/* ===== Variabile ===== */
:root {
  --navy: #1f2a44;
  --navy-dark: #151d31;
  --gold: #c9a961;
  --cream: #f6f1e7;
  --text: #2b2b2b;
  --white: #ffffff;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Source Sans 3", "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--cream);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }

a:focus-visible,
button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ===== Header ===== */
.site-header {
  background: var(--navy);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.title-bar {
  padding: 18px 16px 12px;
  text-align: center;
}

.site-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  letter-spacing: 0.04em;
}

.site-title a:hover { color: var(--gold); }

/* ===== Bara de meniu ===== */
.main-nav {
  border-top: 1px solid rgba(201, 169, 97, 0.35);
  background: var(--navy-dark);
}

.menu {
  list-style: none;
  display: flex;
  justify-content: center;
  position: relative;
}

.menu-item { position: relative; }

.menu-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 24px;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white);
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}

.menu-link:hover { color: var(--gold); }

.menu-item.open > .menu-link {
  color: var(--gold);
  background: rgba(255, 255, 255, 0.06);
}

.caret { font-size: 0.8em; transition: transform 0.2s; }
.menu-item.open .caret { transform: rotate(180deg); }

/* Submeniul se deschide doar la click (clasa .open adăugată din JavaScript) */
.dropdown {
  list-style: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  background: var(--white);
  border-top: 3px solid var(--gold);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  display: none;
}

.menu-item.open > .dropdown { display: block; }

.dropdown a {
  display: block;
  padding: 12px 20px;
  color: var(--navy);
  border-bottom: 1px solid #eee;
  transition: background 0.2s, padding-left 0.2s;
}

.dropdown li:last-child a { border-bottom: none; }

.dropdown a:hover {
  background: var(--cream);
  padding-left: 26px;
}

/* ===== Imaginea + casetele ===== */
main { flex: 1; }

.hero {
  position: relative;
  min-height: clamp(520px, 75vh, 820px);
  background: url("images/cladire.jpg") center / cover no-repeat;
  display: flex;
  align-items: flex-end;
  /* casetele sunt coborâte cu ~2 rânduri (≈52px) față de 60px inițial */
  padding: 40px 5vw 8px;
}

/* Umbră discretă pentru lizibilitatea textului */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 22, 40, 0.85) 0%, rgba(15, 22, 40, 0.35) 45%, rgba(15, 22, 40, 0) 75%);
}

.hero-boxes {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

/* Casete fără margini vizibile */
.hero-box {
  border: none;
  background: transparent;
  color: var(--white);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.hero-box h2 {
  font-family: var(--serif);
  font-size: 1.9rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--gold);
}

.hero-box p {
  font-size: 1.02rem;
  line-height: 1.6;
  margin-bottom: 6px;
  /* Toate casetele au aceeași înălțime (~4 rânduri); restul textului se derulează */
  height: 6.4em;
  overflow-y: auto;
  padding-right: 12px;
  overscroll-behavior: contain;
}

/* Scrollbar subțire, auriu (Firefox) */
@supports not selector(::-webkit-scrollbar) {
  .hero-box p {
    scrollbar-width: thin;
    scrollbar-color: var(--gold) rgba(255, 255, 255, 0.12);
  }
}

/* Scrollbar stilizat (Chrome, Edge, Safari) */
.hero-box p::-webkit-scrollbar { width: 6px; }
.hero-box p::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
}
.hero-box p::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 3px;
}
.hero-box p::-webkit-scrollbar-thumb:hover { background: #e0c27e; }

.more {
  font-weight: 600;
  font-size: 0.95rem;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.more:hover { border-color: var(--gold); }

/* Secțiunea curentă din meniu */
.menu-item.current > .menu-link { box-shadow: inset 0 -3px 0 var(--gold); }

/* ===== Pagini interioare ===== */
.page-banner {
  position: relative;
  background: url("images/cladire.jpg") center 30% / cover no-repeat;
  padding: 70px 16px 34px;
}

.page-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 22, 40, 0.9), rgba(15, 22, 40, 0.45));
}

.page-banner-inner {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  color: var(--white);
}

.breadcrumb { font-size: 0.9rem; opacity: 0.85; margin-bottom: 6px; }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb span { margin: 0 6px; color: var(--gold); }

.page-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--gold);
  text-wrap: balance;
}

.content {
  max-width: 900px;
  margin: 40px auto 60px;
  padding: 40px clamp(20px, 5vw, 56px);
  background: var(--white);
  box-shadow: 0 4px 24px rgba(31, 42, 68, 0.08);
  line-height: 1.7;
  font-size: 1.05rem;
}

@media (max-width: 940px) {
  .content { margin: 24px 16px 40px; }
}

.content p { margin-bottom: 16px; max-width: 70ch; }

.content h3 {
  font-family: var(--serif);
  line-height: 1.25;
  font-size: 1.6rem;
  color: var(--navy);
  margin: 28px 0 10px;
  text-wrap: balance;
}

.content h3:first-child { margin-top: 0; }

.content h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--navy);
  margin: 28px 0 10px;
}

