/* ============================================================
   CEOLDO COSTRUZIONI METALLICHE — STYLE.CSS
   Palette P4 Cool mist · Stile C Classico professionale
============================================================ */

:root {
  --primary: #2f0081;
  --primary-dark: #1f0058;
  --bg: #ffffff;
  --bg-soft: #eef1f5;
  --divider: #dde3eb;
  --text: #1b2330;
  --muted: #5a6270;
  --serif: 'Source Serif 4', Georgia, serif;
  --sans: 'Source Sans 3', system-ui, -apple-system, sans-serif;
  --container: 1200px;
  --radius: 4px;
  --shadow-sm: 0 1px 3px rgba(27, 35, 48, .08);
  --shadow-md: 0 4px 16px rgba(27, 35, 48, .08);
  --t: .25s ease;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--sans); font-size: 16px; line-height: 1.6; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--primary-dark); }
button { font: inherit; cursor: pointer; }

h1, h2, h3 { font-family: var(--serif); font-weight: 700; letter-spacing: -.5px; line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(36px, 5vw, 54px); }
h2 { font-size: clamp(26px, 3.2vw, 32px); }
h3 { font-size: clamp(18px, 2vw, 20px); }
p { margin: 0 0 1em; }
em { font-style: italic; color: var(--primary); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section-soft { background: var(--bg-soft); }

.btn { display: inline-block; padding: 13px 26px; border-radius: var(--radius); font-size: 14px; font-weight: 600; text-decoration: none; transition: all var(--t); border: 1px solid transparent; line-height: 1.2; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-secondary { background: #fff; color: var(--text); border-color: #c8cfd9; }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }

.ornament { display: flex; justify-content: center; align-items: center; gap: 14px; color: var(--primary); font-size: 12px; letter-spacing: 4px; font-weight: 600; text-transform: uppercase; margin-bottom: 22px; }
.ornament::before, .ornament::after { content: ""; height: 1px; width: 60px; background: var(--primary); opacity: .5; }

.text-center { text-align: center; }
.muted { color: var(--muted); }
.eyebrow { font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: var(--primary); font-weight: 600; }

/* Skip link */
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--primary); color: #fff; padding: 8px 16px; z-index: 9999; }
.skip-link:focus { left: 8px; top: 8px; }
/* ============ NAVBAR ============ */
.navbar { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--divider); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; max-width: var(--container); margin: 0 auto; }
.nav-logo { display: flex; align-items: center; }
.nav-logo img { height: 78px; width: auto; }
.nav-menu { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-menu > li { position: relative; }
.nav-menu a { color: var(--text); font-weight: 500; font-size: 15px; padding: 6px 0; }
.nav-menu a:hover, .nav-menu a.active { color: var(--primary); }
.nav-menu .has-dropdown > a::after { content: " ▾"; font-size: 10px; opacity: .7; }
.dropdown { position: absolute; top: 100%; left: -16px; background: #fff; border: 1px solid var(--divider); border-radius: var(--radius); box-shadow: var(--shadow-md); min-width: 220px; padding: 8px 0; opacity: 0; visibility: hidden; transform: translateY(8px); transition: all var(--t); list-style: none; margin: 0; }
.nav-menu .has-dropdown:hover .dropdown,
.nav-menu .has-dropdown:focus-within .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown a { display: block; padding: 10px 18px; font-size: 14px; }
.dropdown a:hover { background: var(--bg-soft); }
.nav-cta { background: var(--primary); color: #fff !important; padding: 9px 18px !important; border-radius: var(--radius); }
.nav-cta:hover { background: var(--primary-dark); color: #fff !important; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 4px 0; transition: var(--t); }

@media (max-width: 860px) {
  .nav-toggle { display: block; flex-shrink: 0; }
  .nav-inner { padding: 12px 18px; }
  .nav-logo { flex: 0 1 auto; min-width: 0; margin-right: 12px; }
  .nav-logo img { height: auto; width: auto; max-height: 54px; max-width: 100%; }
  .nav-menu { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; background: #fff; border-top: 1px solid var(--divider); padding: 12px 0; gap: 0; transform: translateY(-10px); opacity: 0; visibility: hidden; transition: var(--t); }
  .nav-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }
  .nav-menu > li { border-bottom: 1px solid var(--divider); }
  .nav-menu a { padding: 14px 24px; display: block; }
  .nav-menu .has-dropdown > a::after { content: " +"; }
  .nav-menu .has-dropdown.open > a::after { content: " −"; }
  .dropdown { position: static; box-shadow: none; border: 0; padding: 0; opacity: 1; visibility: visible; transform: none; display: none; background: var(--bg-soft); }
  .nav-menu .has-dropdown.open .dropdown { display: block; }
  .nav-cta { margin: 12px 24px; text-align: center; }
}

/* ============ FOOTER ============ */
.footer { background: var(--text); color: #cfd5df; padding: 60px 0 24px; font-size: 14px; }
.footer a { color: #cfd5df; }
.footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer h4 { font-family: var(--serif); font-size: 16px; color: #fff; margin: 0 0 16px; font-weight: 600; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer ul li { margin-bottom: 8px; }
.footer .brand { font-family: var(--serif); font-size: 18px; font-weight: 700; color: #fff; margin-bottom: 12px; }
.footer .brand small { display: block; font-family: var(--sans); font-size: 13px; font-weight: 400; color: #cfd5df; font-style: italic; margin-top: 4px; }
.footer-bottom { border-top: 1px solid #2c3543; padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 12px; color: #8b94a3; }

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
}
@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; }
}
/* ============ HERO HOME ============ */
.hero { background: var(--bg-soft); padding: 80px 0 70px; text-align: center; }
.hero h1 { margin: 0 0 18px; }
.hero .lead { font-size: 18px; line-height: 1.6; color: var(--muted); max-width: 680px; margin: 0 auto 32px; }
.hero .actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-strip { margin: 50px auto 0; height: 200px; max-width: 980px; background-size: cover; background-position: center; border-radius: 6px; }
@media (max-width: 640px) { .hero { padding: 60px 0 50px; } .hero-strip { height: auto; aspect-ratio: 4 / 1; background-size: contain; background-repeat: no-repeat; background-position: center; } }

/* ============ HERO PAGINA SERVIZIO ============ */
.page-hero { background: var(--bg-soft); padding: 50px 0 40px; }
.page-hero .breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.page-hero .breadcrumb a { color: var(--muted); }
.page-hero .breadcrumb a:hover { color: var(--primary); }
.page-hero h1 { margin: 0 0 10px; font-size: clamp(30px, 4.2vw, 44px); }
.page-hero .lead { font-size: 17px; color: var(--muted); max-width: 720px; margin: 0; }

/* ============ SERVIZI (card 4) ============ */
.services { padding: 80px 0; background: #fff; }
.services h2 { text-align: center; }
.services-intro { text-align: center; color: var(--muted); margin: 0 auto 40px; max-width: 600px; }
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.svc-card { display: block; text-align: center; padding: 28px 20px; background: var(--bg-soft); border-radius: 6px; border: 1px solid transparent; transition: transform var(--t), box-shadow var(--t), border-color var(--t); color: var(--text); position: relative; overflow: hidden; min-height: 230px; }
.svc-card .svc-img { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transform: scale(1.06); transition: opacity .45s ease, transform .8s ease; z-index: 0; }
.svc-card::after { content: ""; position: absolute; inset: 0; background: rgba(238, 241, 245, .72); opacity: 0; transition: opacity .45s ease; z-index: 1; pointer-events: none; }
.svc-card > .roman, .svc-card > h3, .svc-card > p { position: relative; z-index: 2; }
.svc-card:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: var(--shadow-md); color: var(--text); }
.svc-card:hover .svc-img { opacity: 1; transform: scale(1); }
.svc-card:hover::after { opacity: 1; }
.svc-card:hover h3 { color: var(--primary); }
.svc-card:hover p { color: var(--text); }
.svc-card:hover .roman { background: var(--primary); border-color: var(--primary); color: #fff; transform: scale(1.05); }
.svc-card .roman { width: 44px; height: 44px; border-radius: 50%; background: #fff; border: 1px solid var(--divider); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; font-family: var(--serif); font-style: italic; font-weight: 700; color: var(--primary); transition: transform var(--t), background var(--t), border-color var(--t); }
.svc-card h3 { margin: 0 0 8px; transition: color var(--t); }
.svc-card p { font-size: 14px; color: var(--muted); margin: 0; line-height: 1.5; transition: color var(--t); }

@media (max-width: 960px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .services-grid { grid-template-columns: 1fr; } }

/* ============ CHI SIAMO ============ */
.chi-siamo { padding: 90px 0; }
.chi-siamo .grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 60px; align-items: center; }
.chi-siamo h2 { margin-bottom: 18px; }
.chi-siamo .points { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.chi-siamo .points li { padding-left: 28px; position: relative; font-size: 15px; }
.chi-siamo .points li::before { content: ""; position: absolute; left: 0; top: 10px; width: 16px; height: 2px; background: var(--primary); }
.chi-siamo .points li strong { display: block; font-family: var(--serif); font-size: 16px; color: var(--text); margin-bottom: 2px; }
.chi-siamo-img { width: 100%; height: 100%; min-height: 360px; background-size: cover; background-position: center; border-radius: 6px; }
@media (max-width: 860px) { .chi-siamo .grid { grid-template-columns: 1fr; gap: 32px; } .chi-siamo-img { min-height: 240px; } }

/* ============ CONTATTI ============ */
.contatti { padding: 90px 0; background: var(--bg-soft); }
.contatti .grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 50px; }
.contatti h2 { margin-bottom: 14px; }
.contatti .lead { color: var(--muted); margin-bottom: 28px; }
.contatti .info { display: grid; gap: 18px; }
.contatti .info .item { display: flex; gap: 14px; align-items: flex-start; }
.contatti .info .label { font-weight: 600; min-width: 90px; color: var(--primary); font-size: 13px; letter-spacing: 1px; text-transform: uppercase; padding-top: 2px; }
.contatti .info .val a { font-weight: 500; }
.contatti .info .val small { display: block; color: var(--muted); font-size: 13px; line-height: 1.5; margin-top: 2px; }
.contact-form { background: #fff; padding: 32px; border-radius: 6px; border: 1px solid var(--divider); }
.contact-form .row { margin-bottom: 16px; }
.contact-form label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.contact-form label .req { color: var(--primary); }
.contact-form input, .contact-form select, .contact-form textarea { width: 100%; padding: 11px 14px; border: 1px solid var(--divider); border-radius: var(--radius); font: inherit; color: var(--text); background: #fff; transition: border-color var(--t); }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { outline: 0; border-color: var(--primary); }
.contact-form textarea { min-height: 120px; resize: vertical; }
.contact-form .privacy { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); }
.contact-form .privacy input { width: auto; margin-top: 3px; }
.contact-form .submit-row { margin-top: 8px; }
.form-status { margin-top: 14px; padding: 12px 16px; border-radius: var(--radius); display: none; font-size: 14px; }
.form-status.ok { display: block; background: #e8f5e9; color: #2e7d32; }
.form-status.err { display: block; background: #ffebee; color: #c62828; }
@media (max-width: 860px) { .contatti .grid { grid-template-columns: 1fr; gap: 32px; } }

/* ============ ALTRI SERVIZI ============ */
.altri-servizi { padding: 80px 0; }
.altri-servizi h2 { text-align: center; margin-bottom: 32px; }
.altri-servizi .services-grid { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .altri-servizi .services-grid { grid-template-columns: 1fr; } }

/* ============ CTA SECTION ============ */
.cta-strip { padding: 60px 0; background: var(--primary); color: #fff; text-align: center; }
.cta-strip h2 { color: #fff; margin-bottom: 16px; }
.cta-strip p { color: rgba(255,255,255,.85); margin-bottom: 24px; }
.cta-strip .btn-secondary { background: #fff; color: var(--primary); border-color: #fff; }
.cta-strip .btn-secondary:hover { background: transparent; color: #fff; }
/* ============ GALLERY ============ */
.gallery-section { padding: 80px 0; }
.gallery-section h2 { text-align: center; margin-bottom: 12px; }
.gallery-section .intro { text-align: center; color: var(--muted); margin: 0 auto 40px; max-width: 640px; }
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.gallery .thumb { position: relative; overflow: hidden; background: var(--bg-soft); border-radius: 4px; cursor: pointer; aspect-ratio: 4/3; border: 0; padding: 0; }
.gallery .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.gallery .thumb:hover img { transform: scale(1.05); }
.gallery .thumb::after { content: ""; position: absolute; inset: 0; background: rgba(47, 0, 129, 0); transition: background var(--t); pointer-events: none; }
.gallery .thumb:hover::after { background: rgba(47, 0, 129, .15); }

@media (max-width: 960px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .gallery { grid-template-columns: repeat(2, 1fr); } }

/* ============ LIGHTBOX ============ */
.lightbox { position: fixed; inset: 0; background: rgba(15, 20, 30, .94); z-index: 1000; display: none; align-items: center; justify-content: center; padding: 24px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 82vh; object-fit: contain; box-shadow: 0 8px 40px rgba(0,0,0,.5); margin-top: 50px; }
.lightbox .lb-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.1); color: #fff; border: 0; width: 50px; height: 50px; border-radius: 50%; font-size: 24px; display: flex; align-items: center; justify-content: center; transition: var(--t); }
.lightbox .lb-btn:hover { background: rgba(255,255,255,.25); }
.lightbox .lb-prev { left: 20px; }
.lightbox .lb-next { right: 20px; }
.lightbox .lb-close { top: 20px; right: 20px; transform: none; width: 44px; height: 44px; font-size: 20px; }
.lightbox .lb-title { position: absolute; background: var(--bg-soft); color: var(--primary); font-family: var(--serif); font-size: 20px; font-weight: 700; letter-spacing: .2px; text-align: center; padding: 10px 24px; line-height: 1.3; box-shadow: 0 4px 16px rgba(0,0,0,.3); box-sizing: border-box; }
body.lb-active { overflow: hidden; }
@media (max-width: 640px) {
  .lightbox .lb-btn { width: 40px; height: 40px; }
  .lightbox .lb-title { font-size: 14px; padding: 8px 14px; }
}
