/**
 * ╔══════════════════════════════════════════════════════════════╗
 * ║  utilities.css — Clase Utilitare Globale                     ║
 * ║                                                              ║
 * ║  CE SUNT CLASELE UTILITARE?                                  ║
 * ║  Clase CSS mici, cu un singur scop, care se pot combina      ║
 * ║  direct în HTML. Ex: class="flex-center gap-4 mt-8"          ║
 * ║                                                              ║
 * ║  AVANTAJE:                                                   ║
 * ║  - Nu scrii CSS nou pentru fiecare micro-ajustare            ║
 * ║  - Modifici direct în HTML fără să cauți CSS-ul              ║
 * ║  - Consistență garantată (folosești token-uri, nu px)        ║
 * ║                                                              ║
 * ║  CONVENȚIE DE NOMENCLATURĂ:                                  ║
 * ║  .mt-4  = margin-top: var(--sp-4)  [16px]                   ║
 * ║  .px-8  = padding: 0 var(--sp-8)   [32px]                   ║
 * ║  .text-lg = font-size: var(--fs-lg)                          ║
 * ╚══════════════════════════════════════════════════════════════╝
 */

/* ═══════════════════════════
   LAYOUT — Container
═══════════════════════════ */

/* Containerul principal — centrează și limitează lățimea */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--sp-8);
}
.container--narrow { max-width: var(--container-narrow); }
.container--wide   { max-width: var(--container-wide); }

/* ═══════════════════════════
   LAYOUT — Flexbox shortcuts
═══════════════════════════ */
.flex          { display: flex; }
.flex-col      { display: flex; flex-direction: column; }
.flex-center   { display: flex; align-items: center; justify-content: center; }
.flex-between  { display: flex; align-items: center; justify-content: space-between; }
.flex-start    { display: flex; align-items: flex-start; }
.flex-end      { display: flex; align-items: flex-end; }
.flex-wrap     { flex-wrap: wrap; }
.flex-1        { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.items-center  { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }

/* ═══════════════════════════
   LAYOUT — Grid
═══════════════════════════ */
.grid      { display: grid; }
.grid-2    { display: grid; grid-template-columns: repeat(2, 1fr); }
.grid-3    { display: grid; grid-template-columns: repeat(3, 1fr); }
.grid-4    { display: grid; grid-template-columns: repeat(4, 1fr); }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

/* Gap-uri pentru grid și flex */
.gap-1 { gap: var(--sp-1); } .gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); } .gap-4 { gap: var(--sp-4); }
.gap-5 { gap: var(--sp-5); } .gap-6 { gap: var(--sp-6); }
.gap-8 { gap: var(--sp-8); } .gap-10{ gap: var(--sp-10);}
.gap-12{ gap: var(--sp-12);}

/* ═══════════════════════════
   SPACING — Margin / Padding
   (adaugă mai multe după nevoie)
═══════════════════════════ */
.mt-0  { margin-top: 0; }
.mt-2  { margin-top: var(--sp-2); }  .mt-4 { margin-top: var(--sp-4); }
.mt-6  { margin-top: var(--sp-6); }  .mt-8 { margin-top: var(--sp-8); }
.mt-12 { margin-top: var(--sp-12);}  .mt-16{ margin-top: var(--sp-16);}
.mb-0  { margin-bottom: 0; }
.mb-4  { margin-bottom: var(--sp-4); }.mb-6 { margin-bottom: var(--sp-6); }
.mb-8  { margin-bottom: var(--sp-8); }.mb-12{ margin-bottom: var(--sp-12);}
.mx-auto{ margin-inline: auto; }

