/* ==========================================
   Large Devices (≤1200px)
========================================== */

@media (max-width:1200px) {

    :root {
        --container: 1100px;
    }

    .hero h1 {
        font-size: 54px;
    }

    .hero h2 {
        font-size: 32px;
    }

    .features h2,
    .benefits h2,
    .stats h2,
    .download h2 {
        font-size: 34px;
    }

}

/* ==========================================
   Tablets (≤992px)
========================================== */

@media (max-width:992px) {

    .container {
        width: min(1180px, calc(100% - 20px));
    }

    .mobile-btn {
        display: block;
        padding: 8px 10px;
        flex-shrink: 0;
    }

    .nav-links {
        position: fixed;
        top: calc(var(--news-bar-height) + var(--header-height) - 1px);
        right: 0;
        left: 0;
        width: 100%;
        height: calc(100vh - var(--news-bar-height) - var(--header-height) + 1px);
        background: #fff;
        flex-direction: column;
        gap: 0;
        padding: 0;
        display: flex;
        overflow-y: auto;
        box-shadow: 0 12px 25px rgba(0, 0, 0, .08);
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.35s ease, opacity 0.35s ease;
        z-index: 1000;
    }

    .nav-links.active {
        right: 0;
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    /* Dropdown menus inside the mobile nav collapse/expand cleanly */
    .nav-links .dropdown .dropdown-menu {
        position: static;
        margin-top: 0;
        box-shadow: none;
        transform: none;
        opacity: 1;
        visibility: visible;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease;
    }

    .nav-links .dropdown.open .dropdown-menu {
        max-height: 1000px;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 16px 24px;
        border-bottom: 1px solid #eee;
    }

    .nav-links a.active::after {
        display: none;
    }

    .welcome {
        padding: var(--section-spacing) 20px;
    }

    .welcome .hero-content {
        max-width: 100%;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        order: 2;
    }

    .hero-image {
        order: 1;
        max-width: 520px;
        margin: auto;
    }

    .hero p {
        margin: auto auto 30px;
    }

    .hero-features {
        max-width: 600px;
        margin: 0 auto 40px;
    }

    .store-buttons {
        justify-content: center;
    }

    .download-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .download .store-buttons {
        justify-content: center;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

}

/* ==========================================
   Mobile Navigation
========================================== */

@media (max-width:768px) {

    :root {
        --section-spacing: 50px;
        --header-height: 82px;
    }

    .navbar {
        min-height: 82px;
        position: relative;
    }

    /* Anchor the home-page menu to the navbar itself, avoiding any offset
       caused by the fixed news/header height variables. */
    .navbar .nav-links {
        position: absolute;
        top: 100%;
        left: 50%;
        right: auto;
        width: 100vw;
        height: calc(100dvh - var(--news-bar-height) - var(--header-height));
        margin-left: -50vw;
    }

    .logo {
        flex: 1;
        min-width: 0;
        gap: 10px;
    }

    .logo img {
        width: 90px;
        flex-shrink: 0;
    }

    .logo h2 {
        font-size: 1.2rem;
        line-height: 1.15;
    }

    .logo small {
        display: block;
        font-size: 0.68rem;
        line-height: 1.15;
        white-space: nowrap;
    }

    .hero {
        padding: 0;
        min-height: auto;
    }

    .hero-carousel .hero-slide {
        min-height: 430px;
        padding: 16px 20px;
    }

    .hero-caption {
        max-width: 100%;
    }

    /* Keep the slide indicators below longer hero copy on phones. */
    .hero-carousel-controls {
        bottom: 20px;
    }

    .hero-image {
        min-height: 300px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .welcome {
        padding: var(--section-spacing) 16px;
        margin: 24px 0 32px;
    }

    .welcome .container {
        display: flex;
        flex-direction: column-reverse;
        gap: 28px;
    }

    .stats-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .welcome-image img {
        min-height: 280px;
        max-height: 380px;
    }

    .stats-image img {
        min-height: 280px;
        max-height: 380px;
    }

    .welcome .hero-content {
        text-align: center;
    }

    .tagline {
        font-size: 1.35rem;
        padding: 7px 14px;
        margin-bottom: 14px;
    }

    .hero h1 {
        font-size: 48px;
        line-height: 1.05;
    }

    .hero h2 {
        font-size: 28px;
    }

    .hero h3 {
        font-size: 1.4rem;
        margin-top: 12px;
        margin-bottom: 16px;
    }

    .hero p {
        font-size: 0.95rem;
        margin-bottom: 34px;
    }

    .hero-icons {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
        margin-top: 30px;
        margin-bottom: 24px;
    }

    .hero-icons div {
        padding: 18px 10px;
    }

    .features,
    .benefits,
    .stats,
    .download {
        padding: var(--section-spacing) 0;
    }

    .download {
        margin: 32px 0;
    }

    .section-title,
    .features-header h2,
    .download-box h2 {
        font-size: 1.5rem;
    }

    .section-title {
        text-align: center;
    }

    .hero-features {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .download-grid {
        padding: 30px 20px;
    }

}

/* ==========================================
   Small Phones
========================================== */

@media (max-width:576px) {

    .container {
        width: min(1180px, calc(100% - 16px));
    }

    .header .container {
        height: 82px;
    }

    .logo img {
        width: 90px;
    }

    .logo h2 {
        font-size: 20px;
    }

    .logo small {
        display: block;
        font-size: 0.6rem;
        line-height: 1.15;
        white-space: nowrap;
    }

    .hero {
        padding: 0;
    }

    .hero-carousel .hero-slide {
        min-height: 360px;
        padding: 12px 16px;
    }

    .hero-caption {
        max-width: 100%;
    }

    .hero-carousel-controls {
        bottom: 16px;
    }

    .hero h1 {
        font-size: 1.9rem;
        line-height: 1.2;
    }

    .hero h3 {
        font-size: 1.05rem;
    }

    .hero h2 {
        font-size: 24px;
        line-height: 1.35;
    }

    .hero p {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .hero-btn {
        padding: 10px 18px;
        font-size: 0.95rem;
    }

    .hero-carousel .owl-nav {
        left: 12px;
        right: 12px;
        bottom: 16px;
        gap: 8px;
    }

    .hero-carousel .owl-nav button {
        width: 40px;
        height: 40px;
    }

    .welcome {
        padding: var(--section-spacing) 16px;
        font-size: 14px;
        margin: 16px 0 24px;
    }

    .hero-icons {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .hero-features div {
        font-size: 15px;
    }

    .store-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .store-buttons img {
        height: 48px;
    }

    .card,
    .benefit-card {
        padding: 30px 22px;
    }

    .card i {
        width: 70px;
        height: 70px;
        font-size: 28px;
    }

    .card h3,
    .benefit-card h3 {
        font-size: 21px;
    }

    .stats-grid h3 {
        font-size: 42px;
    }

    .download-grid {
        border-radius: 18px;
    }

    .download {
        margin: 24px 0;
    }

    .section-title,
    .features-header h2,
    .download-box h2 {
        font-size: 1.35rem;
    }

    #newsletter {
        width: 100%;
    }

    #newsletter input,
    #newsletter button {
        width: 100%;
    }

    .socials {
        justify-content: center;
    }

    .copyright {
        font-size: 13px;
    }

}

/* ==========================================
   Extra Small Phones
========================================== */

@media (max-width:380px) {

    .hero h1 {
        font-size: 34px;
    }

    .hero h2 {
        font-size: 21px;
    }

    .section-title,
    .features-header h2,
    .download-box h2 {
        font-size: 1.2rem;
    }

    .welcome {
        margin: 12px 0 20px;
    }

    .download {
        margin: 20px 0;
    }

    .card,
    .benefit-card {
        padding: 25px 18px;
    }

    .download-grid {
        padding: 25px 15px;
    }

}

/* Keep the download banner compact on phones without affecting the image fit. */
@media (max-width:768px) {
    .download {
        padding: 10px 0;
        margin: 12px 0;
    }
}
