/*
 * CMDA theme layer. Loaded after main.css and page stylesheets.
 * Palette comes from the CMDA mark (green + lime) and its slate wordmark;
 * gold is reserved for deadlines and status badges.
 */
:root {
  --ink: #16242c;
  --green: #00785a;
  --green-dark: #005c45;
  --green-soft: #e6f2ec;
  --lime: #8fbb3a;
  --gold: #c9a227;
  --gold-soft: #f7f0d9;
  --slate: #4c545f;
  --slate-light: #69717b;
  --paper: #f3f5f4;
  --line: #dde3e0;

  --font-body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: Merriweather, Georgia, serif;

  --primary-color: var(--green);
  --primary-dark: var(--green-dark);
  --primary-light: #2f9e7a;
  --secondary-color: var(--gold);
  --secondary-light: #d9b84a;
  --text-dark: var(--ink);
  --text-medium: var(--slate);
  --text-light: var(--slate-light);
  --bg-light: #f6f8f7;
  --bg-gray: #eef1ef;
  --border-color: var(--line);
  --shadow-sm: 0 1px 2px rgb(22 36 44 / 0.06);
  --shadow-md: 0 2px 6px rgb(22 36 44 / 0.07);
  --shadow-lg: 0 8px 24px rgb(22 36 44 / 0.08);

  --focus: var(--green-dark);
}

/* ---------- Base ---------- */
html {
  scroll-behavior: auto;
}
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
body::before {
  display: none;
}
button,
input,
select,
textarea {
  font-family: inherit;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 700;
  opacity: 1;
  animation: none;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2rem, 1.45rem + 2.2vw, 2.75rem);
  line-height: 1.15;
}
h2 {
  font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.1rem);
  line-height: 1.2;
}
h3 {
  font-size: clamp(1.15rem, 1.07rem + 0.35vw, 1.35rem);
  line-height: 1.3;
}
a {
  color: var(--green-dark);
}
a:hover {
  color: var(--ink);
}
::selection {
  background: var(--lime);
  color: var(--ink);
}

/* ---------- Focus & skip link ---------- */
:focus-visible {
  outline: 3px solid var(--focus) !important;
  outline-offset: 2px;
}
.site-header,
.site-footer,
.news-slider,
.final-cta,
.dark-surface {
  --focus: var(--gold);
}
.pre-header {
  --focus: var(--green-dark);
}
.skip-link {
  position: absolute;
  left: 1rem;
  top: -200px;
  z-index: 3000;
  background: var(--ink);
  color: #fff;
  padding: 0.75rem 1.1rem;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus {
  top: 0.75rem;
  color: #fff;
  --focus: var(--gold);
}
main:focus {
  outline: none;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--ink);
}
.pre-header {
  border-bottom: 1px solid var(--line);
}
.pre-header-phone {
  color: var(--slate);
  font-size: 0.95rem;
}
.nav-links a {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.86);
}
.nav-links a.active {
  box-shadow: inset 0 -3px 0 var(--lime);
  border-radius: 6px 6px 0 0;
  background: rgba(255, 255, 255, 0.08);
}
.nav-dropdown-menu a {
  font-size: 0.98rem;
  color: var(--ink);
}
.nav-dropdown-menu a:hover {
  padding-left: 1rem;
  background: var(--green-soft);
  color: var(--green-dark);
}
button.nav-dropdown-toggle {
  background: none;
  border: 0;
  font: inherit;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  white-space: nowrap;
}
button.nav-dropdown-toggle:hover,
.nav-dropdown.open > button.nav-dropdown-toggle {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}
button.nav-dropdown-toggle.active {
  color: #fff;
  box-shadow: inset 0 -3px 0 var(--lime);
  border-radius: 6px 6px 0 0;
  background: rgba(255, 255, 255, 0.08);
}
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
@media (max-width: 1350px) {
  .nav-links a,
  button.nav-dropdown-toggle {
    font-size: 0.95rem;
    padding: 0.45rem 0.65rem;
  }
}
@media (max-width: 1024px) {
  .mobile-menu-toggle {
    width: 44px;
    height: 44px;
  }
  .mobile-menu-toggle span {
    background: var(--ink);
  }
  .nav-links a,
  button.nav-dropdown-toggle {
    color: var(--ink);
    font-size: 1.05rem;
    padding: 0.9rem 0;
    min-height: 48px;
  }
  button.nav-dropdown-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    text-align: left;
  }
  button.nav-dropdown-toggle:hover,
  .nav-dropdown.open > button.nav-dropdown-toggle {
    background: none;
    color: var(--green-dark);
  }
  .nav-links a.active,
  button.nav-dropdown-toggle.active {
    box-shadow: none;
    background: none;
    color: var(--green-dark);
    border-left: 3px solid var(--green);
    padding-left: 0.75rem;
    border-radius: 0;
  }
  .nav-links a:hover {
    padding-left: 0;
  }
  .nav-dropdown-menu a {
    min-height: 44px;
    font-size: 1rem;
    color: var(--slate);
  }
  .nav-dropdown-menu a:hover {
    padding-left: 1.25rem;
    background: none;
  }
  .nav-dropdown:focus-within .nav-dropdown-menu {
    transform: none;
  }
  .nav-menu {
    --focus: var(--green-dark);
  }
}

