/* ===================================
   FARMACIA DEL PORTO - CLINICAL MODERN
   San Benedetto del Tronto
   =================================== */

/* === VARIABILI CSS (CLINICAL LIGHT) === */
:root {
  /* PALETTE CLINICAL MODERN */
  --bg-primary: #F8F9FA;
  /* Light Grey/White Background */
  --bg-card: #FFFFFF;
  /* Pure White Cards */

  --primary-color: #00A896;
  /* Medical Teal - Trust & Health */
  --secondary-color: #028090;
  /* Deep Ocean Blue */
  --accent-color: #FF5722;
  /* Deep Orange - More Vibrant */

  --text-dark: #1A1A1A;
  /* Primary Text */
  --text-medium: #4A4A4A;
  /* Secondary Text */
  --text-light: #6C757D;
  /* Muted Text */
  --white: #ffffff;

  /* TYPOGRAPHY */
  --font-primary: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Geist', 'Inter', system-ui, sans-serif;

  /* SPACING & RADIUS */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 6rem;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;

  /* SHADOWS (Soft & Clean) */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 15px 40px rgba(0, 168, 150, 0.15);
  /* Teal hint on hover */

  --transition-fast: 0.2s ease;
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === RESET & BASE === */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  background-color: var(--bg-primary);
  color: var(--text-medium);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-dark);
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(3rem, 5vw, 4.5rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

/* === UTILITIES & CARDS === */
.container {
  width: 90%;
  max-width: 1200px;
  /* Slightly tighter for readability */
  margin: 0 auto;
}

.section {
  padding: 3rem 0;
  position: relative;
}

.section-header {
  text-align: left;
  margin-bottom: 2rem;
  /* max-width removed to allow full width left alignment */
}

.section-title {
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
  padding-left: 2rem;
  /* Increased space for the wider pill */
}

/* Vertical Pill Accent */
.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  /* More than double width for visual weight */
  height: 80%;
  /* Almost full height of text */
  background-color: var(--primary-color);
  border-radius: 8px;
  /* Chunkier pill */
}

/* Updated "Glass Panel" to "Clean Card" */
.glass-panel {
  background: var(--bg-card);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.glass-panel:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(0, 168, 150, 0.2);
}

.special-card {
  background: linear-gradient(135deg, #FFFFFF 0%, #F0FDFC 100%);
  border: 1px solid rgba(0, 168, 150, 0.2);
}

.flex-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  width: 100%;
}

@media (max-width: 768px) {
  .flex-row {
    flex-direction: column;
    text-align: center;
  }
}

.text-highlight {
  color: var(--primary-color);
}

.text-muted {
  color: var(--text-light);
}

.text-sm {
  font-size: 0.875rem;
  line-height: 1.5;
}

.text-xs {
  font-size: 0.75rem;
  opacity: 0.8;
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.8rem;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: none;
  font-size: 1rem;
  gap: 0.8rem;
  /* Space between icon and text */
}

.btn-primary {
  background-color: var(--accent-color);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(255, 87, 34, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 87, 34, 0.4);
  background-color: #E64A19;
}

.btn-whatsapp {
  background-color: #25D366;
  color: var(--white);
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
  background-color: #128C7E;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}

/* === NAVBAR (Dynamic Glass) === */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.5rem 0;
  transition: all 0.4s ease;
  background: transparent;
  /* Starts transparent */
}

/* Navigation Scrolled State */
.navbar.scrolled {
  background: rgba(0, 168, 150, 0.1) !important;
  /* Force transparent white */
  backdrop-filter: blur(10px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  padding: 0.8rem 0;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.03em;
}

/* Aggiungila dopo .nav-logo i */
.nav-logo-img {
  height: 34px;
  width: auto;
  display: block;
  object-fit: contain;
}


.nav-menu {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  background: rgba(255, 255, 255, 0.5);
  /* Subtle pill bg */
  padding: 0.8rem 2rem;
  border-radius: 50px;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(0, 0, 0, 0.02);
}

.nav-link {
  font-weight: 500;
  color: var(--text-dark);
  font-size: 0.95rem;
  position: relative;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--primary-color);
}

