@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ============================================
   DESIGN SYSTEM & VARIABLES
   ============================================ */

:root {
  /* Colors */
  --primary: #0f5b70;
  --primary-hover: #0a4657;
  --primary-light: #e6f2f5;
  --accent: #2ec4b6;
  --accent-hover: #20a396;
  --accent-light: #eafcfb;
  
  --bg-primary: #ffffff;
  --bg-secondary: #f4f7f6;
  --bg-dark: #121f24;
  
  --text-main: #1c2e35;
  --text-muted: #536c75;
  --text-light: #ffffff;
  
  --border-color: #e0eae8;
  --border-focus: #2ec4b6;
  
  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.4);
  --glass-shadow: 0 8px 32px 0 rgba(15, 91, 112, 0.06);
  
  /* Typography */
  --font-headings: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  
  /* Radius */
  --radius-s: 8px;
  --radius-m: 16px;
  --radius-l: 24px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 4px 6px -1px rgba(15, 91, 112, 0.05), 0 2px 4px -1px rgba(15, 91, 112, 0.03);
  --shadow-md: 0 10px 15px -3px rgba(15, 91, 112, 0.08), 0 4px 6px -2px rgba(15, 91, 112, 0.04);
  --shadow-lg: 0 20px 25px -5px rgba(15, 91, 112, 0.1), 0 10px 10px -5px rgba(15, 91, 112, 0.04);
}

/* ============================================
   BASE & RESET
   ============================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
  width: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: clip;
  width: 100%;
  position: relative;
  padding-top: 80px; /* Compensazione per navbar fissa in alto */
}

h1, h2, h3, h4, h5, h6, p, a, span, li, div {
  overflow-wrap: break-word;
  word-break: break-word;
}

img, iframe, video, svg {
  max-width: 100%;
  box-sizing: border-box;
}

img {
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: var(--radius-m);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

ul {
  list-style: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headings);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-main);
}

h1 {
  font-size: clamp(2.25rem, 1.2rem + 4.2vw, 4.25rem); /* Fluid size */
  font-weight: 800;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.75rem, 1.1rem + 2.6vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h3 {
  font-size: clamp(1.25rem, 0.9rem + 1.4vw, 1.875rem);
  font-weight: 600;
  letter-spacing: -0.01em;
}

p {
  color: var(--text-muted);
  font-size: clamp(0.95rem, 0.9rem + 0.2vw, 1.125rem);
  font-weight: 300;
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ============================================
   LAYOUT & CONTAINER
   ============================================ */

.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 {
  grid-template-columns: 1fr;
}

.grid-3 {
  grid-template-columns: 1fr;
}

.grid-4 {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.flex-align {
  align-items: center;
}

.intro-image {
  width: 100%;
  height: 380px;
  object-fit: cover;
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-smooth);
}

.intro-image:hover {
  transform: scale(1.02);
}

@media (max-width: 768px) {
  .intro-image {
    height: 260px;
  }
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: normal;
  text-align: center;
  word-break: break-word;
  max-width: 100%;
  box-sizing: border-box;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--text-light);
  box-shadow: 0 4px 14px rgba(15, 91, 112, 0.2);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(15, 91, 112, 0.3);
}

.btn-secondary {
  background-color: transparent;
  border-color: var(--primary);
  color: var(--primary);
}

.btn-secondary:hover {
  background-color: var(--primary-light);
  transform: translateY(-2px);
}

.btn-accent {
  background-color: var(--accent);
  color: var(--text-light);
  box-shadow: 0 4px 14px rgba(46, 196, 182, 0.2);
}

.btn-accent:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(46, 196, 182, 0.3);
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

.header-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  background-color: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  transition: all var(--transition-fast);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius-s);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-weight: 800;
  font-size: 1.5rem;
  font-family: var(--font-headings);
  flex-shrink: 0;
}

.logo-text {
  font-family: var(--font-headings);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-main);
  line-height: 1.15;
  white-space: nowrap;
}

.logo-text span {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 1.8vw, 2rem);
  flex-wrap: nowrap;
}

.nav-link {
  font-weight: 500;
  color: var(--text-main);
  padding: 8px 0;
  position: relative;
  white-space: nowrap;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: width var(--transition-fast);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link.active {
  color: var(--primary);
  font-weight: 600;
}

.hamburger {
  display: none;
  cursor: pointer;
  border: none;
  background: none;
  padding: 10px;
}

.hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px auto;
  background-color: var(--text-main);
  transition: all var(--transition-fast);
}