.content a:not(.law-list a) { color: var(--navy); border-bottom: 1px solid var(--gold); }
.content a:not(.law-list a):hover { color: #8a6d2c; }

.lead { font-size: 1.1rem; color: #4a5068; }

.notice {
  padding: 20px 24px;
  background: var(--cream);
  border-left: 3px solid var(--gold);
  color: #4a5068;
}

/* Liste etichetă / valoare */
.info-list {
  display: grid;
  grid-template-columns: minmax(140px, 220px) 1fr;
  border-top: 1px solid #ece6d8;
}

.info-list dt,
.info-list dd {
  padding: 10px 0;
  border-bottom: 1px solid #ece6d8;
  min-width: 0;
}

.info-list dt { font-weight: 600; color: var(--navy); padding-right: 16px; }
.info-list dd.pending { color: #8a8f9e; font-style: italic; }

/* Linkuri către documente (buget, bilanț) */
.info-list dd.doc-links { display: flex; flex-wrap: wrap; align-items: flex-start; align-content: flex-start; gap: 8px 18px; }
.doc-link { font-weight: 600; }

.person .role {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  color: #8a6d2c;
  margin-bottom: 0;
}

/* Cadru legal */
.law-list { list-style: none; display: grid; gap: 14px; }

.law-list a {
  display: block;
  padding: 18px 22px;
  background: var(--cream);
  border-left: 3px solid var(--gold);
  transition: background 0.2s, transform 0.2s;
}

.law-list a:hover { background: #efe7d6; transform: translateX(4px); }
.law-list strong { display: block; color: var(--navy); margin-bottom: 4px; }
.law-list strong::after { content: " ↗"; color: #8a6d2c; }
.law-list span { color: #4a5068; font-size: 0.98rem; }

/* Cerințe generale */
.conditions { list-style: none; display: grid; gap: 12px; margin: 8px 0 24px; }
.conditions li { display: grid; grid-template-columns: 32px 1fr; }
.conditions .letter { font-weight: 700; color: #8a6d2c; }

.note { font-style: italic; color: #4a5068; }

/* Expoziții */
.event { display: grid; grid-template-columns: 260px 1fr; gap: 36px; align-items: start; }
.event-poster { width: 100%; height: auto; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2); position: sticky; top: 140px; }
.event-body { min-width: 0; }
.event-body h3 { margin-top: 4px; margin-bottom: 18px; }
.event-date { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.06em; color: #8a6d2c; margin-bottom: 4px; }
.event-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; padding: 16px 20px; background: var(--cream); margin-bottom: 22px; }
.event-facts dt { font-weight: 600; color: var(--navy); }
.guests { list-style: none; display: grid; gap: 10px; margin-bottom: 16px; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-grid > div { min-width: 0; }
.contact-grid .info-list { grid-template-columns: minmax(110px, 150px) 1fr; }

@media (max-width: 720px) {
  .event { grid-template-columns: 1fr; }
  .event-poster { position: static; max-width: 280px; margin: 0 auto; }
  .contact-grid { grid-template-columns: 1fr; gap: 10px; }
  .info-list, .contact-grid .info-list { grid-template-columns: 1fr; }
  .info-list dt { border-bottom: none; padding-bottom: 0; }
  .event-facts { grid-template-columns: 1fr; }
  .event-facts dd { margin-bottom: 8px; }
}

/* Organigramă */
.org-chart { margin: 0; overflow-x: auto; }
.org-chart a { border-bottom: none !important; display: block; }
.org-chart img { display: block; width: 100%; min-width: 640px; height: auto; border: 1px solid #ece6d8; }
.org-chart figcaption { font-size: 0.9rem; color: #4a5068; margin-top: 10px; }

/* Lista de expoziții */
.expo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 32px; }
.content a.expo-card { display: flex; flex-direction: column; gap: 8px; border-bottom: none; color: var(--navy); }
.expo-card img { width: 100%; aspect-ratio: 355 / 496; object-fit: cover; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18); transition: transform 0.25s, box-shadow 0.25s; }
.expo-card:hover img { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24); }
.expo-date { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: #8a6d2c; margin-top: 6px; }
.expo-title { font-family: var(--serif); font-size: 1.3rem; font-weight: 700; line-height: 1.25; }
.expo-card:hover .expo-title { color: #8a6d2c; }

/* ===== Footer ===== */
.site-footer {
  background: var(--navy-dark);
  color: #c8ccd6;
  text-align: center;
  padding: 28px 20px;
}

.footer-links {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 0;
  margin-bottom: 14px;
}

.footer-links li + li::before {
  content: "|";
  margin: 0 16px;
  color: var(--gold);
}

.footer-links a:hover { color: var(--gold); }

.copy { font-size: 0.85rem; opacity: 0.75; }

/* ===== Ecrane mici: bara rămâne, doar se micșorează ===== */
@media (max-width: 860px) {
  .menu-link { padding: 12px 12px; font-size: 0.85rem; letter-spacing: 0.03em; }

  .hero { min-height: auto; padding: 220px 16px 40px; }
  .hero::before {
    background: linear-gradient(to top, rgba(15, 22, 40, 0.92) 0%, rgba(15, 22, 40, 0.6) 60%, rgba(15, 22, 40, 0.1) 100%);
  }
  .hero-boxes { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 560px) {
  /* Submeniul ocupă toată lățimea sub bară, ca să nu iasă din ecran */
  .menu-item { position: static; }
  .dropdown { left: 0; right: 0; min-width: 0; }
  .menu-link { padding: 12px 8px; font-size: 0.78rem; gap: 3px; }

  .footer-links { flex-direction: column; }
  .footer-links li + li::before { content: none; }
}
