/* ============================================================
   UTILITY CLASSES — utilities.css
   Reusable components shared across every page:
   nav, buttons, section-label, page-hero, ticker,
   cta-strip, partners, footer, forms, alerts, spinner.
   ============================================================ */

/* ─────────────────────────────────────────
   NAVIGATION
   ───────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--pad);
  height: var(--nav-h);
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(0,0,0,0.07);
  transition: box-shadow 0.3s;
}
nav.scrolled { box-shadow: 0 4px 24px rgba(0,0,0,0.08); }

.nav-logo-wrap { display: flex; align-items: center; gap: 0.85rem; }
.nav-logo-img  { height: 44px; width: auto; object-fit: contain; flex-shrink: 0; display: block; }
.nav-logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.nav-logo-text strong { font-size: 0.98rem; font-weight: 900; color: var(--black); }
.nav-logo-text span   { font-size: 0.62rem; color: var(--gray); letter-spacing: 0.07em; text-transform: uppercase; }

.nav-links { display: flex; gap: 2rem; }
.nav-links a {
  font-size: 0.85rem; font-weight: 500; color: var(--gray);
  position: relative; padding-bottom: 3px; transition: color 0.2s;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: -2px;
  width: 0; height: 2px; background: var(--green); transition: width 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--green); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.nav-cta {
  background: var(--green); color: #fff;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.65rem 1.4rem; border-radius: var(--radius); transition: background 0.2s;
  display: inline-block;
}
.nav-cta:hover { background: var(--green-dark); }

.nav-hamburger {
  display: none; flex-direction: column; gap: 5px;
  padding: 8px; background: none; border: none; cursor: pointer;
}
.nav-hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--black); border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.nav-hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

.nav-drawer {
  position: fixed; top: var(--nav-h); right: 0; bottom: 0;
  width: min(320px, 85vw); background: var(--white);
  padding: 2rem 1.5rem; display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  z-index: 199; box-shadow: -8px 0 40px rgba(0,0,0,0.12); overflow-y: auto;
}
.nav-drawer.open { transform: translateX(0); }
.nav-drawer ul   { display: flex; flex-direction: column; }
.nav-drawer ul li a {
  display: block; padding: 0.9rem 0;
  font-size: 1.05rem; font-weight: 600; color: var(--black);
  border-bottom: 1px solid var(--light); transition: color 0.2s;
}
.nav-drawer ul li a:hover,
.nav-drawer ul li a.active { color: var(--green); }

.nav-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.4); z-index: 198;
}
.nav-overlay.active { display: block; }

/* ── NAV DROPDOWNS ──
   Desktop: hover-reveal panel. Mobile: always-visible sub-list in drawer. */