@media (max-width: 768px) {
  .hamburger {
    display: block;
  }
  
  .hamburger.active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
  }
  .hamburger.active .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
  
  .nav-menu {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    max-width: 100vw;
    height: calc(100vh - 80px);
    background-color: var(--bg-primary);
    flex-direction: column;
    padding: 2rem 1.5rem 3rem 1.5rem;
    gap: 1.5rem;
    transition: left var(--transition-smooth);
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    z-index: 1000;
  }
  
  .nav-menu.active {
    left: 0;
  }
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
  position: relative;
  overflow: hidden;
  background-color: var(--bg-secondary);
}

.hero-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 3rem;
}

@media (min-width: 1024px) {
  .hero-wrapper {
    grid-template-columns: 1fr 1fr;
  }
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero-badge {
  align-self: flex-start;
  background-color: var(--primary-light);
  color: var(--primary);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-title {
  margin-bottom: 0.5rem;
}

.hero-description {
  font-size: clamp(1.1rem, 1rem + 0.2vw, 1.25rem);
  margin-bottom: 1rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-image-container {
  position: relative;
}

.hero-image-container::before {
  content: '';
  position: absolute;
  top: 10%;
  left: 10%;
  width: 90%;
  height: 90%;
  border: 4px solid var(--accent);
  border-radius: var(--radius-l);
  z-index: 1;
  pointer-events: none;
}

.hero-image {
  width: 100%;
  height: 480px;
  object-fit: cover;
  border-radius: var(--radius-l);
  position: relative;
  z-index: 2;
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition-smooth);
}

.hero-image-container:hover .hero-image {
  transform: scale(1.02);
}

/* Su tablet e mobile l'unica immagine della dottoressa si posiziona subito prima di "Il tuo sorriso..." */
@media (max-width: 1023px) {
  .hero-wrapper {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1.5rem;
  }
  .hero-content {
    display: contents;
  }
  .hero-badge {
    order: 1;
  }
  .hero-image-container {
    order: 2;
    margin: 0.25rem 0 0.5rem 0;
  }
  .hero-image {
    height: 350px;
    width: 100%;
    object-fit: cover;
  }
  .hero-title {
    order: 3;
    margin-bottom: 0;
  }
  .hero-description {
    order: 4;
    margin-bottom: 0.25rem;
  }
  .hero-actions {
    order: 5;
  }
}

/* ============================================
   SECTIONS & COMMONS
   ============================================ */

.section-bg {
  background-color: var(--bg-secondary);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.section-header p {
  font-size: 1.125rem;
}

/* ============================================
   CARDS (Services, Features)
   ============================================ */

.card {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-m);
  transition: all var(--transition-smooth);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.card-icon {
  width: 60px;
  height: 60px;
  background-color: var(--primary-light);
  border-radius: var(--radius-m);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  margin-bottom: 1.5rem;
  transition: all var(--transition-fast);
}

.card:hover .card-icon {
  background-color: var(--accent-light);
  color: var(--accent);
}

.card-icon svg {
  width: 28px;
  height: 28px;
}

.card-title {
  margin-bottom: 0.75rem;
  font-size: 1.35rem;
}

.card-content {
  font-weight: 300;
  font-size: 1rem;
}

/* ============================================
   CONVENZIONI & PARTNER CARDS
   ============================================ */

.partner-card {
  text-align: center;
  align-items: center;
  display: flex;
  flex-direction: column;
}

.partner-logo-box {
  width: 100%;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  padding: 16px;
  background-color: #ffffff;
  border-radius: var(--radius-m);
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(15, 91, 112, 0.04);
  transition: all var(--transition-fast);
}

.partner-card:hover .partner-logo-box {
  border-color: var(--accent);
  box-shadow: 0 8px 20px rgba(46, 196, 182, 0.15);
  transform: translateY(-3px);
}

.partner-logo {
  max-height: 70px;
  max-width: 90%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform var(--transition-fast);
}

.partner-card:hover .partner-logo {
  transform: scale(1.05);
}

.partner-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  background-color: var(--primary-light);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 0.75rem;
}

/* ============================================
   TEAM PAGE & CARDS
   ============================================ */

.team-grid {
  display: grid;
  gap: 3rem;
  max-width: 900px;
  margin: 0 auto;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.team-card {
  background-color: var(--bg-primary);
  border-radius: var(--radius-l);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-smooth);
}

.team-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.team-img-wrapper {
  height: 380px;
  overflow: hidden;
  position: relative;
}

.team-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  transition: transform var(--transition-smooth);
}

.team-card:hover .team-img {
  transform: scale(1.05);
}

.team-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.team-role {
  color: var(--accent);
  font-family: var(--font-headings);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.team-bio {
  margin-top: 0.5rem;
  font-size: 0.95rem;
}

/* ============================================
   GALLERY & BENTO GRID
   ============================================ */

.bento-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  width: 100%;
}

.bento-card {
  position: relative;
  border-radius: var(--radius-l);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  background-color: var(--bg-dark);
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: all var(--transition-smooth);
}

.bento-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.bento-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  transition: transform var(--transition-smooth);
}

