/* ============================================
   RESET & BASE (Stile Cantiere / Industriale)
============================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f2f2f0;
    color: #1a1a1a;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
}

/* ============================================
   TIPOGRAFIA TECNICA / INDUSTRIALE
============================================ */
h1,
h2,
h3,
h4 {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

h1 {
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1.1;
}

h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
}

h3 {
    font-size: 1.2rem;
    font-weight: 700;
}

/* Sostituto dell'oro: Giallo Segnaletica / Sicurezza */
.gold {
    color: #ffcc00;
    background: linear-gradient(135deg, #ffcc00 0%, #ff9900 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   HEADER MINIMALE
============================================ */
.site-header {
    padding: 20px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.brand {
    font-size: 0.95rem;
    letter-spacing: 0.04em;
}

.brand-sub {
    font-weight: 400;
    color: #6b6a68;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.brand-divider {
    margin: 0 10px;
    color: #b8860b;
    font-weight: 300;
}

.brand-main {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #1f1e1d;
    letter-spacing: 0.06em;
}

.header-contact {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
}

.contact-label {
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #a09e9a;
    font-weight: 400;
    margin-bottom: 1px;
}

.header-phone {
    font-size: 1.05rem;
    font-weight: 500;
    color: #b8860b;
    transition: color 0.3s ease;
    letter-spacing: 0.02em;
}

.header-phone:hover {
    color: #d4af37;
}

/* Su smartphone l'header va interamente in colonna unica */
@media (max-width: 768px) {
    .header-flex {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .header-contact {
        align-items: flex-start;
        width: 100%;
        border-top: 1px solid rgba(0, 0, 0, 0.06);
        padding-top: 8px;
    }
}


/* ============================================
   FOOTER
============================================ */
.site-footer {
    padding: 48px 0 32px;
    background: #1f1e1d;
    color: #a09e9a;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr; /* Colonna unica anche nel footer */
        gap: 24px;
        text-align: left;
    }
    .footer-logo {
        margin: 0 0 12px 0;
    }
}

.footer-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: #faf9f7;
}

.footer-division {
    font-size: 0.8rem;
    color: #b8860b;
    letter-spacing: 0.06em;
}

.footer-logo {
    height: 50px;           
    width: auto;            
    display: block;
    margin-bottom: 12px;
}

.footer-logo-white {
    filter: brightness(0) invert(1) opacity(0.9);
}

.footer-contacts a {
    color: #faf9f7;
    transition: color 0.3s ease;
}

.footer-contacts a:hover {
    color: #b8860b;
}

.footer-contacts p {
    margin-bottom: 4px;
}

.footer-address {
    font-size: 0.85rem;
    color: #7a7873;
}

.footer-legal {
    font-size: 0.75rem;
}

.footer-legal a {
    color: #7a7873;
    transition: color 0.3s ease;
}

.footer-legal a:hover {
    color: #b8860b;
}

.footer-link-sito {
    margin-top: 8px;
}

.footer-link-sito a {
    font-size: 0.7rem;
    color: #7a7873;
    text-decoration: none;
    transition: color 0.3s ease;
    letter-spacing: 0.03em;
}

.footer-link-sito a:hover {
    color: #b8860b;
}


/* ============================================
   HERO CANTIERE / ELETTROVALVOLE (OTTIMIZZATO PC & MOBILE)
============================================ */
.hero {
    padding: 40px 0 50px;
    background: #1a1a1a;
    color: #fff;
    border-bottom: 4px solid #ffcc00;
    width: 100%;
    overflow: hidden;
}

/* Struttura base mobile */
.hero-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    max-width: 100%;
}

/* Da 992px in su (PC/Desktop): griglia contenuta e compatta */
@media (min-width: 992px) {
    .hero {
        padding: 60px 0 80px;
    }
    .hero-grid {
        display: grid;
        grid-template-columns: 1fr 1fr; /* 50/50 bilanciato o 1.1fr 0.9fr */
        gap: 50px;
        align-items: center;
        max-width: 1140px; /* Mantiene l'intera hero compatta al centro */
        margin: 0 auto;
    }
}

.hero-text {
    width: 100%;
    min-width: 0;
    /* BLOCCO DEFINITIVO PC: Impedisce al testo di allargarsi troppo a scapito dell'immagine */
    max-width: 600px; 
}

.hero-tag {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #ffcc00;
    font-weight: 700;
    display: block;
    margin-bottom: 8px;
}

.hero-text h1 {
    font-size: 1.85rem;
    margin-bottom: 14px;
    color: #fff;
    line-height: 1.2;
    word-break: break-word;
}

@media (min-width: 768px) {
    .hero-text h1 {
        font-size: 2.4rem;
    }
}

.hero-sub {
    font-size: 1rem;
    color: #ccc;
    font-weight: 400;
    line-height: 1.6;
    margin-bottom: 16px;
    word-break: break-word;
}

@media (min-width: 768px) {
    .hero-sub {
        font-size: 1.05rem;
    }
}

.hero-visual {
    width: 100%;
    min-width: 0;
}

.hero-image-placeholder {
    aspect-ratio: 16 / 9;
    width: 100%;
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.placeholder-label {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.75);
    color: #ffcc00;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 8px;
    border-radius: 4px;
    z-index: 2;
}

@media (min-width: 768px) {
    .placeholder-label {
        font-size: 0.75rem;
        bottom: 12px;
        left: 12px;
        padding: 4px 10px;
    }
}

.perimetro-box {
    margin: 20px 0;
    background: #252525;
    padding: 14px 16px;
    border-left: 4px solid #ffcc00;
    border-radius: 0 6px 6px 0;
    width: 100%;
    box-sizing: border-box;
}

.perimetro-box p {
    color: #ddd;
    font-size: 0.85rem;
    line-height: 1.5;
    word-break: break-word;
}

.perimetro-box a {
    color: #ffcc00;
    font-weight: 700;
    text-decoration: underline;
    display: inline-block;
    margin-top: 4px;
}
/* ============================================
   PRODOTTI / GRIGLIA TECNICA
============================================ */
.prodotti {
    padding: 70px 0 90px;
    background: #f2f2f0;
}

.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 48px;
}

