/* ------------------------------------------------------------
   Daisy 2.0 (Modern Base)
   - Flexbox grid (no floats for layout)
   - Legacy aliases preserved (contentInside/contentFlex/column6-12 ...)
   - Optional modern naming included (container/row/col-6 ...)
   - Utilities: flow / stack / cluster / center / cover
   - Breakpoints: tablet + mobile
------------------------------------------------------------ */

/* =========================
   1) Mini Reset + Base
========================= */

html {
  box-sizing: border-box;
  height: 100%;
  font-size: 100%; /* 16px standard */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

body {
  min-height: 100%;
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  font-weight: 300;
  font-size: var(--fs-16);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

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

iframe {
  max-width: 100%;
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.25s ease, opacity 0.25s ease, transform 0.25s ease,
    background-color 0.25s ease;
}
a:hover {
  opacity: 0.9;
}

p {
  margin: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-weight: 700;
  line-height: 1.15;
}

strong,
b,
.bold {
  font-weight: 700;
}

.italic {
  font-style: italic;
}
.uppercase {
  text-transform: uppercase;
}

ol,
ul {
  margin: 0;
  padding-left: 2rem;
}
li {
  margin: 0.3rem 0;
}

hr {
  border: 0;
  height: 1px;
  background: #e6e6e6;
  margin: 2rem 0;
}

.clear {
  clear: both !important; /* legacy utility */
}

/* Focus (accessibility) */
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}


/* ======================
 FONT SIZE SCALE
 (px reference)
====================== */
:root {

  --fs-12: 0.75rem;     /* 12px */
  --fs-13: 0.8125rem;   /* 13px */
  --fs-14: 0.875rem;    /* 14px */
  --fs-15: 0.9375rem;   /* 15px */
  --fs-16: 1rem;        /* 16px */
  --fs-18: 1.125rem;    /* 18px */
  --fs-20: 1.25rem;     /* 20px */
  --fs-22: 1.375rem;    /* 22px */
  --fs-24: 1.5rem;      /* 24px */
  --fs-28: 1.75rem;     /* 28px */
  --fs-32: 2rem;        /* 32px */
  --fs-36: 2.25rem;     /* 36px */
  --fs-40: 2.5rem;      /* 40px */
  --fs-48: 3rem;        /* 48px */
  --fs-56: 3.5rem;      /* 56px */
  --fs-64: 4rem;        /* 64px */
}

/* Line-height e padding */

:root {
  --lh-flat: 1;
  --lh-tight: 1.2;
  --lh-normal: 1.5;
  --lh-loose: 1.8;
  
  --pd-lg: 120px;
  --pd-md: 80px;
  --pd-sm: 40px;
}


.section--lg { padding: var(--pd-lg) 0; }
.section--md { padding: var(--pd-md) 0; }
.section--sm { padding: var(--pd-sm) 0; }
@media (max-width: 980px) {
  :root {
    --sec-lg: 80px;
    --sec-md: 60px;
    --sec-sm: 30px;
  }
}



/* =========================
   2) Design Tokens (vars)
========================= */

:root {
  /* Colors */
  --text: #333;
  --bg: #fff;
  --muted: #666;
  --surface: #f3f3f3;
  --border: #e7e7e7;
  --focus: #cfcfcf;

  /* Layout */
  --container: 1188px;
  --container-sm: 980px;
  --container-md: 1430px;

  --pad-x: 20px;
  --gutter: 30px; /* gap between columns */
  --radius: 12px;
  --radius-sm: 8px;

  /* Spacing scale (optional use) */
  --s-1: 0.6rem;
  --s0: 1.2rem;
  --s1: 1.6rem;
  --s2: 2.4rem;
  --s3: 3.2rem;
  --s4: 4.8rem;
}

/* =========================
   3) Buttons
========================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 10px 40px;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  appearance: none;
  background: #333;
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  text-align: center;
  transition: background-color 0.25s ease, transform 0.2s ease,
    opacity 0.25s ease;
}
.btn:hover {
  background: #000;
}
.btn:active {
  transform: translateY(1px);
}

/* =========================
   4) Forms
========================= */

input:not([type="radio"]):not([type="checkbox"]),
textarea,
select {
  width: 100%;
  border: 0;
  border-radius: 0;
  padding: 10px 10px;
  background: #eee;
  color: var(--text);
  font: inherit;
}

textarea {
  max-height: 150px;
  resize: vertical;
}

input[type="submit"] {
  width: auto;
  min-width: 240px;
  margin: 0 auto;
  display: block;
}

input[type="checkbox"] {
  width: auto;
  display: inline-block;
  accent-color: #333;
}

/* =========================
   5) Responsive toggles
========================= */

.mobile {
  display: none;
}
.desktop {
  display: block;
}

/* =========================
   6) Containers (NEW + legacy)
========================= */

/* NEW naming */
.container {
  width: min(100% - (var(--pad-x) * 2), var(--container));
  margin-inline: auto;
}
.container--sm {
  width: min(100% - (var(--pad-x) * 2), var(--container-sm));
  margin-inline: auto;
}
.container--md {
  width: min(100% - (var(--pad-x) * 2), var(--container-md));
  margin-inline: auto;
}
.container--full {
  width: calc(100% - (var(--pad-x) * 2));
  margin-inline: auto;
}

/* Legacy aliases */
.contentInside {
  width: min(100% - (var(--pad-x) * 2), var(--container));
  margin-inline: auto;
  padding-inline: var(--pad-x);
}
.contentInsideSmall {
  width: min(100% - (var(--pad-x) * 2), var(--container-sm));
  margin-inline: auto;
  padding-inline: var(--pad-x);
}
.contentInsideMedium {
  width: min(100% - (var(--pad-x) * 2), var(--container-md));
  margin-inline: auto;
  padding-inline: var(--pad-x);
}
.contentInsideLarge {
  width: calc(100% - (var(--pad-x) * 2));
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

/* =========================
   7) Flex Grid System (NEW + legacy)
========================= */

/* NEW naming */
.row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gutter);
  align-items: stretch;
}

