/* Mobile header, hero offset, and drawer fix only. */
@media (max-width: 768px) {
    :root {
        --header-height: 88px;
    }

    body,
    main,
    .hero,
    .hero-bg,
    .hero-gradient {
        background: #05030D !important;
    }

    .hero-bg .floating-shape,
    .hero-bg .hero-grid-pattern {
        display: none !important;
    }

    html {
        scroll-padding-top: var(--header-height);
    }

    section[id],
    footer[id] {
        scroll-margin-top: var(--header-height);
    }

    .header,
    .header.scrolled {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: var(--header-height) !important;
        min-height: var(--header-height) !important;
        max-height: var(--header-height) !important;
        z-index: 9999 !important;
        transform: none !important;
        transition: none !important;
        background: #05030D !important;
        box-shadow: none !important;
        border-bottom: 1px solid rgba(184, 134, 11, 0.2) !important;
        backdrop-filter: blur(14px) !important;
        -webkit-backdrop-filter: blur(14px) !important;
    }

    .header .container,
    .navbar {
        height: var(--header-height) !important;
        min-height: var(--header-height) !important;
        max-height: var(--header-height) !important;
    }

    .navbar {
        justify-content: space-between !important;
        align-items: center !important;
        gap: 14px !important;
    }

    .navbar > .logo {
        order: 1 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 10px !important;
        flex: 0 1 auto !important;
        min-width: 0;
        margin: 0 !important;
    }

    .navbar > .hamburger {
        order: 2 !important;
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
        flex: 0 0 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 0 0 auto !important;
    }

    .navbar > .nav-links,
    .navbar > .nav-cta {
        display: none !important;
    }

    .navbar > .logo .logo-bear {
        width: 72px !important;
        height: 72px !important;
        max-width: 72px !important;
        flex: 0 0 auto !important;
        object-fit: cover !important;
        object-position: center center !important;
        border-radius: 50% !important;
        padding: 0 !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        image-rendering: -webkit-optimize-contrast;
        transform: none !important;
        display: block !important;
        vertical-align: middle !important;
        overflow: hidden !important;
        align-self: center !important;
    }

    .navbar > .logo:hover .logo-bear {
        transform: none !important;
    }

    .navbar > .logo .logo-text {
        max-width: none !important;
        color: var(--text-primary) !important;
        font-size: 21px !important;
        font-weight: 800 !important;
        line-height: 1.2 !important;
        white-space: nowrap !important;
        overflow: visible !important;
        text-overflow: clip !important;
        letter-spacing: -0.2px !important;
        flex: 0 0 auto !important;
    }

    main {
        margin-top: 0 !important;
        padding-top: var(--header-height) !important;
    }

    .hero {
        min-height: 0 !important;
        height: auto !important;
        margin-top: 0 !important;
        padding-top: 12px !important;
        padding-bottom: 0 !important;
    }

    .hero-content {
        margin-top: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        gap: 12px !important;
    }

    .hero-left,
    .hero-badge {
        margin-top: 0 !important;
    }

    .hero-badge {
        margin-bottom: 12px !important;
    }

    .services.section {
        margin-top: 0 !important;
        padding-top: 10px !important;
    }

    /* Mobile section order: Hero -> What We Offer -> Enquiry Form.
       The enquiry form now lives in its own <section id="enquiry"> in
       the HTML, placed directly after Services, so no JS relocation
       or leftover-wrapper hiding is needed here anymore. */
    .enquiry-section {
        margin-top: 0 !important;
        padding-top: 16px !important;
    }

    .mobile-menu-overlay {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 9997;
        background: rgba(0, 0, 0, 0.35) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .mobile-menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    /* Menu panel sits below the fixed main header (which keeps the
       only close/X button, now on the right) instead of overlapping
       it, so there is no need for a duplicate header row or
       top-padding spacer inside the panel — the nav list starts
       immediately at the top. The panel itself docks to the right
       edge and slides in from the right, matching the hamburger. */
    .mobile-menu {
        position: fixed !important;
        top: var(--header-height) !important;
        left: auto !important;
        right: 0 !important;
        width: 70% !important;
        max-width: 300px !important;
        height: calc(100dvh - var(--header-height)) !important;
        max-height: calc(100dvh - var(--header-height)) !important;
        z-index: 9998 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        padding: 8px 0 calc(20px + env(safe-area-inset-bottom)) !important;
        margin: 0 !important;
        overflow-y: auto !important;
        border-radius: 0 !important;
        background: #0B0A18 !important;
        box-shadow: -14px 0 35px rgba(0, 0, 0, 0.42) !important;
        transform: translateX(100%) !important;
        transition: transform 0.3s ease !important;
    }

    .mobile-menu.active {
        transform: translateX(0) !important;
    }

    .mobile-nav-links {
        width: 100% !important;
        flex: 0 0 auto !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .mobile-nav-links li {
        width: 100%;
    }

    .mobile-nav-link {
        width: 100% !important;
        min-height: 48px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        padding: 14px 20px !important;
        color: var(--text-primary) !important;
        background: transparent !important;
        border-radius: 0 !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        line-height: 1.25 !important;
        text-align: left !important;
        white-space: normal !important;
        transition: background 0.2s ease, color 0.2s ease;
    }

    .mobile-nav-link:hover,
    .mobile-nav-link:focus-visible,
    .mobile-nav-link.active {
        color: var(--highlight) !important;
        background: rgba(139, 92, 246, 0.12) !important;
        transform: none !important;
    }

    .mobile-phone {
        margin-top: 8px;
        color: var(--secondary) !important;
    }

    .mobile-cta {
        width: calc(100% - 40px) !important;
        max-width: none !important;
        min-height: 48px !important;
        margin: 14px 20px 0 !important;
        padding: 12px 16px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        font-size: 15px !important;
        line-height: 1.2 !important;
    }

    .pricing-marquee {
        width: 100%;
        margin: 0 !important;
        overflow: hidden !important;
        mask-image: none !important;
        -webkit-mask-image: none !important;
        cursor: grab;
        touch-action: pan-y;
        user-select: none;
    }

    .pricing-marquee.is-dragging {
        cursor: grabbing;
    }

    .pricing-track {
        display: flex !important;
        grid-template-columns: none !important;
        align-items: stretch !important;
        gap: 12px !important;
        width: max-content !important;
        animation: none !important;
        will-change: transform;
        transform: translate3d(0, 0, 0);
    }

    .pricing-track.is-sliding {
        transition: transform 0.38s ease;
    }

    .pricing-track .pricing-card[aria-hidden="true"] {
        display: none !important;
    }

    .pricing-track .pricing-card {
        flex: 0 0 min(360px, calc(100vw - 72px)) !important;
        width: min(360px, calc(100vw - 72px)) !important;
        min-height: 0 !important;
        height: auto !important;
        max-height: none !important;
        padding: 16px 14px !important;
        overflow: visible !important;
    }

    .pricing-track .pricing-card:hover {
        transform: none !important;
    }

    .pricing-track .pricing-popular {
        transform: none !important;
    }

    .pricing-track .pricing-header {
        margin-bottom: 12px !important;
        padding-bottom: 12px !important;
        text-align: left !important;
    }

    .pricing-track .pricing-name {
        margin-bottom: 6px !important;
    }

    .pricing-track .pricing-desc {
        display: block !important;
        margin-bottom: 10px !important;
        font-size: 12px !important;
        line-height: 1.45 !important;
    }

    .pricing-track .pricing-amount {
        justify-content: flex-start !important;
        margin: 0 !important;
    }

    .pricing-track .pricing-features {
        display: flex !important;
        gap: 7px !important;
        margin-bottom: 14px !important;
    }

    .pricing-track .pricing-feature {
        display: flex !important;
        font-size: 12px !important;
        line-height: 1.35 !important;
        gap: 7px !important;
    }

    .pricing-track .pricing-feature:nth-child(n+5) {
        display: none !important;
    }

    .pricing-track .pricing-cta {
        width: 100% !important;
        height: 42px !important;
        min-height: 42px !important;
        margin-top: auto !important;
    }

    .pricing-controls {
        display: flex !important;
        gap: 10px;
        margin-top: 8px;
    }

    .pricing-control-btn {
        width: 30px;
        height: 30px;
        min-width: 30px;
        min-height: 30px;
        font-size: 16px;
    }

    .pricing-dots {
        gap: 6px;
    }

    .pricing-dot {
        width: 7px;
        height: 7px;
    }

    .pricing-dot.active {
        width: 11px;
        height: 11px;
    }

    .pricing-card,
    .pricing-price,
    .pricing-amount,
    .pricing-cta {
        cursor: pointer;
    }

    /* ===== "What We Offer" services grid — unified 2-column fix ===== */
    /* The 10 cards live in two separate grids (5 + 5). On a 2-column
       layout, 5 is odd, so the first group leaves an empty cell and
       the two groups end up with mismatched spacing. Merge both
       groups into ONE grid so all 10 cards flow as 5 even rows of 2 —
       no orphan cell, no uneven gaps. */
    .services.section .container {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    .services.section .section-header {
        grid-column: 1 / -1 !important;
    }

    .services-grid,
    .services-grid-top,
    .services-grid-bottom {
        display: contents !important;
    }

    /* Undo the old "stretch the last card full-width" trick — not
       needed once all 10 cards share a single even grid. */
    .services-grid-bottom .service-card:last-child {
        grid-column: auto !important;
        width: auto !important;
        max-width: none !important;
    }

    /* Equal-sized boxes: fixed height instead of a variable
       min-height, so every card lines up neatly regardless of
       how much text it has. */
    .service-card {
        height: 172px !important;
        min-height: 172px !important;
        max-height: 172px !important;
        margin: 0 !important;
    }

    /* Clamp titles to 2 lines so a longer title (e.g. "Social Media
       Marketing") can't push one card taller than the others. */
    .service-title {
        display: -webkit-box !important;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }

    /* ===================================================================
       PREMIUM MOBILE FOOTER
       The stock footer collapses into a flat, cramped text list on
       mobile (.footer-grid from responsive.css). Here every section
       becomes its own bordered "card" on a two-column grid, so the
       footer reads as a designed agency footer instead of a plain
       stack of links. Extra bottom padding is added so content never
       sits under the fixed "Book a Demo" sticky bar.
       =================================================================== */

    .footer {
        background: linear-gradient(180deg, #05030D 0%, #0B0A18 100%) !important;
        padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px)) !important;
    }

    .footer-top {
        padding: 40px 0 6px !important;
    }

    /* Card grid: About runs full width at the top,
       Quick Links and Services sit side by side below it. */
    .footer-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 12px !important;
        width: auto !important;
        padding: 0 16px !important;
    }

    .footer-col {
        width: auto !important;
        background: linear-gradient(160deg, rgba(139, 92, 246, 0.10), rgba(217, 70, 239, 0.03)) !important;
        border: 1px solid rgba(139, 92, 246, 0.2) !important;
        border-radius: 16px !important;
        padding: 20px 18px !important;
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35) !important;
    }

    .footer-col:nth-child(1) {
        grid-column: 1 / -1 !important;
    }

    .footer-col:nth-child(2) {
        grid-column: 1 !important;
        padding: 18px 14px !important;
    }

    .footer-col:nth-child(3) {
        grid-column: 2 !important;
        padding: 18px 14px !important;
    }

    /* Brand block */
    .footer-logo {
        gap: 10px !important;
        margin-bottom: 14px !important;
    }

    .footer-logo .logo-bear {
        width: 36px !important;
        height: 36px !important;
        border-radius: 10px !important;
        border: 1px solid rgba(217, 70, 239, 0.45) !important;
        background: rgba(139, 92, 246, 0.12) !important;
        padding: 2px !important;
    }

    .footer-logo span {
        font-size: 17px !important;
        font-weight: 800 !important;
        background: linear-gradient(90deg, #FFFFFF, var(--violet)) !important;
        -webkit-background-clip: text !important;
        background-clip: text !important;
        -webkit-text-fill-color: transparent !important;
    }

    .footer-desc {
        font-size: 13px !important;
        line-height: 1.75 !important;
        color: rgba(248, 250, 252, 0.65) !important;
        margin-bottom: 18px !important;
    }

    .footer-socials {
        gap: 10px !important;
    }

    .social-link {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        border-radius: 50% !important;
        border: 1px solid rgba(139, 92, 246, 0.3) !important;
        background: rgba(139, 92, 246, 0.08) !important;
        color: rgba(248, 250, 252, 0.75) !important;
        transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease !important;
    }

    .social-link:hover,
    .social-link:active {
        background: linear-gradient(135deg, var(--purple), var(--magenta)) !important;
        border-color: transparent !important;
        color: #fff !important;
        box-shadow: 0 6px 18px rgba(217, 70, 239, 0.35) !important;
        transform: translateY(-2px) !important;
    }

    /* Section headings get a small gradient accent bar instead of
       plain uppercase text, to establish clearer hierarchy. */
    .footer-heading {
        position: relative !important;
        font-size: 12px !important;
        letter-spacing: 0.08em !important;
        padding-left: 12px !important;
        margin-bottom: 14px !important;
    }

    .footer-heading::before {
        content: "" !important;
        position: absolute !important;
        left: 0 !important;
        top: 1px !important;
        bottom: 1px !important;
        width: 3px !important;
        border-radius: 4px !important;
        background: linear-gradient(180deg, var(--violet), var(--magenta)) !important;
    }

    .footer-links a {
        font-size: 12.5px !important;
        padding: 8px 0 !important;
        border-bottom: 1px dashed rgba(255, 255, 255, 0.07) !important;
    }

    .footer-links li:last-child a {
        border-bottom: none !important;
    }

    .footer-links a:hover,
    .footer-links a:active {
        color: var(--magenta) !important;
        padding-left: 4px !important;
    }

    /* Bottom bar: separated as its own strip with breathing room
       above the fixed "Book a Demo" CTA. */
    .footer-bottom {
        margin: 20px 16px 0 !important;
        padding: 18px 4px !important;
        border-top: 1px solid rgba(139, 92, 246, 0.2) !important;
    }

    .footer-bottom-content {
        gap: 10px !important;
    }

    .footer-bottom-content p {
        font-size: 11px !important;
        letter-spacing: 0.02em !important;
    }

    .footer-bottom-links a {
        font-size: 11px !important;
    }

    .footer-bottom-links a:hover {
        color: var(--violet) !important;
    }

    /* Lift the sticky "Book a Demo" bar visually so it reads as a
       deliberately placed floating CTA rather than a plain bottom
       strip sitting on top of the footer. */
    .sticky-bottom-bar {
        background: rgba(5, 3, 13, 0.92) !important;
        border-top: 1px solid rgba(139, 92, 246, 0.35) !important;
        box-shadow: 0 -10px 32px rgba(0, 0, 0, 0.5) !important;
    }
}
/* Slightly reduce logo/brand text on very narrow phones to avoid overflow. */
@media (max-width: 380px) {
    .navbar > .logo .logo-bear {
        width: 58px !important;
        height: 58px !important;
        max-width: 58px !important;
        padding: 0 !important;
        object-fit: cover !important;
        border-radius: 50% !important;
        flex: 0 0 auto !important;
    }

    .navbar > .logo .logo-text {
        font-size: 17px !important;
    }
}