/* CJRAE Dolj — front nou (aceleași date/rute; culori instituționale) */

:root {
  --blue: #006EB2;
  --blue-deep: #06399C;
  --magenta: #8F2355;
  --magenta-2: #a12d63;
  --ink: #132038;
  --muted: #5b6b82;
  --line: rgba(19, 32, 56, 0.1);
  --paper: #f5f7fb;
  --card: #ffffff;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(19, 32, 56, 0.1);
  --header-h: 118px;
  --font: "Sora", system-ui, sans-serif;
  --display: "Fraunces", Georgia, serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1000px 480px at 0% -10%, rgba(0, 110, 178, 0.14), transparent 55%),
    radial-gradient(900px 420px at 100% 0%, rgba(143, 35, 85, 0.12), transparent 50%),
    var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--magenta); }
p { margin: 0 0 1em; text-indent: 0 !important; }

.site-main {
  min-height: 55vh;
  padding-bottom: 48px;
}

/* ——— Header / Nav (centrat) ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(19, 32, 56, 0.06);
}

.site-header__top {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 18px 10px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.site-header__top::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(280px, 60%);
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--magenta), var(--blue));
  opacity: 0.85;
}

.site-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  color: inherit;
  max-width: 720px;
  padding: 0 48px;
}

.site-brand img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  background: transparent;
}

.site-brand__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
  gap: 2px;
}

.site-brand__text strong {
  font-family: var(--display);
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  color: var(--blue-deep);
  letter-spacing: -0.02em;
}

.site-brand__text small {
  color: var(--muted);
  font-size: clamp(0.68rem, 1.8vw, 0.78rem);
  font-weight: 500;
  max-width: 36rem;
}

.site-header__nav-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px 14px 12px;
  border-top: 1px solid rgba(19, 32, 56, 0.06);
}

.nav-toggle {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  z-index: 2;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
}

.site-nav__link,
.site-nav__btn {
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ink);
  padding: 8px 11px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  border: 1px solid transparent;
}

.site-nav__link:hover,
.site-nav__btn:hover,
.site-nav__item.is-open > .site-nav__btn {
  background: rgba(0, 110, 178, 0.08);
  color: var(--blue-deep);
}

.site-nav__cta {
  background: linear-gradient(135deg, var(--magenta), var(--magenta-2)) !important;
  color: #fff !important;
  margin-left: 4px;
}

.site-nav__cta:hover {
  filter: brightness(1.05);
  color: #fff !important;
}

.site-nav__item {
  position: relative;
}

.site-nav__panel {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 260px;
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  padding: 8px;
  z-index: 20;
}

.site-nav__item.is-open > .site-nav__panel,
.site-nav__item:hover > .site-nav__panel {
  display: block;
  animation: pop .18s ease;
}

.site-nav__panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 500;
}

.site-nav__panel a:hover {
  background: rgba(0, 110, 178, 0.08);
  color: var(--blue);
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(19, 32, 56, 0.35);
  z-index: 900;
}

/* ——— Hero ——— */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  border-radius: 0 0 24px 24px;
  box-shadow: var(--shadow);
  min-height: 340px;
  display: flex;
  align-items: flex-end;
}

/* Banner cu imagine completă (fără text peste poză) */
.hero--banner {
  display: block;
  min-height: 0;
  background: #eef3f8;
  color: var(--ink);
}

.hero--banner .hero__bg,
.hero--banner .hero__inner {
  display: none;
}

.hero__media {
  width: 100%;
  line-height: 0;
  background: #eef3f8;
}

.hero__media img {
  width: 100%;
  height: auto;
  max-height: min(480px, 52vh);
  object-fit: contain;
  object-position: center top;
  display: block;
  margin: 0 auto;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(6, 57, 156, 0.78) 0%, rgba(143, 35, 85, 0.55) 48%, rgba(6, 57, 156, 0.35) 100%),
    url("/asset/header_nou.jpg") center/cover no-repeat;
  z-index: 0;
}

.hero__inner {
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  padding: 48px 22px 44px;
  position: relative;
  z-index: 1;
}

.hero__eyebrow {
  display: inline-block;
  max-width: 100%;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 12px;
  line-height: 1.3;
  animation: fadeUp .5s ease both;
}

.hero__title {
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.08;
  margin: 0 0 10px;
  letter-spacing: -0.02em;
  animation: fadeUp .55s ease .05s both;
}

.hero__lead {
  max-width: 36rem;
  font-size: 0.98rem;
  opacity: 0.95;
  margin-bottom: 18px;
  line-height: 1.5;
  animation: fadeUp .55s ease .1s both;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  animation: fadeUp .55s ease .15s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.88rem;
  border: 1px solid transparent;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  min-height: 42px;
}

