/* Home Page Specific Styles - Mobile First Refactor */

/* HERO SECTION - Mobile First Default */
.hero {
    position: relative;
    height: 60vh;
    /* Mobile height */
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    overflow: hidden;
    padding: 60px 0;
    /* Mobile padding */
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

/* Default background when no database image is set */
.hero-background:not([style*="background-image"]) {
    background-color: #f7fafc;
}

/* Dark text when no background image */
.hero:has(.hero-background:not([style*="background-image"])) {
    color: #2c3e50;
}

.hero:has(.hero-background:not([style*="background-image"])) h1,
.hero:has(.hero-background:not([style*="background-image"])) p {
    text-shadow: none;
}

/* Overlay gradient for database images */
.hero-background[style*="background-image"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(1, 49, 111, 0.75) 0%, rgba(10, 140, 58, 0.65) 100%);
    z-index: 1;
}

/* Ensure content is above the overlay */
.hero-content {
    position: relative;
    z-index: 3;
    max-width: 900px;
    padding: 0 16px;
    /* Mobile padding */
    animation: fadeInUp 1s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1 {
    font-size: 26px;
    /* Mobile size */
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.1;
    text-shadow: 2px 2px 12px rgba(0, 0, 0, 0.1);
}

.hero p {
    font-size: 14px;
    /* Mobile size */
    margin-bottom: 24px;
    line-height: 1.6;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    flex-direction: column;
    /* Mobile stack */
    width: 100%;
}

.hero-buttons .btn {
    width: 100%;
    /* Full width mobile */
    justify-content: center;
    padding: 12px 20px;
    font-size: 14px;
}

/* STATS SECTION - Mobile First */
.stats-section {
    background: linear-gradient(135deg, #01316f 0%, #025ea1 100%);
    color: #fff;
    padding: 30px 16px;
    /* Mobile padding */
}

.stats-container {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    /* Mobile stack */
    gap: 24px;
    text-align: center;
}

.stat-item {
    padding: 20px;
}

.stat-number {
    font-size: 32px;
    /* Mobile size */
    font-weight: 800;
    color: var(--brand-green);
    margin-bottom: 8px;
    display: block;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 500;
}

/* ABOUT SECTION - Mobile First */
.about-section {
    padding: 40px 12px;
    /* Mobile padding */
    background: #f7fafc;
}

.about-container {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    /* Mobile vertical stack */
    gap: 40px;
    align-items: center;
}

.about-image {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    height: 250px;
    /* Mobile height */
    order: -1;
    /* Image first on mobile */
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.about-image:hover img {
    transform: scale(1.05);
}

.about-content h2 {
    font-size: 24px;
    /* Mobile size */
    color: var(--brand-blue);
    margin-bottom: 24px;
    font-weight: 800;
}

.about-content p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 20px;
}

/* FEATURES SECTION - Mobile First */
.features-section {
    padding: 40px 12px;
    /* Mobile padding */
    background: #fff;
}

.features-container {
    max-width: 1280px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 24px;
    /* Mobile size */
    font-weight: 800;
    color: var(--brand-blue);
    margin-bottom: 12px;
    line-height: 1.2;
}

.section-subtitle {
    text-align: center;
    font-size: 14px;
    /* Mobile size */
    color: #666;
    margin-bottom: 32px;
    line-height: 1.6;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    /* Mobile stack */
    gap: 24px;
}

.feature-card {
    padding: 24px 16px;
    /* Mobile padding */
    background: var(--bg-secondary);
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--brand-green);
}

.feature-icon {
    width: 56px;
    /* Mobile size */
    height: 56px;
    background: linear-gradient(135deg, var(--brand-green), #068935);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 24px;
    box-shadow: var(--shadow-md);
}

.feature-card h3 {
    font-size: 18px;
    /* Mobile size */
    color: var(--brand-blue);
    margin-bottom: 16px;
    font-weight: 700;
}

.feature-card p {
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.7;
}

/* EXHIBITIONS SECTION - Mobile First */
.exhibitions-section {
    padding: 40px 12px;
    /* Mobile padding */
    background: var(--bg-secondary);
}

.exhibitions-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    /* Mobile stack */
    gap: 24px;
    margin-top: 60px;
}

.exhibition-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.exhibition-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.exhibition-image {
    height: 200px;
    /* Mobile height */
    overflow: hidden;
}

.exhibition-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.exhibition-card:hover .exhibition-image img {
    transform: scale(1.1);
}

.exhibition-content {
    padding: 20px;
    /* Mobile padding */
}

.exhibition-content h3 {
    font-size: 20px;
    /* Mobile size */
    color: var(--brand-blue);
    margin-bottom: 12px;
    font-weight: 700;
}

.exhibition-content p {
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 20px;
}

.exhibition-link {
    color: var(--brand-green);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: gap 0.3s ease;
}

.exhibition-link:hover {
    gap: 12px;
}

/* CTA SECTION - Mobile First */
.cta-section {
    background: #f7fafc;
    color: #002c77;
    padding: 60px 16px;
    /* Mobile padding */
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
    background-image: url('data:image/svg+xml,%3Csvg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="none" fill-rule="evenodd"%3E%3Cg fill="%23ffffff" fill-opacity="1"%3E%3Cpath d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.cta-content h2,
.cta-section h2 {
    font-size: 28px;
    /* Mobile size */
    margin-bottom: 24px;
    font-weight: 800;
    color: #002c77;
}

.cta-content p,
.cta-section p {
    font-size: 16px;
    margin-bottom: 24px;
    opacity: 0.95;
    color: #4a5568;
    line-height: 1.6;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: white;
    color: #667eea;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.4s;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.cta-button span {
    position: relative;
    z-index: 2;
}

.cta-button svg {
    position: relative;
    z-index: 2;
    transition: transform 0.3s;
}

.cta-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

.cta-button:hover svg {
    transform: translateX(5px);
}

/* Image Utilities found in file */
.featured-news-card-image,
.news-card-image,
.popular-news-card-image,
.news-card-image-last {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.featured-news-card-image img,
.news-card-image img,
.popular-news-card-image img,
.news-card-image-last img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

/* NEWS SECTIONS - Featured, Categories, Popular */

/* Featured News Section - Mobile First */
.featured-news-section {
    padding: 60px 0;
    /* Mobile padding */
    background: #f7fafc;
    position: relative;
    overflow: hidden;
}

.featured-news-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
    background-image: url('data:image/svg+xml,%3Csvg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="none" fill-rule="evenodd"%3E%3Cg fill="%23ffffff" fill-opacity="1"%3E%3Cpath d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
    z-index: 1;
}

.featured-news-section .features-container {
    position: relative;
    z-index: 2;
}

.featured-news-section .section-header {
    text-align: center;
    margin-bottom: 40px;
}

.featured-news-badge {
    display: inline-block;
    background: linear-gradient(135deg, #f56565 0%, #c53030 100%);
    color: white;
    padding: 10px 24px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 20px;
}

.featured-news-section .section-title {
    font-size: 2rem;
    /* Mobile Size */
    margin-bottom: 15px;
    color: #002c77;
}

.featured-news-section .section-subtitle {
    font-size: 1rem;
    /* Mobile Size */
    color: #718096;
    max-width: 700px;
    margin: 0 auto;
}

/* News Category Section - Mobile First */
.news-category-section {
    padding: 60px 0;
    /* Mobile padding */
}

.news-category-section.alt-bg {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.news-category-section.white-bg {
    background: white;
}

.category-section-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 24px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 20px;
}

.news-category-section .section-header {
    text-align: center;
    margin-bottom: 40px;
}

.news-category-section .section-title {
    font-size: 2rem;
    /* Mobile size */
    margin-bottom: 15px;
}

.news-category-section .section-subtitle {
    font-size: 1rem;
    /* Mobile size */
    color: #718096;
    max-width: 700px;
    margin: 0 auto;
}

/* Popular News Section - Mobile First */
.popular-news-section {
    padding: 60px 0;
    background: linear-gradient(135deg, #e0e7ff 0%, #f3e8ff 100%);
}

.popular-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
    color: white;
    padding: 10px 24px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 20px;
}

.popular-news-section .section-header {
    text-align: center;
    margin-bottom: 40px;
}

.popular-news-section .section-title {
    font-size: 2rem;
    /* Mobile size */
    margin-bottom: 15px;
}

.popular-news-section .section-subtitle {
    font-size: 1rem;
    /* Mobile size */
    color: #718096;
    max-width: 700px;
    margin: 0 auto;
}

/* Shared Hero News Card */
.hero-news-card {
    min-height: 300px;
}


/* ========================================
   DESKTOP ENHANCEMENTS (min-width)
   ======================================== */

/* Tablet & Up */
@media (min-width: 768px) {

    /* HERO */
    .hero {
        height: 80vh;
        min-height: 500px;
    }

    .hero h1 {
        font-size: 48px;
    }

    .hero p {
        font-size: 20px;
    }

    .hero-buttons {
        flex-direction: row;
        width: auto;
    }

    .hero-buttons .btn {
        width: auto;
    }

    /* STATS */
    .stats-section {
        padding: 50px 20px;
    }

    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-number {
        font-size: 36px;
    }

    /* SECTIONS PADDING */
    .about-section,
    .features-section,
    .exhibitions-section,
    .cta-section,
    .featured-news-section,
    .news-category-section,
    .popular-news-section {
        padding: 60px 20px;
    }

    .about-image {
        height: 400px;
        order: 0;
        /* Reset order */
    }

    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 30px;
    }

    .section-title {
        font-size: 36px;
    }

    .section-subtitle {
        font-size: 18px;
    }

    /* CTA */
    .cta-button {
        padding: 20px 50px;
        font-size: 1.2rem;
    }

    .cta-section h2,
    .cta-content h2 {
        font-size: 3.5rem;
    }

    .cta-section p,
    .cta-content p {
        font-size: 1.3rem;
    }

    /* NEWS SECTIONS */
    .featured-news-section .section-title,
    .news-category-section .section-title,
    .popular-news-section .section-title {
        font-size: 3rem;
    }

    .featured-news-section .section-subtitle,
    .news-category-section .section-subtitle,
    .popular-news-section .section-subtitle {
        font-size: 1.2rem;
    }
}

/* Desktop & Up */
@media (min-width: 1024px) {

    /* HERO */
    .hero {
        height: 90vh;
        min-height: 600px;
    }

    .hero h1 {
        font-size: 56px;
    }

    .hero p {
        font-size: 22px;
    }

    /* STATS */
    .stats-section {
        padding: 60px 24px;
    }

    .stats-container {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 48px;
    }

    .stat-number {
        font-size: 48px;
    }

    /* ABOUT */
    .about-section {
        padding: 80px 24px;
    }

    .about-container {
        grid-template-columns: 1fr 1fr;
        gap: 60px;
    }

    .about-image img {
        height: 500px;
    }

    .about-content h2 {
        font-size: 40px;
    }

    .about-content p {
        font-size: 18px;
    }

    /* FEATURES */
    .features-section {
        padding: 80px 24px;
    }

    .section-title {
        font-size: 44px;
    }

    .section-subtitle {
        font-size: 20px;
    }

    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 40px;
    }

    .feature-card {
        padding: 40px 32px;
    }

    .feature-icon {
        width: 80px;
        height: 80px;
        font-size: 36px;
    }

    .feature-card h3 {
        font-size: 22px;
    }

    .feature-card p {
        font-size: 16px;
    }

    /* EXHIBITIONS */
    .exhibitions-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 32px;
    }

    .exhibition-image {
        height: 250px;
    }

    .exhibition-content {
        padding: 28px;
    }

    .exhibition-content h3 {
        font-size: 22px;
    }

    /* CTA */
    .cta-section {
        padding: 120px 0;
    }

    .cta-content h2 {
        font-size: 42px;
    }

    .cta-content p {
        font-size: 20px;
    }

    .hero-news-card {
        min-height: 450px;
    }

    /* NEWS */
    .featured-news-section,
    .news-category-section,
    .popular-news-section {
        padding: 100px 0;
    }
}

/* Large Desktop */
@media (min-width: 1440px) {
    .hero h1 {
        font-size: 64px;
    }

    .hero p {
        font-size: 24px;
    }

    .section-title {
        font-size: 48px;
    }

    .section-subtitle {
        font-size: 22px;
    }

    .about-content h2 {
        font-size: 44px;
    }

    .feature-card h3 {
        font-size: 24px;
    }

    .feature-card p {
        font-size: 17px;
    }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        height: auto;
        min-height: 400px;
        padding: 60px 0;
    }

    .hero h1 {
        font-size: 28px;
    }

    .stats-section,
    .about-section,
    .features-section {
        padding: 30px 16px;
    }
}