/* ========================================
   FLDM - Comprehensive Responsive Styles
   Fluid Typography & All Device Support
   ======================================== */

/* ========== Fluid Typography Base ========== */
/* Using clamp() for smooth scaling across all viewports */

/* Hero Title - Fluid scaling from 320px to 1920px */
.hero-title {
    font-size: clamp(1.25rem, 4vw + 0.5rem, 3rem) !important;
    line-height: 1.2 !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Hero Subtitle - Fluid scaling */
.hero-subtitle {
    font-size: clamp(0.9rem, 2vw + 0.4rem, 1.5rem) !important;
    line-height: 1.4 !important;
}

/* Section Titles - Fluid scaling */
.section-title h2 {
    font-size: clamp(1.5rem, 3vw + 0.5rem, 2.5rem) !important;
}

/* ========== Extra Large Screens (1920px+) ========== */
@media (min-width: 1920px) {
    .hero-title {
        font-size: 3.5rem !important;
    }

    .hero-subtitle {
        font-size: 1.75rem !important;
    }

    .section-title h2 {
        font-size: 3rem !important;
    }

    .hero-section {
        min-height: 90vh !important;
    }

    .hero-section.home-hero {
        min-height: 95vh !important;
    }
}

/* ========== Large Screens (1200px - 1919px) ========== */
@media (min-width: 1200px) and (max-width: 1919px) {
    .hero-title {
        font-size: 2.75rem !important;
    }

    .hero-subtitle {
        font-size: 1.5rem !important;
    }

    .section-title h2 {
        font-size: 2.5rem !important;
    }
}

/* ========== Medium Screens / Tablets (992px - 1199px) ========== */
@media (min-width: 992px) and (max-width: 1199px) {
    .hero-title {
        font-size: 2.5rem !important;
    }

    .hero-subtitle {
        font-size: 1.3rem !important;
    }

    .section-title h2 {
        font-size: 2.25rem !important;
    }
}

/* ========== Small Tablets / Large Phones (768px - 991px) ========== */
@media (min-width: 768px) and (max-width: 991px) {
    .hero-title {
        font-size: 2rem !important;
        margin-top: 4rem !important;
    }

    .hero-subtitle {
        font-size: 1.15rem !important;
    }

    .hero-section {
        min-height: 400px !important;
    }

    .hero-section.home-hero {
        height: 70vh !important;
        min-height: 500px !important;
    }

    .section-title h2 {
        font-size: 2rem !important;
    }

    /* Page/News Hero */
    .page-hero,
    .news-hero,
    .events-hero {
        min-height: 180px !important;
        height: auto !important;
    }

    .page-hero .hero-title,
    .news-hero .hero-title,
    .events-hero .hero-title {
        font-size: 1.5rem !important;
        margin-top: 2rem !important;
    }
}

/* ========== Mobile Devices (576px - 767px) ========== */
@media (min-width: 576px) and (max-width: 767px) {
    .hero-title {
        font-size: 1.75rem !important;
        margin-top: 5rem !important;
        padding: 0 1rem;
    }

    .hero-subtitle {
        font-size: 1rem !important;
        padding: 0 1rem;
    }

    .hero-section {
        height: auto !important;
        min-height: 250px !important;
        width: 100%;
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }


    .hero-section.home-hero {
        height: auto !important;
        min-height: 480px !important;
    }



    .hero-background {
        background-position: center center !important;
    }

    .page-hero,
    .news-hero,
    .events-hero {
        min-height: 150px !important;
        height: 150px !important;
    }

    .page-hero .hero-title,
    .news-hero .hero-title,
    .events-hero .hero-title {
        font-size: 1.15rem !important;
        margin-top: 1rem !important;
    }


    .section-title h2 {
        font-size: 1.75rem !important;
    }

    /* News/Events detail page hero */
    .hero-section[style*="min-height: 400px"] {
        min-height: 250px !important;
    }

    .hero-section[style*="min-height: 400px"] .hero-title {
        font-size: 1.5rem !important;
        margin-top: 0 !important;
    }
}

/* ========== Small Mobile Devices (480px - 575px) ========== */
@media (min-width: 480px) and (max-width: 575px) {
    .hero-title {
        font-size: 1.5rem !important;
        margin-top: 5rem !important;
        padding: 0 0.75rem;
    }

    .hero-subtitle {
        font-size: 0.95rem !important;
        padding: 0 0.75rem;
    }

    .hero-section {
        height: auto !important;
        min-height: 220px !important;
        padding-top: 0.75rem !important;
        padding-bottom: 1rem !important;
    }


    .hero-section.home-hero {
        height: auto !important;
        min-height: 440px !important;
    }



    .page-hero,
    .news-hero,
    .events-hero {
        min-height: 130px !important;
        height: 130px !important;
    }

    .page-hero .hero-title,
    .news-hero .hero-title,
    .events-hero .hero-title {
        font-size: 1rem !important;
        margin-top: 1rem !important;
    }


    .section-title h2 {
        font-size: 1.5rem !important;
    }
}

/* ========== Extra Small Mobile (320px - 479px) ========== */
@media (max-width: 479px) {
    .hero-title {
        font-size: 1.15rem !important;
        margin-top: 1.25rem !important;

        padding: 0 0.5rem;
        letter-spacing: -0.02em;
    }

    .hero-subtitle {
        font-size: 0.875rem !important;
        padding: 0 0.5rem;
    }

    .hero-section {
        height: auto !important;
        min-height: 200px !important;
        padding-top: 0.5rem !important;
        padding-bottom: 0.75rem !important;
    }


    .hero-section.home-hero {
        height: auto !important;
        min-height: 420px !important;
    }



    .page-hero,
    .news-hero,
    .events-hero {
        min-height: 110px !important;
        height: 110px !important;
    }

    .page-hero .hero-title,
    .news-hero .hero-title,
    .events-hero .hero-title {
        font-size: 0.95rem !important;
        margin-top: 0.75rem !important;
    }


    .section-title h2 {
        font-size: 1.35rem !important;
    }

    /* News/Events detail page hero */
    .hero-section[style*="min-height: 400px"] {
        min-height: 180px !important;
    }

    .hero-section[style*="min-height: 400px"] .hero-title {
        font-size: 1.15rem !important;
        margin-top: 0 !important;
    }

    .hero-section[style*="min-height: 400px"] .badge {
        font-size: 0.7rem !important;
        padding: 0.2rem 0.4rem !important;
    }

    .hero-section[style*="min-height: 400px"] .text-white-50 {
        font-size: 0.8rem !important;
        gap: 0.75rem !important;
    }
}

/* ========== Very Small Devices (below 320px) ========== */
@media (max-width: 319px) {
    .hero-title {
        font-size: 1rem !important;
        margin-top: 4rem !important;
        padding: 0 0.25rem;
    }

    .hero-subtitle {
        font-size: 0.75rem !important;
    }

    .page-hero .hero-title,
    .news-hero .hero-title,
    .events-hero .hero-title {
        font-size: 0.875rem !important;
    }

    .section-title h2 {
        font-size: 1.2rem !important;
    }
}

/* ========== Common Mobile Styles (max-width: 767px) ========== */
@media (max-width: 767px) {
    /* Section Padding */
    .section {
        padding: 40px 0 !important;
    }

    /* Stats Section - Smaller on mobile */
    .stats-section {
        padding: 1.5rem 0 !important;
    }

    .stat-number {
        font-size: clamp(1.5rem, 4vw, 2rem) !important;
    }

    .stat-label {
        font-size: clamp(0.75rem, 2vw, 0.9rem) !important;
    }

    .stat-item {
        margin-bottom: 0.5rem;
    }

    /* CTA Section - Smaller on mobile */
    .section h2[style*="2.5rem"] {
        font-size: clamp(1.25rem, 4vw, 1.75rem) !important;
    }

    .section p[style*="1.2rem"] {
        font-size: clamp(0.9rem, 2.5vw, 1.1rem) !important;
    }

    /* News Filters - Horizontal Scroll */
    .news-filters-wrapper {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 20px;
    }

    .news-filters-wrapper .btn-group {
        display: inline-flex;
    }

    /* Newsletter */
    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-form input {
        margin-bottom: 10px;
        width: 100%;
    }

    .newsletter-form button {
        width: 100%;
    }

    /* Footer - Minimal on mobile */
    .footer {
        text-align: center;
        padding: 15px 0 !important;
    }

    .footer-title {
        display: none;
    }

    .footer .col-lg-4,
    .footer .col-lg-2,
    .footer .col-lg-3 {
        margin-bottom: 0;
    }

    .social-icons {
        justify-content: center;
    }

    .footer-contact li {
        justify-content: center;
    }

    .footer-bottom {
        margin-top: 0 !important;
        padding-top: 0 !important;
        border: none !important;
    }
}

/* ========== Extra Small Devices - Additional (max-width: 575px) ========== */
@media (max-width: 575px) {
    .navbar-brand img {
        height: 40px;
    }

    .hero-cta {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-top: 2rem;
        padding: 0 1rem;
    }

    .hero-cta button,
    .hero-cta .btn {
        width: 100%;
        margin: 0 !important;
        padding: 0.75rem 1.5rem !important;
        font-size: 0.9rem !important;
    }

    /* Small Service Cards Mobile Optimization */
    .small-card {
        padding: 1rem !important;
        min-height: 160px;
    }

    .service-icon-small {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
        margin-bottom: 1rem;
        border-radius: 12px;
    }

    .service-title-small {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }

    .service-arrow-small {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
        opacity: 1 !important;
        transform: translateY(0) !important;
    }
}

/* ========== Landscape Mode Adjustments ========== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        min-height: 100vh !important;
    }

    .hero-title {
        font-size: clamp(1.25rem, 5vh, 2rem) !important;
        margin-top: 3rem !important;
    }

    .hero-subtitle {
        font-size: clamp(0.85rem, 3vh, 1.1rem) !important;
    }

    .hero-cta {
        margin-top: 1rem !important;
    }

    .page-hero,
    .news-hero,
    .events-hero {
        min-height: 80px !important;
        height: 80px !important;
    }

    .page-hero .hero-title,
    .news-hero .hero-title,
    .events-hero .hero-title {
        font-size: 1rem !important;
        margin-top: 1rem !important;
    }
}

/* ========== High DPI / Retina Displays ========== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-title,
    .hero-subtitle,
    .section-title h2 {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* ========== Print Styles ========== */
@media print {
    .hero-title {
        font-size: 24pt !important;
        color: #000 !important;
        text-shadow: none !important;
    }

    .hero-subtitle {
        font-size: 14pt !important;
        color: #333 !important;
    }

    .section-title h2 {
        font-size: 18pt !important;
    }
}