.btn:hover { transform: translateY(-2px); }

.btn--primary {
  background: #fff;
  color: var(--blue-deep) !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.1);
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.55);
}

/* ——— Sections ——— */
.section-head {
  max-width: 1180px;
  margin: 0 auto 16px;
  padding: 0 22px;
}

.section-head h2 {
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  margin: 0 0 4px;
  color: var(--blue-deep);
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.services {
  max-width: 1180px;
  margin: -28px auto 0;
  padding: 0 22px;
  position: relative;
  z-index: 2;
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.service-tile {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 12px;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 8px 22px rgba(19, 32, 56, 0.06);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.82rem;
  line-height: 1.25;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}

.service-tile span {
  display: block;
}

.service-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 110, 178, 0.35);
  box-shadow: var(--shadow);
  color: var(--blue-deep);
  background: linear-gradient(180deg, #fff, rgba(0, 110, 178, 0.06));
}

.page-home .news {
  margin-top: 28px;
}

.news {
  max-width: 1180px;
  margin: 36px auto 0;
  padding: 0 22px;
}

.news-feature {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 0;
  background: var(--card);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  color: inherit;
  margin-bottom: 14px;
  transition: transform .25s ease, box-shadow .25s ease;
}

.news-feature:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(143, 35, 85, 0.14);
  color: inherit;
}

.news-feature__img img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  max-height: 280px;
  object-fit: cover;
}

.news-feature__body {
  padding: 22px 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  background: #fff;
}

.news-feature__body h3 {
  font-family: var(--display);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  margin: 0;
  line-height: 1.3;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-feature__more {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--magenta);
}

.pill {
  display: inline-flex;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 110, 178, 0.1);
  color: var(--blue-deep);
  font-size: 0.72rem;
  font-weight: 600;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.news-card {
  background: var(--card);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 8px 22px rgba(19, 32, 56, 0.05);
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
  animation: fadeUp .45s ease both;
}

.news-card:nth-child(2) { animation-delay: .05s; }
.news-card:nth-child(3) { animation-delay: .1s; }
.news-card:nth-child(4) { animation-delay: .15s; }

.news-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  color: inherit;
}

.news-card__img img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  background: #e8eef6;
}

