/* ==========================================================================
   SynoviaFlex (SFX) - Design System & Main Stylesheet
   Preset 1: "Swiss Bioclinic & Pure Innovation"
   Palette: Crisp White (#ffffff), Icy Slate (#f4f8fb), Deep Pine-Teal (#0f766e),
            Titanium Silver (#64748b), Bio-Emerald (#14b8a6), Slate Navy (#0f172a).
   Mobile-First Architecture (<480px single compact header row)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,600&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  /* Brand Colors */
  --primary: #0f766e;
  --primary-hover: #115e59;
  --primary-light: #e6f6f4;
  --accent-cyan: #0d9488;
  --accent-teal: #14b8a6;
  --accent-mint: #2dd4bf;
  
  /* Neutral Palette */
  --bg-pure: #ffffff;
  --bg-icy: #f4f8fb;
  --bg-surface: #ffffff;
  --bg-subtle: #f8fafc;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  --border-light: #e2e8f0;
  --border-teal: #99f6e4;
  --border-focus: #0f766e;

  /* Status Colors */
  --success: #16a34a;
  --success-bg: #f0fdf4;
  --warning: #d97706;
  --warning-bg: #fffbeb;
  --danger: #dc2626;
  --danger-bg: #fef2f2;

  /* Typography */
  --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Outfit', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Elevation Shadows */
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 118, 110, 0.08), 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 30px -4px rgba(15, 118, 110, 0.12), 0 6px 12px -2px rgba(15, 23, 42, 0.06);
  --shadow-drawer: -6px 0 30px rgba(15, 23, 42, 0.15);

  /* Layout */
  --container-max: 1200px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 9999px;
  --header-height: 72px;
  --transition-normal: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-main);
  background-color: var(--bg-pure);
  overflow-x: hidden;
}

body.menu-open,
body.drawer-open,
body.lightbox-open {
  overflow: hidden;
}

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

p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

p:last-child {
  margin-bottom: 0;
}

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

a:hover {
  color: var(--primary-hover);
}

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

/* Accessibility & Utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* ==========================================================================
   Header & Mobile Navigation
   Rule: Mobile Header (<480px) STRICTLY in 1 compact row:
   [Logo SFX] [🇮🇹 IT | 🇬🇧 EN] [🛒 0] [☰]
   ========================================================================== */

.top-bar-notice {
  background-color: #0f172a;
  color: #94a3b8;
  font-size: 0.75rem;
  text-align: center;
  padding: 0.4rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.top-bar-notice strong {
  color: #2dd4bf;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-light);
  transition: box-shadow var(--transition-normal), background-color var(--transition-normal);
}

.site-header.scrolled {
  box-shadow: var(--shadow-sm);
  background-color: rgba(255, 255, 255, 0.98);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: 0.5rem;
}

/* Brand Logo */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: 0 4px 10px rgba(15, 118, 110, 0.25);
}

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

.brand-name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
  line-height: 1;
}

.brand-name span {
  color: var(--primary);
}

.brand-sub {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Desktop Nav Menu */
.desktop-nav {
  display: none;
}

@media (min-width: 992px) {
  .desktop-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
  }

  .nav-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 0.5rem 0.2rem;
    position: relative;
    transition: color var(--transition-normal);
  }

  .nav-link:hover,
  .nav-link.active {
    color: var(--primary);
  }

  .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary);
    border-radius: 2px;
  }
}

/* Header Action Controls (Language, Cart, Burger) */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  padding: 2px;
}

.lang-btn {
  background: none;
  border: none;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-dim);
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 3px;
  min-height: 32px;
  min-width: 34px;
  justify-content: center;
  transition: all var(--transition-normal);
}

.lang-btn.active {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(15, 118, 110, 0.2);
}

.lang-btn:hover:not(.active) {
  color: var(--text-main);
}

