/* ═══════════════════════════════════════════════════════════════════════════
   HoneyBee Central / Public Server — Responsive Styles
   Applies to ALL pages that include central_header.html.twig
   Breakpoints: 1040 · 768 · 640 · 480 · 360
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Design token shim (so this file works standalone) ───────────────────── */
:root {
    --n-border:    rgba(26,29,46,.07);
    --n-border-md: rgba(26,29,46,.12);
}


/* ════════════════════════════════════════════════════════════════════════════
   GLOBAL LAYOUT UTILITIES
   ════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .n-wrap    { padding: 0 20px; }
    .n-sec     { padding: 64px 0; }
    .n-sec-sm  { padding: 44px 0; }
    .n-wrap-sm { padding: 0 20px; }
}
@media (max-width: 480px) {
    .n-wrap    { padding: 0 16px; }
    .n-sec     { padding: 48px 0; }
    .n-sec-sm  { padding: 32px 0; }
    .n-wrap-sm { padding: 0 16px; }
}


/* ════════════════════════════════════════════════════════════════════════════
   HOME PAGE — HERO
   ════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 1040px) {
    /* hero visual hidden at this bp in home.html.twig — guard min-height */
    .n-hero { min-height: unset; }
    /* grid cells must be allowed to shrink below min-content width */
    .n-hero-layout > *,
    .n-region-grid > *,
    .n-six-grid > *,
    .n-mobile-layout > * { min-width: 0; }
}

@media (max-width: 768px) {
    .n-hero { padding: 88px 0 56px; }

    /* !important: home.html.twig <style> block is later in cascade and overrides external CSS */
    .n-hero-tag { white-space: normal !important; overflow-wrap: break-word; font-size: 10px; line-height: 1.5; }

    /* CTA buttons stack */
    .n-hero-actions { flex-direction: column; gap: 10px; }
    .n-hero-actions .n-btn { width: 100%; justify-content: center; }

    /* metrics strip — grid forces clean 2×2; !important overrides home.html.twig inline flex */
    .n-hero-metrics {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 20px 0;
        padding-top: 20px;
        border-top: 1px solid var(--n-border-md);
    }
    .n-metric { padding: 0 !important; border-right: none !important; }

    /* micro-checks */
    .n-micro-checks { gap: 10px 18px; }
}

@media (max-width: 480px) {
    .n-hero { padding: 72px 0 44px; }
    .n-metric { padding: 0 12px; }
}


/* ════════════════════════════════════════════════════════════════════════════
   HOME PAGE — TRUST RIBBON
   ════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 640px) {
    .n-trust-row { gap: 10px 24px; justify-content: flex-start; }
    .n-trust-item { width: calc(50% - 12px); flex-shrink: 0; }
}
@media (max-width: 400px) {
    .n-trust-item { width: 100%; }
}


/* ════════════════════════════════════════════════════════════════════════════
   HOME PAGE — REGIONS GRID  (already 1-col at 1040 in template CSS)
   ════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .n-region-card { padding: 24px 20px; }
}


/* ════════════════════════════════════════════════════════════════════════════
   HOME PAGE — SIX SYSTEMS GRID
   ════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .n-sys-card { padding: 22px 20px; }
}


/* ════════════════════════════════════════════════════════════════════════════
   HOME PAGE — NATIVE AI SECTION
   The main 2-column layout uses inline style, needs !important override.
   ════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 1040px) {
    /* collapse the inline grid wrapper */
    .n-ai-section .n-wrap > div {
        display: flex !important;
        flex-direction: column !important;
        gap: 48px !important;
    }

    /* cloud AI path — price block stacks below text */
    .n-ai-path-cloud {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
    }
    .n-ai-price-block { text-align: left !important; }

    /* native LLM top row — price block below heading */
    .n-native-top {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
    }
    .n-native-top > div:last-child { text-align: left !important; }
}

@media (max-width: 768px) {
    .n-ai-section { padding: 64px 0; }
    .n-ai-use      { padding: 14px 16px; }
    .n-ai-path     { padding: 20px 20px; }
    .n-native-hw-row { flex-wrap: wrap; gap: 8px; }
    .n-hw-chip     { font-size: 11px; padding: 5px 10px; }
}

@media (max-width: 480px) {
    .n-ai-section { padding: 48px 0; }
    .n-hw-chip     { width: 100%; }
}


