/* =========================================================
   AGRITENUTA SAN FRANCESCO — Pagina Contatti
   File: wwwroot/css/contatti.css
   Dipende da: site.css
   ========================================================= */

/* ─────────────────────────────────────────────
   PAGE HERO — minimal e atmosferico
───────────────────────────────────────────── */
.page-hero {
    position: relative;
    height: 46vh;
    min-height: 340px;
    margin-top: calc(var(--nav-h, 80px) * -1);
    padding-top: var(--nav-h, 80px);
    overflow: hidden;
    background: var(--dark);
    display: flex;
    align-items: flex-end;
}

.page-hero__bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to bottom, rgba(0,0,0,.20) 0%, rgba(0,0,0,.80) 100%),
        url('/images/contatti/hero-contatti.jpg');
    background-size: cover;
    background-position: center 55%;
    transform: scale(1.03);
    animation: subtleZoom 22s ease-in-out infinite alternate;
}

@keyframes subtleZoom {
    from { transform: scale(1.03); }
    to   { transform: scale(1.07); }
}

.page-hero__grain {
    position: absolute;
    inset: 0;
    opacity: .04;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 180px;
}

.page-hero__content {
    position: relative;
    z-index: 5;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem 3.5rem;
    animation: fadeUp .9s .1s ease both;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.page-hero__eyebrow {
    display: flex;
    align-items: center;
    gap: .9rem;
    font-size: .67rem;
    letter-spacing: .32em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1rem;
}
.page-hero__eyebrow::before {
    content: '';
    display: inline-block;
    width: 32px;
    height: 1px;
    background: var(--gold-40);
}

.page-hero__title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 6vw, 5.5rem);
    font-weight: 300;
    color: var(--cream);
    line-height: .97;
    letter-spacing: -.02em;
}
.page-hero__title em { font-style: italic; color: #d6e59a; }

/* ─────────────────────────────────────────────
   CONTAINER
───────────────────────────────────────────── */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-label {
    display: flex;
    align-items: center;
    gap: .9rem;
    font-size: .67rem;
    letter-spacing: .32em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1.2rem;
}
.label-line {
    display: inline-block;
    width: 36px;
    height: 1px;
    background: var(--gold-40);
    flex-shrink: 0;
}

/* ─────────────────────────────────────────────
   SEZIONE PRINCIPALE — form + info
───────────────────────────────────────────── */
.section-contact {
    padding: 7rem 0 6rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 6rem;
    align-items: start;
}

/* ─────────────────────────────────────────────
   INFO LATERALE
───────────────────────────────────────────── */
.contact-info h2 {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 3.8vw, 3.4rem);
    font-weight: 300;
    color: var(--cream);
    line-height: 1.08;
    margin-bottom: 1.4rem;
}
.contact-info h2 em { font-style: italic; color: #d6e59a; }

.contact-info > p {
    font-size: .97rem;
    color: var(--cream-60);
    line-height: 1.9;
    margin-bottom: 2.8rem;
}

/* Card contatto singola */
.contact-cards {
    display: flex;
    flex-direction: column;
    gap: 1px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 2.5rem;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 1.4rem;
    padding: 1.4rem 1.6rem;
    background: #1c2016;
    text-decoration: none;
    transition: background .25s ease;
    border-bottom: 1px solid var(--white-05);
}
.contact-card:last-child { border-bottom: none; }
.contact-card:hover { background: #20261a; }

.contact-card__icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--gold-40);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: border-color .25s ease, box-shadow .25s ease;
}
.contact-card:hover .contact-card__icon {
    border-color: var(--gold);
    box-shadow: 0 0 12px 2px rgba(201,162,39,.15);
}

.contact-card__label {
    font-size: .60rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--cream-45);
    display: block;
    margin-bottom: .25rem;
}

.contact-card__value {
    font-size: .95rem;
    color: var(--cream);
    display: block;
    line-height: 1.4;
}

/* Orari */
.contact-hours {
    border: 1px solid var(--white-05);
    border-radius: 8px;
    overflow: hidden;
}

.hours-header {
    padding: 1rem 1.4rem;
    border-bottom: 1px solid var(--white-05);
    font-size: .65rem;
    letter-spacing: .26em;
    text-transform: uppercase;
    color: var(--gold);
}