/* === HERO SECTION === */
/* === HERO SECTION === */
.hero-section {
  padding-top: 10rem;
  padding-bottom: 3rem;
  background: radial-gradient(circle at 50% 0%, rgba(0, 168, 150, 0.08), transparent 70%);
}

/* New Column Layout for Desktop */
.hero-content {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  /* Stretch columns to equal height */
  gap: 2rem;
  text-align: left;
}

.hero-col-left,
.hero-col-right {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.hero-col-left {
  align-items: flex-start;
  justify-content: center;
  /* Vertically center content in left col if needed */
  padding-top: 2rem;
  /* Optional visual balance */
}

.hero-col-right {
  align-items: flex-end;
  justify-content: center;
  /* Vertically center the logo and buttons */
}

.hero-logo-container {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  margin-bottom: 2rem;
}

.hero-logo {
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.hero-pill {
  display: inline-block;
  padding: 0.5rem 1.2rem;
  background: #E0F2F1;
  color: var(--secondary-color);
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero-desc {
  max-width: 550px;
  margin: 1.5rem 0 2.5rem;
  font-size: 1.25rem;
  color: var(--text-light);
  line-height: 1.7;
}

/* Mobile Responsive Layout (Magic Unwrap) */
@media (max-width: 768px) {
  .hero-content {
    display: flex;
    /* Parent is flex */
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }

  /* Unwrap the columns so their children become direct flex items of .hero-content */
  .hero-col-left,
  .hero-col-right {
    display: contents;
  }

  /* Now we can order the children freely */

  /* 1. Pill */
  .hero-pill-container {
    order: 1;
    display: flex;
    justify-content: center;
    width: 100%;
  }

  /* 2. Logo */
  .hero-logo-container {
    order: 2;
    justify-content: center;
    margin-bottom: 1rem;
  }

  /* Restrict logo size on mobile */
  .hero-logo {
    max-width: 280px;
    margin: 0 auto;
  }

  /* 3. Text */
  .hero-text-group {
    order: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  /* 4. Actions */
  .hero-actions {
    order: 4;
    width: 100%;
    justify-content: center;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
  }

  .hero-desc {
    margin: 1.5rem auto 2.5rem;
  }
}

/* === BENTO GRID LAYOUT === */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 2rem;
  /* Clean 32px gap */
  padding: 2rem 0;
}

@media (max-width: 900px) {
  .bento-grid {
    gap: 1rem;
    /* Reduced gap on mobile */
  }
}

.bento-item {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
}

.bento-item.span-6 {
  grid-column: span 6;
}

.bento-item.span-2 {
  grid-column: span 2;
}

.bento-item.span-5 {
  grid-column: span 5;
}

.bento-item.span-7 {
  grid-column: span 7;
}

.bento-item.large {
  grid-column: span 8;
}

.bento-item.full {
  grid-column: span 12;
}

/* Photo Cards */
.photo-card {
  position: relative;
  overflow: hidden;
  padding: 0;
  /* Remove padding for full image */
  height: 100%;
  min-height: 350px;
  /* Ensure verticality */
}

.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.photo-card:hover img {
  /* scale removed as handled by JS tilt without zoom */
  transform: none;
}

.photo-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  padding: 2rem 0.5rem 1rem;
  /* Reduced side padding */
  color: white;
  text-align: center;
}

.photo-name {
  font-weight: 700;
  font-size: 1rem;
  /* Slightly smaller to fit */
  display: block;
  white-space: nowrap;
  /* Prevent wrapping */
  overflow: hidden;
  text-overflow: ellipsis;
}

.photo-role {
  font-size: 0.85rem;
  opacity: 0.9;
  font-weight: 400;
}

@media (max-width: 900px) {

  .bento-item.span-6,
  .bento-item.span-5,
  .bento-item.span-7 {
    grid-column: span 12;
    /* Stack these on mobile */
  }

  /* Reorder Chi Siamo section to show photos first on mobile */
  #chi-siamo .bento-item.span-6 {
    order: 2;
  }

  #chi-siamo .bento-item.span-2 {
    order: 1;
  }

  #chi-siamo .social-pill-wrapper {
    order: 3;
    /* Ensure social pill comes after text on mobile */
  }

  /* Keep team photos side-by-side (1/3 width each) */
  .bento-item.span-2 {
    grid-column: span 4;
  }

  .photo-card {
    min-height: 250px;
    /* Reduced height for side-by-side view */
  }

  /* Compacting section headers on mobile */
  .section-header {
    margin-bottom: 0.5rem;
  }

  /* Stack social pill nicely on mobile */
  .social-pill {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
    padding: 2rem 1rem;
  }
}


