/* Circuito Innovatori — Soft Pastel UI (Flex-only) */
/* ----------------------
   RESET & BASELINE
----------------------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Montserrat:wght@600;700;800&display=swap');

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0 0 16px 22px; padding: 0; }
p { margin: 0 0 16px; }
button { font: inherit; cursor: pointer; }

:root {
  /* Brand core */
  --brand-primary: #0A3D62; /* deep blue */
  --brand-secondary: #4C1D95; /* deep violet */
  --brand-accent: #F5F7FA; /* light accent */

  /* Soft pastel palette */
  --pastel-blue: #E6F0FF;
  --pastel-lavender: #EDE9FE;
  --pastel-pink: #FCE7F3;
  --pastel-mint: #E6F7F1;
  --pastel-peach: #FFF1E6;
  --surface: #FFFFFF;
  --surface-alt: #FBFBFE;

  /* Text & lines */
  --text-strong: #1F2937; /* dark gray-blue for readability */
  --text: #334155;
  --muted: #6B7280;
  --line: #E5E7EB;

  /* Buttons & states */
  --primary-100: #DDE8F0;
  --primary-200: #C6D9E6;
  --primary-600: #0A3D62;
  --secondary-600: #4C1D95;
  --success: #10B981;
  --danger: #EF4444;

  /* Radii & shadows */
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 4px 12px rgba(10, 61, 98, 0.06);
  --shadow: 0 10px 30px rgba(10, 61, 98, 0.08);
}

html { font-size: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--brand-accent);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 { font-family: 'Montserrat', Inter, system-ui, sans-serif; color: var(--text-strong); margin: 0 0 10px; line-height: 1.2; }
h1 { font-size: 2rem; letter-spacing: 0.2px; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.125rem; }
@media (min-width: 768px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.25rem; }
}

/* Links */
a { color: var(--brand-secondary); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: #6D28D9; }

/* Focus states */
:focus-visible { outline: 3px solid #A5B4FC; outline-offset: 2px; border-radius: 6px; }

/* Containers & layout (Flex-only) */
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
}
.content-wrapper { display: flex; flex-direction: column; gap: 20px; }

/* Mandatory spacing patterns */
.section { margin-bottom: 60px; padding: 40px 20px; }
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 18px; }
.content-grid { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; }
.text-image-section { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.testimonial-card { display: flex; align-items: center; gap: 20px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); color: var(--text-strong); }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* Section default spacing inside wrapper */
.content-wrapper > * { margin: 0; }

/* Header */
header {
  position: sticky; top: 0; z-index: 1000; background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(150%) blur(6px);
  border-bottom: 1px solid var(--line);
}
header .container { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; }
.brand { display: flex; align-items: center; }
.brand img { height: 34px; width: auto; }
@media (min-width: 992px) { .brand img { height: 40px; } }

/* Desktop nav */
.main-nav { display: none; align-items: center; gap: 16px; }
.main-nav a { color: var(--text); text-decoration: none; padding: 8px 10px; border-radius: 8px; transition: background 0.2s ease, color 0.2s ease; }
.main-nav a:hover { background: var(--pastel-lavender); color: var(--text-strong); }
.header-cta { display: none; align-items: center; gap: 10px; }

/* Mobile burger */
.mobile-menu-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text-strong);
  transition: background 0.2s ease, transform 0.2s ease;
}
.mobile-menu-toggle:hover { background: var(--pastel-blue); }
.mobile-menu-toggle:active { transform: scale(0.98); }

/* Mobile menu panel */
.mobile-menu {
  position: fixed; inset: 0 0 0 auto; right: 0; top: 0; bottom: 0;
  width: 86vw; max-width: 420px; height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--line);
  box-shadow: -10px 0 30px rgba(10,61,98,0.10);
  transform: translateX(100%);
  transition: transform 0.35s ease;
  z-index: 1100;
  display: flex; flex-direction: column; padding: 16px;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu-close { align-self: flex-end; background: transparent; border: none; color: var(--text-strong); font-size: 22px; padding: 6px; border-radius: 8px; }