.bento-card:hover .bento-img {
  transform: scale(1.05);
}

.bento-overlay {
  position: relative;
  z-index: 2;
  background: linear-gradient(
    to top,
    rgba(15, 31, 36, 0.94) 0%,
    rgba(15, 31, 36, 0.70) 55%,
    rgba(15, 31, 36, 0.15) 85%,
    transparent 100%
  );
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  box-sizing: border-box;
}

.bento-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  background-color: rgba(46, 196, 182, 0.25);
  color: #a3f7ee;
  border: 1px solid rgba(46, 196, 182, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.bento-title {
  color: var(--text-light);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
}

.bento-desc {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.92rem;
  font-weight: 300;
  line-height: 1.5;
  margin: 0;
}

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 1023px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .bento-item-hero {
    grid-column: span 2;
    min-height: 380px;
  }
  .bento-item-wide {
    grid-column: span 2;
    min-height: 300px;
  }
}

/* Desktop Bento Matrix */
@media (min-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 290px;
  }
  
  .bento-item-hero {
    grid-column: span 2;
    grid-row: span 2;
  }
  
  .bento-item-tall {
    grid-column: span 1;
    grid-row: span 2;
  }
  
  .bento-item-wide {
    grid-column: span 2;
    grid-row: span 1;
  }

  .bento-item-hero .bento-title {
    font-size: 1.6rem;
  }

  .bento-item-hero .bento-desc {
    font-size: 1rem;
    max-width: 580px;
  }
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 640px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-m);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  aspect-ratio: 4 / 3;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  transition: transform var(--transition-smooth);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(15, 91, 112, 0.9), rgba(15, 91, 112, 0.2));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity var(--transition-fast);
  z-index: 2;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay h3 {
  color: var(--text-light);
  margin-bottom: 0.25rem;
}

.gallery-overlay p {
  color: var(--accent-light);
  font-size: 0.9rem;
}

/* ============================================
   LOCATIONS (DOVE SIAMO)
   ============================================ */

.location-card {
  background-color: var(--bg-primary);
  border-radius: var(--radius-l);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.location-map-placeholder {
  height: 250px;
  background-color: var(--primary-light);
  position: relative;
  overflow: hidden;
}

.location-map-placeholder img,
.location-map-placeholder iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  border: 0;
  display: block;
}

.location-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.location-title {
  font-size: 1.5rem;
  border-bottom: 2px solid var(--primary-light);
  padding-bottom: 0.5rem;
}

.location-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.detail-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.detail-item svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 3px;
}

.detail-text {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.detail-text strong {
  color: var(--text-main);
  display: block;
}

/* ============================================
   FORMS & CONTACTS
   ============================================ */

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 1024px) {
  .contact-wrapper {
    grid-template-columns: 1.2fr 1.8fr;
  }
}

.contact-info-panel {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius-l);
  color: var(--text-light);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-info-panel h3 {
  color: var(--text-light);
  font-size: 1.75rem;
}

.contact-info-panel p {
  color: var(--accent-light);
  opacity: 0.9;
}

.panel-details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.panel-item {
  display: flex;
  gap: 15px;
  align-items: flex-start;
}

.panel-item svg {
  width: 24px;
  height: 24px;
  color: var(--text-light);
  opacity: 0.8;
  flex-shrink: 0;
}

.panel-text h4 {
  color: var(--text-light);
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.panel-text p {
  color: var(--text-light);
  font-size: 0.95rem;
}

.contact-form-panel {
  background-color: var(--bg-primary);
  border-radius: var(--radius-l);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  padding: 14px 20px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-m);
  background-color: var(--bg-secondary);
  transition: all var(--transition-fast);
  outline: none;
}

.form-input:focus {
  background-color: var(--bg-primary);
  border-color: var(--border-focus);
  box-shadow: 0 0 0 4px rgba(46, 196, 182, 0.15);
}

