/* ============================================
   EPAC S.r.l. - Stylesheet Principale
   Riqualificazione Energetica & Fotovoltaico
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  /* Colori */
  --primary: #1a73b5;
  --primary-dark: #155d93;
  --secondary: #3ca1da;
  --accent: #f7a71b;
  --accent-dark: #e09400;
  --green: #10b981;
  --dark: #0c1f2e;
  --dark-lighter: #132d42;
  --light-bg: #f0f7fc;
  --white: #ffffff;
  --text: #1e293b;
  --text-light: #64748b;
  --border: #e2e8f0;
  --shadow: rgba(12, 31, 46, 0.1);
  --shadow-lg: rgba(12, 31, 46, 0.15);

  /* Font */
  --font-heading: 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Spacing */
  --section-padding: 100px 0;
  --container-width: 1200px;
  --container-padding: 0 24px;

  /* Transizioni */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --transition: all 0.3s var(--ease);
  --transition-slow: all 0.6s var(--ease);
  --transition-reveal: opacity 0.5s var(--ease), transform 0.5s var(--ease);

  /* Border radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.4rem, 2.5vw, 1.75rem); }
h4 { font-size: clamp(1.1rem, 2vw, 1.3rem); }

p {
  margin-bottom: 1em;
  color: var(--text-light);
}

/* --- Utility Classes --- */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: var(--container-padding);
}

.section,
.section-padding {
  padding: var(--section-padding);
}

.section-light {
  background-color: var(--light-bg);
}

.section-header {
  text-align: center;
  max-width: 850px;
  margin: 0 auto 60px;
}

.label,
.section-label {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--secondary);
  margin-bottom: 16px;
}

.section-header h2 {
  margin-bottom: 20px;
}

.section-header p {
  font-size: 1.1rem;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 36px;
  border-radius: 50px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  -webkit-appearance: none;
  appearance: none;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--white);
  box-shadow: 0 4px 20px rgba(26, 115, 181, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(26, 115, 181, 0.45);
}

.btn-accent {
  background: var(--accent);
  color: var(--dark);
  box-shadow: 0 4px 20px rgba(247, 167, 27, 0.35);
}

.btn-accent:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(247, 167, 27, 0.45);
}

.btn svg {
  width: 18px;
  height: 18px;
}

/* --- Navbar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 20px 0;
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 2px 30px var(--shadow);
  padding: 12px 0;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 100%;
  padding: 0 82px;
}

.navbar-logo img {
  height: 60px;
  width: auto;
  transition: var(--transition);
}

.navbar-logo {
  position: relative;
  display: flex;
  align-items: center;
}

.navbar-logo .logo-color {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: var(--transition);
}

.navbar-logo .logo-white {
  opacity: 1;
  transition: var(--transition);
}

.navbar.scrolled .navbar-logo .logo-white {
  opacity: 0;
  pointer-events: none;
}

.navbar.scrolled .navbar-logo .logo-color {
  opacity: 1;
}

.navbar-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.navbar-menu a {
  padding: 12px 24px;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  border-radius: 50px;
  transition: var(--transition);
}

.navbar.scrolled .navbar-menu a {
  color: var(--text);
}

.navbar-menu a:hover,
.navbar-menu a.active {
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
}

.navbar.scrolled .navbar-menu a:hover,
.navbar.scrolled .navbar-menu a.active {
  background: var(--light-bg);
  color: var(--primary);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 28px;
  height: 2.5px;
  background: var(--white);
  border-radius: 10px;
  transition: var(--transition);
}

.navbar.scrolled .hamburger span {
  background: var(--text);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* --- Hero --- */
.hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-lighter) 100%);
}

.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 920px;
  margin: 0 auto;
  padding: 140px 0 100px;
  text-align: center;
}

.hero-content .label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-radius: 50px;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-content h1 {
  color: var(--white);
  margin-bottom: 24px;
  font-weight: 800;
  white-space: nowrap;
  will-change: transform;
  display: inline-block;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

.hero-content h1 span {
  color: var(--accent);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.hero-content p {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.3);
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  animation: bounce 2s ease infinite;
}

.hero-scroll .scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.6), transparent);
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(10px); }
}

