/* VERSIONE: 00.00.07
   MODIFICHE E IMPLEMENTAZIONI EFFETTUATE (CHANGELOG):
   Percorso completo origine file: \\212.227.161.94\progetti\miositoweb\static\css\style.css
   Cartella backup versionati del progetto: H:\BackupSoftware\Backup_Progetti_Attivi\miositoweb
   25/08/2026 13:13:07 - Versione 00.00.07 - Aggiunto passaggio mouse rosso dedicato al solo tasto Area Privata della navbar senza modificare l'hover degli altri link.
   25/08/2026 08:00:54 - Versione 00.00.06 - Aggiunto effetto di accensione al passaggio del mouse e al focus sui tasti della navbar.
   25/08/2026 06:28 - Versione 00.00.05 - Rifinita la correzione mobile stretto della home impilando i riquadri principali e contenendo i link a 320px.
   25/08/2026 03:31 - Versione 00.00.04 - Corretto lo scorrimento orizzontale su mobile stretto per home, competenze e lavori.
   25/08/2026 02:09 - Versione 00.00.03 - Aggiunti campo anti-spam invisibile e stato disabilitato del pulsante invio nella modale Contattami.
   25/08/2026 01:56 - Versione 00.00.02 - Aggiunti stili per i contatti diretti dentro la modale Contattami.
   25/08/2026 01:44 - Versione 00.00.01 - Aggiunti stili della modale contatto pubblica senza modificare la grafica delle sezioni esistenti.
*/

/* ----------------------------------------------------------------------
   VARIABILI E PALETTE CROMATICA (Tema Blu Elettrico & Neon)
   ---------------------------------------------------------------------- */
:root[data-theme="dark"] {
    --bg-primary: #0a0f1d;
    --bg-secondary: #111a30;
    --border-color: #1e3264;
    --text-primary: #f0f4ff;
    --text-secondary: #8a9fc4;
    --accent-color: #0052ff;  /* Blu Elettrico Vivido */
    --accent-neon: #00d2ff;   /* Cyan Neon Accattivante */
    --navbar-bg: #0d1527;
    --card-bg: #14213d;
}

:root[data-theme="light"] {
    --bg-primary: #f4f7fc;
    --bg-secondary: #ffffff;
    --border-color: #cbdcf7;
    --text-primary: #0f1c3f;
    --text-secondary: #5c6b89;
    --accent-color: #0046ff;  /* Blu Elettrico ad alto contrasto per il light mode */
    --accent-neon: #002db3;
    --navbar-bg: #ffffff;
    --card-bg: #ffffff;
}

/* ----------------------------------------------------------------------
   RESET E LAYOUT DI BASE
   ---------------------------------------------------------------------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ----------------------------------------------------------------------
   NAVBAR ISTITUZIONALE
   ---------------------------------------------------------------------- */
.navbar {
    background-color: var(--navbar-bg);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
    padding: 15px 20px;
}

.logo {
    font-weight: 700;
    font-size: 1.3rem;
    text-decoration: none;
    color: var(--accent-color);
    letter-spacing: -0.01em;
}

.nav-menu {
    display: flex;
    gap: 25px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
    color: #ffffff !important;
    background-color: var(--accent-color) !important;
    border-color: var(--accent-neon) !important;
    box-shadow: 0 0 18px rgba(0, 210, 255, 0.45), 0 6px 16px rgba(0, 82, 255, 0.28) !important;
    transform: translateY(-1px);
}

.nav-link--private-area:hover,
.nav-link--private-area:focus-visible {
    color: #ffffff !important;
    background-color: #EA4335 !important;
    border-color: #EA4335 !important;
    box-shadow: 0 0 18px rgba(234, 67, 53, 0.42), 0 6px 16px rgba(234, 67, 53, 0.25) !important;
}

/* ----------------------------------------------------------------------
   INTERRUTTORE TEMA (Toggle)
   ---------------------------------------------------------------------- */
.theme-btn {
    background: none;
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, border-color 0.2s;
}

.theme-btn:hover {
    background-color: var(--bg-secondary);
    border-color: var(--accent-color);
}

.mode-icon::before {
    content: "🌙";
}

:root[data-theme="light"] .mode-icon::before {
    content: "☀️";
}

/* ----------------------------------------------------------------------
   SEZIONI CONTENUTO
   ---------------------------------------------------------------------- */
.main-content {
    flex: 1;
    padding: 60px 0;
}