.section-tag {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #d97706;
    font-weight: 700;
    display: block;
    margin-bottom: 6px;
}

.section-desc {
    color: #555;
    font-weight: 400;
    margin-top: 6px;
}

.prodotti-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    width: 100%;
}

/* Su smartphone i prodotti diventano tassativamente a colonna unica */
@media (max-width: 768px) {
    .prodotti-grid {
        grid-template-columns: 1fr;
    }
}

.prodotto-card {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e0e0e0;
    border-top: 4px solid #1a1a1a;
    width: 100%;
}

.prodotto-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-top-color: #ffcc00;
}

.prodotto-image {
    position: relative;
    background: #e5e5e0;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prodotto-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #1a1a1a;
    color: #ffcc00;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    border-radius: 4px;
}

.prodotto-body {
    padding: 20px;
}

.prodotto-body h3 {
    margin-bottom: 8px;
    font-size: 1.15rem;
    text-transform: none;
}

.prodotto-desc {
    font-size: 0.88rem;
    color: #444;
    line-height: 1.5;
    margin-bottom: 12px;
}

.marchio {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #1a1a1a;
    background: #ffcc00;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-left: 4px;
}

.btn-pdf-small {
    display: inline-block;
    margin-top: 12px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #1a1a1a;
    background: #e5e5e0;
    padding: 6px 14px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.btn-pdf-small:hover {
    background: #1a1a1a;
    color: #ffcc00;
}


/* ============================================
   FORM DI RICHIESTA (Colonna Unica su Smartphone e Tablet)
============================================ */
.form-section {
    padding: 70px 0 90px;
    background: #ffffff;
    border-top: 1px solid #e0e0e0;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
    align-items: start;
    width: 100%;
}

/* Su smartphone e tablet il form va tassativamente in colonna unica */
@media (max-width: 992px) {
    .form-grid {
        grid-template-columns: 1fr !important;
    }
}

.form-tag {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #d97706;
    font-weight: 700;
    display: block;
    margin-bottom: 6px;
}

.form-intro h2 {
    margin-bottom: 12px;
}

.form-intro p {
    color: #555;
    font-weight: 400;
    line-height: 1.6;
    margin-bottom: 20px;
}

.form-contatti-rapidi {
    background: #f8f8f6;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    border-left: 4px solid #1a1a1a;
}

.contact-phone {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a1a1a;
    display: block;
    margin: 4px 0 6px;
}

.form-main {
    background: #f8f8f6;
    padding: 32px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .form-main {
        padding: 20px;
    }
}

/* Forza tutti i campi del form a colonna unica su smartphone e tablet */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
    width: 100%;
}

@media (max-width: 992px) {
    .form-row {
        grid-template-columns: 1fr !important; /* Campi nome, cognome, email, ecc. tutti in verticale */
    }
}

.full-width {
    grid-column: 1 / -1;
}

.form-group {
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
}

.form-group label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #333;
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    max-width: 100%;
    padding: 12px 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px; /* Evita lo zoom automatico su iOS */
    font-family: 'Inter', sans-serif;
    background: #fff;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1a1a1a;
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.1);
}

.privacy {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
    width: 100%;
}

.privacy input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #1a1a1a;
    flex-shrink: 0;
}

.privacy label {
    font-size: 0.8rem;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
    color: #444;
    margin-bottom: 0;
    line-height: 1.3;
}

.btn-submit {
    width: 100%;
    padding: 14px;
    background: #1a1a1a;
    color: #ffcc00;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: 6px;
}

.btn-submit:hover {
    background: #333;
}

.form-note {
    font-size: 0.75rem;
    color: #666;
    text-align: center;
    margin-top: 12px;
}


/* ============================================
   FOOTER (Ripristinato Originale)
============================================ */
.site-footer {
    padding: 48px 0 32px;
    background: #1f1e1d;
    color: #a09e9a;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        text-align: center;
    }
}

.footer-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: #faf9f7;
}

.footer-division {
    font-size: 0.8rem;
    color: #b8860b;
    letter-spacing: 0.06em;
}

.footer-logo {
    height: 50px;          
    width: auto;           
    display: block;
    margin-bottom: 12px;
}

.footer-logo-white {
    filter: brightness(0) invert(1) opacity(0.9);
}

.footer-contacts a {
    color: #faf9f7;
    transition: color 0.3s ease;
}

.footer-contacts a:hover {
    color: #b8860b;
}

.footer-contacts p {
    margin-bottom: 4px;
}

.footer-address {
    font-size: 0.85rem;
    color: #7a7873;
}

.footer-legal {
    font-size: 0.75rem;
}

.footer-legal a {
    color: #7a7873;
    transition: color 0.3s ease;
}

.footer-legal a:hover {
    color: #b8860b;
}

.footer-link-sito {
    margin-top: 8px;
}

.footer-link-sito a {
    font-size: 0.7rem;
    color: #7a7873;
    text-decoration: none;
    transition: color 0.3s ease;
    letter-spacing: 0.03em;
}

.footer-link-sito a:hover {
    color: #b8860b;
}