/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f8f8f8;
    color: #333;
}

/* Header Section */
.header {
    background: url('header-bg.jpg') no-repeat center center;
    background-size: cover;
    height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 36px;
    font-weight: bold;
}

/* News Recommendation Section */
.news-recommendation-section {
    padding: 30px;
    background-color: #fff;
    text-align: center;
}

.news-recommendation-section h2 {
    margin-bottom: 20px;
    font-size: 24px;
    color: #555;
}

.news-recommendation-carousel {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.news-card {
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: 220px;
    text-align: center;
}

.news-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.news-card p {
    padding: 10px;
    font-size: 14px;
    color: #444;
}

/* Main News List */
.main-news-list {
    max-width: 90%;
    margin: 30px auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.news-item {
    display: flex;
    gap: 25px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
}

.news-item img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
}

.news-item h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #333;
}

.news-item p {
    font-size: 14px;
    color: #666;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin: 20px;
    gap: 10px;
}

.pagination a {
    text-decoration: none;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #007bff;
    background-color: #fff;
    font-size: 14px;
}

.pagination a:hover {
    background-color: #007bff;
    color: #fff;
}

.pagination a.active {
    background-color: #007bff;
    color: #fff;
    font-weight: bold;
}



/* Hover effects and zoom animations */

/* Ensure container hides overflow during zoom */
.news-item {
    overflow: hidden;
    position: relative;
    border: 1px solid #ddd;
    border-radius: 8px;
    transition: transform 0.3s ease; /* Smooth zoom effect */
    cursor: pointer;
}

/* Slight zoom effect on hover */
.news-item:hover {
    transform: scale(1.05); /* Zoom the entire card */
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.2); /* Shadow for hover effect */
}

/* Ensure image fills the container */
.news-item img {
    width: 100%;
    height: auto;
    transition: transform 0.3s ease; /* Smooth zoom on image */
}

/* Zoom image further on hover */
.news-item:hover img {
    transform: scale(1.1); /* Slightly zoom the image */
}

/* Overlay effect on hover */
.news-item::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0); /* No overlay by default */
    transition: background 0.3s ease;
    z-index: 1;
}

.news-item:hover::after {
    background: rgba(0, 0, 0, 0.1); /* Light overlay on hover */
}

        /* Mobile styles */
        @media (max-width: 768px) {
            .flashing-moving-text {
                font-size: 14px !important; /* Smaller font size for mobile */
                animation: flashAndMoveMobile 3s infinite; /* Adjusted animation for mobile */
            }

            /* Adjusted animation for mobile */
            @keyframes flashAndMoveMobile {
                0%, 100% {
                    opacity: 1;
                    transform: translateX(0);
                }
                50% {
                    opacity: 0.5;
                    transform: translateX(10px); /* Smaller movement for mobile */
                }
            }
        }

        /* Extra small devices (phones) */
        @media (max-width: 480px) {
            .flashing-moving-text {
                font-size: 12px !important; /* Even smaller font size for very small screens */
            }
        }