/* =============================
   Atelierul Grada Unrab — Nature Organic UI
   style.css — Mobile-first, Flexbox-only, Accessible
   ============================= */

/* 0) RESET & NORMALIZE */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure { margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul, ol { padding-left: 1.2em; }
button { background: none; border: none; cursor: pointer; font: inherit; }
:focus { outline: none; }

/* 1) THEME TOKENS */
:root {
  /* Brand */
  --brand-primary: #2B2D42; /* text/ink */
  --brand-secondary: #D77C5A; /* clay/terracotta */
  --brand-accent: #FAF3E8; /* cream */
  /* Nature Organic palette */
  --green-600: #2F5D50; /* evergreen */
  --green-500: #3F7D6B; /* moss */
  --green-300: #A3B18A; /* olive light */
  --sage-200: #E9F2EC; /* pale sage */
  --sand-50: #F4EFE6; /* sand */
  --clay-700: #8C5A3C; /* clay deep */
  --ink: #1E1F26;
  --muted: #5B5E6B;
  --line: #D9D5CC;
  --white: #FFFFFF;
  --shadow: rgba(23, 28, 25, 0.08);
}

/* 2) BASE TYPOGRAPHY */
body {
  font-family: "Trebuchet MS", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--brand-primary);
  background: var(--brand-accent);
}
h1, h2, h3, h4 { font-family: Georgia, "Times New Roman", serif; color: var(--ink); }
h1 { font-size: 32px; line-height: 1.25; letter-spacing: -0.2px; }
h2 { font-size: 24px; line-height: 1.3; margin-bottom: 12px; }
h3 { font-size: 18px; line-height: 1.35; margin-top: 8px; }
p { margin: 10px 0 0 0; color: var(--brand-primary); }
small { font-size: 14px; color: var(--muted); }

/* Links */
a { color: var(--green-600); transition: color .2s ease, opacity .2s ease; }
a:hover { color: var(--green-500); }
a[aria-current="page"] { font-weight: 700; color: var(--green-600); }

/* Lists spacing */
ul, ol { display: flex; flex-direction: column; gap: 8px; }

/* 3) LAYOUT PRIMITIVES (Flexbox-only) */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex; /* flex-only */
  flex-direction: column;
  gap: 20px;
}
.content-wrapper {
  display: flex; /* flex-only */
  flex-direction: column;
  gap: 16px;
}
section { margin-bottom: 60px; }

/* Mandatory spacing/alignment patterns */
.section { margin-bottom: 60px; padding: 40px 20px; }
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; }
.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; }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* 4) HEADER & NAV */
header {
  position: sticky;
  top: 0; z-index: 1000;
  background: var(--white);
  box-shadow: 0 6px 24px var(--shadow);
  border-bottom: 1px solid var(--line);
}
header .container { flex-direction: row; align-items: center; justify-content: space-between; gap: 14px; }
.logo img { height: 40px; width: auto; }

.main-nav { display: none; align-items: center; gap: 16px; }
.main-nav a { color: var(--ink); padding: 8px 10px; border-radius: 16px; transition: background-color .2s ease, color .2s ease; }
.main-nav a:hover { background: var(--sage-200); color: var(--green-600); }
.main-nav a[aria-current="page"] { background: var(--sand-50); border: 1px solid var(--line); }

.header-ctas { display: none; align-items: center; gap: 10px; }

/* Mobile burger */
.mobile-menu-toggle {
  width: 44px; height: 44px; border-radius: 14px 18px 16px 20px;
  background: var(--sage-200); color: var(--green-600);
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px var(--shadow);
}
.mobile-menu-toggle:hover { background: #DAE9E1; }

/* Mobile menu overlay */
.mobile-menu {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(34, 46, 40, 0.5);
  display: flex; /* flex-only */
  flex-direction: row; align-items: stretch; justify-content: flex-end;
  pointer-events: none; opacity: 0; transition: opacity .25s ease;
}
.mobile-menu.open { pointer-events: auto; opacity: 1; }

.mobile-menu .mobile-nav {
  width: 86%; max-width: 360px; height: 100%;
  background: var(--white);
  display: flex; /* flex-only */
  flex-direction: column; gap: 10px; padding: 24px;
  transform: translateX(100%); transition: transform .3s ease;
}
.mobile-menu.open .mobile-nav { transform: translateX(0); }
.mobile-menu-close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--sand-50); color: var(--ink);
}
.mobile-nav a {
  padding: 12px 14px; border-radius: 16px;
  background: var(--brand-accent); color: var(--ink);
}
.mobile-nav a:hover { background: var(--sage-200); color: var(--green-600); }
.mobile-nav a[aria-current="page"] { background: var(--sand-50); border: 1px solid var(--line); }

