/* ==================== ROOT VARIABLES - Easy to modify colors ==================== */
:root {
    --primary-color: #00b4d8;
    --secondary-color: #caf0f8;
    --dark-bg: #023e8a;
    --light-bg: #f8f9fa;
    --text-dark: #03045e;
    --text-light: #ffffff;
    --accent-color: #ff6b6b;
    --accent-secondary: #ffd60a;
    --border-color: #dee2e6;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 24px rgba(0, 180, 216, 0.3);
}

/* ==================== GLOBAL RESET & BASE STYLES ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    color: var(--text-dark);
    line-height: 1.6;
}

/* ==================== CONTAINER - Centers content with max width ==================== */
.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== HEADER SECTION ==================== */
.header {
    background: linear-gradient(135deg, #00b4d8 0%, #0096c7 100%);
    color: var(--text-light);
    padding: 20px 0;
    box-shadow: 0 4px 12px rgba(0, 180, 216, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid var(--accent-color);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

/* Logo Styles */
.logo h1 {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 5px;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.2);
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-image {
    height: 50px;
    width: auto;
    vertical-align: middle;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.2));
}

.tagline {
    font-size: 0.9rem;
    opacity: 0.9;
    font-style: italic;
    color: white;
}

/* Navigation Styles */
.nav {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
    background-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 107, 107, 0.3);
}

/* ==================== MAIN CONTENT AREA ==================== */
.main-content {
    min-height: 100vh;
    padding: 40px 0;
}

/* ==================== HERO SECTION WITH ADS ==================== */
.hero-section-main {
    margin-bottom: 60px;
    opacity: 0;
    animation: fadeIn 0.8s ease-in forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Top Banner Ad */
.ad-banner-top {
    text-align: center;
    margin-bottom: 30px;
    animation: fadeIn 1s ease-in 0.3s forwards;
    opacity: 0;
}

.ad-placeholder {
    display: none !important; /* later need to remove these to put the ads */
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    border: 2px dashed #ccc;
    padding: 30px;
    border-radius: 8px;
    color: #999;
    font-weight: bold;
    font-size: 14px;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-ad {
    min-height: 250px;
}

.small-ad {
    min-height: 100px;
    font-size: 12px;
}

/* Hero Grid Layout */
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr 300px;
    gap: 20px;
    margin-bottom: 20px;
}

.hero-left-column,
.hero-right-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.hero-sidebar-column {
    grid-column: 4;
    grid-row: 1 / 3;
    display: flex;
    flex-direction: column;
    gap: 20px;
    opacity: 0;
    animation: fadeIn 0.8s ease-in 0.7s forwards;
}

.ad-column-bottom {
    margin-top: auto;
}

/* Hero Cards */
.hero-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    opacity: 0;
    animation: fadeIn 0.8s ease-in forwards;
}

.hero-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 180, 216, 0.3);
}

/* Large Center Card */
.hero-large {
    grid-column: 2;
    grid-row: 1 / 3;
    animation-delay: 0.5s;
}

.hero-large .hero-image-wrapper {
    position: relative;
    height: 500px;
    overflow: hidden;
}

.hero-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.hero-large:hover img {
    transform: scale(1.08);
}