.nav-dropdown { position: relative; }
.nav-dropdown > a { display: flex; align-items: center; gap: 0.28rem; }
.nav-dropdown-caret {
  display: inline-block; width: 0; height: 0;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-top: 4px solid currentColor;
  flex-shrink: 0; margin-top: 2px; opacity: 0.5;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-dropdown:hover .nav-dropdown-caret,
.nav-dropdown:focus-within .nav-dropdown-caret { transform: rotate(180deg); opacity: 1; }
.nav-dropdown-menu {
  position: absolute; top: calc(100% + 8px); left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: var(--white); list-style: none;
  border: 1px solid rgba(0,0,0,0.07); border-radius: 6px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.10);
  padding: 0.35rem 0; min-width: 140px;
  opacity: 0; visibility: hidden;
  transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
  z-index: 201;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1; visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.nav-dropdown-menu li a {
  display: block; padding: 0.55rem 1.1rem;
  font-size: 0.82rem; font-weight: 500; color: var(--gray);
  white-space: nowrap; transition: color 0.15s, background 0.15s;
}
.nav-dropdown-menu li a:hover { color: var(--green); background: rgba(0,133,81,0.05); }
/* Suppress green underline on dropdown items */
.nav-dropdown-menu li a::after,
.nav-dropdown-menu li a:hover::after { content: none; }

/* Mobile drawer sub-lists */
.nav-drawer-sub {
  list-style: none; padding-left: 1rem; margin: 0.15rem 0 0.4rem;
  border-left: 2px solid var(--green);
  display: flex; flex-direction: column;
}
.nav-drawer-sub li a {
  display: block; padding: 0.55rem 0;
  font-size: 0.9rem; font-weight: 500; color: var(--gray);
  border-bottom: 1px solid var(--light); transition: color 0.2s;
}
.nav-drawer-sub li:last-child a { border-bottom: none; }
.nav-drawer-sub li a:hover { color: var(--green); }

/* ─────────────────────────────────────────
   BUTTONS
   ───────────────────────────────────────── */
.btn-primary {
  background: var(--green); color: #fff;
  font-size: 0.88rem; font-weight: 700;
  padding: 0.9rem 2rem; border: none; cursor: pointer;
  border-radius: var(--radius);
  transition: background 0.2s, transform 0.15s;
  display: inline-block;
}
.btn-primary:hover { background: var(--green-dark); transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-outline {
  background: transparent; color: var(--black);
  font-size: 0.88rem; font-weight: 600;
  padding: 0.9rem 2rem; border: 2px solid rgba(0,0,0,0.15);
  border-radius: var(--radius); transition: border-color 0.2s, color 0.2s;
  display: inline-block;
}
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }

.btn-yellow {
  background: var(--yellow); color: var(--black);
  font-size: 0.88rem; font-weight: 900;
  padding: 0.9rem 2rem; border: none; cursor: pointer;
  border-radius: var(--radius); transition: opacity 0.2s;
  display: inline-block;
}
.btn-yellow:hover { opacity: 0.88; }

.btn-yellow-solid {
  background: var(--yellow); color: var(--black);
  font-size: 0.88rem; font-weight: 900;
  padding: 0.95rem 2.2rem; border: none; cursor: pointer;
  border-radius: var(--radius); transition: opacity 0.2s;
  display: inline-block; letter-spacing: 0.02em;
}
.btn-yellow-solid:hover { opacity: 0.88; }

.btn-outline-white {
  background: transparent; color: var(--white);
  font-size: 0.88rem; font-weight: 600;
  padding: 0.9rem 2rem; border: 2px solid rgba(255,255,255,0.3);
  border-radius: var(--radius); transition: border-color 0.2s, color 0.2s;
  display: inline-block;
}
.btn-outline-white:hover { border-color: var(--yellow); color: var(--yellow); }

/* ─────────────────────────────────────────
   SECTION LABEL (eyebrow text)
   ───────────────────────────────────────── */
.section-label {
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--green); margin-bottom: 1rem;
  display: flex; align-items: center; gap: 0.7rem;
}
.section-label::before {
  content: ''; width: 1.8rem; height: 2px; background: var(--green); flex-shrink: 0;
}
.section-label.blue   { color: var(--blue);  }
.section-label.blue::before   { background: var(--blue);  }
.section-label.yellow { color: var(--yellow); }
.section-label.yellow::before { background: var(--yellow); }
.section-label.white  { color: rgba(255,255,255,0.7); }
.section-label.white::before  { background: rgba(255,255,255,0.4); }

/* ─────────────────────────────────────────
   PAGE HERO (inner pages — not homepage)
   ─────────────────────────────────────────
   COLOR THEME OVERRIDE: uses --green-deep gradient.
   CHANGE BRAND COLOR HERE → adjust --green-deep in variables.css
   BACKGROUND IMAGE option: replace gradient with
     url('/src/assets/images/page-hero-bg.webp') — 1920×500px WebP
   ───────────────────────────────────────── */
.page-hero {
  background: linear-gradient(160deg, var(--green-deep) 0%, #005235 40%, #1a6b50 100%);
  padding-top: var(--nav-h);
  min-height: 360px;
  display: flex; align-items: flex-end;
  position: relative; overflow: hidden;
}
.page-hero-accent {
  position: absolute; top: 0; right: 0;
  width: 6px; height: 100%; background: var(--yellow);
}
.page-hero-watermark {
  position: absolute; font-size: 22vw; font-weight: 900;
  color: rgba(255,255,255,0.03); right: 3rem; bottom: -2rem;
  pointer-events: none; letter-spacing: -0.05em; line-height: 1;
  z-index: 1;
}
/* Image placed inside the watermark — constrain to the right portion of the hero
   so it never extends over the left-side text content. */
.page-hero-watermark img {
  display: block;
  max-width: 42vw;
  width: auto;
  height: auto;
}
/* hr inside the watermark scales with the image container automatically.
   Reset browser default borders so only the inline height is used. */
.page-hero-watermark hr {
  border: none;
  background: rgba(255,255,255,0.12);
  margin: 0;
}
.page-hero-inner {
  padding: 3.5rem var(--pad); position: relative; z-index: 2; width: 100%;
}
.page-hero-eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  background: rgba(255,222,0,0.12); color: var(--yellow);
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 0.4rem 0.9rem; border-radius: var(--radius);
  margin-bottom: 1.2rem; animation: fadeUp 0.7s 0.1s both;
}
.page-hero-eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--yellow); }
.page-hero h1 {
  font-size: clamp(2.8rem, 5vw, 5rem); font-weight: 900;
  line-height: 1.0; letter-spacing: -0.03em;
  color: var(--white); max-width: 700px; animation: fadeUp 0.7s 0.25s both;
}
.page-hero h1 .t-green  { color: var(--green);  }
.page-hero h1 .t-yellow { color: var(--yellow); }
.page-hero-sub {
  font-size: 1.05rem; color: rgba(255,255,255,0.5);
  max-width: 560px; margin-top: 1.2rem; line-height: 1.75;
  animation: fadeUp 0.7s 0.4s both;
}

