/* Palette:
   Blu notte: #0A1A2F
   Oro: #C9A86A
   Grigio chiaro: #F5F5F5
*/

body {
    margin: 0;
    font-family: "Open Sans", sans-serif;
    background: #F5F5F5;
    color: #15365f;
    overflow-x: hidden;
}

/* HEADER */
.header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 40px;
    background: white;
    position: relative;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    height: 80px;
    width: 80px;
    object-fit: contain;
    border-radius: 50%;
}

.studio-name {
    font-size: 2.5rem;
    font-weight: 700;
    color: #000103;
    font-family: "Open Sans", sans-serif;
    letter-spacing: 0.5px;
}

/* MENU DESKTOP */
.nav {
    position: absolute;
    right: 40px;
}

.nav a {
    color: #000103;
    margin-left: 25px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
}

.nav a:hover {
    color: #C9A86A;
}

/* HERO */
.hero {
    background: linear-gradient(
        rgba(0,0,0,0.30),
        rgba(0,0,0,0.30)
    ),
    url('immagine-home.jpg') center/cover no-repeat;
    padding: 140px 20px 160px 20px;
    text-align: center;
    color: white;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.hero-content h2 {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.btn-primary {
    background: #C9A86A;
    color: #0A1A2F;
    padding: 12px 25px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 4px;
}

/* SEZIONI */
section {
    padding: 60px 20px;
    max-width: 1100px;
    margin: auto;
}

h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

/* SERVICES GRID */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.service-card {
    background: white;
    padding: 25px;
    border-left: 4px solid #C9A86A;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* VALUES */
.values ul {
    list-style: none;
    padding: 0;
}

.values li {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

/* CTA */
.contact-cta {
    text-align: center;
    background: #C9A86A;
    color: #0A1A2F;
    padding: 60px 20px;
}

/* FOOTER */
.footer {
    background: #0A1A2F;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

/* CHI SONO */
.chi-sono {
    padding: 60px 20px;
    max-width: 1100px;
    margin: auto;
}

.chi-sono-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    align-items: center;
}

.chi-sono-text p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: justify;
    text-justify: inter-word;
}

.chi-sono-photo img {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
    display: block;
}

/* ============================
   SLIDER — VERSIONE DEFINITIVA
   Desktop: fisso
   Mobile: scorrevole lento infinito (se implementi duplicazione HTML o JS)
   ============================ */

.gallery-slider {
    width: 100%;
    max-width: 1100px;
    margin: 40px auto;
    overflow: hidden;
    display: flex;
}

.slide-track {
    display: flex;
    gap: 20px;
}

.gallery-slider img {
    width: 250px;
    height: 180px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

/* ============================
   CONTACT PAGE (grafica importata)
   Layout: recapiti a sinistra, form a destra (affiancati)
   ============================ */

.contact-page {
    padding: 60px 20px;
    max-width: 1100px;
    margin: 40px auto;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(10,26,47,0.06);
    display: grid;
    grid-template-columns: 1fr 520px; /* sinistra: recapiti; destra: form */
    gap: 40px;
    align-items: start;
}

/* Titolo e intro (posizionate nella colonna sinistra sopra i recapiti) */
.contact-page h1 {
    margin: 0 0 10px 0;
    font-size: 2rem;
    color: #0A1A2F;
}

.contact-page .contact-intro {
    margin: 0 0 18px 0;
    color: #15365f;
    font-size: 1.05rem;
    line-height: 1.6;
}

/* Contenitore interno: sinistra/dx */
.contact-grid {
    display: contents; /* mantiene struttura semantica; layout gestito da .contact-page */
}

/* Colonna sinistra: recapiti, indirizzi, orari */
.contact-info {
    padding-right: 10px;
}

.contact-info h2 {
    font-size: 1.1rem;
    color: #0A1A2F;
    margin-top: 18px;
    margin-bottom: 8px;
}

.contact-info p {
    margin: 8px 0;
    color: #15365f;
    font-size: 1rem;
}

/* quick info box */
.contact-quick {
    background: linear-gradient(180deg, #fff 0%, #fbfaf8 100%);
    padding: 18px;
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(10,26,47,0.04);
    margin-top: 18px;
}

.contact-quick h3 {
    margin-top: 0;
    font-size: 1.05rem;
    color: #0A1A2F;
}

.contact-card {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.contact-card .icon {
    width: 44px;
    height: 44px;
    background: #C9A86A;
    color: #0A1A2F;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(201,168,106,0.18);
}

.contact-card .meta {
    font-size: 0.95rem;
    color: #15365f;
}

.contact-card .meta a {
    color: #15365f;
    text-decoration: none;
    font-weight: 600;
}

.contact-card .meta a:hover {
    color: #0A1A2F;
}

/* Mappa / iframe */
.contact-map {
    margin-top: 12px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eee;
    height: 220px;
    background: #f7f7f7;
}

/* Colonna destra: form */
.contact-form {
    padding: 0;
}

.contact-form h2 {
    margin-top: 0;
    font-size: 2rem;
    color: #0A1A2F;
}

/* Form layout */
.contact-form form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.form-group {
    display: block;
}

.contact-form label {
    display: block;
    font-size: 0.9rem;
    color: #15365f;
    margin-bottom: 6px;
    font-weight: 600;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea,
.contact-form select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e6e6e6;
    border-radius: 6px;
    background: #fff;
    color: #15365f;
    font-size: 0.95rem;
    box-shadow: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.contact-form textarea {
    min-height: 140px;
    resize: vertical;
    grid-column: 1 / -1;
}

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

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    outline: none;
    border-color: #C9A86A;
    box-shadow: 0 4px 12px rgba(201,168,106,0.12);
}

/* Pulsante invio */
.contact-form .btn-submit {
    display: inline-block;
    background: #0A1A2F;
    color: #fff;
    padding: 12px 20px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 700;
    letter-spacing: 0.2px;
    transition: background .15s ease, transform .08s ease;
    margin-top: 6px;
    grid-column: 1 / -1;
    justify-self: start;
}

.contact-form .btn-submit:hover {
    background: #0f2a45;
    transform: translateY(-1px);
}

/* stato del form */
.form-status {
    margin-top: 12px;
    font-size: 0.95rem;
}
.form-status.success { color: #0A7A3A; }
.form-status.error   { color: #b00020; }

/* Piccoli accorgimenti tipografici */
.contact-page .muted {
    color: #7a8796;
    font-size: 0.95rem;
}

/* ============================
   RESPONSIVE CONTACT
   ============================ */

@media (max-width: 900px) {
    .contact-page {
        grid-template-columns: 1fr;
        padding: 30px 16px;
    }

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

    .contact-form textarea {
        min-height: 120px;
    }

    .contact-quick {
        margin-top: 18px;
    }
}

/* ============================
   RESPONSIVE GENERALE
   ============================ */

@media (max-width: 900px) {

    .logo {
        height: 90px;
        width: 90px;
    }

    .studio-name {
        font-size: 1.4rem;
    }

    .nav {
        display: none !important;
    }

    .hamburger {
        display: flex !important;
    }

    .mobile-menu {
        display: flex;
    }

    .chi-sono-grid {
        grid-template-columns: 1fr !important;
        gap: 30px;
    }

    .chi-sono-photo {
        display: flex;
        justify-content: center;
    }

    .chi-sono-photo img {
        max-width: 240px;
    }

    .chi-sono-text {
        width: 100%;
        padding: 0 10px;
        text-align: left;
    }

    .chi-sono-text p {
        font-size: 1rem;
        line-height: 1.55;
    }
}

/* MOBILE — slider (loop gestito da JS o duplicazione HTML) */
@media (max-width: 600px) {

  .slide-track {
      display: flex;
      width: max-content;
      will-change: transform;
  }

  .gallery-slider img {
      width: 150px;
      height: auto;
  }

  .logo {
      height: 70px;
      width: 70px;
  }

  .studio-name {
      font-size: 1.2rem;
  }
}

/* MENU MOBILE */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    z-index: 2001;
    position: absolute;
    right: 20px;
}

.hamburger .bar {
    width: 28px;
    height: 3px;
    background-color: #000103;
    border-radius: 2px;
    display: block;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 260px;
    height: 100vh;
    background: white;
    padding: 80px 20px;
    display: flex;
    flex-direction: column;
    gap: 25px;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    z-index: 2000;
}

.mobile-menu a {
    font-size: 1.3rem;
    text-decoration: none;
    color: #000103;
    font-weight: bold;
}

.mobile-menu.open {
    transform: translateX(0);
}

/* OVERLAY */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
    z-index: 1500;
}

.overlay.show {
    opacity: 1;
    pointer-events: all;
}

@media (min-width: 901px) {
    .nav {
        display: flex !important;
    }

    .hamburger {
        display: none;
    }

    .mobile-menu {
        display: none !important;
    }
}

/* HOME – riduzione padding verticale */
.index section {
    padding-top: 20px;
    padding-bottom: 20px;
}

/* Rimuove stile blu e sottolineato da email e telefono */
a[href^="mailto"],
a[href^="tel"] {
    color: inherit !important;
    text-decoration: none !important;
    font-weight: inherit;
}

a[href^="mailto"]:hover,
a[href^="tel"]:hover {
    text-decoration: underline;
}

/* ============================
   PAGINA PRIVACY
   ============================ */

.privacy-page {
    padding: 60px 20px;
    max-width: 860px;
    margin: auto;
}

.privacy-meta {
    color: #888;
    font-size: 0.9rem;
    margin-top: -10px;
    margin-bottom: 40px;
}

.privacy-body h2 {
    font-size: 1.05rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #C9A86A;
    margin: 36px 0 10px;
}

    /* Giustifica il testo nella pagina Informativa Privacy */
.privacy-body,
.privacy-body p,
.privacy-body li {
  text-align: justify;
  text-justify: inter-word;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  hyphens: auto;
  line-height: 1.75;
  color: #15365f;
}

/* Mantieni i titoli allineati a sinistra per leggibilità */
.privacy-body h2,
.privacy-body h1 {
  text-align: left;
  color: #C9A86A;
  margin-top: 1.4rem;
}

/* Piccola ottimizzazione per schermi stretti */

@media (max-width: 600px) {
  .privacy-body,
  .privacy-body p,
  .privacy-body li {
    text-align: left; /* evita righe troppo lunghe e spaziature irregolari su mobile */
    hyphens: auto;
  }
}

/* ============================
   POPUP CHIUSURA FERIE
   ============================ */

.ferie-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 26, 47, 0.82);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 20px;
  box-sizing: border-box;
}

.ferie-popup {
  background: #ffffff;
  border-top: 4px solid #C9A86A;
  border-radius: 6px;
  padding: 48px 44px 40px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  position: relative;
  margin: auto;
  box-shadow: 0 20px 60px rgba(10, 26, 47, 0.35);
  animation: ferieIn 0.3s ease;
}

@keyframes ferieIn {
  from { opacity: 0; transform: translateY(-18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ferie-close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: #aaa;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: color 0.2s;
}
.ferie-close:hover { color: #0A1A2F; }

.ferie-icon {
  font-size: 2.4rem;
  margin-bottom: 12px;
}

.ferie-title {
  font-size: 1.4rem;
  color: #0A1A2F;
  margin: 0 0 18px;
  font-family: "Open Sans", sans-serif;
  font-weight: 700;
}

.ferie-msg {
  font-size: 1rem;
  color: #15365f;
  line-height: 1.7;
  margin-bottom: 12px;
}

.ferie-msg strong {
  color: #0A1A2F;
}

.ferie-sub {
  font-size: 0.85rem;
  color: #7a8796;
  line-height: 1.6;
  margin-bottom: 28px;
}

.ferie-btn {
  display: inline-block;
  background: #C9A86A;
  color: #0A1A2F;
  padding: 12px 28px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  margin-bottom: 14px;
  transition: background 0.2s;
}
.ferie-btn:hover { background: #b8944f; }

.ferie-dismiss {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: #aaa;
  font-size: 0.82rem;
  cursor: pointer;
  letter-spacing: 0.04em;
  padding: 4px 0;
  transition: color 0.2s;
  font-family: "Open Sans", sans-serif;
}
.ferie-dismiss:hover { color: #0A1A2F; }

@media (max-width: 500px) {
  .ferie-popup {
    padding: 40px 24px 32px;
  }
}