.hero-section {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.divider {
    border: 0;
    height: 1px;
    background-color: var(--border-color);
    margin: 30px 0;
}

.intro-box {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 30px;
    border-radius: 6px;
    text-align: left;
}

/* ----------------------------------------------------------------------
   MODALE CONTATTO PUBBLICA
   ---------------------------------------------------------------------- */
body.contact-modal-open {
    overflow: hidden;
}

.contact-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.contact-modal.is-visible {
    display: flex;
}

.contact-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.68);
}

.contact-modal__panel {
    position: relative;
    width: min(100%, 560px);
    max-height: calc(100vh - 40px);
    overflow: auto;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 26px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

.contact-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--navbar-bg);
    color: var(--text-primary);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

.contact-modal__kicker {
    margin: 0 0 6px;
    color: var(--accent-color);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.contact-modal__panel h2 {
    margin: 0 38px 10px 0;
    color: var(--text-primary);
    font-size: 1.55rem;
    font-weight: 800;
}

.contact-modal__intro {
    margin: 0 0 18px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.contact-modal__direct {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 0 0 18px;
}

.contact-modal__direct-link {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    text-decoration: none;
}

.contact-modal__direct-link span {
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.contact-modal__direct-link strong {
    min-width: 0;
    color: var(--accent-color);
    font-size: 0.86rem;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.contact-modal__direct-link:hover {
    border-color: var(--accent-color);
}

.contact-modal__form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.contact-modal__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--text-primary);
    font-size: 0.88rem;
    font-weight: 700;
}

.contact-modal__field--full,
.contact-modal__feedback,
.contact-modal__actions {
    grid-column: 1 / -1;
}

.contact-modal__field--trap {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.contact-modal__field input,
.contact-modal__field textarea {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 11px 12px;
    font: inherit;
}

.contact-modal__field textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-modal__feedback {
    margin: 0;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
}

.contact-modal__feedback:empty {
    display: none;
}

.contact-modal__feedback--error {
    background: rgba(234, 67, 53, 0.12);
    border: 1px solid rgba(234, 67, 53, 0.35);
    color: var(--text-primary);
}

.contact-modal__feedback--success {
    background: rgba(20, 184, 166, 0.12);
    border: 1px solid rgba(20, 184, 166, 0.35);
    color: var(--text-primary);
}

.contact-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.contact-modal__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 800;
    cursor: pointer;
}

.contact-modal__button--primary {
    border: 0;
    background: var(--accent-color);
    color: #ffffff;
}

.contact-modal__button--secondary {
    border: 1px solid var(--border-color);
    background: var(--navbar-bg);
    color: var(--text-primary);
}

.contact-modal__button:disabled {
    cursor: wait;
    opacity: 0.72;
}

@media (max-width: 640px) {
    .contact-modal {
        padding: 12px;
    }

    .contact-modal__panel {
        padding: 22px;
    }

    .contact-modal__form {
        grid-template-columns: 1fr;
    }

    .contact-modal__direct {
        grid-template-columns: 1fr;
    }

    .contact-modal__actions {
        justify-content: stretch;
    }

    .contact-modal__button {
        width: 100%;
    }
}

@media (max-width: 360px) {
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .hero-section,
    .page-section,
    .container > section[style*="max-width: 1000px"] {
        max-width: 100%;
    }

    .hero-section > div,
    .page-section > div,
    .container > section[style*="max-width: 1000px"] > div {
        max-width: 100%;
        min-width: 0;
    }

    .hero-section > div > div,
    .page-section article,
    .container > section[style*="max-width: 1000px"] article {
        max-width: 100%;
        min-width: 0;
    }

    .hero-section [style*="min-width: 250px"] {
        min-width: 0 !important;
    }

    .intro-box > div,
    .tips-box > div,
    .ham-box > div,
    .gallery-box > div,
    .private-box > div {
        flex-direction: column;
        align-items: flex-start !important;
    }

    .hero-section a[style*="display: inline-block"] {
        max-width: 100%;
        white-space: normal;
        overflow-wrap: anywhere;
        text-align: center;
    }

    .page-section [style*="grid-template-columns: repeat(auto-fit"],
    .container > section[style*="max-width: 1000px"] [style*="grid-template-columns: repeat(auto-fit"] {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}

/* ----------------------------------------------------------------------
   FOOTER
   ---------------------------------------------------------------------- */
.footer {
    background-color: var(--navbar-bg);
    border-top: 1px solid var(--border-color);
    padding: 25px 0;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.footer-link {
    color: var(--accent-color);
    text-decoration: none;
}

.footer-link:hover {
    text-decoration: underline;
}