.hours-row {
    display: flex;
    justify-content: space-between;
    padding: .85rem 1.4rem;
    border-bottom: 1px solid var(--white-05);
    font-size: .85rem;
}
.hours-row:last-child { border-bottom: none; }
.hours-row span:first-child { color: var(--cream-60); }
.hours-row span:last-child  { color: var(--cream); }

/* Social */
.contact-social {
    display: flex;
    gap: .75rem;
    margin-top: 2rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid var(--white-08);
    color: var(--cream-60);
    font-size: 1rem;
    text-decoration: none;
    transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.social-link:hover {
    color: var(--gold);
    border-color: var(--gold-40);
    background: rgba(201,162,39,.06);
}

/* ─────────────────────────────────────────────
   FORM CONTATTO
───────────────────────────────────────────── */
.contact-form-wrap {
    background: #1c2016;
    border-radius: 12px;
    padding: 3rem;
    border: 1px solid var(--white-05);
}

.contact-form-wrap h3 {
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 300;
    color: var(--cream);
    margin-bottom: .6rem;
    line-height: 1.15;
}

.contact-form-wrap > p {
    font-size: .88rem;
    color: var(--cream-60);
    margin-bottom: 2.2rem;
    line-height: 1.7;
}

/* Tabs tipo messaggio */
.msg-type-tabs {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.msg-type-tab {
    background: none;
    border: 1px solid var(--white-08);
    border-radius: 999px;
    padding: .5rem 1.1rem;
    font-family: var(--font-sans);
    font-size: .68rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--cream-45);
    cursor: pointer;
    transition: color .2s ease, border-color .2s ease, background .2s ease;
    white-space: nowrap;
}
.msg-type-tab:hover { color: var(--cream); border-color: var(--white-08); }
.msg-type-tab.is-active {
    color: var(--gold);
    border-color: var(--gold-40);
    background: rgba(201,162,39,.08);
}

/* Campi form */
.form-group {
    margin-bottom: 1.4rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.4rem;
}

label {
    display: block;
    font-size: .65rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--cream-45);
    margin-bottom: .55rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
    width: 100%;
    background: rgba(255,255,255,.04);
    border: 1px solid var(--white-08);
    border-radius: 6px;
    padding: .85rem 1rem;
    font-family: var(--font-sans);
    font-size: .92rem;
    color: var(--cream);
    outline: none;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
    appearance: none;
    -webkit-appearance: none;
}

input::placeholder,
textarea::placeholder { color: var(--cream-35); }

input:focus,
select:focus,
textarea:focus {
    border-color: var(--gold-40);
    background: rgba(255,255,255,.06);
    box-shadow: 0 0 0 3px rgba(201,162,39,.08);
}

/* Validation states */
input.is-error,
select.is-error,
textarea.is-error {
    border-color: rgba(220,80,60,.5);
    box-shadow: 0 0 0 3px rgba(220,80,60,.08);
}

.field-error {
    display: block;
    font-size: .72rem;
    color: rgba(220,120,100,.9);
    margin-top: .4rem;
    letter-spacing: .05em;
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='rgba(245,240,232,.4)' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    cursor: pointer;
}

select option {
    background: #1c2016;
    color: var(--cream);
}

textarea {
    resize: vertical;
    min-height: 130px;
    line-height: 1.6;
}

/* Privacy checkbox */
.form-privacy {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    margin: 1.6rem 0 2rem;
}

.form-privacy input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: .1rem;
    border-radius: 4px;
    accent-color: var(--gold);
    cursor: pointer;
}