/* ════════════════════════════════════════════════════════════════════════════
   HOME PAGE — MOBILE APP SECTION
   ════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .n-mobile-stores { flex-direction: column; }
}


/* ════════════════════════════════════════════════════════════════════════════
   HOME PAGE — PRICING GRID
   ════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .n-plan        { padding: 24px 20px; }
    .n-plan-tag    { right: 16px; }
    .n-ai-pricing-note { flex-direction: column; gap: 12px; padding: 16px 20px; }
}


/* ════════════════════════════════════════════════════════════════════════════
   HOME PAGE — CLIENT LOGO STRIP
   ════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 640px) {
    .n-logo-strip  { padding: 24px 20px; }
    .n-logo-row    { flex-wrap: wrap; }
    .n-logo-item   { flex: 0 0 50%; border-right: none; border-bottom: 1px solid var(--n-border); padding: 10px 16px; text-align: left; }
    .n-logo-item:nth-child(odd) { border-right: 1px solid var(--n-border); }
    .n-logo-item:last-child,
    .n-logo-item:nth-last-child(2):nth-child(odd) { border-bottom: none; }
}


/* ════════════════════════════════════════════════════════════════════════════
   HOME PAGE — DASHBOARD COMMAND PREVIEW  (.n-dash-preview)
   ════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .n-dash-preview { padding: 32px 20px; }
    .n-dash-stats   { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .n-dash-stats   { grid-template-columns: 1fr; }
}


/* ════════════════════════════════════════════════════════════════════════════
   HOME PAGE — SPREADSHEET CALLOUT  (.n-spreadsheet)
   ════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .n-spreadsheet { padding: 32px 20px; }
}


/* ════════════════════════════════════════════════════════════════════════════
   HOME PAGE — CTA / NEWSLETTER
   ════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .n-cta-final { padding: 72px 0; }
}
@media (max-width: 480px) {
    .n-cta-final { padding: 56px 0; }
    .n-cta-form  { padding: 0 4px; }
}


/* ════════════════════════════════════════════════════════════════════════════
   ROLE / COMPANY PAGE  (index_central_landing.html.twig)
   ════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .role-company-page.section { padding: 32px 0 60px; }
}

@media (max-width: 480px) {
    .role-company-page .tab-container { padding: 0 16px; }

    /* horizontally scrollable tab row on small screens */
    .role-company-page .tab-container .tab-box {
        gap: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
    }
    .role-company-page .tab-container .tab-box::-webkit-scrollbar { display: none; }

    /* let content box shrink rather than stay at fixed 600px */
    .role-company-page .tab-container .content-box {
        height: auto;
        min-height: 480px;
    }
    .role-company-page .tab-container .content-box .content { margin-top: 40px; }

    /* reset the 160% width hack — Swiper breakpoints now control slide count */
    .role-company-page .tab-container .content-box .content .swiper-container { width: 100%; }

    /* nav arrows not useful on touch — hide */
    .role-company-page .swiper-button-prev,
    .role-company-page .swiper-button-next { display: none; }
}


/* ════════════════════════════════════════════════════════════════════════════
   AUTHENTICATION PAGES  (login, registration, reset password, OTP)
   ════════════════════════════════════════════════════════════════════════════ */

/* Already responsive in their own template <style> blocks — guard only */
@media (max-width: 480px) {
    .n-auth-page { padding: 48px 16px 64px; }
}


/* ════════════════════════════════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    footer .footer-content   { padding: 40px 24px !important; gap: 32px !important; flex-wrap: wrap; }
    footer .footer-bottom    { padding: 14px 24px !important; flex-direction: column !important; text-align: center; gap: 6px; }
    footer .footer-bottom hr { display: none !important; }
}
@media (max-width: 480px) {
    footer .footer-content   { padding: 32px 16px !important; gap: 24px !important; }
    footer .footer-bottom    { padding: 14px 16px !important; }
}


/* ════════════════════════════════════════════════════════════════════════════
   SUPER ADMIN COMMAND CENTER
   ════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 640px) {
    .super-admin-title  { font-size: clamp(22px, 6vw, 36px); }
    .hero-chip-row      { gap: 6px; }
    .hero-chip          { font-size: 11px; padding: 5px 10px; }
}


/* ════════════════════════════════════════════════════════════════════════════
   MISC: PREVENT HORIZONTAL OVERFLOW ON ALL CENTRAL PAGES
   ════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    /* Bootstrap containers honour padding on mobile */
    body.body-mask { overflow-x: hidden; }
    img { max-width: 100%; height: auto; }
}