/* ─────────────────────────────────────────
   BREADCRUMB
   ───────────────────────────────────────── */
.breadcrumb {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.06em;
  color: rgba(255,255,255,0.3); margin-bottom: 1.2rem;
  animation: fadeUp 0.6s 0.05s both;
}
.breadcrumb a { color: rgba(255,255,255,0.45); transition: color 0.2s; }
.breadcrumb a:hover { color: var(--yellow); }
.breadcrumb-sep { opacity: 0.3; }

/* ─────────────────────────────────────────
   TICKER BAR
   ───────────────────────────────────────── */
.ticker { background: var(--yellow); padding: 0.75rem 0; overflow: hidden; }
.ticker-track { display: inline-flex; white-space: nowrap; animation: ticker 30s linear infinite; }
.ticker-item {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--black); padding: 0 2.5rem; display: inline-flex; align-items: center; gap: 0.6rem;
}
.ticker-item::after { content: '·'; opacity: 0.4; }

/* ─────────────────────────────────────────
   CTA STRIP (inner pages)
   ───────────────────────────────────────── */
.cta-strip {
  background: var(--blue); padding: 6rem var(--pad);
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 5rem; align-items: center;
  color: var(--white); position: relative; overflow: hidden;
}
.cta-strip::after {
  content: ''; position: absolute; top: 0; right: 0; bottom: 0;
  width: 6px; background: var(--yellow);
}
/* Both class names used across pages — kept as aliases */
.cta-watermark,
.cta-strip-watermark {
  position: absolute; font-size: 20vw; font-weight: 900;
  color: rgba(255,255,255,0.04);
  bottom: -3rem; right: 5rem;
  pointer-events: none; letter-spacing: -0.04em;
}
.cta-strip h2 {
  font-size: clamp(2.2rem, 4vw, 4.5rem); font-weight: 900;
  line-height: 1.0; letter-spacing: -0.03em; position: relative; z-index: 2;
}
.cta-strip h2 .t-yellow { color: var(--yellow); }
/* Both class names used across pages — kept as aliases */
.cta-right,
.cta-strip-right { position: relative; z-index: 2; }
.cta-right p,
.cta-strip-right p { font-size: 1rem; line-height: 1.8; color: rgba(255,255,255,0.6); margin-bottom: 2rem; }
.cta-contacts { display: flex; flex-direction: column; gap: 0.85rem; margin-bottom: 2.5rem; }
.cta-contact  { display: flex; align-items: center; gap: 1rem; font-size: 0.95rem; }
.cta-contact-label {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255,255,255,0.35); width: 72px; flex-shrink: 0;
}
.cta-contact a { color: #fff; font-weight: 500; transition: color 0.2s; }
.cta-contact a:hover { color: var(--yellow); }

/* ─────────────────────────────────────────
   PARTNERS SECTION
   ───────────────────────────────────────── */
.partners-section { padding: 6rem var(--pad); background: var(--white); }
.partners-section h2 {
  font-size: clamp(2rem, 3vw, 3rem); font-weight: 900;
  letter-spacing: -0.03em; margin-bottom: 3rem;
}
.partners-grid {
  display: grid; grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--light); border-left: 1px solid var(--light);
}
.partner-cell {
  border-right: 1px solid var(--light); border-bottom: 1px solid var(--light);
  padding: 2rem 1rem; display: flex; align-items: center; justify-content: center;
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.04em;
  text-align: center; color: #9ca3af;
  transition: color 0.2s, background 0.2s; cursor: default;
}
.partner-cell:hover { color: var(--green); background: #f0faf5; }

/* ─────────────────────────────────────────
   FOOTER
   ─────────────────────────────────────────
   COLOR THEME OVERRIDE: background uses --blue-deep.
   CHANGE BRAND COLOR HERE → swap var(--blue-deep) in variables.css
   ───────────────────────────────────────── */
footer {
  background: var(--blue-deep);
  color: var(--white); padding: 4.5rem var(--pad) 2rem;
}
.footer-top {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 3rem; padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.07); margin-bottom: 2rem;
}
.footer-brand-name { font-size: 1.05rem; font-weight: 900; color: var(--white); margin-bottom: 0.25rem; }
.footer-brand-sub  {
  font-size: 0.72rem; color: rgba(255,255,255,0.3);
  letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 1.1rem;
}
.footer-desc {
  font-size: 0.87rem; line-height: 1.75; color: rgba(255,255,255,0.35);
  margin-bottom: 1.5rem; max-width: 300px;
}
.footer-social { display: flex; gap: 0.55rem; }
.social-link {
  width: 34px; height: 34px; border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius); display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; color: rgba(255,255,255,0.4);
  text-decoration: none; transition: border-color 0.2s, color 0.2s;
}
.social-link:hover { border-color: var(--yellow); color: var(--yellow); }
.footer-col h5 {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--yellow); margin-bottom: 1.2rem;
}
.footer-col ul { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-col ul li a { font-size: 0.87rem; color: rgba(255,255,255,0.4); transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--white); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.78rem; color: rgba(255,255,255,0.2); flex-wrap: wrap; gap: 0.5rem;
}
.footer-bottom a { color: var(--yellow); }