/* Legacy alias */
.contentFlex {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gutter);
  align-items: stretch;
}

/* Allow "container" to also be a row with no extra wrapper */
.container.row,
.contentInside.contentFlex,
.contentInside.row,
.container.contentFlex {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gutter);
  align-items: stretch;
}

/* Prevent overflow issues in flex children */
.row > *,
.contentFlex > * {
  min-width: 0;
}

/* Column base (NEW) */
.col {
  flex: 1 1 0;
  min-width: 0;
}

/* Fixed columns (12-col system) - NEW */
.col-1 { flex: 0 0 calc(8.3333% - (var(--gutter) * 0.9167)); }
.col-2 { flex: 0 0 calc(16.6667% - (var(--gutter) * 0.8333)); }
.col-3 { flex: 0 0 calc(25% - (var(--gutter) * 0.75)); }
.col-4 { flex: 0 0 calc(33.3333% - (var(--gutter) * 0.6667)); }
.col-5 { flex: 0 0 calc(41.6667% - (var(--gutter) * 0.5833)); }
.col-6 { flex: 0 0 calc(50% - (var(--gutter) * 0.5)); }
.col-7 { flex: 0 0 calc(58.3333% - (var(--gutter) * 0.4167)); }
.col-8 { flex: 0 0 calc(66.6667% - (var(--gutter) * 0.3333)); }
.col-9 { flex: 0 0 calc(75% - (var(--gutter) * 0.25)); }
.col-10 { flex: 0 0 calc(83.3333% - (var(--gutter) * 0.1667)); }
.col-11 { flex: 0 0 calc(91.6667% - (var(--gutter) * 0.0833)); }
.col-12 { flex: 0 0 100%; }

/* Legacy column mapping (keep ALL your old names) */
.column12-12,
.column3-3,
.column2-2,
.column4-4,
.column6-6 { flex: 0 0 100%; }

.column6-12,
.column1-2,
.column2-4,
.column3-6 { flex: 0 0 calc(50% - (var(--gutter) * 0.5)); }

.column3-12,
.column1-4 { flex: 0 0 calc(25% - (var(--gutter) * 0.75)); }

.column9-12,
.column3-4 { flex: 0 0 calc(75% - (var(--gutter) * 0.25)); }

.column4-12,
.column1-3,
.column2-6 { flex: 0 0 calc(33.3333% - (var(--gutter) * 0.6667)); }