/* --- Hero pagine interne --- */
.hero-page {
  position: relative;
  padding: 160px 0 100px;
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-lighter) 100%);
  overflow: hidden;
}

.hero-page::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(60, 161, 218, 0.15), transparent 70%);
  border-radius: 50%;
}

.hero-page::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(247, 167, 27, 0.1), transparent 70%);
  border-radius: 50%;
}

.hero-page .container {
  position: relative;
  z-index: 1;
}

.hero-page .label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-radius: 50px;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-page h1 {
  color: var(--white);
  margin-bottom: 20px;
  max-width: 800px;
}

.hero-page p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.15rem;
  max-width: 700px;
  line-height: 1.8;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 30px;
  font-size: 0.9rem;
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.5);
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb span {
  color: rgba(255, 255, 255, 0.3);
}

.breadcrumb .current {
  color: var(--white);
  font-weight: 500;
}

/* --- Servizi / Card Grid --- */
.services-featured {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin-bottom: 30px;
}

.services-featured--single {
  grid-template-columns: 1fr;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.service-card.service-card--featured {
  padding: 52px 44px;
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-lighter) 100%);
  color: var(--white);
  border-color: transparent;
}

.service-card.service-card--featured h3 {
  color: var(--white);
  font-size: 1.5rem;
}

.service-card.service-card--featured p {
  color: rgba(255, 255, 255, 0.8);
}

.service-card.service-card--featured .icon {
  background: rgba(255, 255, 255, 0.1);
  width: 72px;
  height: 72px;
}

.service-card.service-card--featured .icon svg {
  color: var(--accent);
  width: 36px;
  height: 36px;
}

.service-card.service-card--featured .card-link {
  color: var(--accent);
}

.service-card.service-card--featured:hover {
  border-color: transparent;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.service-card.service-card--featured::before {
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
}

.service-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 44px 36px;
  transition: var(--transition);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  opacity: 0;
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px var(--shadow-lg);
  border-color: transparent;
}

.service-card:hover::before {
  opacity: 1;
}

.service-card .icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, rgba(26, 115, 181, 0.1), rgba(60, 161, 218, 0.1));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  transition: var(--transition);
}

.service-card .icon svg {
  width: 30px;
  height: 30px;
  color: var(--primary);
  stroke-width: 1.8;
}

.service-card:hover .icon {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.service-card:hover .icon svg {
  color: var(--white);
}

.service-card h3 {
  margin-bottom: 14px;
  font-size: 1.25rem;
}

.service-card p {
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.service-card .card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
}

.service-card .card-link::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}

.service-card .card-link svg {
  width: 16px;
  height: 16px;
  transition: var(--transition);
}

.service-card:hover .card-link svg {
  transform: translateX(4px);
}

/* --- Opportunita --- */
.opportunita-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.opportunita-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid var(--border);
}

.opportunita-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px var(--shadow-lg);
  border-color: transparent;
}

.opportunita-image {
  height: 200px;
  background: linear-gradient(135deg, rgba(26, 115, 181, 0.08), rgba(60, 161, 218, 0.08));
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border);
}

.opportunita-image svg {
  color: var(--border);
  opacity: 0.6;
}

.opportunita-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.opportunita-content {
  padding: 28px 28px 32px;
}

.opportunita-content h3 {
  margin-bottom: 10px;
  font-size: 1.15rem;
}

.opportunita-content p {
  font-size: 0.92rem;
  margin-bottom: 0;
}

/* --- Stats --- */
.stats-section {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-lighter) 100%);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.stats-section .section-header {
  text-align: center;
  margin-bottom: 50px;
  position: relative;
  z-index: 1;
}

.stats-section .section-header .label {
  color: var(--accent);
}

.stats-section .section-header h2 {
  color: var(--white);
}

.stats-section .section-header p {
  color: rgba(255, 255, 255, 0.7);
}

.stats-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  position: relative;
  z-index: 1;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 800;
  color: var(--white);
  margin-bottom: 8px;
  line-height: 1;
}

.stat-number span {
  color: var(--accent);
}

.stat-label {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
}

.stat-number.counting {
  color: var(--accent);
  animation: countGlow 0.15s ease infinite alternate;
}