.card-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Add explicit span-12 if missing */
.bento-item.span-12 {
  grid-column: span 12;
}

/* === SOCIAL PILL === */
.social-pill-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  /* Establish positioning context */
  z-index: 1;
}

/* === SOCIAL PILL (MAGIC UI STYLE) === */
/* === SOCIAL PILL (MAGIC UI STYLE) === */
.social-pill {
  width: 100%;
  color: var(--text-color);
  /* Changed from white to dark text */
  padding: 1.5rem 3rem;
  /* Changed from 50px to standard card radius (20px) */
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  background-color: #ffffff;
  /* Changed from var(--primary-color) to white */
  /* Use explicit border-radius for path calculation */
  /* Remove tilt transform-style */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  /* REMOVED fixed border */
  border: none;
  max-width: 100%;
  /* Ensure it doesn't overflow on small screens */
}

/* LIFT EFFECT ON HOVER */
.social-pill:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
  /* REMOVED hover border color */
}

/* Clear previous layered approach */
.social-pill::before {
  display: none;
}

/* === BORDER BEAM CONTAINER === */
/* Handled by border-beam.css and border-beam.js */

/* Ensure Content stays on top */
.social-pill h3 {
  font-weight: 700;
  font-size: 1.8rem;
  font-style: italic;
  /* Added italic style */
  color: var(--text-color);
  /* Ensure text is visible on white */
  margin: 0;
  position: relative;
  z-index: 2;
}

.pill-icons {
  display: flex;
  gap: 1.5rem;
  position: relative;
  z-index: 2;
}

.pill-icons a {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--bg-color);
  /* Light gray bg for icons */
  color: var(--primary-color);
  /* Primary color icon */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
  /* Subtle border */
}

.pill-icons a:hover {
  background: var(--primary-color);
  color: white;
  transform: scale(1.1);
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
  background: rgba(0, 168, 150, 0.1);
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  /* Circular icon bg */
}

.feature-list {
  list-style: none;
  margin-top: 1rem;
}

.feature-list li {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.feature-list i {
  color: var(--secondary-color);
  font-size: 0.8rem;
}

/* === FEATURES GRID (Renovated) === */
.features-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  padding: 2rem 0;
  /* Removed overflow/scroll */
}

.feature-card {
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0, 0, 0, 0.03);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.feature-card i {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  margin-left: auto;
  margin-right: auto;
  padding: 0;
  background: rgba(0, 168, 150, 0.05);
  border-radius: 50%;
  flex-shrink: 0;
}

.feature-card h4 {
  font-size: 1.1rem;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

/* === FLOATING DOCK === */
.floating-dock-container {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 1rem;
  width: auto;
  max-width: 95%;
  pointer-events: none;
  /* Let clicks pass through the container area */
}

.floating-dock {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 2rem;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  pointer-events: auto;
  /* Re-enable clicks for the dock itself */
}

.dock-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--text-dark);
  font-weight: 500;
  font-size: 0.95rem;
  white-space: nowrap;
}

.dock-item i {
  font-size: 1.1rem;
  color: var(--primary-color);
}

.dock-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s;
}

.dock-link:hover {
  color: var(--primary-color);
}

.dock-divider {
  width: 1px;
  height: 24px;
  background: rgba(0, 0, 0, 0.1);
}

/* Back to Top Button */
/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  min-width: 50px;
  min-height: 50px;
  border-radius: 50%;
  border: none;
  padding: 0;
  /* Remove .btn padding */
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.95);
  color: var(--primary-color);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  font-size: 1.2rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 9999;
  cursor: pointer;
  transform: translateY(20px);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 168, 150, 0.3);
}