/* ─────────────────────────────────────────
   FORM ELEMENTS
   ───────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 0.45rem; }
.form-group.full { grid-column: 1 / -1; }
.form-label {
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--black);
}
.form-label .req { color: var(--green); }
.form-input,
.form-select,
.form-textarea {
  font-family: var(--font); font-size: 0.92rem; font-weight: 400;
  color: var(--black); background: var(--white);
  border: 1.5px solid var(--light); border-radius: var(--radius);
  padding: 0.85rem 1rem; width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s; outline: none; appearance: none;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(0,133,81,0.10); }
.form-input.error,
.form-select.error,
.form-textarea.error { border-color: #dc2626; }
.form-input.error:focus,
.form-textarea.error:focus { box-shadow: 0 0 0 3px rgba(220,38,38,0.10); }
.form-input.success,
.form-textarea.success { border-color: var(--green); }
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center;
  padding-right: 2.5rem; cursor: pointer;
}
.form-textarea { resize: vertical; min-height: 140px; line-height: 1.6; }
.form-error {
  font-size: 0.75rem; font-weight: 600; color: #dc2626;
  display: flex; align-items: center; gap: 0.3rem; min-height: 1.2rem;
}
.form-error::before { content: '!'; font-weight: 900; }
.form-hint { font-size: 0.75rem; color: #9ca3af; line-height: 1.5; }
.char-count { font-size: 0.72rem; color: #9ca3af; text-align: right; margin-top: 0.2rem; }

/* ─────────────────────────────────────────
   ALERT / TOAST STATES
   ───────────────────────────────────────── */
.alert {
  display: none; align-items: flex-start; gap: 0.9rem;
  padding: 1.1rem 1.3rem; border-radius: var(--radius);
  font-size: 0.88rem; font-weight: 500; line-height: 1.55; margin-bottom: 1.5rem;
}
.alert.show { display: flex; }
.alert-icon { font-size: 1.2rem; flex-shrink: 0; }
.alert-success      { background: var(--green-bg); color: var(--green-dark); border: 1px solid rgba(0,133,81,0.2); }
.alert-error-banner { background: #fef2f2;         color: #991b1b;           border: 1px solid rgba(220,38,38,0.2); }
.alert-info         { background: var(--blue-bg);  color: var(--blue-dark);  border: 1px solid rgba(16,100,169,0.2); }

/* ─────────────────────────────────────────
   LOADING SPINNER
   ───────────────────────────────────────── */
.spinner {
  display: inline-block; width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.35); border-top-color: var(--white);
  border-radius: 50%; animation: spin 0.7s linear infinite;
}

/* ─────────────────────────────────────────
   SHARED RESPONSIVE BREAKPOINTS
   ───────────────────────────────────────── */
@media (max-width: 960px) {
  nav { padding: 0 1.5rem; }
  .nav-links, .nav-cta { display: none; }
  .nav-hamburger { display: flex; }
}
@media (max-width: 768px) {
  :root { --pad: 1.5rem; }
  .cta-strip  { grid-template-columns: 1fr; gap: 2.5rem; }
  .partners-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .page-hero-watermark img { max-width: 36vw; }
}
@media (max-width: 480px) {
  .footer-top { grid-template-columns: 1fr; }
  .page-hero-watermark { display: none; }
}