.form-privacy label {
    font-size: .80rem;
    letter-spacing: .03em;
    text-transform: none;
    color: var(--cream-60);
    line-height: 1.6;
    margin-bottom: 0;
    cursor: pointer;
}
.form-privacy label a {
    color: var(--gold);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Submit */
.btn-submit {
    width: 100%;
    padding: 1.05rem;
    border-radius: 8px;
    background: rgba(201,162,39,.95);
    color: var(--dark);
    font-family: var(--font-sans);
    font-size: .76rem;
    font-weight: 500;
    letter-spacing: .18em;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: transform .3s var(--ease-out-quart, cubic-bezier(.25,1,.5,1)),
                background .25s ease, opacity .25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
}
.btn-submit:hover:not(:disabled) { transform: translateY(-2px); background: #d9b33d; }
.btn-submit:disabled { opacity: .55; cursor: not-allowed; }
.btn-submit.is-loading .btn-submit__text { display: none; }
.btn-submit.is-loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid rgba(26,28,22,.3);
    border-top-color: var(--dark);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Messaggio di successo */
.form-success {
    display: none;
    text-align: center;
    padding: 3rem 2rem;
    animation: fadeUp .5s ease both;
}
.form-success.is-visible { display: block; }
.form-success__icon { font-size: 2.5rem; margin-bottom: 1rem; }
.form-success h4 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 300;
    color: var(--cream);
    margin-bottom: .8rem;
}
.form-success p {
    font-size: .9rem;
    color: var(--cream-60);
    line-height: 1.8;
}

/* ─────────────────────────────────────────────
   MAPPA
───────────────────────────────────────────── */
.section-map {
    padding: 0 0 7rem;
}

.map-wrap {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--white-05);
    height: 460px;
    background: #1c2016;
    position: relative;
}

.map-wrap iframe {
    width: 100%;
    height: 100%;
    border: none;
    filter: grayscale(.35) contrast(.95) brightness(.9);
}

/* Overlay pin con nome — visibile se no iframe */
.map-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: var(--cream-45);
}
.map-placeholder span { font-size: 2.5rem; }
.map-placeholder p {
    font-size: .80rem;
    letter-spacing: .14em;
    text-transform: uppercase;
}

/* Info sopra mappa */
.map-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.map-header h2 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 300;
    color: var(--cream);
}

.btn-directions {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .75rem 1.5rem;
    border-radius: 999px;
    border: 1px solid var(--gold-40);
    color: var(--gold);
    font-size: .70rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background .25s ease, border-color .25s ease;
    white-space: nowrap;
}
.btn-directions:hover { background: rgba(201,162,39,.1); border-color: var(--gold); }

/* ─────────────────────────────────────────────
   FAQ rapide
───────────────────────────────────────────── */
.section-faq {
    padding: 0 0 7rem;
    border-top: 1px solid var(--white-05);
    padding-top: 5rem;
}

.faq-grid {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 5rem;
    align-items: start;
}

.faq-intro h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 3.2vw, 2.8rem);
    font-weight: 300;
    color: var(--cream);
    line-height: 1.1;
    margin-bottom: 1rem;
}
.faq-intro h2 em { font-style: italic; color: #d6e59a; }
.faq-intro p {
    font-size: .92rem;
    color: var(--cream-60);
    line-height: 1.85;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    border-radius: 10px;
    overflow: hidden;
}

.faq-item {
    background: #1c2016;
    border-bottom: 1px solid var(--white-05);
    overflow: hidden;
}
.faq-item:last-child { border-bottom: none; }

.faq-question {
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-sans);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.4rem 1.6rem;
    text-align: left;
    transition: background .2s ease;
}
.faq-question:hover { background: rgba(255,255,255,.025); }

.faq-question span {
    font-size: .92rem;
    color: var(--cream);
    line-height: 1.4;
}

.faq-arrow {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid var(--white-08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--gold);
    font-size: .75rem;
    transition: transform .3s ease, border-color .3s ease;
}
.faq-item.is-open .faq-arrow { transform: rotate(45deg); border-color: var(--gold-40); }

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height .4s cubic-bezier(.25,1,.5,1);
}
.faq-item.is-open .faq-answer { max-height: 300px; }

.faq-answer p {
    padding: 0 1.6rem 1.4rem;
    font-size: .88rem;
    color: var(--cream-60);
    line-height: 1.85;
}

/* ─────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────── */
@media (max-width: 1000px) {
    .contact-grid { grid-template-columns: 1fr; gap: 4rem; }
    .faq-grid     { grid-template-columns: 1fr; gap: 3rem; }
}

@media (max-width: 900px) {
    .page-hero { height: 42vh; min-height: 300px; }
    .contact-form-wrap { padding: 2rem 1.5rem; }
    .form-row { grid-template-columns: 1fr; }
    .map-wrap { height: 320px; }
}

@media (max-width: 600px) {
    .container { padding: 0 1.25rem; }
    .msg-type-tabs { gap: .4rem; }
    .map-header { flex-direction: column; align-items: flex-start; }
}