.back-to-top:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-5px);
}

/* Mobile Dock Adjustments */
@media (max-width: 768px) {
  .dock-hidden-mobile {
    display: none !important;
  }

  /* Expand dock to fit content better on mobile if needed, or keep auto */
  .floating-dock {
    padding: 0.8rem 1.5rem;
  }

  /* Hide Back to Top on Mobile */
  .back-to-top {
    display: none !important;
  }
}

/* === RESPONSIVE === */
@media (max-width: 968px) {

  .bento-item,
  .bento-item.large {
    grid-column: span 12;
  }

  .nav-menu {
    display: none;
  }
}

@media (max-width: 768px) {
  .floating-dock {
    flex-direction: column;
    gap: 1rem;
    border-radius: 20px;
  }

  .divider {
    width: 100%;
    height: 1px;
  }

  /* Mobile Navbar Refinements */
  .nav-logo span {
    white-space: nowrap;
    font-size: 1.1rem;
  }

  .nav-actions .btn-primary {
    font-size: 0;
    /* Hide text */
    padding: 0;
    width: 40px;
    height: 40px;
    min-width: 40px;
    /* Ensure circular shape holds */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
  }

  .nav-actions .btn-primary i {
    font-size: 1.2rem;
  }
}

/* === ANIMATIONS === */
.fade-in {
  opacity: 0;
}

/* JS handles reveal */
/* Script.js needs to handle .fade-in with IntersectionObserver */

/* === FOOTER SECTION === */
.footer-section {
  padding: 10rem 0 8rem;
  /* Extra padding top for blend, bottom for dock */
  text-align: center;
  margin-top: 0;
  border-top: none;
  position: relative;
  /* Ensure mask doesn't clip content */
  isolation: isolate;
}

.footer-section::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 50% 100%, rgba(0, 168, 150, 0.12), transparent 70%);
  /* Stronger opacity since it fades */
  mask-image: linear-gradient(to bottom, transparent 0%, black 40%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 40%);
}

.footer-copy {
  margin-top: 2rem;
  font-size: 0.9rem;
  color: var(--text-light);
  font-weight: 500;
  opacity: 0.8;
}