textarea.form-input {
  resize: vertical;
  min-height: 120px;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  background-color: var(--bg-dark);
  color: var(--text-light);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.95rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.footer-logo {
  color: var(--text-light);
}

.footer-logo .logo-icon {
  background: var(--accent);
}

.footer-logo .logo-text {
  color: var(--text-light);
}

.footer-logo .logo-text span {
  color: rgba(255, 255, 255, 0.4);
}

.footer-title {
  color: var(--text-light);
  font-size: 1.2rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: var(--accent);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-link {
  color: rgba(255, 255, 255, 0.7);
  transition: all var(--transition-fast);
}

.footer-link:hover {
  color: var(--accent);
  padding-left: 5px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
  }
}

.footer-bottom p {
  font-size: 0.85rem;
}

/* ============================================
   INTERACTIVE LOGIC IN JS / STATE HELPERS
   ============================================ */

.fade-in {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.fade-in.appear {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   DROPDOWN MENU STYLES
   ============================================ */

.nav-item-dropdown {
  position: relative;
}

.dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.dropdown-chevron {
  width: 14px;
  height: 14px;
  transition: transform var(--transition-fast);
}

.nav-item-dropdown:hover .dropdown-chevron {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background-color: var(--bg-primary);
  border-radius: var(--radius-m);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  padding: 0.75rem 0;
  min-width: 230px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
  z-index: 110;
}

.nav-item-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-link {
  display: block;
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-main);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.dropdown-link:hover {
  background-color: var(--primary-light);
  color: var(--primary);
  padding-left: 24px;
}

/* Mobile Dropdown Adjustment */
@media (max-width: 768px) {
  .nav-item-dropdown {
    width: 100%;
    text-align: center;
  }
  
  .dropdown-toggle {
    justify-content: center;
  }
  
  .dropdown-menu {
    position: static;
    transform: none !important;
    box-shadow: none;
    border: none;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-s);
    padding: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 1;
    visibility: visible;
    transition: max-height 0.4s ease, padding 0.4s ease;
    margin-top: 0.5rem;
    width: 100%;
  }
  
  .nav-item-dropdown.open .dropdown-menu {
    max-height: 300px;
    padding: 0.5rem 0;
  }
  
  .nav-item-dropdown.open .dropdown-chevron {
    transform: rotate(180deg);
  }
  
  .dropdown-link {
    padding: 10px 20px;
    text-align: center;
    font-size: 1rem;
  }
}

/* ============================================
   EXTRA MOBILE & RESPONSIVE FIXES
   ============================================ */
@media (max-width: 600px) {
  .hero-wrapper {
    gap: 1.5rem;
  }
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  .hero-actions .btn {
    width: 100%;
  }
  .hero-image-container::before {
    left: 3%;
    top: 5%;
    width: 94%;
    height: 94%;
  }
  .hero-image {
    height: 280px;
  }
  .section-header {
    margin-bottom: 2rem;
  }
  .pi-xxl { padding: 24px; }
  .pi-xl  { padding: 20px; }
  .pi-l   { padding: 18px; }
  .pi-m   { padding: 14px; }
}

/* ============================================
   WHATSAPP FLOATING BUTTON
   ============================================ */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  background-color: #25D366;
  color: #ffffff;
  border-radius: var(--radius-full);
  display: flex !important;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(37, 211, 102, 0.45);
  cursor: pointer;
  z-index: 99999 !important;
  transition: all var(--transition-smooth);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.whatsapp-float:hover {
  background-color: #20ba5a;
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.55);
  color: #ffffff;
}

.whatsapp-float svg {
  width: 32px;
  height: 32px;
  fill: #ffffff;
}

/* Tooltip informativo al passaggio del mouse su desktop */
.whatsapp-float::before {
  content: 'Scrivici su WhatsApp';
  position: absolute;
  right: 68px;
  background-color: #1c2e35;
  color: #ffffff;
  padding: 6px 12px;
  border-radius: var(--radius-s);
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transform: translateX(10px);
  transition: all var(--transition-fast);
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.whatsapp-float:hover::before {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

/* ============================================
   BACK TO TOP BUTTON
   (Su desktop sopra WhatsApp; su mobile a destra alla stessa altezza di WhatsApp)
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 92px;
  right: 28px;
  width: 48px;
  height: 48px;
  background-color: var(--primary);
  color: var(--text-light);
  border: none;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 16px rgba(15, 91, 112, 0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition-smooth);
  z-index: 99998 !important;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.back-to-top:hover {
  background-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(46, 196, 182, 0.4);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top svg {
  width: 22px;
  height: 22px;
  stroke-width: 2.5;
}

@media (max-width: 768px) {
  .whatsapp-float {
    bottom: calc(20px + env(safe-area-inset-bottom, 0px)) !important;
    right: calc(78px + env(safe-area-inset-right, 0px)) !important;
    width: 50px !important;
    height: 50px !important;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 99999 !important;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  .whatsapp-float:active {
    transform: scale(0.92);
  }
  .whatsapp-float svg {
    width: 28px !important;
    height: 28px !important;
  }
  .whatsapp-float::before {
    display: none !important;
  }
  .back-to-top {
    bottom: calc(20px + env(safe-area-inset-bottom, 0px)) !important;
    right: calc(18px + env(safe-area-inset-right, 0px)) !important;
    width: 50px !important;
    height: 50px !important;
    z-index: 99998 !important;
    display: flex !important;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  .back-to-top.visible {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
  }
  .back-to-top:active {
    transform: scale(0.92);
  }
}