/* Side Cards (Left & Right Columns) */
.hero-side-card .hero-image-wrapper-side {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.hero-side-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.hero-side-card:hover img {
    transform: scale(1.08);
}

/* Sidebar Cards */
.hero-sidebar-card .hero-image-wrapper {
    height: 150px;
    position: relative;
    overflow: hidden;
}

.hero-sidebar-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.hero-sidebar-card:hover img {
    transform: scale(1.05);
}

/* Hero Content Styles */
.hero-content {
    padding: 20px;
}

.hero-content-small {
    padding: 12px;
}

.hero-title-large {
    font-size: 2rem;
    font-weight: 700;
    color: #023e8a;
    line-height: 1.3;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #023e8a;
    line-height: 1.4;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sidebar-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #023e8a;
    line-height: 1.3;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-excerpt,
.hero-excerpt-large {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 15px;
}

.hero-excerpt {
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-excerpt-large {
    font-size: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

.date {
    color: #6c757d;
    font-size: 0.85rem;
}

.date-small {
    color: #6c757d;
    font-size: 0.8rem;
}

.read-more-btn {
    display: inline-block;
    background: linear-gradient(135deg, #00b4d8, #0096c7);
    color: white;
    padding: 12px 28px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 180, 216, 0.3);
}

.read-more-btn:hover {
    background: linear-gradient(135deg, #0096c7, #0077b6);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 180, 216, 0.4);
}

/* Bottom Row Cards */
.hero-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    opacity: 0;
    animation: fadeIn 0.8s ease-in 0.8s forwards;
}

.hero-small .hero-image-wrapper {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.hero-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.hero-small:hover img {
    transform: scale(1.08);
}

.hero-title-small {
    font-size: 1rem;
    font-weight: 600;
    color: #023e8a;
    line-height: 1.4;
    margin-bottom: 8px;
}

/* ==================== REGULAR NEWS SECTION ==================== */
.regular-news-section {
    margin: 60px 0 40px 0;
    text-align: center;
}

.section-title {
    font-size: 2.5rem;
    color: var(--dark-bg);
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(0, 180, 216, 0.5);
}

/* ==================== NEWS FEED - Grid layout for news items ==================== */
.news-feed {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

/* ==================== NEWS CARD - YouTube-style card design ==================== */
.news-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease;
    cursor: pointer;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

/* News Card Image Container - YouTube style with 16:9 ratio */
.news-image {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #00b4d8 0%, #0077b6 100%);
}

.news-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover .news-image img {
    transform: scale(1.1);
}

/* News Card Content - YouTube style with compact layout */
.news-content {
    padding: 15px;
}

.news-title {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--dark-bg);
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-excerpt {
    color: #6c757d;
    margin-bottom: 10px;
    line-height: 1.5;
    font-size: 0.88rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* News Card Footer - YouTube style compact footer */
.news-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

.news-date {
    color: #6c757d;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.read-more:hover {
    gap: 10px;
    color: var(--accent-color);
}

/* ==================== LOADING SPINNER - Shows when fetching content ==================== */
.loading-spinner {
    text-align: center;
    padding: 40px 0;
}

.spinner {
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
    box-shadow: 0 2px 8px rgba(0, 180, 216, 0.3);
}

/* Spinner rotation animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner p {
    color: #6c757d;
    font-size: 1.1rem;
}

/* ==================== END OF CONTENT MESSAGE ==================== */
.end-message {
    text-align: center;
    padding: 40px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin: 40px 0;
}

.end-message p {
    font-size: 1.2rem;
    color: #6c757d;
}

/* ==================== FOOTER SECTION ==================== */
.footer {
    background-color: var(--dark-bg);
    color: var(--text-light);
    padding: 30px 0;
    margin-top: 60px;
    text-align: center;
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-links a {
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* ==================== RESPONSIVE DESIGN ==================== */

/* Hide sidebar on medium screens */
@media (max-width: 1200px) {
    .hero-grid {
        grid-template-columns: 1fr 2fr 1fr;
    }
    
    .hero-sidebar-column {
        display: none;
    }
    
    .hero-large .hero-image-wrapper {
        height: 400px;
    }
}

/* Tablet layout */
@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .hero-large {
        grid-column: 1 / 3;
    }
    
    .hero-large .hero-image-wrapper {
        height: 350px;
    }
}

/* Mobile layout */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 20px;
    }
    
    .logo {
        text-align: center;
    }
    
    .logo h1 {
        justify-content: center;
    }
    
    .nav {
        justify-content: center;
    }
    
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .hero-large {
        grid-column: 1;
        grid-row: auto;
    }
    
    .hero-large .hero-image-wrapper {
        height: 280px;
    }
    
    .hero-side-card .hero-image-wrapper-side {
        height: 220px;
    }
    
    .hero-title-large {
        font-size: 1.5rem;
    }
    
    .hero-title {
        font-size: 1.1rem;
    }
    
    .hero-bottom {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .news-feed {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .footer .container {
        flex-direction: column;
    }
}

/* Very small mobile */
@media (max-width: 480px) {
    .logo-image {
        height: 35px;
    }
    
    .hero-title-large {
        font-size: 1.3rem;
    }
    
    .read-more-btn {
        width: 100%;
        text-align: center;
    }
}