/* ---------- Buttons ---------- */
.btn,
.cta-button,
.btn-startup-primary {
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0;
  border-radius: 6px;
  animation: none;
  box-shadow: none;
}
.btn::before,
.cta-button::before,
.btn-startup-primary::before,
.form-actions button::before {
  display: none;
}
.btn-primary,
.cta-button,
.pre-header-right .cta-button,
.btn-startup-primary {
  background: var(--green);
  box-shadow: none;
}
.btn-primary:hover,
.cta-button:hover,
.pre-header-right .cta-button:hover,
.btn-startup-primary:hover {
  background: var(--green-dark);
  box-shadow: none;
}
.btn-large {
  font-size: 1.1rem;
  padding: 0.95rem 1.75rem;
}
.cta-note {
  font-size: 0.95rem;
  color: var(--slate);
  margin: 0.85rem auto 0;
  max-width: 56ch;
  line-height: 1.5;
}
.final-cta .cta-note,
.dark-surface .cta-note {
  color: rgba(255, 255, 255, 0.82);
}

/* No lift-on-hover: the pointer already shows what is interactive. */
.btn:hover,
.btn-primary:hover,
.btn-secondary:hover,
.cta-button:hover,
.pre-header-right .cta-button:hover,
.btn-startup-primary:hover,
.nav-phone:hover,
.social-link:hover,
.stat-card:hover,
.program-card:hover,
.programs-grid .program-card:hover,
.impact-card:hover,
.impact .impact-card:hover,
.impact-program-card:hover,
.benefit-card:hover,
.benefit-item:hover,
.partner-card:hover,
.internal-partner:hover,
.gallery-item:hover,
.quick-link-card:hover,
.success-preview-card:hover,
.partners-preview .highlight-card:hover,
.startup-stat-card:hover,
.service-mini-card:hover,
.infra-hero-card:hover,
.infra-tag:hover,
.pim-feature-card:hover,
.infra-benefit-card:hover,
.ima-resident-card:hover,
.story-card:hover,
.news-card:hover,
.proiecte-grid-item:hover,
.form-actions .btn-primary:hover,
.form-actions .btn-secondary:hover,
.final-cta .cta-button:hover,
.story-content .btn-outline:hover,
.infra-apply-section .btn-primary:hover,
.stay-connected-socials .social-link:hover {
  transform: none;
}

/* Form fields don't jump when focused. */
input:focus,
textarea:focus,
select:focus {
  transform: none !important;
}

/* ---------- Labels in sentence case ---------- */
.success-preview-tag,
.story-content .success-preview-tag,
.impact-program-stat span,
.impact .stat-item span,
.impact .impact-card.primary p,
.partners-slider-container h3,
.programs-hero-label,
.hero-stat-label,
.program-featured-badge,
.startup-stat-card p,
.infra-hero-label,
.growth-label,
.ima-residents-live,
.proiecte-table th {
  text-transform: none;
  letter-spacing: 0;
}

/* Status badges: gold carries ink text (6.5:1), never white. */
.program-featured-badge,
.program-block-badge,
.infra-block-badge {
  background: var(--gold);
  color: var(--ink);
  font-weight: 700;
}

/* Gradient-filled text reads as decoration; use solid ink/green. */
.card-stat .stat-number,
.gradient-text {
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  -webkit-text-fill-color: currentColor;
  color: var(--green-dark);
}

/* ---------- Cards: one quiet surface ---------- */
.program-card,
.success-preview-card,
.news-card,
.story-card,
.ima-resident-card {
  border-radius: 10px;
  border-color: var(--line);
  box-shadow: none;
}
.program-card:hover,
.success-preview-card:hover,
.news-card:hover,
.story-card:hover,
.ima-resident-card:hover {
  border-color: var(--green);
  box-shadow: none;
}
.ima-resident-card::after,
.programs-grid .program-card::after {
  display: none;
}

/* ---------- Long-form reading ---------- */
.news-body,
.story-body,
.article-content {
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}
.news-body p,
.news-body li,
.story-body p,
.article-content p {
  color: var(--ink);
  line-height: 1.7;
}

