/* ============================================================
   MedBe Pharmacy – Mobile & Tablet Responsive Stylesheet
   ALL desktop styles are in style.css and left untouched.
   This file only applies styles inside breakpoints.
   ============================================================ */

/* ============================================================
   HAMBURGER MENU – mobile nav
   ============================================================ */

/* Button hidden on desktop */
.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1100;
}

.nav-hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease;
    transform-origin: center;
}

/* X state when open */
.nav-hamburger.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
    background: var(--medbe-green);
}

.nav-hamburger.is-open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.nav-hamburger.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
    background: var(--medbe-green);
}

/* Mobile dropdown overlay */
.nav-mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.97);
    z-index: 1050;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-mobile-menu.is-open {
    display: flex;
    opacity: 1;
}

.nav-mobile-menu a {
    display: block;
    width: 100%;
    text-align: center;
    padding: 20px 0;
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--white);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-mobile-menu a:first-child {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-mobile-menu a:hover,
.nav-mobile-menu a.active {
    color: var(--medbe-green);
    background: rgba(96, 172, 56, 0.06);
}

/* ============================================================
   TABLET – max-width: 1024px
   ============================================================ */
@media (max-width: 1024px) {

    /* Nav: show hamburger */
    .nav-hamburger {
        display: flex;
    }

    .nav-links {
        display: none !important;
    }

    /* Hero: single column */
    .hero .container {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: left;
    }

    .hero-visuals-6 {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 12px;
    }

    .hero-card-sm {
        width: calc(50% - 8px) !important;
    }

    /* About: stack */
    .about-preview .container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    /* Services: 2-col */
    .services-grid-3 {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .service-card-wide {
        grid-column: auto !important;
    }

    /* Features: 2-col */
    .features-grid-3 {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Values: 3-col */
    .values-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Delivery & Support: stack */
    .delivery-grid,
    .support-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* ============================================================
   TABLET – max-width: 992px
   ============================================================ */
@media (max-width: 992px) {
    .home-delivery-wrapper {
        grid-template-columns: 1fr !important;
    }

    .steps-grid {
        grid-template-columns: 1fr !important;
    }

    .delivery-features {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ============================================================
   MOBILE – max-width: 768px
   ============================================================ */
@media (max-width: 768px) {

    /* === Mascot Reordering === */
    .home-delivery-wrapper {
        display: flex !important;
        flex-direction: column !important;
        gap: 40px !important;
    }

    .home-delivery-wrapper .home-delivery-left,
    .home-delivery-wrapper .home-delivery-right {
        display: contents !important;
    }

    .home-delivery-wrapper .section-header {
        order: 1;
        margin-bottom: 0 !important;
    }

    .delivery-mascot {
        order: 2;
        margin-bottom: 0 !important;
    }

    .delivery-features {
        order: 3;
    }

    .home-delivery-wrapper .coverage-highlight {
        order: 4;
        margin: 0 auto !important;
    }

    .how-it-works-section {
        order: 5;
    }

    .visit-store-card {
        order: 6;
    }

    /* === Global === */
    :root {
        --section-padding: 60px 0;
    }

    p {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    /* === Navbar === */
    .navbar {
        padding: 14px 0;
    }

    /* === Hero === */
    .hero {
        min-height: auto;
        padding: 100px 0 60px;
        height: auto;
    }

    .hero .container {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: left;
    }

    .hero-tagline {
        font-size: 0.85rem;
        letter-spacing: 0.5px;
        margin-bottom: 16px;
    }

    .hero-title {
        font-size: 36px !important;
        line-height: 1.15;
        margin-bottom: 12px !important;
    }

    .hero-sub {
        font-size: 1rem;
        margin-bottom: 18px;
    }

    .hero-description {
        font-size: 0.95rem;
        max-width: 100%;
        margin-bottom: 24px !important;
        line-height: 1.7;
    }

    .hero-buttons {
        flex-wrap: wrap;
        gap: 12px;
    }

    /* Hero cards: full-width vertical stack */
    .hero-visuals-6 {
        flex-direction: column;
        width: 100%;
        gap: 16px;
    }

    .hero-col-a,
    .hero-col-b {
        display: flex;
        flex-direction: column;
        gap: 16px;
        margin-top: 0 !important;
        width: 100%;
    }

    .hero-card-sm {
        width: 100% !important;
        animation: none !important;
        /* disable floating for perf */
        padding: 14px 18px;
    }

    /* Simple fade instead of float */
    .hero-card-sm.is-animated {
        opacity: 1 !important;
        transform: none !important;
    }

    /* === About === */
    .about-preview .container {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .about-image-wrapper {
        min-height: auto;
    }

    .about-brand-content {
        padding: 28px 24px;
    }

    .about-content h2 {
        font-size: 26px;
        margin-bottom: 16px;
    }

    .nap-info {
        padding: 16px 18px;
        margin: 20px 0;
    }

    /* === Section Headers === */
    .section-header h2 {
        font-size: 26px;
    }

    .section-header {
        margin-bottom: 40px;
    }

    /* === Services === */
    .services-grid,
    .services-grid-3 {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    .service-card {
        padding: 28px 22px;
    }

    .service-icon {
        width: 52px;
        height: 52px;
    }

    .delivery-features {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }

    .steps-grid {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }

    /* === Features / Why Choose === */
    .features-grid,
    .features-grid-3 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px;
    }

    .feature-icon svg {
        width: 34px;
        height: 34px;
    }

    /* === Core Values === */
    .values-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .value-card {
        padding: 28px 18px 24px;
    }

    /* === Delivery === */
    .delivery-text h2 {
        font-size: 26px;
    }

    .delivery-icons {
        gap: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .delivery-arrow {
        font-size: 1.2rem;
    }

    /* === Support === */
    .support-text h2 {
        font-size: 26px;
    }

    .support-grid {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: center;
    }

    .support-icon-col {
        justify-content: center;
    }

    /* === CTA === */
    .cta-content h2 {
        font-size: 28px;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    /* === Buttons === */
    .btn {
        min-height: 48px;
        padding: 13px 24px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 0.95rem;
    }

    /* === Parallax === */
    .parallax-section {
        padding: 80px 0;
    }

    .parallax-content h2 {
        font-size: 2rem;
    }

    .parallax-content p {
        font-size: 1.1rem;
    }

    /* === Disable heavy animations === */
    .animate-slide-left,
    .animate-slide-right {
        transform: translateY(30px) !important;
    }

    /* Turn float animations off for perf */
    @keyframes float {

        0%,
        100% {
            transform: none;
        }
    }

    @keyframes float-delayed {

        0%,
        100% {
            transform: none;
        }
    }
}

/* ============================================================
   SMALL MOBILE – max-width: 480px
   ============================================================ */
@media (max-width: 480px) {

    .container {
        padding: 0 1.2rem;
    }

    .hero-title {
        font-size: 30px !important;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
        text-align: center;
    }

    /* Hero cards: full-width, no two columns */
    .hero-visuals-6 {
        display: flex;
        flex-direction: column;
    }

    .hero-col-a,
    .hero-col-b {
        width: 100%;
    }

    /* Features: 1 col */
    .features-grid,
    .features-grid-3 {
        grid-template-columns: 1fr !important;
    }

    /* Values: 1 col */
    .values-grid {
        grid-template-columns: 1fr;
    }

    /* Services already 1-col */

    .section-header h2 {
        font-size: 22px;
    }

    .about-content h2,
    .delivery-text h2,
    .support-text h2 {
        font-size: 22px;
    }

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

    .parallax-content h2 {
        font-size: 1.6rem;
    }

    /* Mission sequence: wrap naturally */
    .mission-sequence {
        gap: 8px;
    }

    .mission-seq-arrow {
        font-size: 1rem;
        padding-bottom: 12px;
    }

    /* Nav mobile menu font */
    .nav-mobile-menu a {
        font-size: 1.2rem;
        padding: 18px 0;
    }
}

/* ============================================================
   ABOUT PAGE + OTHER INNER PAGES
   ============================================================ */
@media (max-width: 768px) {

    /* story.html grid stacking */
    .story-grid,
    .ambassador-grid {
        grid-template-columns: 1fr !important;
        gap: 40px;
    }

    .hexagon-cluster {
        height: auto;
        display: flex;
        flex-direction: column;
        gap: 20px;
        align-items: center;
        transform: none;
        margin-top: 40px;
    }

    .hex {
        position: static;
        top: auto;
        bottom: auto;
        left: auto;
        right: auto;
        transform: none;
        animation: none;
    }

    .ambassador-image-placeholder {
        min-height: 300px;
    }

    /* about.html grid stacking */
    .about-grid {
        grid-template-columns: 1fr !important;
        gap: 32px;
    }

    .about-image-placeholder {
        min-height: 180px;
        font-size: 0.9rem;
    }

    /* inner-header sizing */
    .inner-header h1 {
        font-size: 28px;
    }

    .inner-header p {
        font-size: 0.95rem;
    }

    /* footer grid: 2-col on tablet, 1-col on mobile */
    .footer-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 32px;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr !important;
    }

    .inner-header h1 {
        font-size: 22px;
    }

    /* Hide complex hexagon cluster on the smallest screens to save space */
    .hexagon-cluster {
        display: none;
    }
}