.mobile-nav { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.mobile-nav a { display: flex; padding: 12px 10px; border-radius: 10px; color: var(--text); background: var(--surface-alt); border: 1px solid var(--line); text-decoration: none; }
.mobile-nav a:hover { background: var(--pastel-mint); }

/* Desktop visibility */
@media (min-width: 992px) {
  .main-nav { display: flex; }
  .header-cta { display: flex; }
  .mobile-menu-toggle { display: none; }
}

/* Hero */
.hero { background: var(--pastel-lavender); border-bottom: 1px solid var(--line); }
.hero .container { padding-top: 28px; padding-bottom: 28px; }
.hero .content-wrapper { gap: 16px; }
.hero h1 { color: var(--brand-primary); font-weight: 800; }
.hero p { max-width: 62ch; }
.hero .button-group, .hero div { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 999px; border: 1px solid transparent; text-decoration: none; font-weight: 600; transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.1s ease; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button-primary { background: var(--brand-secondary); color: #fff; border-color: var(--brand-secondary); }
.button-primary:hover { background: #6D28D9; border-color: #6D28D9; }
.button-secondary { background: var(--pastel-blue); color: var(--brand-primary); border-color: #C7D2FE; }
.button-secondary:hover { background: #DBEAFE; }
.button-ghost { background: transparent; color: var(--brand-primary); border-color: var(--line); }
.button-ghost:hover { background: var(--surface-alt); }

/* Generic section styling */
main section { padding: 32px 0; }
section .container { gap: 18px; }

/* Text sections as soft cards */
.text-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}
.text-section h3 { color: var(--brand-secondary); margin-bottom: 6px; }

/* Lists spacing tweaks */
.text-section ul li, .text-section ol li, .content-wrapper ul li, .content-wrapper ol li { margin-bottom: 8px; }
.content-wrapper ul, .content-wrapper ol { margin-bottom: 12px; }

/* Icon inline spacing */
img[alt^=""] + span,
.text-section img, p img { vertical-align: middle; margin-right: 8px; display: inline-block; }

/* Testimonials */
.testimonial-card p { margin: 0; }
.testimonial-card p + p { color: var(--muted); }

/* Accent info blocks in pages */
.content-wrapper > p,
.content-wrapper > ul,
.content-wrapper > ol { max-width: 70ch; }

/* Footer */
footer { background: var(--surface); border-top: 1px solid var(--line); margin-top: 20px; }
footer .container { padding-top: 24px; padding-bottom: 24px; }
footer .content-wrapper { display: flex; flex-direction: column; gap: 16px; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); }
footer nav a { color: var(--muted); text-decoration: none; }
footer nav a:hover { color: var(--brand-secondary); text-decoration: underline; }
footer .text-section { background: transparent; border: none; box-shadow: none; padding: 0; }

/* Cards & utility components */
.badge { display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 999px; background: var(--pastel-mint); color: var(--brand-primary); border: 1px solid #CFF0E5; font-weight: 600; font-size: 0.85rem; }

/* Content grid behavior for wrappers */
.content-grid > * { flex: 1 1 260px; }
.card-container > * { flex: 1 1 280px; }

/* Layout tweaks per page sections (multi-column using flex-wrap) */
.content-wrapper { flex-wrap: wrap; }
.content-wrapper > .text-section,
.content-wrapper > .testimonial-card { flex: 1 1 300px; }

/* Text-image split section */
.text-image-section { padding: 10px 0; }
.text-image-section > * { flex: 1 1 320px; }

/* Hero variants by stacking multiple pastel stripes (solid) */
.hero { background: linear-gradient(0deg, var(--pastel-lavender), var(--pastel-lavender)); }

/* Ensure adequate spacing between all cards */
main .content-wrapper > * + * { margin-top: 0; } /* gap handles spacing */

/* Table basic style if any appear */
table { width: 100%; border-collapse: collapse; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: block; }
tr { display: flex; width: 100%; }
th, td { flex: 1; padding: 12px; border-bottom: 1px solid var(--line); text-align: left; }
tr:last-child td { border-bottom: none; }

/* Mobile-first responsive adjustments */
@media (min-width: 768px) {
  .hero .container { padding-top: 44px; padding-bottom: 44px; }
}
@media (min-width: 992px) {
  .content-wrapper { flex-direction: row; align-items: flex-start; gap: 24px; }
}

/* Micro-interactions */
.button, .main-nav a, .mobile-nav a, .mobile-menu-toggle { transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.12s ease; }

/* Pastel section alternation (applies soft striping for readability) */
main section:nth-of-type(odd) { background: var(--surface-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* Strong emphasis */
strong { color: var(--text-strong); }

/* Accessibility for testimonials/reviews: dark on light */
.testimonial-card, .testimonial-card * { color: var(--text-strong); }

/* Lists with icon inline support in contact blocks */
.content-wrapper p img { margin-right: 8px; }

/* ---------------------------------
   MOBILE MENU OVERLAY (optional CSS hook)
---------------------------------- */
.mobile-menu-overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.35); z-index: 1090; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; display: flex; }
.mobile-menu-overlay.open { opacity: 1; pointer-events: auto; }

/* ----------------------
   COOKIE CONSENT BANNER
----------------------- */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 1200;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  transform: translateY(140%);
  opacity: 0; transition: transform 0.35s ease, opacity 0.35s ease;
}
.cookie-banner.show { transform: translateY(0%); opacity: 1; }
.cookie-banner .cookie-content { display: flex; flex-direction: column; gap: 8px; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-button { padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-alt); color: var(--text-strong); font-weight: 600; }
.cookie-button.primary { background: var(--brand-secondary); color: #fff; border-color: var(--brand-secondary); }
.cookie-button.primary:hover { background: #6D28D9; }
.cookie-button.secondary { background: var(--pastel-mint); border-color: #BAE6D1; color: var(--brand-primary); }
.cookie-button.secondary:hover { background: #D1FAE5; }
.cookie-button.danger { background: #FFE4E6; border-color: #FCA5A5; color: #B91C1C; }

/* Cookie preferences modal */
.cookie-modal { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(15,23,42,0.35); z-index: 1300; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.cookie-modal.open { opacity: 1; pointer-events: auto; }
.cookie-modal .cookie-modal-content { width: 92vw; max-width: 560px; background: var(--surface); border-radius: var(--radius-lg); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.cookie-modal .row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-alt); }
.cookie-modal .row .label { font-weight: 600; }
.cookie-modal .row .toggle { display: inline-flex; align-items: center; gap: 10px; }

/* Toggle (pure CSS visual) */
.toggle-switch { width: 42px; height: 24px; border-radius: 999px; background: #E5E7EB; border: 1px solid var(--line); position: relative; display: inline-flex; align-items: center; padding: 2px; }
.toggle-switch::after { content: ""; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transform: translateX(0); transition: transform 0.2s ease, background 0.2s ease; }
.toggle-switch.on { background: #C7D2FE; border-color: #C7D2FE; }
.toggle-switch.on::after { transform: translateX(18px); background: #fff; }

/* ----------------------
   FORMS (if any added)
----------------------- */
input, select, textarea { width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
label { display: block; font-weight: 600; margin-bottom: 6px; }

/* ----------------------
   RESPONSIVE RULES
----------------------- */
@media (max-width: 768px) {
  .text-image-section { flex-direction: column; align-items: center; }
}

/* Ensure no overlap: add breathing room */
main { display: flex; flex-direction: column; gap: 24px; }

/* ----------------------
   PAGE-SPECIFIC SOFT PASTEL ACCENTS
----------------------- */
/* Light pastel headers within sections */
.content-wrapper h2 { background: var(--pastel-peach); display: inline-flex; padding: 8px 12px; border-radius: 12px; border: 1px solid #FFE1C7; box-shadow: var(--shadow-sm); font-weight: 800; color: var(--brand-primary); }

/* Inline rating row style (with star icon) */
.content-wrapper > p img[alt*="star"], .content-wrapper img[alt*="star"] { margin-right: 6px; }

/* Header CTA stack on mobile */
.header-cta .button { white-space: nowrap; }

/* ----------------------
   PRINT BASICS
----------------------- */
@media print {
  header, .mobile-menu, .mobile-menu-toggle, .cookie-banner, .cookie-modal { display: none !important; }
  a { text-decoration: underline; }
  body { background: #fff; }
}