/* ---------- Page headers: one ink band, no gradient ---------- */
.page-header,
.proiecte-hero {
  background: var(--ink);
  --focus: var(--gold);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
}
.footer-bottom {
  opacity: 1;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.95rem;
}
.footer-links a,
.footer-info a,
.footer-info p,
.footer-info address {
  opacity: 1;
  color: rgba(255, 255, 255, 0.86);
}
.footer-links a:hover,
.footer-info a:hover {
  color: #fff;
}
.social-link {
  width: 44px;
  height: 44px;
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Apply link inside the mobile menu only (desktop has it in the pre-header). */
.nav-mobile-cta {
  display: none;
}
@media (max-width: 1024px) {
  .nav-mobile-cta {
    display: block;
    margin-top: 1.25rem;
  }
  .nav-links .nav-mobile-cta a.cta-button {
    display: block;
    text-align: center;
    color: #fff !important;
    background: var(--green);
    border: 0;
    border-radius: 6px;
    padding: 0.9rem 1rem;
  }
  .nav-links .nav-mobile-cta a.cta-button:hover {
    padding-left: 1rem;
    background: var(--green-dark);
  }
}

/* Accent stripes on one side of a card read as template chrome; use a full hairline. */
.service-card,
.info-card,
.project-item,
.content-block:nth-child(2),
.accordion-item.active,
.leg-decision-card,
.program-block-highlight {
  border-left: 1px solid var(--line);
  border: 1px solid var(--line);
}
.content-block:nth-child(2),
.program-block-highlight {
  background: var(--green-soft);
  border-color: #cfe3d8;
}
.success-preview-card::after,
.impact .impact-card::before,
.partners-preview .highlight-card::before {
  display: none;
}
.quick-link-card:hover .quick-link-icon {
  animation: none;
}

/* Smallest text on the site: 13px, never below. */
.lang-trigger-code,
.lang-option-code,
.news-slide-date,
.news-date,
.infra-block-badge,
.ima-resident-domain,
.ima-resident-period,
.story-content .success-preview-tag,
.success-preview-tag {
  font-size: 0.8125rem;
}

/* Labels in sentence case everywhere (collected from every uppercase rule). */
.growth-label,
.hero-stat-label,
.ima-resident-num,
.ima-residents-live,
.impact .impact-card.primary p,
.impact .stat-item span,
.impact-program-stat span,
.infra-hero-label,
.lang-option-code,
.leg-hero-stat .stat-label,
.nav-links a,
.partners-slider-container h3,
.program-featured-badge,
.programs-hero-label,
.proiecte-table th,
.startup-stat-card p,
.story-content .success-preview-tag,
.success-preview-tag,
.team-card__role {
  text-transform: none;
  letter-spacing: 0;
}
.leg-hero {
  background: var(--ink);
  --focus: var(--gold);
}

/* External-platform note under apply buttons (all pages). */
.cta-note {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: fit-content;
  max-width: 60ch;
  margin: 1rem auto 0;
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.45;
  text-align: left;
}
.cta-note::before {
  content: "\f35d";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 0.85rem;
  color: var(--green-dark);
  flex: none;
}
.final-cta .cta-note,
.dark-surface .cta-note {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
}
.final-cta .cta-note::before,
.dark-surface .cta-note::before {
  color: var(--lime);
}

/* Closing "apply" bands: one treatment everywhere (ink band, lime button). */
.final-cta,
.infra-apply-section {
  background: var(--ink);
  color: #fff;
  --focus: var(--gold);
}
.final-cta h2,
.infra-apply-section h2,
.final-cta p:not(.cta-note),
.infra-apply-section p:not(.cta-note) {
  color: #fff;
}
.final-cta .btn-primary,
.final-cta .cta-button,
.infra-apply-section .btn-primary {
  background: var(--lime);
  color: var(--ink) !important;
}
.final-cta .btn-primary:hover,
.final-cta .cta-button:hover,
.infra-apply-section .btn-primary:hover {
  background: #a3cc52;
  color: var(--ink) !important;
}
.infra-apply-section .cta-note {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
}
.infra-apply-section .cta-note::before {
  color: var(--lime);
}

/* ---------- Personal data: consent checkbox, cookie bar, policy page (2026-10) ---------- */

/* Consent box under the contact form: set apart from the fields (art. 7 alin. (2)). */
.consent-field {
  display: grid;
  grid-template-columns: 1.375rem 1fr;
  column-gap: 0.75rem;
  align-items: start;
  padding: 1rem 1.1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md, 8px);
}
.consent-field input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 1.375rem;
  height: 1.375rem;
  margin: 0.1rem 0 0;
  padding: 0;
  border: 1.5px solid var(--slate-light);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  display: grid;
  place-content: center;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.consent-field input[type="checkbox"]::before {
  content: "";
  width: 0.8rem;
  height: 0.8rem;
  transform: scale(0);
  transition: transform 0.12s ease;
  background: #fff;
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}
.consent-field input[type="checkbox"]:hover {
  border-color: var(--green);
}
.consent-field input[type="checkbox"]:checked {
  background: var(--green);
  border-color: var(--green);
}
.consent-field input[type="checkbox"]:checked::before {
  transform: scale(1);
}
.consent-field input[type="checkbox"]:focus-visible {
  outline: 3px solid var(--focus) !important;
  outline-offset: 2px;
}
.consent-field input[type="checkbox"].error,
.consent-field input[type="checkbox"]:user-invalid {
  border-color: #b42318;
}
.form-group.consent-field label {
  display: block;
  margin: 0;
  font-weight: 400;
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--ink);
  cursor: pointer;
}
.consent-field label a {
  color: var(--green-dark);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.consent-note {
  grid-column: 2;
  margin: 0.4rem 0 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--slate);
}

