/* mobile.css - Mobile specific styles for TherapieMaroc.online */

@media (max-width: 768px) {

    /* Variables & Base */
    body {
        font-size: 16px;
    }

    .container {
        padding-inline: 16px;
        width: 100%;
    }

    .section {
        padding-block: 2.5rem;
    }

    /* 1. Header & Navigation */
    .site-header {
        height: 60px;
        display: flex;
        align-items: center;
        position: sticky;
        top: 0;
        z-index: 2000;
    }

    .header-inner {
        min-height: 60px;
        height: 60px;
        padding-block: 0;
    }

    .brand img {
        height: 32px;
        width: auto;
    }

    .menu-toggle {
        display: flex !important;
        z-index: 3000;
        /* Stays above overlay */
        background: transparent;
        border: none;
        position: relative;
    }

    /* Close icon transformation when active */
    .menu-toggle[aria-expanded="true"] span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .menu-toggle[aria-expanded="true"] span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle[aria-expanded="true"] span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .menu-toggle span {
        transition: all 0.3s ease;
    }

    /* Full-screen overlay menu */
    .mobile-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: #f3f6f4;
        z-index: 2500;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        display: flex;
        flex-direction: column;
        padding: 100px 24px 40px;
        overflow-y: auto;
    }

    .mobile-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .mobile-overlay ul {
        list-style: none;
        padding: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        gap: 1.8rem;
        align-items: center;
    }

    .mobile-overlay a {
        font-size: 1.35rem;
        font-weight: 700;
        text-decoration: none;
        color: #19352c;
    }

    .mobile-overlay .header-actions {
        margin-top: 3rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        width: 100%;
    }

    .mobile-overlay .header-actions .btn {
        width: 100%;
        min-height: 54px;
        border-radius: 8px;
        font-size: 1.1rem;
    }

    .mobile-overlay .header-actions .lang-switch {
        font-size: 1.1rem;
        padding: 0.6rem 2.5rem;
    }

    /* Hide desktop nav elements securely */
    .site-header .primary-nav,
    .site-header .header-actions:not(.mobile-overlay .header-actions) {
        display: none !important;
    }

    /* 2. Hero Section */
    .hero {
        padding-top: 60px;
        padding-bottom: 2rem;
        min-height: auto;
        background: var(--bg);
        /* Override any overlapping bg */
    }

    .hero-container {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    .hero-content {
        order: 1;
        padding: 0;
    }

    .hero-visual {
        order: 2;
        margin-top: 1rem;
    }

    .hero h1 {
        font-size: 26px !important;
        line-height: 1.3;
    }

    .hero-copy {
        font-size: 16px;
        margin-top: 1.2rem;
    }

    .hero-cta {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        margin-top: 1.5rem;
        width: 100%;
    }

    .hero-cta .btn {
        width: 100%;
        border-radius: 8px;
        min-height: 52px;
        margin: 0;
    }

    .hero-trust {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.2rem 1rem;
        padding-top: 1.5rem;
        border-top: 1px solid rgba(0, 0, 0, 0.08);
    }

    .hero-trust li {
        background: transparent;
        padding: 0;
        box-shadow: none;
        text-align: center;
    }

    .hero-image-wrapper {
        border-radius: 12px;
        transform: none !important;
    }

    .hero-image-wrapper:hover {
        transform: none !important;
    }

    /* 3. Symptoms Section */
    .symptoms-list {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
    }

    .symptoms-list li {
        background: #fefefe !important;
        border: none !important;
        border-left: 4px solid var(--primary) !important;
        border-radius: 12px !important;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06) !important;
        padding: 18px !important;
        margin: 0 !important;
        color: var(--text) !important;
        font-size: 15px !important;
    }

    .section-dark-glass .symptoms-list li {
        background: rgba(255, 255, 255, 0.08) !important;
        color: #fff !important;
        border-left-color: #4ade80 !important;
    }

    /* 4. Services Cards */
    .cards-3 {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.5rem !important;
    }

    .card {
        border-radius: 12px !important;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08) !important;
        padding: 24px 20px !important;
        width: 100% !important;
        margin: 0 !important;
    }

    /* 5. How It Works - Stepper */
    .steps {
        display: flex !important;
        flex-direction: column !important;
        gap: 2rem !important;
        position: relative !important;
        padding-left: 32px !important;
    }

    .steps::before {
        content: '';
        position: absolute;
        left: 10px;
        top: 20px;
        bottom: 20px;
        width: 2px;
        background: var(--primary);
        opacity: 0.3;
    }

    .steps li {
        position: relative !important;
        padding: 20px 16px !important;
        border-radius: 12px !important;
        box-shadow: 0 2px 14px rgba(0, 0, 0, 0.06) !important;
        background: #fff !important;
        margin: 0 !important;
        color: var(--text) !important;
    }

    .steps li h3,
    .steps li p {
        color: var(--text) !important;
    }

    .steps li::before {
        content: counter(step) !important;
        counter-increment: step;
        position: absolute !important;
        left: -34px !important;
        top: 24px !important;
        width: 28px !important;
        height: 28px !important;
        border-radius: 50% !important;
        background: var(--primary) !important;
        color: #fff !important;
        font-weight: 800 !important;
        font-size: 14px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border: none !important;
        box-shadow: 0 0 0 4px #f3f6f4 !important;
    }

    .section-dark-glass .steps li::before {
        box-shadow: 0 0 0 4px #1a1a1a !important;
        /* Approximate dark bg cut */
    }

    .steps h3 {
        margin-top: 0 !important;
    }

    /* 6. Therapist Profile */
    .split {
        display: flex !important;
        flex-direction: column !important;
        gap: 2rem !important;
    }

    .split-media img {
        width: 140px !important;
        height: 140px !important;
        border-radius: 50% !important;
        margin: 0 auto !important;
        object-fit: cover !important;
    }

    .split-content p {
        text-align: justify !important;
        font-size: 16px !important;
    }

    .split-content .check-list {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 0.6rem !important;
    }

    .split-content .check-list li {
        background: rgba(31, 111, 90, 0.1) !important;
        color: var(--primary-strong) !important;
        padding: 0.5rem 1rem !important;
        border-radius: 999px !important;
        font-size: 0.85rem !important;
        font-weight: 700 !important;
    }

    .split-content .check-list li::before {
        display: none !important;
    }

    /* 7. Why TCC (6 features) */
    section[aria-labelledby="tcc-title"] .cards-3 {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 1rem !important;
        flex-direction: row !important;
    }

    section[aria-labelledby="tcc-title"] .cards-3 .card {
        padding: 18px 12px !important;
        text-align: center !important;
        cursor: pointer;
    }

    section[aria-labelledby="tcc-title"] .cards-3 .card h3 {
        font-size: 0.95rem !important;
        margin-bottom: 0 !important;
    }

    section[aria-labelledby="tcc-title"] .cards-3 .card p {
        font-size: 0.85rem !important;
        margin-top: 0.6rem !important;
        display: none;
        color: rgba(255, 255, 255, 0.8) !important;
        /* Specific to dark section */
    }

    section[aria-labelledby="tcc-title"] .cards-3 .card.expanded p {
        display: block !important;
    }

    section[aria-labelledby="tcc-title"] .cards-3 .card h3::after {
        content: ' ▾';
        font-size: 0.8rem;
        opacity: 0.6;
        display: inline-block;
        margin-left: 4px;
        vertical-align: middle;
    }

    section[aria-labelledby="tcc-title"] .cards-3 .card.expanded h3::after {
        content: ' ▴';
    }

    /* 8. Testimonials (carousel) */
    section[aria-labelledby="testimonials-title"] .cards-3 {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        gap: 1rem !important;
        padding-bottom: 1.5rem !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }

    section[aria-labelledby="testimonials-title"] .cards-3::-webkit-scrollbar {
        display: none !important;
    }

    section[aria-labelledby="testimonials-title"] .cards-3 .testimonial-card {
        scroll-snap-align: center !important;
        flex: 0 0 88% !important;
        border-radius: 12px !important;
    }

    .testimonial-indicators {
        display: flex;
        justify-content: center;
        gap: 8px;
        margin-top: -0.5rem;
        margin-bottom: 1.5rem;
    }

    .testimonial-indicators span {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.3);
        transition: background 0.3s ease, transform 0.3s ease;
    }

    .testimonial-indicators span.active {
        background: #fff;
        transform: scale(1.2);
    }

    /* 9. Pricing Box */
    #consultation-title~.info-list {
        background: #fff !important;
        border-radius: 12px !important;
        padding: 1.8rem !important;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08) !important;
        text-align: center !important;
        margin-bottom: 2rem !important;
    }

    #consultation-title~.info-list li {
        font-size: 16px !important;
        padding-left: 0 !important;
    }

    #consultation-title~.info-list li::before {
        display: none !important;
    }

    #consultation-title~.split-cta {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 1rem !important;
    }

    #consultation-title~.split-cta .btn {
        width: 100% !important;
        min-height: 52px !important;
        border-radius: 8px !important;
        margin: 0 !important;
    }

    /* 10. FAQ Accordion */
    .faq-item {
        background: #fff !important;
        border-radius: 12px !important;
        box-shadow: 0 2px 14px rgba(0, 0, 0, 0.06) !important;
        margin-bottom: 0.8rem !important;
        border: none !important;
    }

    .faq-item summary {
        min-height: 56px !important;
        display: flex !important;
        align-items: center !important;
        padding: 14px 44px 14px 18px !important;
        font-size: 1.05rem !important;
    }

    .faq-item summary::after {
        right: 18px !important;
        font-size: 1.5rem !important;
    }

    /* 11. Blog Cards */
    .blog-preview .cards-3 {
        display: flex !important;
        flex-direction: column !important;
    }

    .blog-preview .card {
        padding: 20px !important;
        border-radius: 12px !important;
    }

    /* 12. Footer */
    .site-footer {
        padding-bottom: 7rem !important;
        /* space for sticky bar */
    }

    .footer-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
    }

    .footer-grid>div {
        border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
        padding-block: 1.2rem !important;
    }

    .footer-grid>div:last-child {
        border-bottom: none !important;
    }

    .footer-grid h3 {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        margin: 0 !important;
        cursor: pointer;
        font-size: 1.15rem !important;
    }

    .footer-grid h3::after {
        content: '+';
        font-size: 1.4rem;
        font-weight: 300;
    }

    .footer-grid>div.active h3::after {
        content: '−';
    }

    .footer-grid ul {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        margin-top: 0 !important;
        gap: 0.8rem !important;
    }

    .footer-grid>div.active ul {
        max-height: 350px;
        margin-top: 1.2rem !important;
    }

    /* Make first item not collapsible */
    .footer-grid>div:first-child h3::after {
        content: '' !important;
    }

    .footer-grid>div:first-child h3 {
        cursor: default;
    }

    .footer-grid>div:first-child p {
        margin-top: 0.8rem !important;
    }

    /* Tappable buttons in footer */
    .footer-grid a[href^="tel:"],
    .footer-grid a[href^="https://wa.me"] {
        display: block !important;
        padding: 14px !important;
        background: rgba(255, 255, 255, 0.1) !important;
        border-radius: 8px !important;
        text-align: center !important;
        margin-top: 0.5rem !important;
        font-weight: 600 !important;
    }

    /* 13. Sticky Bottom Action Bar */
    .mobile-sticky {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        background: #fff !important;
        box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.12) !important;
        padding: 14px 16px !important;
        display: flex !important;
        gap: 12px !important;
        z-index: 2200 !important;
        /* higher than footer */
        transform: translateY(150%) !important;
        transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
        border-top: none !important;
    }

    .mobile-sticky.visible {
        transform: translateY(0) !important;
    }

    .mobile-sticky .btn {
        flex: 1 !important;
        min-height: 52px !important;
        border-radius: 8px !important;
        font-size: 16px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        font-weight: 700 !important;
    }

    .mobile-sticky .mobile-main {
        background: var(--primary) !important;
        color: #fff !important;
    }

    .mobile-sticky .mobile-wa {
        background: #25d366 !important;
        color: #fff !important;
        min-width: 0 !important;
    }
}

/* Base states for desktop to avoid flashing/display issues */
@media (min-width: 769px) {
    .mobile-overlay {
        display: none !important;
    }

    .testimonial-indicators {
        display: none !important;
    }
}