/* ========================================
   STILE GLOBALE (v2.2 con Dropdown)
   ======================================== */

:root {
  --primary-color: #1A3A5A; --primary-color-dark: #10253A; --accent-color: #D4A056; --accent-color-hover: #E8B871;
  --secondary-color: #1a202c; --bg-light: #fdfdfd; --bg-dark: #f4f6f9; --text-color: #4a5568;
  --font-family: "Poppins", sans-serif; --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06); --box-shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.1);
  --border-radius: 12px; --transition-speed: 0.3s;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; width: 100%; overflow-x: hidden; }
body { font-family: var(--font-family); line-height: 1.7; color: var(--text-color); background-color: var(--bg-light); overflow-x: hidden; }
.preloader-active { overflow: hidden; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
img { max-width:100%; height:auto; display: block; }
section { padding: 100px 0; }
.section-title, h2 { font-size: 2.8rem; font-weight: 700; text-align: center; margin-bottom: 1.5rem; color: var(--secondary-color); position: relative; padding-bottom: 15px; }
.section-title::after, h2::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 80px; height: 4px; background-color: var(--accent-color); border-radius: 2px; }
.section-subtitle { font-size: 1.1rem; color: #6c757d; text-align: center; margin-top: -15px; margin-bottom: 60px; max-width: 600px; margin-left: auto; margin-right: auto; }
.bg-light { background-color: var(--bg-light); }
.bg-dark { background-color: var(--bg-dark); }
.text-light { color: #fff; text-shadow: 1px 1px 10px rgba(0, 0, 0, 0.7); }
.btn { display: inline-block; background-color: var(--accent-color); color: #fff !important; padding: 15px 40px; border: none; border-radius: 50px; text-decoration: none; font-size: 1rem; font-weight: 600; cursor: pointer; transition: all var(--transition-speed) ease; box-shadow: 0 5px 20px rgba(212, 160, 86, 0.4); }
.btn:hover { background-color: var(--accent-color-hover); transform: translateY(-5px); box-shadow: 0 8px 25px rgba(212, 160, 86, 0.5); }
.btn i { margin-right: 10px; }
header { background-color: rgba(255, 255, 255, 0.8); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); border-bottom: 1px solid rgba(0,0,0,0.07); padding: 0; position: sticky; top: 0; z-index: 1000; width: 100%; transition: all var(--transition-speed) ease; }
header.scrolled { height: 70px; box-shadow: 0 5px 25px rgba(0,0,0,0.08); }
header .container { height: 80px; display:flex; justify-content:space-between; align-items:center; transition:height var(--transition-speed) ease; }
header.scrolled .container { height:70px; }
.logo img { height:50px; transition:height var(--transition-speed) ease; }
header.scrolled .logo img { height:45px; }
nav ul { list-style:none; display:flex; gap:35px; }
nav a { text-decoration:none; color:var(--secondary-color); font-weight:600; position:relative; padding-bottom:8px; transition: color var(--transition-speed); }
nav a::after { content:""; position:absolute; bottom:0; left:0; width:0; height:2px; background-color:var(--accent-color); transition:width var(--transition-speed) ease; }
nav a:hover, nav a.active { color: var(--primary-color); }
nav a:hover::after, nav a.active::after { width:100%; }
.has-dropdown { position: relative; }
.has-dropdown > a i { font-size: 0.7rem; margin-left: 5px; transition: transform 0.3s ease; }
.dropdown-menu { position: absolute; top: 100%; left: -20px; background-color: #fff; border-radius: var(--border-radius); box-shadow: 0 10px 40px rgba(0,0,0,0.1); list-style: none; padding: 10px 0; margin-top: 15px; min-width: 250px; z-index: 1001; opacity: 0; visibility: hidden; transform: translateY(10px); transition: all 0.3s ease; border: 1px solid #f1f1f1; }
.has-dropdown:hover > .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.has-dropdown:hover > a i { transform: rotate(180deg); }
.dropdown-menu li { padding: 0; }
.dropdown-menu a { display: block; padding: 12px 20px; font-size: 0.95rem; white-space: nowrap; }
.dropdown-menu a::after { display: none; }
.dropdown-menu a:hover { background-color: var(--bg-dark); color: var(--primary-color); }
#home { position: relative; height: 100vh; display: flex; justify-content: center; align-items: center; text-align: center; padding: 0; }
.slider-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; z-index: -2; background-color: #000; }
.slider { display: flex; height: 100%; }
.slider img { width: 100%; height: 100%; object-fit: cover; flex-shrink: 0; }
#home::after { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.3) 100%); z-index: -1; }
.hero-content h1 { font-size: 4rem; color: #fff; text-shadow: 2px 2px 20px rgba(0, 0, 0, 0.7); }
.hero-content h1::after, .hero-content h2::after { display: none; }
.hero-content p { font-size: 1.3rem; max-width: 650px; margin: 1.5rem auto 2.5rem auto; }
#chi-siamo { position: relative; background-image: url("images/chi-siamo-bg.jpg"); background-size: cover; background-position: center; background-attachment: fixed; z-index: 1; }
#chi-siamo::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(26, 58, 90, 0.9); z-index: -1; }
#chi-siamo .section-title, #chi-siamo h3 { color: #fff; }
#chi-siamo .section-title::after { background-color: rgba(255,255,255,0.8); }
.chi-siamo-content { max-width: 850px; margin: 0 auto; text-align: center; font-size: 1.1rem; }
.chi-siamo-intro { font-size: 1.25rem; font-style: italic; margin-bottom: 3rem !important; color: #e0e0e0; }
.punti-chiave-list { list-style: none; padding: 0; text-align: left; max-width: 750px; margin: 0 auto; }
.punti-chiave-list li { display: flex; align-items: flex-start; gap: 25px; margin-bottom: 25px; padding: 20px; border-radius: var(--border-radius); transition: transform 0.3s ease, background-color 0.3s ease; }
.punti-chiave-list li:hover { transform: translateX(10px); background-color: rgba(255, 255, 255, 0.07); }
.punti-chiave-list i { font-size: 2.2rem; color: var(--accent-color); margin-top: 5px; }
.punti-chiave-list p { color: #ccc; }
.numeri-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.numero-card { text-align: center; padding: 40px 20px; background-color: var(--bg-light); border-radius: var(--border-radius); box-shadow: var(--box-shadow); transition: all var(--transition-speed) ease; border-top: 4px solid transparent; }
.numero-card:hover { transform: translateY(-10px); box-shadow: var(--box-shadow-hover); border-top-color: var(--accent-color); }
.numero-card i { font-size: 3.5rem; color: var(--primary-color); margin-bottom: 15px; }
.numero-card .counter { font-size: 4rem; font-weight: 700; color: var(--secondary-color); display: block; line-height: 1; }
.numero-card h4 { font-size: 1.1rem; color: #6c757d; margin-top: 10px; font-weight: 600; }
#servizi { background: linear-gradient(180deg, var(--primary-color) 0%, var(--primary-color-dark) 100%); }
#servizi .section-title, #servizi .section-subtitle { color: #fff; }
#servizi .section-title::after { background-color: var(--accent-color); }
.servizi-grid { display: grid; gap: 30px; }
.servizi-grid-3-col { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.servizio-card-link { text-decoration: none; color: inherit; display: block; }
.servizio-card { position: relative; overflow: hidden; border-radius: var(--border-radius); box-shadow: var(--box-shadow); height: 350px; display: flex; align-items: flex-end; text-align: left; padding: 30px; transition: all var(--transition-speed) ease; color: #fff; }
.servizio-card::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.1) 60%, rgba(0,0,0,0) 100%); z-index: 1; transition: background var(--transition-speed); }
.card-bg-image { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; transition: transform 0.5s ease-out; }
.card-content { position: relative; z-index: 2; transform: translateY(10px); transition: transform 0.4s ease; }
.servizio-card h3 { font-size: 1.8rem; color: #fff; margin-bottom: 0.5rem; }
.servizio-card p { font-size: 0.95rem; color: #ddd; max-height: 0; opacity: 0; transition: max-height 0.4s ease, opacity 0.4s ease; margin: 0; }
.servizio-card-link:hover .servizio-card { box-shadow: var(--box-shadow-hover); }
.servizio-card-link:hover .card-bg-image { transform: scale(1.1); }
.servizio-card-link:hover .card-content { transform: translateY(0); }
.servizio-card-link:hover p { max-height: 100px; opacity: 1; }
#progetti { padding: 0; position: relative; height: 85vh; min-height: 450px; background-color: var(--secondary-color); }
.video-overlay-content { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 20px; z-index: 2; }
#progetti .section-title, #progetti .section-subtitle { color: #fff; }
#progetti .section-title::after { background-color: var(--accent-color); }
#contatti { background-color: #fff; }
.contatti-grid-mappa { display: grid; grid-template-columns: 1fr 1.2fr; gap: 60px; align-items: stretch; margin-top: 2rem; }
.contatti-info p { display: flex; align-items: center; margin-bottom: 1.5rem; font-size: 1.1rem; }
.contatti-info i { color: var(--primary-color); margin-right: 20px; width: 25px; font-size: 1.2rem; text-align: center; }
.contatti-info a { color: var(--text-color); text-decoration: none; transition: color var(--transition-speed); word-break: break-word; }
.contatti-info a:hover { color: var(--accent-color); }
.orari-title, .social-title { color: var(--secondary-color) !important; font-weight: 600; margin-bottom: 1rem; }
.orari-list li { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid #e2e8f0; }
.social-icons a { color: var(--secondary-color); font-size: 2rem; transition: all var(--transition-speed); }
.social-icons a:hover { color: var(--primary-color); transform: translateY(-5px); }
.map-container-colonna { min-height: 450px; height: 100%; border-radius: var(--border-radius); overflow: hidden; box-shadow: var(--box-shadow); }
footer { background-color: var(--primary-color-dark); color: #a0aec0; text-align: center; padding: 25px 0; font-size: 0.9rem; }
footer p { margin: 0; }
.lightbox { display: none; position: fixed; z-index: 2000; padding-top: 60px; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.95); }
.lightbox-content { margin: auto; display: block; width: 80%; max-width: 1000px; animation: zoomIn 0.5s; }
@keyframes zoomIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.lightbox-close { position: absolute; top: 15px; right: 35px; color: #f1f1f1; font-size: 40px; font-weight: bold; transition: 0.3s; cursor: pointer; }
.lightbox-close:hover, .lightbox-close:focus { color: #bbb; }
.lightbox-prev, .lightbox-next { cursor: pointer; position: absolute; top: 50%; width: auto; padding: 16px; margin-top: -50px; color: white; font-weight: bold; font-size: 20px; transition: 0.6s ease; border-radius: 0 3px 3px 0; user-select: none; }
.lightbox-next { right: 0; border-radius: 3px 0 0 3px; }
.lightbox-prev:hover, .lightbox-next:hover { background-color: rgba(255,255,255,0.2); }
.progress-btn { position: fixed; bottom: 25px; right: 25px; width: 55px; height: 55px; z-index: 1900; opacity: 0; visibility: hidden; transition: all var(--transition-speed) ease; cursor: pointer; text-decoration: none; border-radius: 50%; }
.progress-btn.visible { opacity: 1; visibility: visible; }
.progress-btn:hover { transform: scale(1.1); }
.progress-btn i { font-size: 1.2rem; color: var(--primary-color); }
.progress-circle circle { fill: rgba(255, 255, 255, 0.95); stroke-width: 5; box-shadow: 0 0 20px rgba(0,0,0,0.1); }
.progress-bg { stroke: #e2e8f0; }
.progress-bar { stroke: var(--accent-color); }
#hamburger-icon { display: none; cursor: pointer; width: 30px; height: 25px; position: relative; z-index: 1002; }
#hamburger-icon div { width: 100%; height: 3px; background-color: var(--secondary-color); margin: 5px 0; transition: 0.4s; border-radius: 3px; }
#hamburger-icon.open .bar1 { transform: rotate(-45deg) translate(-6px, 6px); }
#hamburger-icon.open .bar2 { opacity: 0; }
#hamburger-icon.open .bar3 { transform: rotate(45deg) translate(-6px, -6px); }
#menu-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.6); z-index: 999; visibility: hidden; transition: opacity 0.4s ease, visibility 0.4s ease; }
#menu-overlay.open { display: block; }
#preloader { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background-color: #fff; z-index: 9999; transition: opacity 0.6s ease, visibility 0.6s ease; display: flex; justify-content: center; align-items: center; }
#preloader.hidden { opacity: 0; visibility: hidden; }
.preloader-logo { width: clamp(140px, 32vw, 240px); }
.preloader-logo img { width: 100%; animation: pulse-logo 1.5s infinite ease-in-out; }
@keyframes pulse-logo { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@media (max-width: 1024px) { .servizi-grid-3-col { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 992px) { .contatti-grid-mappa { grid-template-columns: 1fr; } .map-container-colonna { order: -1; min-height: 350px; margin-bottom: 40px; } }
@media (max-width: 768px) {
  section { padding: 80px 0; }
  .section-title, h2 { font-size: 2.2rem; }
  .hero-content h1 { font-size: 2.8rem; }
  .servizi-grid-3-col { grid-template-columns: 1fr; }
  .btn-header { display: none; }
  #hamburger-icon { display: block; }
  header nav { position: fixed; top: 0; right: 0; width: 85%; max-width: 320px; height: 100vh; padding-top: 100px; transform: translateX(100%); transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); z-index: 1001; visibility: hidden; background-color: #fff; box-shadow: -8px 0 30px rgba(0, 0, 0, 0.1); }
  header nav.open { transform: translateX(0); visibility: visible; }
  header nav ul { flex-direction: column; align-items: flex-start; padding-left: 20px; gap: 0; }
  header nav ul li { width: 100%; padding: 0; }
  header nav ul li a { color: var(--secondary-color); font-size: 1.2rem; display: block; padding: 15px; border-bottom: 1px solid #f1f1f1; }
  .has-dropdown > a { display: flex; justify-content: space-between; align-items: center; width: 100%; }
  .has-dropdown.submenu-open > a i { transform: rotate(180deg); }
  .dropdown-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; padding-left: 15px; margin-top: 0; max-height: 0; overflow: hidden; transition: max-height 0.4s ease-out; }
  .has-dropdown.submenu-open > .dropdown-menu { max-height: 500px; }
  .dropdown-menu a { font-size: 1rem; padding: 12px 15px; }
}