/* =============================================================
   NaroVeda /contact — styles scoped entirely to .nv-* classes so
   nothing here can leak into other pages or collide with nav-v7.css.
   Raw CSS (no Tailwind @apply/build step) — same pattern as nav-v7.css,
   since this project is deployed with no local Vite build on the host.

   MOBILE-FIRST: base rules below are written for a 320px viewport and
   upgraded with min-width media queries, never the other way round.
   Breakpoints covered explicitly, as planned and approved:
     320  (old Android)      → base rules, no media query needed
     375  (iPhone SE)        → base rules (fluid clamp() already fits)
     390  (iPhone 14)        → base rules (primary visual-QA reference size)
     430  (iPhone 14 Plus)   → base rules; 2-up route cards only if they
                                comfortably fit (tested, not assumed)
     768  (iPad portrait)    → first real layout change: 2-column grids
     1024 (iPad landscape)   → form + sidebar become a 2-column shell
     1280 (desktop)          → blueprint's 1280px container width
     1440 (large desktop)    → container stays 1280px, capped
     1920 (wide screen)      → same 1280px container, centered
   ============================================================= */

:root{
    --nv-c-red:#C63A27;
    --nv-c-orange:#E98232;
    --nv-c-green:#24501D;
    --nv-c-ink:#292522;
    --nv-c-border:#E9E1DC;
    --nv-c-warm:#FFF7F2;
}

/* ---------- Contact routes (four cards) ---------- */
/* 320–767px: single column list. A grid-of-1 rather than a flex column so
   the exact same markup upgrades to 2 cols (430px, content permitting) and
   4 cols (1024px+) just by changing grid-template-columns — no structural
   rewrite between breakpoints. */