.stat-number.counted {
  animation: countFinish 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes countGlow {
  from { text-shadow: 0 0 0px transparent; }
  to   { text-shadow: 0 0 24px rgba(247, 167, 27, 0.55); }
}

@keyframes countFinish {
  0%   { transform: scale(1);    color: var(--accent); }
  45%  { transform: scale(1.06); color: var(--accent); }
  100% { transform: scale(1);    color: var(--white); }
}

/* --- About Preview (Home) --- */
.about-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-image {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 20px 60px var(--shadow-lg);
  transition: box-shadow var(--transition), transform var(--transition);
}

.about-image:hover {
  box-shadow: 0 28px 80px rgba(12, 31, 46, 0.22);
  transform: translateY(-4px);
}

.about-image img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  display: block;
}

.about-image .accent-box {
  position: absolute;
  bottom: -20px;
  right: -20px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--white);
  padding: 28px 36px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 40px rgba(26, 115, 181, 0.3);
}

.about-image .accent-box .number {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
}

.about-image .accent-box .text {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-top: 4px;
}

.about-text h2 {
  margin-bottom: 24px;
}

.about-text p {
  font-size: 1.05rem;
  margin-bottom: 16px;
  text-align: justify;
}

.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 32px 0 36px;
}

.about-feature {
  display: flex;
  align-items: center;
  gap: 12px;
}

.about-feature .check {
  width: 36px;
  height: 36px;
  min-width: 36px;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-feature .check svg {
  width: 18px;
  height: 18px;
  color: var(--green);
}

.about-feature span {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text);
}

/* --- CTA Banner --- */
.cta-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: var(--radius-xl);
  padding: 80px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin: 0 24px;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1), transparent 70%);
  border-radius: 50%;
}

.cta-banner::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(247, 167, 27, 0.2), transparent 70%);
  border-radius: 50%;
}

.cta-banner .cta-content {
  position: relative;
  z-index: 1;
}

.cta-banner .cta-icon {
  margin-bottom: 16px;
  opacity: 0.9;
}

.cta-banner h2 {
  color: var(--white);
  margin-bottom: 20px;
}

.cta-banner p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.15rem;
  max-width: 550px;
  margin: 0 auto 36px;
}

.cta-banner .btn-group {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* --- Portfolio / Lavori --- */
.portfolio-filters {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 50px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 10px 28px;
  border-radius: 50px;
  border: 2px solid var(--border);
  background: var(--white);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.portfolio-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.portfolio-card.is-leaving {
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity: 0;
  transform: scale(0.95);
}

.portfolio-card.is-entering {
  transition: opacity 0.4s ease, transform 0.4s ease;
  opacity: 1;
  transform: scale(1);
}

.portfolio-card .card-image {
  width: 100%;
  height: 320px;
  overflow: hidden;
}

.portfolio-card .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-slow);
}

.portfolio-card:hover .card-image img {
  transform: scale(1.08);
}

.portfolio-card .card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 30px;
  background: linear-gradient(to top, rgba(12, 31, 46, 0.9), transparent);
  transform: translateY(20px);
  opacity: 0;
  transition: var(--transition);
}

.portfolio-card:hover .card-overlay {
  transform: translateY(0);
  opacity: 1;
}

