/* =========================
   Spazio Antenna - Style
   ========================= */

:root {
  --color-primary: #0074ff;
  --color-primary-alt: #1fb8e6;
  --color-primary-dark: #0a4875;
  --color-bg: #ffffff;
  --color-bg-alt: #f4f7fb;
  --color-text: #1f2933;
  --color-muted: #6b7280;
  --radius-lg: 1.5rem;
  --radius-md: 1rem;
  --shadow-soft: 0 18px 45px rgba(0,0,0,0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.5;
}

/* Layout base */

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4rem 0;
}

.section-alt {
  padding: 4rem 0;
  background: var(--color-bg-alt);
}

h1, h2, h3 {
  margin-top: 0;
  color: var(--color-primary-dark);
}

.section-intro {
  max-width: 640px;
  font-size: 0.98rem;
  color: var(--color-muted);
  margin-bottom: 2rem;
}

/* TOPBAR */

.topbar {
  background: var(--color-primary-dark);
  color: #fff;
  font-size: 0.82rem;
  padding: 0.35rem 0;
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.90rem;
  flex-wrap: wrap;
}

.social {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.4);
  font-size: 0.75rem;
}

.topbar-text {
  opacity: 0.9;
}

.phone {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.2em;
}

.topbar .phone {
  font-size: 1.0em;
}

/* HEADER / NAV */

.site-header {
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #e5e7eb;
}

.sticky {
  position: sticky;
  top: 0;
  z-index: 30;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.90rem 0;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  gap: 0.90rem;
}

.brand-logo {
  width: 80px;
  height: 80px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-weight: 700;
  font-size: 1.3rem;
}

.brand-subtitle {
  font-size: 1rem;
  color: var(--color-muted);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.main-nav a {
  text-decoration: none;
  font-size: 0.95rem;
  color: var(--color-muted);
  position: relative;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.25rem;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width 0.18s ease-out;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--color-primary-dark);
}

.main-nav a:hover::after,
.main-nav a.active::after {
  width: 100%;
}

/* Mobile nav */

.nav-toggle {
  display: none;
  border: none;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
  padding: 0.25rem;
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  background: var(--color-primary-dark);
  border-radius: 999px;
}

/* HERO */

.hero {
  position: relative;
  height: 420px;
  overflow: hidden;
}

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(10,72,117,0.9), rgba(10,72,117,0.55), rgba(10,72,117,0.15) 60%, rgba(10,72,117,0.6));
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  color: #fff;
}

.hero-kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  margin-bottom: 0.6rem;
  opacity: 0.9;
}

.hero h1 {
  font-size: clamp(2.1rem, 4vw, 2.8rem);
  margin: 0 0 0.75rem;
  text-shadow: 0 3px 10px rgba(0,0,0,0.45);
  color: #fff;
}

.hero-sub {
  display: block;
  font-size: 0.9em;
}

.hero-lead {
  max-width: 520px;
  font-size: 0.98rem;
  margin-bottom: 1.35rem;
  opacity: 0.92;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.3rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.08s ease-out, box-shadow 0.08s ease-out, background 0.15s ease-out;
}

.btn-primary {
  background: var(--color-primary-alt);
  color: #fff;
  box-shadow: 0 12px 28px rgba(31,184,230,0.5);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 36px rgba(31,184,230,0.65);
}

.btn-outline {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border-color: rgba(255,255,255,0.6);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.22);
}

.btn-full {
  width: 100%;
}

/* Servizi 3 box */

.servizi-home {
  margin-top: -40px;
}

.servizi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.serv-box {
  background: var(--color-primary-alt);
  padding: 2.5rem 2rem;
  text-align: left;
  color: #fff;
}

.serv-box:nth-child(2) {
  background: #20a6d5;
}

.serv-box:nth-child(3) {
  background: #1990bd;
}

.serv-box h3 {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
  color: #fff;
}

.serv-box p {
  margin: 0;
  font-size: 0.95rem;
}

/* Chi sono */

.chi-sono-layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  align-items: center;
}

.chi-sono-img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.chi-sono-content h2 {
  margin-bottom: 1rem;
}