.nv-croutes{
    display:grid;
    grid-template-columns:1fr;
    gap:.75rem;
    margin-bottom:2rem;
}
.nv-croutes__card{
    display:flex;
    align-items:flex-start;
    gap:.75rem;
    padding:1rem 1.1rem;
    border:1px solid var(--nv-c-border);
    border-radius:1rem;
    background:#fff;
    cursor:pointer;
    transition:border-color .25s ease,box-shadow .25s ease,transform .2s ease;
}
.dark .nv-croutes__card{background:#242220;border-color:#3A3632}
.nv-croutes__card:hover{border-color:var(--nv-c-orange);box-shadow:0 6px 18px -10px rgba(41,37,34,.18)}
.nv-croutes__card.is-active{border-color:var(--nv-c-red);box-shadow:0 0 0 3px rgba(198,58,39,.12)}
.nv-croutes__icon{
    flex-shrink:0;
    width:2.25rem;height:2.25rem;
    border-radius:9999px;
    display:flex;align-items:center;justify-content:center;
    background:rgba(233,130,50,.12);
    color:var(--nv-c-orange);
}
.dark .nv-croutes__icon{background:rgba(243,160,92,.16)}
.nv-croutes__label{font-weight:600;color:var(--nv-c-ink);margin:0 0 .15rem;font-size:.9375rem}
.dark .nv-croutes__label{color:#F5F1ED}
.nv-croutes__desc{font-size:.8125rem;color:rgba(41,37,34,.65);margin:0;line-height:1.35}
.dark .nv-croutes__desc{color:rgba(245,241,237,.65)}

/* 430px: allow 2-up IF it fits — fixed minmax prevents forced squeeze; if a
   card's content needs more room it simply wraps to the next line (grid auto
   row), it never overlaps or clips. */
@media(min-width:430px){
    .nv-croutes{grid-template-columns:repeat(2,minmax(0,1fr))}
}
/* 768px+: tablet two-column rule from the blueprint still applies here as
   2x2 (not 4x1) — four cards in a single row gets cramped on an iPad portrait
   width; 2x2 keeps each card's description readable. */
@media(min-width:768px){
    .nv-croutes{grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}
}
/* 1024px+: small-laptop width comfortably fits all four in a row. */
@media(min-width:1024px){
    .nv-croutes{grid-template-columns:repeat(4,minmax(0,1fr))}
}

/* ---------- Form + sidebar shell ---------- */
/* 320–1023px: single column, form first then sidebar stacked below —
   mobile users should reach the form without scrolling past hours/FAQ. */
.nv-contact-shell{
    display:grid;
    grid-template-columns:1fr;
    gap:1.5rem;
    align-items:start;
}
.nv-contact-shell__aside{
    display:flex;
    flex-direction:column;
    gap:1rem;
}
/* 1024px+: blueprint's two-column adaptation — form (left, wider) + a
   sticky sidebar (right) with channels/hours/address, matching the same
   left-heavy ratio used on other inner pages. */
@media(min-width:1024px){
    .nv-contact-shell{grid-template-columns:1.6fr 1fr;gap:2rem}
    .nv-contact-shell__aside{position:sticky;top:5.5rem}
}
/* 1280px+: nothing further changes here — the page's own .max-w-container
   (1280px, from tailwind.config.js) already caps and centers everything;
   this rule file never re-implements that cap to avoid two sources of truth. */

/* ---------- Form ---------- */
.nv-cform{
    background:#fff;
    border:1px solid var(--nv-c-border);
    border-radius:1.25rem;
    padding:1.5rem;
    box-shadow:0 1px 2px rgba(41,37,34,.04),0 10px 28px -16px rgba(41,37,34,.12);
}
.dark .nv-cform{background:#242220;border-color:#3A3632}
.nv-cform__heading{
    font-family:'Manrope',sans-serif;
    font-weight:700;
    font-size:1.25rem;
    color:var(--nv-c-ink);
    margin:0 0 1rem;
}
.dark .nv-cform__heading{color:#F5F1ED}

.nv-cform__honeypot{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}

.nv-cform__urgent{
    display:flex;
    align-items:flex-start;
    gap:.6rem;
    background:rgba(198,58,39,.08);
    border:1px solid rgba(198,58,39,.25);
    color:#8f2c1c;
    padding:.75rem .9rem;
    border-radius:.85rem;
    font-size:.8125rem;
    line-height:1.4;
    margin-bottom:1rem;
}
.dark .nv-cform__urgent{background:rgba(198,58,39,.14);color:#F3A596;border-color:rgba(198,58,39,.35)}

/* Fields — single column on mobile, 2-up from 768px, full-width items
   (message, attachment, consent) always span both columns. */
.nv-cform__grid{
    display:grid;
    grid-template-columns:1fr;
    gap:1rem;
}
@media(min-width:768px){
    .nv-cform__grid{grid-template-columns:1fr 1fr}
}
.nv-field{display:flex;flex-direction:column;gap:.35rem}
.nv-field--full{grid-column:1 / -1}
.nv-field label{font-size:.8125rem;font-weight:600;color:var(--nv-c-ink)}
.dark .nv-field label{color:#F5F1ED}
.nv-field input[type=text],
.nv-field input[type=email],
.nv-field input[type=tel],
.nv-field select,
.nv-field textarea{
    width:100%;
    font:inherit;
    font-size:.9375rem;
    padding:.65rem .85rem;
    border:1px solid var(--nv-c-border);
    border-radius:.7rem;
    background:#fff;
    color:var(--nv-c-ink);
    transition:border-color .2s ease,box-shadow .2s ease;
}
.dark .nv-field input,.dark .nv-field select,.dark .nv-field textarea{
    background:#1C1A18;border-color:#3A3632;color:#F5F1ED;
}
.nv-field input:focus,.nv-field select:focus,.nv-field textarea:focus{
    outline:none;
    border-color:var(--nv-c-orange);
    box-shadow:0 0 0 3px rgba(233,130,50,.18);
}
.nv-field.has-error input,.nv-field.has-error select,.nv-field.has-error textarea{
    border-color:var(--nv-c-red);
}
.nv-field.is-valid input,.nv-field.is-valid select{
    border-color:var(--nv-c-green);
    background-image:none;
}
.nv-field__error{
    font-size:.75rem;
    color:var(--nv-c-red);
    margin:0;
    min-height:1px;
    display:none;
}
.nv-field__error:not(:empty){display:block}
.nv-field__hint{font-size:.75rem;color:rgba(41,37,34,.55);margin:.25rem 0 0}
.dark .nv-field__hint{color:rgba(245,241,237,.55)}

/* Dropzone */
.nv-dropzone{
    position:relative;
    display:flex;
    align-items:center;
    gap:.6rem;
    border:1.5px dashed var(--nv-c-border);
    border-radius:.85rem;
    padding:1rem;
    color:rgba(41,37,34,.6);
    font-size:.875rem;
    transition:border-color .2s ease,background .2s ease;
}
.dark .nv-dropzone{border-color:#3A3632;color:rgba(245,241,237,.6)}
.nv-dropzone.is-dragover{border-color:var(--nv-c-orange);background:rgba(233,130,50,.06)}
.nv-dropzone input[type=file]{
    position:absolute;inset:0;opacity:0;cursor:pointer;width:100%;height:100%;
}

/* Consent checkbox */
.nv-checkbox{
    display:flex;
    align-items:flex-start;
    gap:.55rem;
    font-size:.8125rem;
    color:rgba(41,37,34,.75);
    cursor:pointer;
}
.dark .nv-checkbox{color:rgba(245,241,237,.75)}
.nv-checkbox input{margin-top:.2rem;accent-color:var(--nv-c-red);width:1rem;height:1rem;flex-shrink:0}
.nv-checkbox a{color:var(--nv-c-red);font-weight:600;text-decoration:underline}

.nv-cform__server-error{
    color:var(--nv-c-red);
    font-size:.8125rem;
    margin:1rem 0 0;
}

/* Submit button */
.nv-cform__submit{
    margin-top:1.25rem;
    width:100%;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:.5rem;
    height:3rem;
    border-radius:.85rem;
    background:var(--nv-c-red);
    color:#fff;
    font-weight:600;
    font-size:.9375rem;
    border:none;
    cursor:pointer;
    transition:background .2s ease,opacity .2s ease,transform .15s ease;
}
.nv-cform__submit:hover{background:#A92D24}
.nv-cform__submit:active{transform:scale(.98)}
.nv-cform__submit[disabled]{opacity:.65;cursor:not-allowed}
.nv-cform__submit.is-loading .nv-cform__submit-label::after{
    content:'';
    display:inline-block;
    width:.8rem;height:.8rem;
    margin-left:.5rem;
    border:2px solid rgba(255,255,255,.4);
    border-top-color:#fff;
    border-radius:50%;
    animation:nv-cform-spin .7s linear infinite;
    vertical-align:-2px;
}
@keyframes nv-cform-spin{to{transform:rotate(360deg)}}

/* 768px+: submit button no longer needs to be full-width edge-to-edge */
@media(min-width:768px){
    .nv-cform__submit{width:auto;padding:0 2rem}
}

/* Success state */
.nv-cform--success{text-align:center;padding:2.5rem 1.5rem}
.nv-cform__success-icon{
    display:inline-flex;
    align-items:center;justify-content:center;
    width:3rem;height:3rem;
    border-radius:50%;
    background:rgba(36,80,29,.12);
    color:var(--nv-c-green);
    margin-bottom:1rem;
}
.dark .nv-cform__success-icon{background:rgba(36,80,29,.22)}
.nv-cform--success p{color:rgba(41,37,34,.75);margin:0 0 .5rem}
.dark .nv-cform--success p{color:rgba(245,241,237,.75)}
.nv-cform__reference{font-size:1rem;margin-top:.75rem !important}
.nv-cform__reference strong{color:var(--nv-c-red)}
.nv-cform__edit{
    margin:1.5rem auto 0;
    max-width:28rem;
    text-align:left;
    background:var(--nv-c-warm);
    border-radius:.85rem;
    padding:1rem;
}
.dark .nv-cform__edit{background:#1C1A18}
.nv-cform__edit textarea{
    width:100%;
    margin:.5rem 0;
    padding:.6rem .75rem;
    border:1px solid var(--nv-c-border);
    border-radius:.6rem;
    font:inherit;
    font-size:.875rem;
}
.dark .nv-cform__edit textarea{background:#242220;border-color:#3A3632;color:#F5F1ED}
.nv-cform__new-link{
    display:inline-block;
    margin-top:1.5rem;
    font-size:.8125rem;
    font-weight:600;
    color:var(--nv-c-red);
}

/* ---------- Quick channels ---------- */
/* 320px: 2x2 icon-forward grid, not a single row — a row of 3 pill buttons
   at 320px forces text truncation; a compact grid keeps every label legible. */
.nv-channels__grid{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:.5rem;
}
.nv-channels__item{
    display:flex;
    align-items:center;
    gap:.4rem;
    padding:.55rem .6rem;
    border:1px solid var(--nv-c-border);
    border-radius:.65rem;
    font-size:.8125rem;
    font-weight:600;
    color:var(--nv-c-ink);
    overflow:hidden;
    white-space:nowrap;
    text-overflow:ellipsis;
}
.dark .nv-channels__item{border-color:#3A3632;color:#F5F1ED}
.nv-channels__item:hover{border-color:var(--nv-c-orange)}
/* 430px+: enough room for a single row of three. */
@media(min-width:430px){
    .nv-channels__grid{grid-template-columns:repeat(3,1fr)}
}
/* 1024px+: the aside column is narrower than the page, so drop back to a
   single column list so labels never truncate inside the sidebar. */
@media(min-width:1024px){
    .nv-channels__grid{grid-template-columns:1fr}
}

/* ---------- FAQ accordion ---------- */
.nv-cfaq{margin-top:3rem}
.nv-cfaq__list{display:flex;flex-direction:column;gap:.6rem}
.nv-cfaq__item{
    border:1px solid var(--nv-c-border);
    border-radius:.85rem;
    padding:.2rem 1rem;
    background:#fff;
}
.dark .nv-cfaq__item{background:#242220;border-color:#3A3632}
.nv-cfaq__item summary{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:1rem;
    padding:.9rem 0;
    cursor:pointer;
    font-weight:600;
    font-size:.9375rem;
    color:var(--nv-c-ink);
    list-style:none;
}
.dark .nv-cfaq__item summary{color:#F5F1ED}
.nv-cfaq__item summary::-webkit-details-marker{display:none}
.nv-cfaq__chevron{transition:transform .25s ease;flex-shrink:0;color:var(--nv-c-orange)}
.nv-cfaq__item[open] .nv-cfaq__chevron{transform:rotate(180deg)}
.nv-cfaq__item p{
    margin:0 0 1rem;
    font-size:.875rem;
    color:rgba(41,37,34,.7);
    line-height:1.5;
}
.dark .nv-cfaq__item p{color:rgba(245,241,237,.7)}

/* 768px+: FAQ answers read better as a single column (long text, not cards)
   even once the rest of the page goes two-column — matches the blueprint
   note that FAQ stays full-width for readability. */

/* ---------- 1440 / 1920: verified no element stretches edge-to-edge ----------
   Nothing below changes layout at these widths on purpose — .max-w-container
   (1280px) already governs the cap; this comment documents that the absence
   of a rule here is a deliberate, tested decision, not an oversight. */

@media(prefers-reduced-motion:reduce){
    .nv-cform__submit.is-loading .nv-cform__submit-label::after{animation:none}
    .nv-croutes__card{transition:none}
}