.news-card__body {
  padding: 12px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.news-card__body time {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
}

.news-card__body h3 {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.35;
  color: var(--ink);
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ——— Inner pages ——— */
.page-shell {
  max-width: 920px;
  margin: 28px auto;
  padding: 0 18px;
}

.page-card {
  background: var(--card);
  border-radius: 22px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 28px 26px 34px;
  animation: fadeUp .4s ease both;
}

.page-card h1,
.page-card > h4,
.page-card .page-title {
  font-family: var(--display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 18px;
  color: var(--blue-deep);
  line-height: 1.25;
  padding-bottom: 14px;
  border-bottom: 2px solid rgba(143, 35, 85, 0.18);
}

.page-card img {
  border-radius: 14px;
  margin: 8px 0 16px;
}

.page-card p,
.page-card li {
  font-size: 1rem;
  line-height: 1.75;
}

.page-card a {
  font-weight: 600;
}

.contact-grid {
  max-width: 1100px;
  margin: 28px auto;
  padding: 0 18px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
}

.contact-card {
  background: var(--card);
  border-radius: 20px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 24px;
}

.contact-card h2 {
  font-family: var(--display);
  margin: 0 0 14px;
  color: var(--blue-deep);
  font-size: 1.45rem;
}

.contact-card ul {
  margin: 0;
  padding-left: 18px;
}

.contact-card li {
  margin-bottom: 6px;
}

/* ——— Footer ——— */
.site-footer {
  margin-top: 40px;
  background: linear-gradient(180deg, transparent, rgba(6, 57, 156, 0.05) 18%, #e6edf6);
  border-top: 1px solid var(--line);
  padding: 36px 18px 18px;
}

.site-footer__grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
}

.site-footer iframe {
  width: 100%;
  min-height: 240px;
  border: 0;
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.site-footer__info {
  background: #fff;
  border-radius: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(19, 32, 56, 0.05);
}

.site-footer__info h3 {
  font-family: var(--display);
  margin: 0 0 10px;
  color: var(--blue-deep);
}

.site-footer__info p {
  margin: 0;
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.7;
}

.site-footer__copy {
  max-width: 1180px;
  margin: 18px auto 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.82rem;
}

/* ——— Gallery leftovers ——— */
.gal a img {
  border-radius: 10px;
  margin: 4px;
  max-height: 120px;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pop {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 1100px) {
  .services__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-nav__link,
  .site-nav__btn { font-size: 0.72rem; padding: 7px 8px; }
}

@media (max-width: 900px) {
  .news-feature { grid-template-columns: 1fr; }
  .news-feature__img img { min-height: 160px; max-height: 180px; }
  .contact-grid { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  :root { --header-h: 76px; }

  .site-header__top {
    padding: 10px 52px 12px;
  }

  .site-header__top::after {
    width: 120px;
    height: 2px;
  }

  .site-header__nav-wrap {
    height: 0;
    padding: 0;
    border: 0;
    overflow: visible;
  }

  .nav-toggle {
    display: inline-flex;
    left: 10px;
    width: 40px;
    height: 40px;
  }

  .site-brand {
    padding: 0;
    gap: 0;
  }

  .site-brand img {
    width: 52px;
    height: 52px;
  }

  .site-brand__text { display: none; }

  .site-nav {
    display: none;
    position: fixed;
    top: calc(var(--header-h) + 4px);
    left: 10px;
    right: 10px;
    max-height: calc(100vh - var(--header-h) - 20px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    border-radius: 14px;
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
    padding: 6px;
    flex-direction: column;
    align-items: stretch;
    gap: 1px;
    z-index: 1001;
    margin: 0;
  }

  body.nav-open .site-nav { display: flex; }

  .site-nav__link,
  .site-nav__btn {
    width: 100%;
    justify-content: space-between;
    padding: 11px 12px;
    font-size: 0.88rem;
    border-radius: 10px;
    white-space: normal;
    text-align: left;
  }

  .site-nav__panel {
    position: static;
    display: none;
    box-shadow: none;
    border: 0;
    background: #f4f7fb;
    margin: 0 0 4px;
    min-width: 0;
    padding: 4px;
  }

  .site-nav__panel a {
    padding: 9px 12px;
    font-size: 0.84rem;
  }

  .site-nav__item.is-open > .site-nav__panel { display: block; }
  .site-nav__item:hover > .site-nav__panel { display: none; }
  .site-nav__item.is-open:hover > .site-nav__panel { display: block; }

  .site-nav__cta { justify-content: center; margin: 4px 0 0; }

  .hero:not(.hero--banner) {
    min-height: 220px;
    border-radius: 0 0 16px 16px;
  }

  .hero__media img {
    max-height: min(280px, 38vh);
    object-fit: contain;
  }

  .section-head {
    padding: 0 14px;
    margin-bottom: 10px;
  }

  .section-head h2 { font-size: 1.25rem; }
  .section-head p { font-size: 0.82rem; }

  .services {
    margin-top: 12px;
    padding: 0 14px;
  }

  .services__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .service-tile {
    min-height: 56px;
    padding: 10px 8px;
    font-size: 0.78rem;
    border-radius: 12px;
  }

  .news {
    margin-top: 24px;
    padding: 0 14px;
  }

  .news-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .news-feature {
    border-radius: 14px;
    margin-bottom: 10px;
  }

  .news-feature__body {
    padding: 14px;
    gap: 8px;
  }

  .news-feature__body h3 {
    font-size: 1.05rem;
    -webkit-line-clamp: 3;
  }

  .news-card {
    flex-direction: row;
    align-items: stretch;
    border-radius: 12px;
  }

  .news-card__img {
    flex: 0 0 96px;
    width: 96px;
  }

  .news-card__img img {
    height: 100%;
    min-height: 88px;
  }

  .news-card__body {
    padding: 10px 12px;
    gap: 4px;
  }

  .news-card__body h3 {
    font-size: 0.84rem;
    -webkit-line-clamp: 3;
  }

  .page-shell {
    margin: 14px auto;
    padding: 0 12px;
  }

  .page-card {
    padding: 16px 14px 20px;
    border-radius: 14px;
  }

  .page-card h1,
  .page-card .page-title {
    font-size: 1.25rem;
    margin-bottom: 12px;
    padding-bottom: 10px;
  }

  .site-footer {
    padding: 22px 12px 14px;
    margin-top: 24px;
  }

  .site-footer iframe { min-height: 180px; border-radius: 12px; }
  .site-footer__info { padding: 14px; border-radius: 12px; }
  .site-footer__info h3 { font-size: 1.15rem; }
  .site-footer__info p { font-size: 0.86rem; }
}

@media (max-width: 480px) {
  .services__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero__media img {
    max-height: min(220px, 34vh);
  }
}
