/* ==========================================================
   CONTACT page styles (contact.php)
   ========================================================== */

/* ---------- Contact cards ---------- */
.contact-cards { position: relative; z-index: 2; margin-top: -50px; }
.contact-cards__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.c-card {
    background: var(--white); border-radius: var(--radius-lg); padding: 30px 26px;
    box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px;
    border-top: 4px solid var(--amber);
    transition: transform .3s var(--ease);
    overflow-wrap: anywhere;
}
.c-card:hover { transform: translateY(-6px); }
.c-card__icon {
    display: grid; place-items: center; width: 60px; height: 52px; margin-bottom: 14px;
    background: var(--navy); color: var(--amber); clip-path: var(--hex);
}
.c-card__icon--wa { background: #25d366; color: var(--white); }
.c-card h2 { font-family: var(--font-head); font-size: 1.2rem; color: var(--navy); margin-bottom: 6px; }
.c-card a { font-weight: 600; color: var(--navy); font-size: .95rem; }
.c-card a:hover { color: var(--gold-deep); }
.c-card span { font-size: .9rem; color: var(--muted); }

/* ---------- Quote form ---------- */
.quote { scroll-margin-top: 90px; }
.quote__grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 50px; align-items: start; }
.quote__form-wrap {
    background: var(--white); border-radius: var(--radius-lg); padding: 50px 48px; box-shadow: var(--shadow-sm);
}
.quote-form { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 22px; margin-top: 10px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field--full { grid-column: 1 / -1; }
.field label { font-weight: 500; font-size: .9rem; color: var(--navy); }
.field label span { color: #c0392b; }
.field label small { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
    width: 100%; padding: 14px 16px;
    background: var(--cream); border: 1.5px solid var(--line); border-radius: 10px;
    font-size: .95rem; transition: border-color .2s, background .2s, box-shadow .2s;
}
.field select {
    appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23131d27' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 16px center; padding-right: 42px;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none; border-color: var(--amber); background: var(--white);
    box-shadow: 0 0 0 4px rgba(249, 177, 42, .18);
}
.field [aria-invalid="true"] { border-color: #c0392b; background: #fdf3f2; }
.field__error { color: #c0392b; font-size: .83rem; }
.quote-form__submit { width: 100%; padding: 17px; font-size: 1rem; }
.quote-form__note { font-size: .8rem; color: var(--muted); text-align: center; margin: 12px 0 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alert { border-radius: 12px; padding: 18px 20px; margin: 18px 0 10px; font-size: .95rem; }
.alert--success { display: flex; gap: 14px; background: #eaf7ee; border: 1px solid #b7e1c3; color: #1d5e33; }
.alert--success .icon { flex-shrink: 0; background: #2e8b57; color: #fff; border-radius: 50%; padding: 4px; }
.alert--success strong { display: block; margin-bottom: 2px; }
.alert--success p { margin: 0; }
.alert--success a { font-weight: 600; text-decoration: underline; }
.alert--error { background: #fdf0ef; border: 1px solid #f1c3be; color: #9b2c20; }

/* ---------- Aside ---------- */
.quote__aside { display: grid; gap: 22px; position: sticky; top: 110px; }
.aside-card { background: var(--navy); color: #c1cad2; border-radius: var(--radius-lg); padding: 32px 30px; }
.aside-card h3 { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); color: var(--white); font-size: 1.25rem; margin-bottom: 18px; }
.aside-card h3 .icon { color: var(--amber); }
.hours li { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px dashed rgba(255, 255, 255, .12); font-size: .92rem; }
.hours li:last-child { border-bottom: 0; }
.hours strong { color: var(--white); font-weight: 500; text-align: right; }
.aside-card--gold { background: var(--amber); color: #3a3320; }
.aside-card--gold h3 { color: var(--navy); }
.aside-card--gold p { margin-bottom: 20px; }
.next-steps { margin: 0; padding: 0; list-style: none; counter-reset: n; }
.next-steps li { counter-increment: n; position: relative; padding: 0 0 16px 44px; font-size: .93rem; }
.next-steps li::before {
    content: counter(n); position: absolute; left: 0; top: -2px;
    width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
    background: var(--amber); color: var(--navy); font-weight: 700; font-size: .85rem;
}

/* ---------- Map ---------- */
.map { position: relative; height: 440px; background: var(--navy-700); }
.map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(.35) contrast(1.05); }
.map__card {
    position: absolute; left: max(20px, calc((100% - var(--container)) / 2 + 20px)); top: 40px;
    display: flex; gap: 16px; align-items: flex-start;
    background: var(--navy); color: #c1cad2; padding: 22px 26px; border-radius: var(--radius);
    box-shadow: var(--shadow); max-width: 360px; border-left: 4px solid var(--amber);
}
.map__card img { width: 44px; height: auto; flex-shrink: 0; }
.map__card strong { display: block; font-family: var(--font-head); color: var(--white); font-size: 1.05rem; }
.map__card span { display: block; font-size: .88rem; margin: 2px 0 8px; }
.map__card a { color: var(--amber); font-weight: 600; font-size: .9rem; }

/* ---------- JavaScript-driven extras (contact.js) ---------- */
.field__meta { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.field__count { margin-left: auto; font-size: .78rem; color: var(--muted); white-space: nowrap; }
.field__count.is-near { color: #c0392b; font-weight: 600; }
.field__hint {
    margin: 4px 0 0; padding: 10px 14px; border-radius: 10px;
    background: rgba(249, 177, 42, .14); border-left: 3px solid var(--amber);
    font-size: .85rem; color: #5a4a1c;
}
.field input.is-valid, .field select.is-valid, .field textarea.is-valid { border-color: #6fbf8a; }
.quote-form__buttons { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; }
.btn--wa { background: #25d366; color: #fff; padding: 17px; }
.btn--wa:hover { background: #1ebe5b; transform: translateY(-2px); }
.quote-form__submit.is-loading { opacity: .8; cursor: wait; }
.quote-form__submit.is-loading .icon { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.open-badge {
    margin-left: auto; font-family: var(--font-body); font-size: .72rem; font-weight: 600;
    letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px;
    background: rgba(231, 76, 60, .18); color: #ff8a7a;
}
.open-badge.is-open { background: rgba(46, 204, 113, .18); color: #6ee29a; }
.open-badge.is-open::before { content: "● "; }
.hours li.is-today span, .hours li.is-today strong { color: var(--amber); }
.hours li.is-today span::after { content: " (today)"; font-size: .78rem; }

@media (max-width: 700px) {
    .quote-form__buttons { grid-template-columns: 1fr; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
    .contact-cards__grid { grid-template-columns: 1fr 1fr; }
    .quote__grid { grid-template-columns: 1fr; }
    .quote__aside { position: static; grid-template-columns: 1fr 1fr; }
    .quote__aside .aside-card:last-child { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
    .contact-cards__grid { grid-template-columns: 1fr; }
    .quote__form-wrap { padding: 34px 22px; }
    .quote-form { grid-template-columns: 1fr; }
    .quote__aside { grid-template-columns: 1fr; }
    .map { height: 380px; }
    .map__card { left: 16px; right: 16px; top: auto; bottom: 16px; max-width: none; }
}