.pt-0  { padding-top: 0; }
.pt-4  { padding-top: var(--sp-4); }  .pt-8  { padding-top: var(--sp-8); }
.pt-16 { padding-top: var(--sp-16);} .pt-24 { padding-top: var(--sp-24);}
.pb-4  { padding-bottom: var(--sp-4); }.pb-8  { padding-bottom: var(--sp-8); }
.p-4   { padding: var(--sp-4); }  .p-6   { padding: var(--sp-6); }
.p-8   { padding: var(--sp-8); }  .p-10  { padding: var(--sp-10);}
.px-4  { padding-inline: var(--sp-4); }.px-6  { padding-inline: var(--sp-6); }
.px-8  { padding-inline: var(--sp-8); }.py-4  { padding-block: var(--sp-4); }
.py-6  { padding-block: var(--sp-6); } .py-8  { padding-block: var(--sp-8); }
.py-12 { padding-block: var(--sp-12);} .py-16 { padding-block: var(--sp-16);}
.py-24 { padding-block: var(--sp-24);}

/* ═══════════════════════════
   TIPOGRAFIE
═══════════════════════════ */
.font-display  { font-family: var(--font-display); }
.font-script   { font-family: var(--font-script); }
.font-body     { font-family: var(--font-body); }

.text-xs   { font-size: var(--fs-xs); }   .text-sm   { font-size: var(--fs-sm); }
.text-base { font-size: var(--fs-base); } .text-md   { font-size: var(--fs-md); }
.text-lg   { font-size: var(--fs-lg); }   .text-xl   { font-size: var(--fs-xl); }
.text-2xl  { font-size: var(--fs-2xl); }  .text-3xl  { font-size: var(--fs-3xl); }
.text-4xl  { font-size: var(--fs-4xl); }  .text-5xl  { font-size: var(--fs-5xl); }

.fw-light   { font-weight: var(--fw-light); }
.fw-regular { font-weight: var(--fw-regular); }
.fw-medium  { font-weight: var(--fw-medium); }
.fw-semibold{ font-weight: var(--fw-semibold);}
.fw-bold    { font-weight: var(--fw-bold); }

.italic     { font-style: italic; }
.uppercase  { text-transform: uppercase; letter-spacing: var(--ls-wider); }

.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

/* ═══════════════════════════
   CULORI — Text
═══════════════════════════ */
.text-primary   { color: var(--txt-primary); }
.text-secondary { color: var(--txt-secondary); }
.text-muted     { color: var(--txt-muted); }
.text-brand     { color: var(--brand); }
.text-accent    { color: var(--accent); }
.text-gold      { color: var(--gold); }
.text-white     { color: #fff; }
.text-on-dark   { color: var(--txt-on-dark); }

/* ═══════════════════════════
   DIMENSIUNI
═══════════════════════════ */
.w-full   { width: 100%; }
.w-auto   { width: auto; }
.h-full   { height: 100%; }
.min-h-screen { min-height: 100dvh; }
.max-w-prose  { max-width: 65ch; }

/* ═══════════════════════════
   POSITION
═══════════════════════════ */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed    { position: fixed; }
.sticky   { position: sticky; top: 0; }
.inset-0  { inset: 0; }
.overflow-hidden { overflow: hidden; }

/* ═══════════════════════════
   VIZIBILITATE / DISPLAY
═══════════════════════════ */
.hidden         { display: none !important; }
.invisible      { visibility: hidden; }
.block          { display: block; }
.inline-block   { display: inline-block; }
.inline-flex    { display: inline-flex; align-items: center; }

/* Screen-reader only — vizibil pentru screen readers, invizibil vizual */
.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;
}

/* ═══════════════════════════
   SECȚIUNI DE PAGINĂ
═══════════════════════════ */

/* Clasa de bază pentru orice secțiune de pagină */
.section {
  padding-block: var(--sp-24);
}
.section--sm  { padding-block: var(--sp-16); }
.section--lg  { padding-block: var(--sp-32); }

/* Fundal variante pentru secțiuni */
.bg-page     { background-color: var(--bg-page); }
.bg-card     { background-color: var(--bg-card); }
.bg-alt      { background-color: var(--bg-section-alt); }
.bg-dark     { background-color: var(--bg-dark); }
.bg-brand    { background-color: var(--brand); }

/* Patternuri de fundal */
.bg-dots     { background-image: var(--pattern-dots); }
.bg-cross    { background-image: var(--pattern-cross); }
.bg-floral   { background-image: var(--pattern-floral); }
.bg-diag     { background-image: var(--pattern-diag); }

