/* ============================================================
   Next Pro — template-contact.php
   Uses theme tokens from main.css (:root)
   ============================================================ */

.next-contact-hero {
    background: linear-gradient(135deg, var(--teal-soft) 0%, #fdece0 100%);
    border: 1px solid var(--line);
    border-radius: var(--radius, 14px);
    padding: 42px 32px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
    text-align: center;
    color: var(--ink);
}
.next-contact-hero::before,
.next-contact-hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
}
.next-contact-hero::before { width: 200px; height: 200px; top: -90px; inset-inline-start: -60px; background: rgba(44,74,71,.08); }
.next-contact-hero::after  { width: 140px; height: 140px; bottom: -60px; inset-inline-end: -30px; background: rgba(0,186,186,.12); }

.next-contact-hero__crumb {
    position: relative;
    z-index: 1;
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    color: var(--rust);
    background: #fff;
    border: 1px solid var(--line);
    padding: 5px 14px;
    border-radius: 30px;
    margin-bottom: 16px;
}

.next-contact-hero h1 {
    position: relative;
    z-index: 1;
    font-size: 25px;
    font-weight: 800;
    margin: 0 0 10px;
    color: var(--ink);
}
.next-contact-hero p {
    position: relative;
    z-index: 1;
    max-width: 620px;
    margin: 0 auto;
    color: var(--muted);
    font-size: 14.5px;
    line-height: 1.9;
}

/* info cards */
.next-contact-info {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}
@media (max-width: 991px) { .next-contact-info { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575px) { .next-contact-info { grid-template-columns: 1fr; } }

.next-contact-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius, 14px);
    padding: 22px 18px;
    text-align: center;
    transition: .2s;
}
.next-contact-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(28,27,25,.08);
    border-color: transparent;
}
.next-contact-card__icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: var(--teal-soft);
    color: var(--rust);
    display: flex;
    align-items: center;
    justify-content: center;
}
.next-contact-card__icon svg { width: 24px; height: 24px; }
.next-contact-card h3 {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--ink);
}
.next-contact-card p,
.next-contact-card a {
    font-size: 13.5px;
    color: var(--muted);
    margin: 0;
    line-height: 1.8;
    word-break: break-word;
}
.next-contact-card a:hover { color: var(--rust); }

/* main grid: form + map/sidebar */
.next-contact-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 24px;
    align-items: start;
}
@media (max-width: 991px) { .next-contact-grid { grid-template-columns: 1fr; } }

.next-contact-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius, 14px);
    padding: 28px;
}
@media (max-width: 575px) { .next-contact-panel { padding: 20px 16px; } }

.next-contact-panel h2 {
    font-size: 18px;
    font-weight: 800;
    margin: 0 0 6px;
}
.next-contact-panel .next-panel-sub {
    font-size: 13px;
    color: var(--muted);
    margin: 0 0 22px;
}

.next-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}
@media (max-width: 575px) { .next-form-row { grid-template-columns: 1fr; gap: 0; } }

.next-field { margin-bottom: 14px; }
.next-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--ink);
}
.next-field label .req { color: var(--rust); }

.next-field input[type="text"],
.next-field input[type="email"],
.next-field input[type="tel"],
.next-field textarea {
    width: 100%;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    padding: 11px 14px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 13.5px;
    color: var(--ink);
    background: var(--paper);
    transition: border-color .15s, box-shadow .15s;
}
.next-field input:focus,
.next-field textarea:focus {
    outline: none;
    border-color: var(--rust);
    box-shadow: 0 0 0 3px rgba(0,186,186,.12);
    background: #fff;
}
.next-field textarea { resize: vertical; min-height: 130px; }

.next-field.has-error input,
.next-field.has-error textarea { border-color: #c0392b; }
.next-field__error {
    display: none;
    color: #c0392b;
    font-size: 12px;
    margin-top: 5px;
}
.next-field.has-error .next-field__error { display: block; }

/* honeypot — hidden from real users */
.next-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px; height: 1px;
    opacity: 0;
    pointer-events: none;
}

.next-contact-submit {
    width: 100%;
    border: none;
    border-radius: 10px;
    background: var(--rust);
    color: #fff;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 700;
    font-size: 14.5px;
    padding: 13px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: .15s;
}
.next-contact-submit:hover { background: var(--rust-dark); }
.next-contact-submit:disabled { opacity: .65; cursor: not-allowed; }

.next-contact-submit .next-spinner {
    display: none;
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: next-spin .7s linear infinite;
}
.next-contact-submit.is-loading .next-spinner { display: inline-block; }
.next-contact-submit.is-loading .next-btn-label { opacity: .85; }
@keyframes next-spin { to { transform: rotate(360deg); } }

.next-contact-result { margin-top: 16px; }

/* sidebar: map + social */
.next-contact-side { display: flex; flex-direction: column; gap: 20px; }

.next-contact-map {
    border: 1px solid var(--line);
    border-radius: var(--radius, 14px);
    overflow: hidden;
    background: var(--teal-soft);
    min-height: 260px;
}
.next-contact-map iframe {
    width: 100%;
    height: 100%;
    min-height: 260px;
    border: 0;
    display: block;
}

.next-contact-social {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius, 14px);
    padding: 22px;
}
.next-contact-social h3 { font-size: 14.5px; font-weight: 700; margin: 0 0 14px; }
.next-contact-social .next-social-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.next-contact-social .next-social-list a {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--teal-soft);
    color: var(--teal);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .15s;
}
.next-contact-social .next-social-list a:hover {
    background: var(--rust);
    color: #fff;
    transform: translateY(-2px);
}
.next-contact-social .next-social-list svg { width: 18px; height: 18px; }