/* Cart Trigger Button */
.cart-trigger-btn {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  border-radius: var(--radius-pill);
  padding: 0 10px;
  height: 36px;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  position: relative;
  transition: all var(--transition-normal);
  font-weight: 600;
  font-size: 0.85rem;
}

.cart-trigger-btn:hover {
  border-color: var(--border-teal);
  background-color: var(--primary-light);
  color: var(--primary);
}

.cart-icon {
  font-size: 1.05rem;
}

.cart-badge-count {
  background-color: var(--primary);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
  border-radius: 999px;
  padding: 2px 6px;
  min-width: 18px;
  text-align: center;
  line-height: 1;
}

.cart-badge-count.has-items {
  background-color: var(--accent-cyan);
}

/* Mobile Burger Button */
.mobile-burger-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 40px;
  height: 40px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
}

.burger-bar {
  width: 18px;
  height: 2px;
  background-color: var(--text-main);
  border-radius: 2px;
  transition: transform var(--transition-normal), opacity var(--transition-normal);
}

@media (min-width: 992px) {
  .mobile-burger-btn {
    display: none;
  }
}

/* Mobile Navigation Drawer */
.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.mobile-drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  max-width: 85vw;
  height: 100vh;
  background-color: #ffffff;
  z-index: 1060;
  box-shadow: var(--shadow-drawer);
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

.mobile-nav-drawer.active {
  right: 0;
}

.mobile-drawer-header {
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
}

.mobile-drawer-close {
  background: none;
  border: none;
  font-size: 1.75rem;
  color: var(--text-dim);
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-nav-list {
  list-style: none;
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  padding: 0.85rem 1.5rem;
  font-weight: 600;
  color: var(--text-main);
  border-left: 3px solid transparent;
  min-height: 44px;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  background-color: var(--bg-icy);
  color: var(--primary);
  border-left-color: var(--primary);
}

.mobile-drawer-footer {
  margin-top: auto;
  padding: 1.5rem;
  background-color: var(--bg-subtle);
  border-top: 1px solid var(--border-light);
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ==========================================================================
   Buttons & Core Components
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  min-height: 48px;
  transition: all var(--transition-normal);
  text-align: center;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(15, 118, 110, 0.25);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(15, 118, 110, 0.35);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background-color: var(--primary-light);
  color: var(--primary-hover);
}

.btn-white {
  background-color: #ffffff;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.btn-white:hover {
  background-color: #f8fafc;
  color: var(--primary-hover);
}

.btn-block {
  width: 100%;
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.badge-primary {
  background-color: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--border-teal);
}

.badge-warning {
  background-color: var(--warning-bg);
  color: var(--warning);
  border: 1px solid #fde68a;
}

.badge-green {
  background-color: var(--success-bg);
  color: var(--success);
  border: 1px solid #bbf7d0;
}

/* ==========================================================================
   Section Layouts
   ========================================================================== */

section {
  padding: 4rem 0;
}

@media (min-width: 768px) {
  section {
    padding: 5.5rem 0;
  }
}

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

.section-dark {
  background-color: #0f172a;
  color: #f8fafc;
}

.section-dark h2,
.section-dark h3,
.section-dark h4 {
  color: #ffffff;
}

.section-dark p {
  color: #94a3b8;
}

.section-header {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 3rem;
}

.section-header h2 {
  font-size: 1.85rem;
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
}

@media (min-width: 768px) {
  .section-header h2 {
    font-size: 2.35rem;
  }
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Hero Section Styles
   ========================================================================== */

.hero-section {
  padding: 3.5rem 0 4.5rem;
  background: radial-gradient(circle at 80% 20%, rgba(20, 184, 166, 0.08) 0%, transparent 50%),
              linear-gradient(180deg, #ffffff 0%, var(--bg-icy) 100%);
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 992px) {
  .hero-grid {
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3.5rem;
  }
}

.hero-title {
  font-size: 2.1rem;
  line-height: 1.2;
  margin-bottom: 1.25rem;
  letter-spacing: -0.8px;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 2.75rem;
  }
}

.hero-lead {
  font-size: 1.12rem;
  line-height: 1.65;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.hero-cta-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 480px) {
  .hero-cta-group {
    flex-direction: row;
    align-items: center;
  }
}

.hero-visual-card {
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
  position: relative;
}

/* Compliance Notice Box */
.notice-box {
  background-color: #f8fafc;
  border-left: 4px solid var(--accent-cyan);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-sm);
  margin: 2rem 0;
  box-shadow: var(--shadow-sm);
}

.notice-box h4 {
  font-size: 0.9rem;
  color: var(--primary);
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.notice-box p {
  font-size: 0.85rem;
  margin-bottom: 0;
  color: var(--text-muted);
}

/* ==========================================================================
   Problem Cards (FANS / Painkillers vs Cartilage)
   ========================================================================== */

.problem-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .problem-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.problem-card {
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.problem-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-teal);
}

.problem-card-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background-color: var(--danger-bg);
  color: var(--danger);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.problem-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
}