.portfolio-card .card-overlay .tag {
  display: inline-block;
  padding: 4px 14px;
  background: var(--accent);
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.portfolio-card .card-overlay h3 {
  color: var(--white);
  font-size: 1.2rem;
  margin-bottom: 6px;
}

.portfolio-card .card-overlay p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* --- Vantaggi / Features --- */
.vantaggi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.vantaggio-card {
  display: flex;
  gap: 24px;
  padding: 36px;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.vantaggio-card:hover {
  box-shadow: 0 20px 60px var(--shadow-lg);
  border-color: transparent;
}

.vantaggio-card .icon {
  width: 56px;
  height: 56px;
  min-width: 56px;
  background: linear-gradient(135deg, rgba(26, 115, 181, 0.1), rgba(60, 161, 218, 0.1));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.vantaggio-card .icon svg {
  width: 26px;
  height: 26px;
  color: var(--primary);
}

.vantaggio-card h4 {
  margin-bottom: 10px;
}

.vantaggio-card p {
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* --- Processo / Timeline --- */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  position: relative;
}

.process-grid::before {
  content: '';
  position: absolute;
  top: 44px;
  left: 12.5%;
  right: 12.5%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  z-index: 0;
}

.process-step {
  text-align: center;
  position: relative;
  z-index: 1;
}

.process-step .step-number {
  width: 88px;
  height: 88px;
  background: var(--white);
  border: 3px solid var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  margin: 0 auto 24px;
  transition: var(--transition);
}

.process-step:hover .step-number {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--white);
  border-color: transparent;
  transform: scale(1.1);
}

.process-step h4 {
  margin-bottom: 10px;
}

.process-step p {
  font-size: 0.9rem;
}

/* --- Team --- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.team-card {
  text-align: center;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.team-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px var(--shadow-lg);
  border-color: transparent;
}

.team-card .card-image {
  width: 100%;
  height: 280px;
  overflow: hidden;
}

.team-card .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-slow);
}

.team-card .card-image.team-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--light-bg);
}

.team-card .card-image.team-placeholder svg {
  width: 100%;
  height: 100%;
}

.team-card:hover .card-image img {
  transform: scale(1.05);
}

.team-card .card-info {
  padding: 24px 20px;
}

.team-card h4 {
  margin-bottom: 4px;
}

.team-card .role {
  font-size: 0.9rem;
  color: var(--primary);
  font-weight: 500;
}

/* --- Certificazioni --- */
.certifications-section {
  padding: 70px 0;
}

.certifications-section .section-header {
  margin-bottom: 40px;
}

.cert-row {
  display: flex;
  justify-content: center;
  gap: 32px;
}

.cert-row + .cert-row {
  margin-top: 32px;
}

.cert-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  max-width: 340px;
  aspect-ratio: 4/3;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid var(--border);
  transition: var(--transition);
  text-decoration: none;
  cursor: pointer;
}

.cert-card:hover {
  box-shadow: 0 8px 30px var(--shadow);
  border-color: var(--primary);
  transform: translateY(-4px);
}

.cert-card img {
  width: 95%;
  height: 95%;
  object-fit: contain;
}

.cert-pdf-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: var(--primary);
  color: var(--white);
  border-radius: 0 0 var(--radius-lg) 0;
  border-top-left-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  opacity: 0.85;
  transition: var(--transition);
}

.cert-card:hover .cert-pdf-badge {
  opacity: 1;
  background: var(--secondary);
}

/* --- Contatti Hero --- */
.contatti-hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
}

.contatti-hero-text {
  flex: 1;
}

.contatti-hero-action {
  flex-shrink: 0;
}

.btn-email-hero {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--accent);
  color: var(--dark);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 16px 36px;
  border-radius: 50px;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(247, 167, 27, 0.35);
  transition: var(--transition);
  white-space: nowrap;
}

.btn-email-hero:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(247, 167, 27, 0.45);
}

/* --- Legal Pages --- */
.legal-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-top: 16px;
}

.legal-table th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 600;
  border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

.legal-table td {
  padding: 12px 16px;
}

.legal-table tr:not(:last-child) td {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.legal-table td:first-child {
  color: var(--text-light);
}

.legal-table td:last-child {
  color: var(--text-light);
}

/* --- Legal Pages Content --- */
.legal-page .hero-page h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
}

.legal-content {
  max-width: 800px;
}

.legal-content h2 {
  font-size: 1.45rem;
  margin-top: 48px;
  margin-bottom: 16px;
  color: var(--text);
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content h3 {
  font-size: 1.15rem;
  margin-top: 32px;
  margin-bottom: 12px;
  color: var(--text);
}

.legal-content p {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.85;
  margin-bottom: 16px;
}

.legal-content ul,
.legal-content ol {
  list-style: disc;
  padding-left: 24px;
  margin-bottom: 20px;
}

.legal-content ol {
  list-style: decimal;
}

.legal-content li {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.85;
  margin-bottom: 8px;
}

.legal-content a {
  color: var(--primary);
}

.legal-content a:hover {
  text-decoration: underline;
}

.legal-content hr {
  margin: 48px 0;
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.legal-content .legal-subtitle {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 32px;
}

.legal-content .legal-update {
  margin-top: 48px;
  font-size: 0.85rem;
  color: var(--text-light);
}

/* --- Contatti --- */

/* --- Info Bar (Contatti) --- */
.info-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.info-bar-item {
  text-align: center;
  padding: 40px 32px;
}

.info-bar-item:not(:last-child) {
  border-right: 1px solid rgba(0, 0, 0, 0.08);
}

.info-bar-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: var(--light-bg);
  border-radius: 50%;
  margin: 0 auto 16px;
  color: var(--secondary);
}

.info-bar-item h3 {
  font-size: 1.15rem;
  margin-bottom: 12px;
  color: var(--dark);
}

.info-bar-item p {
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--text-light);
  margin-bottom: 0;
}