.column8-12,
.column2-3,
.column4-6 { flex: 0 0 calc(66.6667% - (var(--gutter) * 0.3333)); }

.column1-12 { flex: 0 0 calc(8.3333% - (var(--gutter) * 0.9167)); }
.column2-12 { flex: 0 0 calc(16.6667% - (var(--gutter) * 0.8333)); }
.column5-12 { flex: 0 0 calc(41.6667% - (var(--gutter) * 0.5833)); }
.column7-12 { flex: 0 0 calc(58.3333% - (var(--gutter) * 0.4167)); }
.column10-12 { flex: 0 0 calc(83.3333% - (var(--gutter) * 0.1667)); }
.column11-12 { flex: 0 0 calc(91.6667% - (var(--gutter) * 0.0833)); }

/* Legacy “columnFlexX” helpers */
.columnFlex { flex: 1 1 0; min-width: 0; }
.columnFlex2 { flex-grow: 2; }
.columnFlex3 { flex-grow: 3; }
.columnFlex4 { flex-grow: 4; }
.columnFlex5 { flex-grow: 5; }
.columnFlex6 { flex-grow: 6; }
.columnFlex7 { flex-grow: 7; }
.columnFlex8 { flex-grow: 8; }
.columnFlex9 { flex-grow: 9; }
.columnFlex10 { flex-grow: 10; }
.columnFlex11 { flex-grow: 11; }

/* =========================
   8) Layout Utilities (modern “mattoni”)
========================= */

/* Vertical rhythm: applies spacing between children */
.flow > * + * {
  margin-top: var(--s0);
}

/* Column stack with gap */
.stack {
  display: flex;
  flex-direction: column;
  gap: var(--s0);
}

/* Horizontal cluster that wraps */
.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s0);
}

/* Center content with max width */
.center {
  margin-inline: auto;
}

/* Simple card */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s2);
}

/* Muted text */
.muted {
  color: var(--muted);
}

/* Hide visually but keep for screen readers */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}


.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.text-justify { text-align: justify; }
.text-start { text-align: start; }
.text-end { text-align: end; }



/* =========================
   9) WP content alignment
   (keep floats ONLY here because wrapping text matters)
========================= */

.alignleft {
  float: left;
  margin: 0 20px 10px 0;
}
.alignright {
  float: right;
  margin: 0 0 10px 20px;
}
.aligncenter {
  margin: 0 auto 20px;
}

/* WP-like screen reader helper (legacy) */
.screen-reader-text {
  background: #ccc;
  color: #000;
  height: 35px;
  line-height: 35px;
  padding: 0 10px;
  position: absolute !important;
  left: -9999px !important;
  overflow: hidden;
  width: 1px;
  white-space: nowrap;
}
.screen-reader-text:focus {
  left: 10px !important;
  top: 10px !important;
  width: auto;
  height: auto;
  z-index: 999999;
}

/* =========================
   10) Responsive Breakpoints
   - Tablet: tweak gutters/padding
   - Mobile: stack columns to 100%
========================= */

/* Tablet */
@media (max-width: 1024px) {
  :root {
    --gutter: 22px;
    --pad-x: 18px;
  }
}

/* Mobile */
@media (max-width: 790px) {
  :root {
    --gutter: 18px;
    --pad-x: 16px;
  }

  .desktop { display: none; }
  .mobile { display: block; }

  /* Stack any fixed columns to full width */
  .row > [class*="col-"],
  .contentFlex > [class*="column"],
  .row > [class*="column"],
  .contentFlex > [class*="col-"] {
    flex: 0 0 100% !important;
  }

  /* Safer container padding on mobile */
  .contentInside,
  .contentInsideSmall,
  .contentInsideMedium,
  .contentInsideLarge {
    padding-inline: var(--pad-x);
  }
}

/* =========================
   11) OPTIONAL: CSS Grid helper
   (non lo usi se non ti serve)
========================= */

.grid {
  display: grid;
  gap: var(--gutter);
}

/* Example helpers: .grid-cols-2 / 3 / 4 */
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 1024px) {
  .grid-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 790px) {
  .grid-cols-3,
  .grid-cols-4,
  .grid-cols-2 { grid-template-columns: 1fr; }
}