/* 5) HERO & SECTIONS */
.hero { background: var(--sand-50); border-bottom: 1px solid var(--line); }
.hero .container { padding-top: 28px; padding-bottom: 28px; }
.hero .content-wrapper {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 28px 18px 26px 20px;
  padding: 24px;
  box-shadow: 0 12px 36px var(--shadow);
}

/* Generic section content */
section .content-wrapper {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 22px 18px 24px 20px;
  padding: 22px;
  box-shadow: 0 8px 28px var(--shadow);
}

.text-section { display: flex; flex-direction: column; gap: 10px; }
.text-section ul { margin-top: 4px; }

/* 6) BUTTONS */
.btn-primary, .btn-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; }
.btn-primary, .btn-secondary, .mobile-nav a, .main-nav a {
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease, transform .08s ease;
}
.btn-primary {
  background: var(--green-600); color: var(--white);
  padding: 12px 18px; border-radius: 22px 18px 24px 20px;
  box-shadow: 0 6px 18px var(--shadow);
}
.btn-primary:hover { background: var(--green-500); transform: translateY(-1px); }
.btn-primary:focus { outline: 2px dashed var(--green-300); outline-offset: 3px; }

.btn-secondary {
  background: var(--brand-accent); color: var(--green-600);
  padding: 10px 16px; border-radius: 20px 16px 22px 18px;
  border: 1px solid var(--line);
}
.btn-secondary:hover { background: var(--sage-200); }
.btn-secondary:focus { outline: 2px dashed var(--brand-secondary); outline-offset: 3px; }

.cta-group { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* 7) CARDS & TESTIMONIALS */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px 16px 22px 20px;
  padding: 18px;
  box-shadow: 0 8px 22px var(--shadow);
}

/* Testimonials must be readable: light bg + dark text */
.testimonial-card {
  background: #F6FAF8; /* light sage */
  border: 1px solid var(--line);
  border-left: 6px solid var(--green-500);
  border-radius: 18px;
  color: var(--ink);
}
.testimonial-card p { color: var(--ink); }