.footer-author-link {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.footer-author-link:hover {
  text-decoration: underline;
  color: var(--primary-color);
}

/* Social Footer Section */
.footer-social-section {
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.social-cta {
  font-size: 1.1rem;
  color: var(--text-dark);
  line-height: 1.6;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: all 0.3s ease;
  background: white;
  box-shadow: var(--shadow-sm);
  color: var(--text-medium);
}

.social-btn:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  color: white;
}

.social-btn.instagram:hover {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}

.social-btn.facebook:hover {
  background: #1877F2;
}

/* =========================================
   MOBILE ADJUSTMENTS (Crucial for Real Devices)
   ========================================= */
@media (max-width: 768px) {

  /* Social Pill Mobile Fixes (Stacking & Alignment) */
  .social-pill-wrapper {
    width: 100%;
    padding: 0;
    grid-column: span 12 !important;
    order: 9999;
    /* Nuclear option for ordering */
    position: relative !important;
    z-index: 20;
    /* High z-index */
    margin-top: 1.5rem;

    /* CHROME ANDROID FIXES */
    display: block !important;
    /* Force block context */
    isolation: isolate;
    /* Create new stacking context */
    transform: translateZ(0);
    /* Force hardware acceleration */
  }

  .social-pill {
    display: flex !important;
    flex-direction: column !important;
    padding: 2rem 1.5rem !important;
    gap: 1.5rem !important;
    text-align: center !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    background-color: #ffffff !important;
    /* Force white background */
    position: relative !important;
    z-index: 10 !important;
    transform: none !important;
    /* Reset any lingering transforms */
    box-shadow: var(--shadow-md) !important;
  }

  .social-pill h3 {
    font-size: 1.4rem !important;
    line-height: 1.4 !important;
    margin-bottom: 0.5rem;
    color: var(--text-color) !important;
  }

  .pill-icons {
    gap: 2rem !important;
    width: 100%;
    justify-content: center;
    display: flex !important;
  }

  /* Auto-Tilt Animation for Mobile */
  .auto-tilt {
    animation: breathe-tilt 6s ease-in-out infinite;
  }
}

@keyframes breathe-tilt {

  0%,
  100% {
    transform: perspective(1000px) rotateX(0deg) rotateY(0deg);
  }

  25% {
    transform: perspective(1000px) rotateX(2deg) rotateY(-2deg);
  }

  50% {
    transform: perspective(1000px) rotateX(0deg) rotateY(0deg);
  }

  75% {
    transform: perspective(1000px) rotateX(-2deg) rotateY(2deg);
  }
}

/* ===================================
   COOKIE CONSENT CUSTOM STYLING
   Override default vanilla-cookieconsent styles
   =================================== */

:root {
  /* Override variabili interne di cookieconsent */
  --cc-font: var(--font-primary);
  --cc-bg: var(--bg-card);
  --cc-text: var(--text-medium);
  --cc-btn-primary-bg: var(--primary-color);
  --cc-btn-primary-text: var(--white);
  --cc-btn-primary-hover-bg: var(--secondary-color);
  --cc-btn-secondary-bg: #eaeff2;
  --cc-btn-secondary-text: var(--text-dark);
  --cc-btn-secondary-hover-bg: #dbe4e9;
  --cc-toggle-bg-off: #cbd5e1;
  --cc-toggle-bg-on: var(--primary-color);
  --cc-toggle-knob-bg: #fff;
  --cc-cookie-category-block-bg: #f8f9fa;
  --cc-cookie-category-block-bg-hover: #e9ecef;
  --cc-section-border: #f1f5f9;
  --cc-cookie-table-border: #e2e8f0;
  --cc-overlay-bg: rgba(0, 0, 0, 0.4);
  /* Backdrop scuro */
  --cc-webkit-scrollbar-bg: #f1f5f9;
  --cc-webkit-scrollbar-bg-hover: var(--primary-color);
}

/* Container principale del banner */
#cc--main {
  font-family: var(--font-primary);
  z-index: 20000 !important;
  /* Assicura che stia sopra la navbar */
}

/* Modale/Banner stesso */
#cc--main .cm {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(0, 168, 150, 0.1);
  /* Bordo sottile teal */
}

/* Titolo del banner */
#cc--main .cm__title {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-dark);
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
}

/* Testo descrittivo */
#cc--main .cm__desc {
  font-size: 0.95rem;
  color: var(--text-medium);
  line-height: 1.5;
}

/* Link (es. Privacy Policy) */
#cc--main .cm__link {
  color: var(--primary-color);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

#cc--main .cm__link:hover {
  border-color: var(--primary-color);
}

/* Bottoni (Generali) */
#cc--main .cm__btn {
  border-radius: 50px;
  /* Pill shape */
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.6rem 1.2rem;
  transition: var(--transition-smooth);
  box-shadow: none;
  /* Rimuovi ombre default */
}

/* Bottone Primario (Accetta Tutto) */
#cc--main .cm__btn--primary {
  box-shadow: 0 4px 12px rgba(0, 168, 150, 0.2);
}

#cc--main .cm__btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 168, 150, 0.3);
}

/* Bottone Secondario (Preferenze / Rifiuta) */
#cc--main .cm__btn--secondary:hover {
  background-color: #dbe4e9;
  transform: translateY(-1px);
}

/* Icona biscotto (Opzionale: se la libreria la supporta o vuoi aggiungerla via CSS) */
/*
#cc--main .cm__title::before {
    content: '🍪';
    margin-right: 0.5rem;
    font-size: 1.2rem;
}
*/

/* Settings Modal (Quando clicchi su preferenze) */
#cc--main .pm {
  border-radius: var(--radius-lg);
  font-family: var(--font-primary);
}

#cc--main .pm__header {
  border-bottom: 1px solid var(--cc-section-border);
}

#cc--main .pm__title {
  font-family: var(--font-heading);
  color: var(--text-dark);
}

#cc--main .pm__close-btn {
  border-radius: 50%;
  transition: background 0.2s;
}

#cc--main .pm__close-btn:hover {
  background: #f1f5f9;
}