.chi-sono-intro {
  font-size: 1.1rem;
  color: var(--color-text);
  margin-bottom: 1rem;
}

.chi-sono-content p {
  margin-bottom: 1rem;
  color: var(--color-muted);
}

/* Cards generiche */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
}

/* Carosello lavori homepage */

.lavori-carousel {
  overflow: hidden;
  width: 100%;
}

.carousel-track {
  display: flex;
  gap: 1.5rem;
  transition: transform 0.5s ease;
}

.carousel-item {
  flex: 0 0 calc(33.333% - 1rem);
  min-width: 0;
}

.card {
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-soft);
  padding: 1.3rem 1.4rem;
}

.section-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.link-more {
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--color-primary);
}

/* Lavori cards */

.lavori-grid .lavoro-card {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.lavoro-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.lavoro-body {
  padding: 0.9rem 1.1rem 1.1rem;
}

.lavoro-meta {
  font-size: 0.78rem;
  color: var(--color-muted);
  margin-bottom: 0.25rem;
}

.lavoro-title {
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.lavoro-desc {
  font-size: 0.9rem;
  color: var(--color-muted);
}

/* Masonry layout per lavori page */

.masonry {
  column-count: 3;
  column-gap: 1.5rem;
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 1.5rem;
}

/* Filtri */

.filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.filter-btn {
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #fff;
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
  cursor: pointer;
}

.filter-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/* Contatti */

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.2fr);
  gap: 2.5rem;
  align-items: flex-start;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  font-size: 0.95rem;
  color: var(--color-muted);
}

.contact-list li + li {
  margin-top: 0.4rem;
}

.contact-list a {
  color: var(--color-primary-dark);
  text-decoration: none;
}

.contact-phone {
  font-size: 1.2em;
  font-weight: 600;
}

.contact-info {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.contact-map {
  margin-top: 1.5rem;
  flex: 1;
}

.contact-map iframe {
  height: 100%;
  min-height: 300px;
}

.contact-form-wrapper {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 1.8rem 1.6rem;
}

.contact-form .form-row {
  margin-bottom: 1rem;
}

.contact-form label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid #d1d5db;
  padding: 0.55rem 0.7rem;
  font-size: 0.9rem;
  font-family: inherit;
}

.contact-form textarea {
  resize: vertical;
}

.checkbox-row {
  font-size: 0.85rem;
}

.checkbox-row input {
  margin-right: 0.35rem;
}

/* Footer */

.site-footer {
  border-top: 1px solid #e5e7eb;
  padding: 1.6rem 0 2rem;
  background: #f9fafb;
}

.footer-inner {
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-muted);
}

.footer-small {
  margin-top: 0.4rem;
}

.footer-small a {
  color: var(--color-primary-dark);
}

/* Privacy page */

.privacy h1 {
  margin-bottom: 1rem;
}

.privacy h2 {
  margin-top: 2rem;
  font-size: 1.1rem;
}

/* Animazioni "reveal" */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Media queries */

@media (max-width: 900px) {
  .servizi-grid {
    grid-template-columns: 1fr;
  }
  .serv-box {
    padding: 1.8rem 1.6rem;
  }
  .masonry {
    column-count: 2;
  }
}

@media (max-width: 768px) {
  .topbar-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .hero {
    height: 360px;
  }
  .hero-content {
    justify-content: flex-end;
    padding-bottom: 2.5rem;
  }

  .main-nav {
    position: absolute;
    inset: 100% 0 auto 0;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    flex-direction: column;
    padding: 0.75rem 1.5rem 1rem;
    display: none;
  }
  .main-nav.open {
    display: flex;
  }
  .nav-toggle {
    display: flex;
  }
  .contact-layout {
    grid-template-columns: 1fr;
  }
  .chi-sono-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .masonry {
    column-count: 1;
  }
  
  .carousel-item {
    flex: 0 0 calc(50% - 0.75rem);
  }
}

@media (max-width: 480px) {
  .hero {
    height: 320px;
  }
  
  .carousel-item {
    flex: 0 0 100%;
  }
}

@media (max-width: 480px) {
  .hero {
    height: 320px;
  }
}