.problem-card p {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-muted);
}

/* ==========================================================================
   Joint Anatomy & Clinical Numbers
   ========================================================================== */

.anatomy-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 992px) {
  .anatomy-layout {
    grid-template-columns: 1fr 1fr;
  }
}

.stats-grid-2x2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 480px) {
  .stats-grid-2x2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat-box {
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* ==========================================================================
   Pathways Navigation Grid (Home Page Transitions)
   ========================================================================== */

.pathways-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .pathways-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .pathways-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.pathway-card {
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
  text-decoration: none;
}

.pathway-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.pathway-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 1.25rem;
}

.pathway-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.pathway-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.pathway-link-text {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ==========================================================================
   Story Page Styles (storia.html)
   ========================================================================== */

.story-lead-quote {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--primary);
  padding: 1.5rem 2rem;
  border-left: 4px solid var(--primary);
  background-color: var(--bg-icy);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 2rem 0;
}

.story-article-body {
  max-width: 820px;
  margin: 0 auto;
}

.story-article-body p {
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.story-photo-block {
  margin: 2.5rem 0;
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-md);
}

.story-photo-caption {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-dim);
  text-align: center;
  font-weight: 500;
}

/* Timeline Cards */
.timeline-track {
  position: relative;
  max-width: 780px;
  margin: 3rem auto;
}

.timeline-track::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 20px;
  width: 3px;
  background: linear-gradient(180deg, var(--primary) 0%, var(--accent-mint) 100%);
  border-radius: 3px;
}

@media (min-width: 768px) {
  .timeline-track::before {
    left: 50%;
    transform: translateX(-50%);
  }
}

.timeline-step {
  position: relative;
  margin-bottom: 2.5rem;
  padding-left: 50px;
}

@media (min-width: 768px) {
  .timeline-step {
    width: 50%;
    padding-left: 0;
  }

  .timeline-step:nth-child(odd) {
    left: 0;
    padding-right: 40px;
    text-align: right;
  }

  .timeline-step:nth-child(even) {
    left: 50%;
    padding-left: 40px;
  }
}

.timeline-bullet {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--primary);
  border: 4px solid #ffffff;
  box-shadow: 0 0 0 2px var(--primary);
}

@media (min-width: 768px) {
  .timeline-step:nth-child(odd) .timeline-bullet {
    right: -12px;
    left: auto;
  }
  .timeline-step:nth-child(even) .timeline-bullet {
    left: -12px;
  }
}

.timeline-card {
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.timeline-day-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--primary);
  background-color: var(--primary-light);
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 0.5rem;
}

/* ==========================================================================
   Formula Page Styles (formula.html)
   ========================================================================== */

.components-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}

@media (min-width: 768px) {
  .components-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.comp-card {
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 2rem;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.comp-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-teal);
}

.comp-number-pill {
  font-size: 0.8rem;
  font-weight: 800;
  color: #0f766e;
  background-color: var(--primary-light);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  align-self: flex-start;
  margin-bottom: 1rem;
}