.info-bar-item a {
  color: var(--text-light);
  transition: var(--transition);
}

.info-bar-item a:hover {
  color: var(--primary);
}

/* --- Sedi (Contatti) --- */
.sede-card {
  flex: 1;
}

.sede-info {
  text-align: center;
  margin-bottom: 24px;
}

.sede-info a {
  color: var(--primary);
  font-weight: 500;
}

.sede-info a:hover {
  color: var(--secondary);
}

/* --- Map --- */
.map-section {
  width: 100%;
  height: 400px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: 60px;
  border: 1px solid var(--border);
}

.map-section iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* --- Service Page --- */
.service-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.service-hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: 0;
}

.service-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(12, 31, 46, 0.6), rgba(12, 31, 46, 0.85));
  z-index: 1;
}

.service-hero .container {
  position: relative;
  z-index: 2;
}

.service-hero-content {
  max-width: 850px;
  padding: 160px 0 100px;
}

.service-hero-content .section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-radius: 50px;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.service-hero-content h1 {
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 20px;
  max-width: 850px;
}

.service-hero-content p {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.7;
}

/* --- Hero Play Button (mobile fallback) --- */
.hero-play-btn {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: var(--white);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), transform var(--transition);
}

.hero-play-btn.visible {
  display: flex;
}

.hero-play-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%) scale(1.08);
}

.hero-play-btn svg {
  width: 30px;
  height: 30px;
  margin-left: 4px;
}

/* Service Block (sezioni alternate) */
.service-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.service-row--reverse {
  direction: rtl;
}

.service-row--reverse > * {
  direction: ltr;
}

.service-text .section-label {
  margin-bottom: 16px;
}

.service-text h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 20px;
  color: var(--dark);
}

.service-text p {
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 12px;
  text-align: justify;
}

.service-text p:last-child {
  margin-bottom: 0;
}

.service-image {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 20px 60px var(--shadow-lg);
  transition: box-shadow var(--transition), transform var(--transition);
}

.service-image:hover {
  box-shadow: 0 28px 80px rgba(12, 31, 46, 0.22);
  transform: translateY(-4px);
}

.service-image img {
  width: 100%;
  height: 460px;
  object-fit: cover;
  display: block;
}

.service-image-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--light-bg), var(--border));
  border-radius: var(--radius-lg);
}

/* Sotto-servizi card */
.subservices-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 48px;
}

.subservices-grid--4 {
  grid-template-columns: repeat(2, 1fr);
}

.subservice-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px var(--shadow);
  transition: var(--transition);
}

.subservice-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px var(--shadow);
}

.subservice-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(26, 115, 181, 0.1), rgba(60, 161, 218, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  margin-bottom: 20px;
}

.subservice-card h3 {
  font-size: 1.1rem;
  color: var(--dark);
  margin-bottom: 12px;
}

.subservice-card p {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.7;
}

/* Service CTA */
.service-cta {
  background: var(--dark);
  padding: 80px 0;
  text-align: center;
}

.service-cta h2 {
  color: var(--white);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 16px;
}

.service-cta p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.05rem;
  max-width: 550px;
  margin: 0 auto 32px;
}

/* --- Footer --- */
.footer {
  background: var(--dark);
  color: var(--white);
  padding: 60px 0 0;
}

.footer-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo {
  height: 44px;
  width: auto;
  margin-bottom: 32px;
}

.footer-nav {
  display: flex;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.6);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition);
}

.footer-nav a:hover {
  color: var(--white);
}

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.5);
  transition: var(--transition);
}

.footer-social a:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
}

.footer-social a[aria-label="Instagram"]:hover {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}

