/*
Theme Name: Autoservizi Passarini
Description: Tema WordPress personalizzato per Autoservizi Passarini Nereo e Figli, convertito dal sito statico originale.
Author: Passarini
Version: 1.3
*/

:root {
  --blue: #1C2B4A;
  --red: #E63329;
  --grey: #F4F5F7;
  --text2: #45506b;
  --footer: #131f38;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body { margin: 0; font-family: 'Poppins', sans-serif; color: var(--blue); background: #FFFFFF; overflow-x: hidden; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--red); }
img { display: block; width: 100%; height: 100%; object-fit: cover; }

.topbar { background: var(--blue); padding: 8px 24px; display: flex; justify-content: flex-end; gap: 20px; flex-wrap: wrap; }
.topbar-link { color: #FFFFFF; font-size: 13px; display: flex; align-items: center; gap: 6px; opacity: 0.92; }
.topbar-link:hover { opacity: 1; color: #FFFFFF; }

.header { position: sticky; top: 0; z-index: 50; background: #FFFFFF; box-shadow: 0 2px 14px rgba(28,43,74,0.08); padding: 12px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { height: 44px; width: auto; }
.logo-link { display: flex; align-items: center; }

.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 8px; flex-direction: column; gap: 5px; }
.hamburger span { width: 26px; height: 3px; background: var(--blue); border-radius: 2px; display: block; }

.nav-desktop { display: flex; align-items: center; gap: 18px; }
.nav-links { display: flex; align-items: center; gap: 16px; }
.nav-links a, .nav-links-mobile a { font-size: 15px; font-weight: 600; color: var(--blue); white-space: nowrap; }

.lang-switch { display: flex; align-items: center; gap: 4px; border: 1px solid var(--grey); border-radius: 20px; padding: 4px; }
.lang-btn { border: none; background: transparent; color: var(--blue); padding: 5px 12px; border-radius: 16px; font-size: 13px; font-weight: 700; cursor: pointer; }
.lang-btn.active { background: var(--blue); color: #FFFFFF; }

.btn { display: inline-block; font-weight: 700; padding: 15px 34px; border-radius: 4px; border: none; cursor: pointer; font-family: 'Poppins', sans-serif; font-size: 16px; }
.btn-red { background: var(--red); color: #FFFFFF; }
.btn-red:hover { background: #c92a21; color: #FFFFFF; }
.btn-dark { background: var(--blue); color: #FFFFFF; font-size: 15px; padding: 14px 30px; }
.btn-dark:hover { background: var(--red); color: #FFFFFF; }
.btn-white { background: #FFFFFF; color: var(--blue); font-size: 14px; padding: 11px 22px; }
.btn-white:hover { background: var(--red); color: #FFFFFF; }
#navCta { font-size: 14px; padding: 11px 22px; }
.skew { transform: skewX(-8deg); }
.unskew { display: inline-block; transform: skewX(8deg); }

.mobile-menu { display: none; position: absolute; top: 100%; left: 0; right: 0; max-height: calc(100dvh - 68px); overflow-y: auto; background: #FFFFFF; border-bottom: 1px solid var(--grey); padding: 18px 24px; flex-direction: column; gap: 16px; }

.nav-links-mobile { display: flex; flex-direction: column; gap: 16px; }
#mobileCta { text-align: center; padding: 12px; font-size: 15px; }

.hero { position: relative; padding: 56px 24px 90px; background: #FFFFFF; overflow: hidden; }
.hero-shape-square { position: absolute; top: -60px; right: -120px; width: 480px; height: 480px; background: var(--grey); transform: rotate(24deg); z-index: 0; }
.hero-shape-bar { position: absolute; top: 40px; right: 60px; width: 220px; height: 34px; background: var(--red); transform: skewX(-30deg); z-index: 0; opacity: 0.9; }
.hero-inner { position: relative; z-index: 1; max-width: 1160px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.hero-text { flex: 1 1 380px; min-width: 280px; }
.hero-text h1 { font-size: 43px; font-style: italic; font-weight: 800; line-height: 1.22; margin: 0 0 20px; transform: skewX(-2deg); letter-spacing: -0.3px; max-width: 560px; white-space: pre-line; }
.lead { font-size: 17px; line-height: 1.6; color: var(--text2); margin: 0 0 32px; max-width: 480px; }
.lead.light { color: #dbe0ec; }
.hero-photo { flex: 1 1 560px; min-width: 320px; position: relative; }
.clip-hero { position: relative; clip-path: polygon(8% 0, 100% 0, 92% 100%, 0 100%); overflow: hidden; height: 480px; }

.section { padding: 90px 24px; background: #FFFFFF; }
.container { max-width: 1160px; margin: 0 auto; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 56px; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; font-style: italic; margin: 0 0 14px; }
.section-head h2.on-dark { color: #FFFFFF; }
.section-head p { max-width: none; margin: 0 auto; }
.center-cta { text-align: center; margin-top: 44px; }

.services-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.service-card { background: var(--grey); border-radius: 6px; overflow: hidden; display: flex; flex-direction: column; }
.service-photo { height: 140px; }
.service-body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.service-accent { width: 40px; height: 4px; background: var(--red); transform: skewX(-20deg); }
.service-body h3 { font-size: 17px; font-weight: 700; margin: 4px 0 0; }
.service-body p { font-size: 14px; color: var(--text2); line-height: 1.55; margin: 0; flex: 1; }

.airport-section { position: relative; background: var(--blue); padding: 90px 24px; clip-path: polygon(0 4%, 100% 0, 100% 96%, 0 100%); margin: -20px 0; }
.airport-inner { padding: 20px 0; display: flex; flex-wrap: wrap; gap: 48px; }
.airport-text { flex: 1 1 460px; min-width: 280px; }
.airport-text h2 { color: #FFFFFF; font-size: clamp(26px, 3.6vw, 36px); font-weight: 800; font-style: italic; margin: 0 0 18px; }
.list-label { color: #FFFFFF; font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; margin: 0 0 12px; }
.pill-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.pill-row span { background: rgba(255,255,255,0.1); color: #FFFFFF; font-size: 13px; padding: 7px 14px; border-radius: 20px; border: 1px solid rgba(255,255,255,0.2); }
.ports-box { margin-top: 40px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.15); border-radius: 6px; padding: 26px; }
.ports-box h3 { color: #FFFFFF; font-size: 18px; font-weight: 700; margin: 0 0 10px; }
.ports-box .pill-row { margin-bottom: 20px; }
.airport-photo { flex: 1 1 380px; min-width: 260px; }
.clip-airport { clip-path: polygon(0 0, 100% 6%, 100% 100%, 0 94%); overflow: hidden; height: 100%; min-height: 340px; }

.dest-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.dest-card { position: relative; height: 300px; border-radius: 4px; overflow: hidden; }
.dest-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(28,43,74,0.85), rgba(28,43,74,0) 55%); pointer-events: none; }
.dest-name { position: absolute; bottom: 18px; left: 20px; color: #FFFFFF; font-size: 20px; font-weight: 800; font-style: italic; pointer-events: none; }

.about-section { padding: 90px 24px; background: var(--grey); }
.about-inner { display: flex; flex-wrap: wrap-reverse; gap: 48px; align-items: center; }
.about-photo { flex: 1 1 420px; min-width: 280px; }
.clip-about { clip-path: polygon(0 0, 92% 0, 100% 100%, 8% 100%); overflow: hidden; height: 360px; }
.about-text { flex: 1 1 420px; min-width: 280px; }
.about-text h2 { font-size: clamp(28px, 4vw, 38px); font-weight: 800; font-style: italic; margin: 0 0 18px; }
.about-text .lead { margin-bottom: 28px; }
.certification-inner { margin-top: 64px; flex-wrap: wrap; }
.certification-inner > div { min-width: 0; }
.certification-inner .lead { margin-bottom: 0; }
.certification-photo img { height: auto; object-fit: contain; }
.points { display: flex; flex-direction: column; gap: 16px; }
.point-row { display: flex; align-items: center; gap: 14px; }
.point-icon { flex: none; width: 34px; height: 34px; border-radius: 50%; background: #FFFFFF; display: flex; align-items: center; justify-content: center; }
.point-row span:last-child { font-size: 15px; font-weight: 600; }

.contact-section { background: var(--blue); padding: 90px 24px 50px; }
.contact-inner { display: flex; flex-wrap: wrap; gap: 48px; }
.contact-info { flex: 1 1 300px; min-width: 260px; display: flex; flex-direction: column; gap: 20px; }
.info-row { display: flex; gap: 12px; align-items: flex-start; color: #FFFFFF; font-size: 15px; }
.info-row.link { align-items: center; }
.info-row.link:hover { color: var(--red); }
.map-embed { width: 100%; min-width: 0; margin-top: 8px; border-radius: 6px; overflow: hidden; height: 220px; }
.map-embed iframe { display: block; width: 100%; max-width: none; height: 100%; border: 0; }

.contact-form-wrap { flex: 1 1 400px; min-width: 280px; }
.form-thanks { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.15); border-radius: 6px; padding: 40px; text-align: center; }
.form-thanks p { color: #FFFFFF; font-size: 18px; font-weight: 700; margin: 0; }
#contactForm { display: flex; flex-direction: column; gap: 14px; }
#contactForm input, #contactForm select, #contactForm textarea { padding: 13px 16px; border-radius: 4px; border: none; font-size: 15px; font-family: 'Poppins', sans-serif; color: var(--blue); }
#contactForm textarea { resize: vertical; }
.row-2 { display: flex; gap: 14px; flex-wrap: wrap; }
.row-2 input:first-child { flex: 1 1 200px; }
.row-2 input:last-child { flex: 1 1 160px; }
.privacy-label { display: flex; gap: 10px; align-items: flex-start; color: #cdd4e4; font-size: 13px; line-height: 1.5; }
.privacy-label input { margin-top: 3px; }
.privacy-label a { color: #FFFFFF; text-decoration: underline; }
.privacy-label a:hover { color: var(--red); }
#submitBtn { margin-top: 6px; }
#submitBtn:hover { background: #FFFFFF; color: var(--blue); }

.post-footer { background: var(--footer); padding: 16px 24px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; }
.post-footer a { color: inherit; text-decoration: underline; }
.post-footer a:hover { color: #FFFFFF; }
.post-footer span { color: #8b96b3; font-size: 12px; }

.intro-overlay { visibility: hidden; position: fixed; inset: 0; z-index: 999; background: #FFFFFF; display: flex; align-items: center; justify-content: center; transition: opacity 0.5s ease, background 0.5s ease; }
.intro-overlay.active { visibility: visible; }
.intro-overlay.shrink { background: rgba(255,255,255,0.6); }
.intro-overlay.done { opacity: 0; pointer-events: none; }
#introLogo { height: 220px; width: auto; transition: all 0.7s cubic-bezier(0.4,0,0.2,1); }
.intro-overlay.shrink #introLogo, .intro-overlay.done #introLogo { height: 44px; width: auto; transform: translate(calc(-46vw + 90px), calc(-46vh + 34px)); }

.fleet-section { background: var(--blue); padding: 90px 24px; }
.fleet-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.clip-fleet { clip-path: polygon(0 0, 96% 0, 100% 100%, 4% 100%); overflow: hidden; height: 360px; }
.clip-fleet video { width: 100%; height: 100%; object-fit: cover; }

[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
[data-reveal].visible { opacity: 1; transform: none; }

@media (max-width: 1039px) {
  .mobile-menu.open { display: flex; }
  .nav-desktop { display: none; }
  .hamburger { display: flex; }
  .topbar { justify-content: center; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .services-grid { grid-template-columns: 1fr; }
}

/* Keep the desktop composition; allow narrow screens to fit their content. */
#contactForm[hidden] { display: none; }
@media (max-width: 640px) {
  .header { padding: 12px 16px; }
  .logo { max-width: calc(100vw - 106px); height: auto; max-height: 44px; }
  .hero { padding: 36px 20px 56px; }
  .hero-text h1 { font-size: clamp(28px, 7.5vw, 38px); }
  .lead { font-size: 16px; }
  .section, .about-section, .fleet-section { padding: 56px 20px; }
  .airport-section { padding: 64px 20px; }
  .contact-section { padding: 56px 20px 36px; }
  .hero-inner, .airport-inner, .about-inner, .contact-inner { gap: 28px; }
  .hero-text, .hero-photo, .airport-text, .airport-photo,
  .about-text, .about-photo, .contact-info, .contact-form-wrap { min-width: 0; }
  .fleet-grid { grid-template-columns: minmax(0, 1fr); }
  .clip-hero { height: 300px; }
  .clip-about, .clip-fleet { height: 260px; }
  .clip-airport { min-height: 260px; }
  .section-head { margin-bottom: 32px; }
  .ports-box { padding: 20px; }
  .row-2 > input { min-width: 0; width: 100%; }
  #contactForm input, #contactForm select, #contactForm textarea { font-size: 16px; }
  .info-row { overflow-wrap: anywhere; }
  .info-row svg { flex-shrink: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .intro-overlay { display: none; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}