/* 8) FOOTER */
footer { background: var(--green-600); color: var(--brand-accent); padding: 28px 0; }
footer .content-wrapper { background: transparent; border: none; box-shadow: none; padding: 0; }
footer a { color: var(--brand-accent); }
footer a:hover { color: #E6E0D6; }
footer .logo img { filter: brightness(0) invert(1); height: 34px; }

/* 9) UTILITIES */
.hr-line { width: 100%; height: 1px; background: var(--line); }
.badge { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 999px; background: var(--sage-200); color: var(--green-600); font-size: 12px; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* 10) ACCESSIBILITY FOCUS VISIBLE */
:focus-visible { outline: 2px dashed var(--green-300); outline-offset: 3px; }

/* 11) MOBILE NAV VISIBILITY RULES */
@media (min-width: 768px) {
  .mobile-menu-toggle { display: none; }
  .main-nav { display: flex; }
  .header-ctas { display: flex; }
}

/* 12) RESPONSIVE TYPOGRAPHY & LAYOUT */
@media (min-width: 600px) {
  h1 { font-size: 36px; }
  h2 { font-size: 28px; }
  h3 { font-size: 20px; }
}
@media (min-width: 768px) {
  .hero .container { padding-top: 40px; padding-bottom: 40px; }
  .hero .content-wrapper { padding: 32px; }
  section .content-wrapper { padding: 28px; }
  h1 { font-size: 40px; }
  h2 { font-size: 32px; }
}
@media (min-width: 1024px) {
  h1 { font-size: 48px; }
  h2 { font-size: 36px; }
}

/* 13) FLEX RULES FOR TEXT-IMAGE SECTIONS (if any appear) */
@media (max-width: 768px) {
  .text-image-section { flex-direction: column; }
}
@media (min-width: 769px) {
  .text-image-section { flex-direction: row; }
}

/* 14) FORMS & INLINE ICON TEXT (contact footer icons) */
.text-section img { width: 18px; height: 18px; margin-right: 6px; display: inline-block; vertical-align: text-bottom; }
.text-section p img { margin-right: 8px; }

/* 15) BREADCRUMBS (text-section used as crumbs) */
.text-section.breadcrumbs, .breadcrumbs { display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 14px; }

/* 16) COOKIE CONSENT BANNER & MODAL */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 3000;
  background: var(--white);
  border-top: 1px solid var(--line);
  box-shadow: 0 -10px 24px var(--shadow);
  display: flex; /* flex-only */
  flex-direction: column; gap: 12px; padding: 14px 16px;
}
.cookie-banner .container { flex-direction: column; gap: 12px; }
.cookie-text { color: var(--ink); }
.cookie-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px; border-radius: 20px; border: 1px solid var(--line); }
.cookie-accept { background: var(--green-600); color: var(--white); border-color: transparent; }
.cookie-accept:hover { background: var(--green-500); }
.cookie-reject { background: var(--brand-accent); color: var(--green-600); }
.cookie-settings { background: var(--sand-50); color: var(--ink); }

/* Cookie modal */
.cookie-backdrop {
  position: fixed; inset: 0; z-index: 3500;
  background: rgba(27, 35, 31, 0.55);
  display: none; align-items: center; justify-content: center;
}
.cookie-backdrop.show { display: flex; }
.cookie-modal {
  width: 92%; max-width: 640px; background: var(--white);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 24px 60px var(--shadow);
  display: flex; flex-direction: column; gap: 16px; padding: 20px;
}
.cookie-modal-header { display: flex; align-items: center; justify-content: space-between; }
.cookie-modal-body { display: flex; flex-direction: column; gap: 12px; }
.cookie-category { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 14px; }
.cookie-modal-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

/* 17) COLOR-DRIVEN EMPHASIS (brand + organic) */
.emphasis { background: var(--sage-200); color: var(--green-600); padding: 2px 6px; border-radius: 10px; }

/* 18) LIST LOOK (organic markers) */
ul li::marker { color: var(--green-500); }
ol { counter-reset: ol; }
ol li { position: relative; }

/* 19) CARDS FOR CALENDAR/MENTORS (applies to list items visually when needed) */
.content-wrapper > ul li strong { color: var(--ink); }

/* 20) HEADER STATES WHEN BODY NO-SCROLL FOR MOBILE MENU */
body.menu-open { overflow: hidden; }

/* 21) PRINT TWEAKS */
@media print {
  header, .mobile-menu, .cookie-banner, .cookie-backdrop { display: none !important; }
  section .content-wrapper, .hero .content-wrapper { box-shadow: none; border: 1px solid #ccc; }
}

/* 22) SAFETY SPACING TO AVOID OVERLAP */
main { display: flex; flex-direction: column; gap: 20px; }

/* 23) EXTRA: HIGHLIGHT INFO BLOCKS */
.info-block { background: var(--brand-accent); border: 1px solid var(--line); border-radius: 18px; padding: 16px; }

/* 24) HOVERABLE CARD MICRO-INTERACTION */
.card:hover, section .content-wrapper:hover { box-shadow: 0 12px 36px var(--shadow); transform: translateY(-1px); transition: box-shadow .2s ease, transform .1s ease; }

/* 25) ARIA CURRENT FOR SIDE/FOOTER LINKS */
nav a[aria-current="page"], .mobile-nav a[aria-current="page"] { font-weight: 700; }