/* ═══════════════════════════
   RESPONSIV — Helpers
═══════════════════════════ */
.hide-mobile  { } /* vizibil desktop, ascuns mobil */
.show-mobile  { display: none; } /* ascuns desktop, vizibil mobil */

@media (max-width: 768px) {
  .hide-mobile  { display: none !important; }
  .show-mobile  { display: block !important; }
  .container    { padding-inline: var(--sp-5); }
  .section      { padding-block: var(--sp-16); }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .container { padding-inline: var(--sp-4); }
  .section   { padding-block: var(--sp-12); }
}

/* ═══════════════════════════
   PRINT
═══════════════════════════ */
@media print {
  .no-print { display: none !important; }
  body { font-size: 12pt; color: black; background: white; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 10pt; }
}

/* ══════════════════════════════════════════════════
   BUTTONS — Sistem complet de butoane
   Folosite pe toate paginile
══════════════════════════════════════════════════ */

/* Buton de bază */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: 13px 28px;
  border-radius: var(--r-full);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wide);
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition:
    background var(--dur-base),
    color      var(--dur-base),
    border-color var(--dur-base),
    transform  var(--dur-base) var(--ease-spring),
    box-shadow var(--dur-base);
  -webkit-appearance: none;
  user-select: none;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}
.btn:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
}
.btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Variante */
.btn--primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  box-shadow: 0 4px 14px rgba(200,135,58,.3);
}
.btn--primary:hover {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(200,135,58,.4);
}
.btn--primary:active { transform: translateY(0); }

.btn--outline {
  background: transparent;
  color: var(--brand);
  border-color: var(--border-strong);
}
.btn--outline:hover {
  background: var(--brand-subtle);
  border-color: var(--brand);
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  color: var(--txt-secondary);
  border-color: transparent;
}
.btn--ghost:hover { background: var(--bg-section-alt); }

.btn--dark {
  background: var(--bg-dark);
  color: var(--txt-on-dark);
  border-color: var(--bg-dark);
}
.btn--dark:hover { background: var(--bg-dark-alt); transform: translateY(-2px); }

/* Mărimi */
.btn--sm  { padding: 8px 20px; font-size: var(--fs-xs); }
.btn--lg  { padding: 16px 36px; font-size: var(--fs-base); }
.btn--xl  { padding: 20px 48px; font-size: var(--fs-md); }
.btn--wide { width: 100%; }
.btn--icon { padding: 12px; border-radius: var(--r-full); width: 46px; height: 46px; }

/* ══════════════════════════════════════════════════
   SECTION HEADERS — Capuri de secțiune
   Folosite pe toate paginile
══════════════════════════════════════════════════ */
.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto var(--sp-16);
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: var(--sp-4);
}
.section-eyebrow::before,
.section-eyebrow::after {
  content: '';
  width: 34px;
  height: 1px;
  background: currentColor;
  border-radius: 1px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(var(--fs-2xl), 4vw, var(--fs-4xl));
  font-weight: var(--fw-semibold);
  color: var(--txt-secondary);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  margin-bottom: var(--sp-5);
}
.section-title em {
  font-style: italic;
  color: var(--brand);
}
.section-title .script {
  font-family: var(--font-script);
  font-size: 1.1em;
  color: var(--accent);
}

.section-lead {
  font-size: var(--fs-md);
  color: var(--txt-muted);
  line-height: var(--lh-relaxed);
  font-weight: var(--fw-light);
  max-width: 60ch;
  margin: 0 auto;
}

/* ══════════════════════════════════════════════════
   BADGES
══════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: 4px 14px;
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
}
.badge--brand   { background: var(--clr-caramel-100); color: var(--clr-caramel-700); }
.badge--success { background: var(--clr-sage-100);    color: var(--clr-sage-700); }
.badge--peach   { background: var(--clr-peach-100);   color: var(--clr-peach-700); }
.badge--gold    { background: var(--clr-gold-100);    color: var(--clr-gold-700); }
.badge--dark    { background: var(--bg-dark);          color: var(--txt-on-dark); }