/* Google Maps behind a click / consent. Same footprint as the iframe: no layout shift. */
.map-consent-container {
  position: relative;
  min-height: 450px;
  background: var(--bg-gray);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg, 12px);
  overflow: hidden;
}
.map-consent-container iframe {
  display: block;
}
.map-consent {
  min-height: 450px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem 1.5rem;
  text-align: center;
}
.map-consent[hidden] {
  display: none;
}
.map-consent > .fa-map-marker-alt {
  font-size: 2rem;
  color: var(--green);
}
.map-consent p {
  max-width: 46ch;
  margin: 0;
  color: var(--slate);
}
.map-consent-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1.5rem;
}
@media (max-width: 768px) {
  .map-consent-container,
  .map-consent {
    min-height: 320px;
  }
}

/* Footer legal row */
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.25rem 0.75rem;
  margin-bottom: 0.75rem;
}
.footer-legal a,
.footer-cookie-settings {
  color: rgba(255, 255, 255, 0.86);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer-cookie-settings {
  background: none;
  border: 0;
  padding: 0.5rem 0;
  cursor: pointer;
}
.footer-legal a:hover,
.footer-cookie-settings:hover {
  color: #fff;
}

/* Cookie bar: full-width ink strip fixed to the bottom; overlays, never pushes content. */
.cookie-bar {
  --focus: var(--gold);
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2500;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.86);
  border-top: 3px solid var(--green);
  box-shadow: 0 -10px 30px rgb(22 36 44 / 0.22);
  padding: 1.25rem 0 calc(1.25rem + env(safe-area-inset-bottom, 0px));
}
.cookie-bar[hidden] {
  display: none;
}
.cookie-bar__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem 2.5rem;
}
.cookie-bar__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1.3;
  color: #fff;
  margin: 0 0 0.35rem;
}
.cookie-bar__title:focus {
  outline: none;
}
.cookie-bar__title:focus-visible {
  outline: 3px solid var(--focus) !important;
}
.cookie-bar__text {
  margin: 0;
  max-width: 75ch;
  font-size: 0.95rem;
  line-height: 1.55;
}
.cookie-bar__text a {
  color: #fff;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--lime);
  text-underline-offset: 3px;
  white-space: nowrap;
}
.cookie-bar__text a:hover {
  color: var(--lime);
}
.cookie-bar__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
/* Accept and Refuz are deliberately identical: same size, colour and weight. */
.cookie-bar__btn {
  min-width: 9.5rem;
  min-height: 48px;
  padding: 0.7rem 1.4rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--green);
  border: 1px solid var(--green);
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.cookie-bar__btn:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
}
@media (max-width: 860px) {
  .cookie-bar {
    padding-top: 1rem;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  }
  .cookie-bar__inner {
    grid-template-columns: 1fr;
  }
  .cookie-bar__title {
    font-size: 1.05rem;
  }
  .cookie-bar__text {
    font-size: 0.9rem;
  }
  .cookie-bar__btn {
    min-width: 0;
    width: 100%;
  }
}

/* Policy page */
.privacy-policy-section {
  padding: 3rem 0 4rem;
}
.privacy-policy {
  max-width: 46rem;
  margin: 0 auto;
}
.privacy-policy h2 {
  font-size: clamp(1.3rem, 1.15rem + 0.6vw, 1.6rem);
  margin: 2.5rem 0 0.9rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.privacy-policy h3 {
  font-size: 1.15rem;
  margin: 1.75rem 0 0.6rem;
}
.privacy-policy p,
.privacy-policy li {
  color: var(--ink);
  line-height: 1.7;
}
.privacy-policy p {
  margin: 0 0 1rem;
}
.privacy-policy ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}
.privacy-policy li {
  margin-bottom: 0.45rem;
}
.privacy-policy li::marker {
  color: var(--green);
}
.privacy-policy .privacy-contact {
  list-style: none;
  padding: 1rem 1.25rem;
  background: var(--green-soft);
  border: 1px solid #cfe3d8;
  border-radius: var(--radius-md, 8px);
}