.footer-bottom {
  padding: 24px 0;
}

.footer-legal {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-legal a {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.8rem;
  transition: var(--transition);
}

.footer-legal a:hover {
  color: var(--accent);
}

/* --- Scroll Animations --- */
.reveal,
.reveal-left,
.reveal-right {
  opacity: 0;
  transition: var(--transition-reveal);
}

.reveal         { transform: translateY(30px); }
.reveal-left    { transform: translateX(-30px); }
.reveal-right   { transform: translateX(30px); }

.reveal.visible,
.reveal-left.visible,
.reveal-right.visible {
  opacity: 1;
  transform: translate(0);
}

/* Stagger delay for children */
.stagger > *:nth-child(1)  { transition-delay: 0s; }
.stagger > *:nth-child(2)  { transition-delay: 0.12s; }
.stagger > *:nth-child(3)  { transition-delay: 0.24s; }
.stagger > *:nth-child(4)  { transition-delay: 0.36s; }
.stagger > *:nth-child(5)  { transition-delay: 0.48s; }
.stagger > *:nth-child(6)  { transition-delay: 0.6s; }
.stagger > *:nth-child(7)  { transition-delay: 0.72s; }
.stagger > *:nth-child(8)  { transition-delay: 0.84s; }
.stagger > *:nth-child(9)  { transition-delay: 0.96s; }
.stagger > *:nth-child(10) { transition-delay: 1.08s; }

/* --- Pagina Azienda specifica --- */
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.value-card {
  text-align: center;
  padding: 48px 36px;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.value-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px var(--shadow-lg);
  border-color: transparent;
}

.value-card .icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, rgba(26, 115, 181, 0.1), rgba(60, 161, 218, 0.1));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  transition: var(--transition);
}

.value-card:hover .icon {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.value-card .icon svg {
  width: 36px;
  height: 36px;
  color: var(--primary);
  transition: var(--transition);
}

.value-card:hover .icon svg {
  color: var(--white);
}

.value-card h3 {
  margin-bottom: 14px;
  font-size: 1.2rem;
}

.value-card p {
  font-size: 0.95rem;
  margin: 0;
}

/* Timeline storia */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), var(--secondary));
  transform: translateX(-50%);
}

.timeline-item {
  display: flex;
  justify-content: flex-end;
  padding-right: calc(50% + 40px);
  margin-bottom: 50px;
  position: relative;
}

.timeline-item:nth-child(even) {
  justify-content: flex-start;
  padding-right: 0;
  padding-left: calc(50% + 40px);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 20px;
  width: 16px;
  height: 16px;
  background: var(--primary);
  border: 4px solid var(--white);
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 0 4px rgba(26, 115, 181, 0.2);
  z-index: 1;
}

.timeline-content {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 28px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px var(--shadow);
}

