/* ==========================================================================
   REVICASA — Foglio di stile personalizzato
   Complementare a Pico.css (NON lo sostituisce, lo estende)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. RESET MINIMALE (compatibile con Pico)
   -------------------------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   2. VARIABILI BRAND
   -------------------------------------------------------------------------- */
:root {
    --brand: #0056b3;
    --brand-hover: #003d80;
    --brand-light: rgba(0, 86, 179, 0.08);

    --text-main: #1a1a1a;
    --text-muted: #718096;
    --text-soft: #4a5568;

    --surface: #ffffff;
    --surface-alt: #f8f9fa;
    --border: #e2e8f0;

    --radius: 8px;
    --radius-sm: 4px;

    --success-bg: #edf7ed;
    --success-text: #1e4620;
    --error-bg: #fdeded;
    --error-text: #5f2120;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* --------------------------------------------------------------------------
   3. TIPOGRAFIA E CORPO
   -------------------------------------------------------------------------- */
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-main);
    letter-spacing: -0.01em;
}

p {
    color: var(--text-soft);
}

a {
    color: var(--brand);
    text-decoration: none;
}

a:hover {
    color: var(--brand-hover);
    text-decoration: underline;
}

.text-center {
    text-align: center;
}

/* --------------------------------------------------------------------------
   4. HEADER E NAVBAR
   -------------------------------------------------------------------------- */
header.container {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid var(--border);
}

header nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

header nav > div {
    text-align: center;
}

header nav strong {
    color: var(--brand);
    font-size: 1.4rem;
    letter-spacing: -0.5px;
}

header nav span {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-left: 0.5rem;
}

/* Switcher lingua */
header nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    font-size: 0.85rem;
}

header nav ul li {
    margin: 0;
    padding: 0;
}

header nav ul li a {
    color: var(--text-muted);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: color 0.15s ease, background-color 0.15s ease;
}

header nav ul li a:hover {
    color: var(--brand);
    background-color: var(--brand-light);
    text-decoration: none;
}

/* Lingua attiva */
header nav ul li a[style*="font-weight:700"] {
    color: var(--brand) !important;
}

/* --------------------------------------------------------------------------
   5. HERO SECTION
   -------------------------------------------------------------------------- */
.hero-section {
    background-color: var(--surface-alt);
    padding: 4rem 1rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.hero-section h1 {
    font-size: clamp(1.75rem, 4vw, 2.6rem);
    line-height: 1.2;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.hero-section p {
    font-size: 1.15rem;
    max-width: 800px;
    margin: 0 auto 2rem;
    color: var(--text-soft);
    line-height: 1.6;
}

.hero-section .actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   6. GRIGLIE DI SERVIZI / STEP / STRUMENTI
   -------------------------------------------------------------------------- */
.grid-services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.step-box,
.tool-box,
.check-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.step-box:hover,
.tool-box:hover,
.check-box:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: #cbd5e0;
}

.step-box h4,
.tool-box h4,
.check-box h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.step-box p,
.tool-box p,
.check-box p {
    font-size: 0.95rem;
    color: var(--text-soft);
    margin: 0;
    line-height: 1.55;
}

/* Numero grande negli step */
.step-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--brand);
    margin-bottom: 0.5rem;
    line-height: 1;
}

/* Icone negli strumenti / check */
.tool-box i,
.check-box i {
    color: var(--brand);
    font-size: 2rem;
    margin-bottom: 0.75rem;
    display: inline-block;
}

/* --------------------------------------------------------------------------
   7. GALLERIA FOTO
   -------------------------------------------------------------------------- */
.photo-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.photo-row img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: transform 0.25s ease;
}

.photo-row img:hover {
    transform: scale(1.02);
}

/* --------------------------------------------------------------------------
   8. FORM CONTATTI
   -------------------------------------------------------------------------- */
#contact-form {
    margin-top: 1.5rem;
}

#contact-form input,
#contact-form textarea {
    width: 100%;
    margin-bottom: 1rem;
    font-family: inherit;
}

#contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

#contact-form button[type="submit"] {
    width: 100%;
    background-color: var(--brand);
    border-color: var(--brand);
    color: #ffffff;
    font-weight: 500;
    letter-spacing: 0.3px;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

#contact-form button[type="submit"]:hover:not(:disabled) {
    background-color: var(--brand-hover);
    border-color: var(--brand-hover);
}

#contact-form button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Messaggi di stato */
#form-status {
    margin-top: 1rem;
    padding: 0;
    font-size: 0.9rem;
    text-align: center;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

#form-status.success {
    padding: 0.85rem 1rem;
    background-color: var(--success-bg);
    color: var(--success-text);
    border: 1px solid #c6e6c6;
}

#form-status.error {
    padding: 0.85rem 1rem;
    background-color: var(--error-bg);
    color: var(--error-text);
    border: 1px solid #f5c2c2;
}

/* --------------------------------------------------------------------------
   9. FOOTER
   -------------------------------------------------------------------------- */
footer {
    background-color: var(--surface-alt);
    border-top: 1px solid var(--border);
    padding: 2rem 1rem;
    margin-top: 4rem;
    text-align: center;
}

footer .container {
    max-width: 1140px;
    margin: 0 auto;
}

/* Label "Zona operativa" */
footer p:first-child {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
}

/* Link zone */
footer ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

footer ul li {
    margin: 0;
}

footer ul li a {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color 0.15s ease;
}

footer ul li a:hover {
    color: var(--brand);
    text-decoration: none;
}

/* Zona attiva */
footer ul li a[style*="font-weight:700"] {
    color: var(--brand) !important;
    font-weight: 700;
}

/* Copyright */
footer p:last-child {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

/* --------------------------------------------------------------------------
   10. RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 1rem;
    }

    .hero-section h1 {
        font-size: 1.75rem;
    }

    .hero-section p {
        font-size: 1rem;
    }

    .step-box,
    .tool-box,
    .check-box {
        padding: 1.5rem 1.25rem;
    }

    .photo-row img {
        height: 180px;
    }

    header nav strong {
        font-size: 1.2rem;
    }
}

/* --------------------------------------------------------------------------
   11. ACCESSIBILITÀ
   -------------------------------------------------------------------------- */
*:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}