.comp-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.4rem;
}

.comp-card-role {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 1rem;
}

.comp-card p {
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Packages Grid (NO prices shown on formula page!) */
.packages-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 3rem;
}

@media (min-width: 992px) {
  .packages-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.package-card {
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  padding: 2.25rem 1.75rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all var(--transition-normal);
}

.package-card.featured {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: scale(1.03);
}

.package-card:hover {
  border-color: var(--primary);
}

.package-badge-ribbon {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent-cyan) 100%);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 10px rgba(15, 118, 110, 0.25);
  white-space: nowrap;
}

.package-card h3 {
  font-size: 1.3rem;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  text-align: center;
}

.package-duration {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim);
  text-align: center;
  margin-bottom: 1.5rem;
}

.package-img-wrap {
  max-width: 140px;
  margin: 0 auto 1.5rem;
}

.package-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

/* ==========================================================================
   Certificates Page (certificati.html)
   Symmetric 2x2 Desktop, 1 Col Mobile
   ========================================================================== */

.certs-grid-2x2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .certs-grid-2x2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.cert-card-interactive {
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all var(--transition-normal);
}

.cert-card-interactive:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.cert-preview-wrap {
  padding: 1rem;
  background-color: var(--bg-subtle);
  border-bottom: 1px solid var(--border-light);
  position: relative;
}

.cert-zoom-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(15, 118, 110, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  opacity: 0;
  backdrop-filter: blur(2px);
  transition: opacity var(--transition-normal);
}

.cert-card-interactive:hover .cert-zoom-overlay {
  opacity: 1;
}

.cert-meta-info {
  padding: 1.25rem 1.5rem;
}

.cert-meta-info h3 {
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

.cert-meta-info p {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 0;
}

/* Lightbox Modal */
.cert-lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.cert-lightbox-modal.active {
  display: flex;
}

.cert-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(6px);
}

.cert-lightbox-content {
  position: relative;
  z-index: 10;
  max-width: 900px;
  width: 100%;
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  animation: modalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.cert-lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  background-color: #0f172a;
  color: #ffffff;
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.cert-lightbox-frame {
  padding: 1.5rem;
  background-color: #f8fafc;
}

.cert-lightbox-caption {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-light);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-main);
  background-color: #ffffff;
}

/* ==========================================================================
   Footer & Cookie Banner
   ========================================================================== */

.site-footer {
  background-color: #0b1324;
  color: #94a3b8;
  padding: 4rem 0 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer-brand h3 {
  color: #ffffff;
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

.footer-brand p {
  color: #94a3b8;
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 1rem;
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links a {
  color: #94a3b8;
  font-size: 0.88rem;
  transition: color var(--transition-normal);
}

.footer-links a:hover {
  color: #2dd4bf;
}

.footer-disclaimer-box {
  padding: 1.5rem;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  margin-bottom: 2rem;
  font-size: 0.8rem;
  line-height: 1.6;
  color: #64748b;
}

.footer-bottom-bar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.8rem;
}

@media (min-width: 768px) {
  .footer-bottom-bar {
    flex-direction: row;
  }
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  max-width: 520px;
  background-color: #0f172a;
  color: #ffffff;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 1500;
  display: none;
  animation: slideUp 0.3s ease-out;
}

.cookie-banner.visible {
  display: block;
}

@keyframes slideUp {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.cookie-banner p {
  font-size: 0.85rem;
  line-height: 1.5;
  color: #cbd5e1;
  margin-bottom: 1rem;
}

.cookie-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-cookie-accept {
  background-color: var(--accent-mint);
  color: #0f172a;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
}

.btn-cookie-essential {
  background-color: transparent;
  color: #94a3b8;
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
}

/* Toast Message */
.sf-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  background-color: #0f172a;
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
  z-index: 2500;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid var(--border-teal);
}

.sf-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