.timeline-content .year {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.timeline-content h4 {
  margin-bottom: 8px;
}

.timeline-content p {
  font-size: 0.9rem;
  margin: 0;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .navbar .container {
    padding: 0 32px;
  }

  .services-featured {
    gap: 24px;
    margin-bottom: 24px;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .services-grid .service-card:last-child {
    grid-column: 1 / -1;
    max-width: calc(50% - 12px);
    justify-self: center;
  }

  .service-row {
    gap: 40px;
  }

  .service-image img {
    height: 380px;
  }

  .subservices-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .opportunita-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .opportunita-grid .opportunita-card:last-child {
    grid-column: 1 / -1;
    max-width: calc(50% - 12px);
    justify-self: center;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 30px;
  }

  .about-preview {
    gap: 50px;
  }

  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }

  .process-grid::before {
    display: none;
  }

  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .values-grid {
    grid-template-columns: repeat(2, 1fr);
  }

}

@media (max-width: 768px) {
  .navbar .container {
    padding: 0 20px;
  }

  :root {
    --section-padding: 70px 0;
  }

  .navbar-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 380px;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    padding: 100px 32px 40px;
    gap: 4px;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
    overflow-y: auto;
    z-index: 1002;
  }

  .navbar-menu.open {
    right: 0;
  }

  .navbar-menu a {
    color: var(--text);
    padding: 14px 20px;
    font-size: 1rem;
    border-radius: var(--radius-sm);
  }

  .navbar-menu a:hover,
  .navbar-menu a.active {
    background: var(--light-bg);
    color: var(--primary);
  }

  .hamburger {
    display: flex;
  }

  .hamburger.active span {
    background: var(--text) !important;
  }

  /* Mobile overlay */
  .menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    cursor: pointer;
  }

  .menu-overlay.active {
    display: block;
  }

  .service-row {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .service-row--reverse {
    direction: ltr;
  }

  .service-image img {
    height: 300px;
  }

  .service-image,
  .about-image {
    border-radius: var(--radius-lg);
  }

  .hero-play-btn {
    width: 72px;
    height: 72px;
  }

  .service-hero-content {
    padding: 140px 0 80px;
  }

  .subservices-grid {
    grid-template-columns: 1fr;
  }

  .service-cta {
    padding: 60px 0;
  }

  .hero-content {
    padding: 120px 0 80px;
  }

  .hero-content h1 {
    font-size: clamp(1.8rem, 6vw, 2.8rem);
    white-space: normal;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .hero-buttons .btn {
    text-align: center;
    justify-content: center;
  }

  .about-preview {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-image img {
    height: 350px;
  }

  .about-image .accent-box {
    bottom: 20px;
    right: 20px;
  }

  .services-featured {
    grid-template-columns: 1fr;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .services-grid .service-card:last-child {
    max-width: 100%;
    grid-column: auto;
  }

  .opportunita-grid {
    grid-template-columns: 1fr;
  }

  .opportunita-grid .opportunita-card:last-child {
    max-width: 100%;
  }

  .vantaggi-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .cta-banner {
    padding: 60px 32px;
    margin: 0 16px;
    border-radius: var(--radius-lg);
  }

  .hero-page {
    padding: 120px 0 70px;
  }

  .info-bar {
    grid-template-columns: 1fr;
  }

  .info-bar-item:not(:last-child) {
    border-right: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  }

  .map-section {
    height: 300px;
    margin-top: 24px;
  }

  .footer-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px 20px;
  }

  .footer-legal {
    gap: 12px 16px;
  }

  .values-grid {
    grid-template-columns: 1fr;
  }

  .timeline::before {
    left: 20px;
  }

  .timeline-item {
    padding-right: 0;
    padding-left: 56px;
  }

  .timeline-item:nth-child(even) {
    padding-left: 56px;
  }

  .timeline-item::before {
    left: 20px;
  }

  .section-header {
    margin-bottom: 40px;
  }

  .team-grid {
    grid-template-columns: 1fr;
  }

  .process-grid {
    grid-template-columns: 1fr;
  }

  .cert-row {
    gap: 20px;
  }

  .cert-card {
    max-width: 280px;
    padding: 24px;
  }
}

@media (max-width: 480px) {
  :root {
    --section-padding: 60px 0;
    --container-padding: 0 16px;
  }

  .hero-play-btn {
    width: 60px;
    height: 60px;
  }

  .hero-play-btn svg {
    width: 22px;
    height: 22px;
  }

  .service-image img {
    height: 240px;
  }

  .filter-btn {
    padding: 8px 18px;
    font-size: 0.82rem;
  }

  .cert-row {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .cert-row + .cert-row {
    margin-top: 16px;
  }

  .cert-card {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16/6;
    height: auto;
    padding: 16px;
  }

  .hero-page {
    padding: 100px 0 60px;
  }

  .hero-page h1 {
    font-size: clamp(1.6rem, 6vw, 2rem);
  }

  .contatti-hero-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 32px;
  }

  .btn-email-hero {
    width: 100%;
    justify-content: center;
  }

  .hero-content {
    padding: 100px 0 60px;
  }

  .info-bar-item {
    padding: 28px 20px;
  }

  .map-section {
    height: 250px;
  }

  .cta-banner {
    padding: 48px 20px;
    margin: 0 8px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px 20px;
  }

  .about-features {
    grid-template-columns: 1fr;
  }

  .about-image .accent-box {
    position: relative;
    bottom: auto;
    right: auto;
    margin-top: 16px;
    border-radius: var(--radius-sm);
  }

  .portfolio-card .card-overlay {
    opacity: 1;
    transform: translateY(0);
  }
}
