:root {
  --bg: #ffffff;
  --bg-elevated: #f5f5f3;
  --text: #1a1a1a;
  --text-muted: #6b6b6b;
  --border: #e5e5e2;
  --accent: #1a1a1a;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  /* plasa de siguranta - pagina nu trebuie sa poata face scroll orizontal,
     indiferent ce element ar "scapa" din vreun motiv (poza, nav, etc.) */
  overflow-x: hidden;
  max-width: 100vw;
}

/* footer "lipicios" de josul ecranului - pe pagini cu putin continut (ex.
   Contact), footer-ul ramane jos de tot, la fel ca pe paginile mai lungi,
   in loc sa ramana plutind la mijlocul ecranului */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  color: inherit;
}

/* --- nav --- */

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.nav-group {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.wordmark {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--text);
}

.nav-links {
  display: flex;
  gap: 1.6rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a.active {
  color: var(--text);
  font-weight: 600;
}

.lang-switcher {
  position: relative;
  border-left: 1px solid var(--border);
  padding-left: 0.9rem;
}

@media (max-width: 600px) {
  .site-nav {
    justify-content: center;
    padding: 0.8rem;
    gap: 0.35rem;
  }
  .nav-group {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.3rem 0.7rem;
  }
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.3rem 0.9rem;
  }
  .lang-switcher {
    border-left: none;
    padding-left: 0;
  }
  .nav-group {
    width: 100%;
  }
  .nav-links {
    width: 100%;
    min-width: 0;
  }
}

.lang-current {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 0.2rem 0.35rem;
  border-radius: 3px;
}

.lang-current:hover {
  color: var(--text);
}

.lang-current .flag {
  font-size: 1.05rem;
  line-height: 1;
}

.lang-current .caret {
  font-size: 0.6rem;
  margin-left: 0.1rem;
  opacity: 0.6;
}

.lang-menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  list-style: none;
  padding: 0.3rem;
  margin: 0;
  min-width: 150px;
  z-index: 20;
}

.lang-menu li {
  margin: 0;
}

.lang-menu button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: 0.88rem;
  color: var(--text);
  padding: 0.4rem 0.5rem;
  border-radius: 4px;
}

.lang-menu button .flag {
  font-size: 1.05rem;
}

.lang-menu button:hover {
  background: var(--border);
}

.lang-menu button.active {
  font-weight: 700;
}

/* --- page title --- */

.page-title {
  text-align: center;
  padding: 2.6rem 1rem 1.4rem;
}

.page-title h1 {
  margin: 0 0 0.9rem;
  font-size: 1.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.page-title h1::after {
  content: "";
  display: block;
  width: 100%;
  max-width: 900px;
  margin: 1rem auto 0;
  border-bottom: 1px solid var(--border);
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0;
}

/* --- filters (linkuri text, stil editorial) --- */

.filters {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.3rem;
  padding: 0.9rem 1rem;
  margin-bottom: 1.5rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.filter-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.2rem 0.05rem;
  border-bottom: 2px solid transparent;
}

.filter-btn:hover {
  color: var(--text);
}

.filter-btn.active {
  color: var(--text);
  font-weight: 600;
  border-bottom-color: var(--accent);
}

.filter-count {
  opacity: 0.6;
  font-size: 0.85em;
  margin-left: 0.25em;
}

.tag-filter-bar {
  display: flex;
  justify-content: center;
  margin: -0.8rem 0 1.8rem;
}

.tag-filter-bar[hidden] {
  display: none;
}

.tag-filter-bar select {
  padding: 0.4rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
}

/* --- gallery: mozaic, aspect ratio natural --- */

.gallery {
  column-count: 3;
  column-gap: 0.7rem;
  padding: 0 1.2rem 3rem;
  max-width: 1700px;
  margin: 0 auto;
}

@media (max-width: 1000px) {
  .gallery { column-count: 2; }
}

@media (max-width: 560px) {
  .gallery { column-count: 1; }
}

.gallery-item {
  display: block;
  break-inside: avoid;
  margin-bottom: 0.7rem;
  cursor: pointer;
  overflow: hidden;
  border-radius: 4px;
  background: var(--bg-elevated);
}

.gallery-item img {
  width: 100%;
  display: block;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.4s ease;
}

.gallery-item img.loaded {
  opacity: 1;
}

.gallery-item:hover img {
  transform: scale(1.015);
}

.gallery-item.hidden {
  display: none;
}

/* --- portfolio: 4 categorii-coperta, mari, o poza pe rand ---
   click pe coperta deschide colectia Featured a categoriei, in lightbox */

.portfolio {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
}

.portfolio-item {
  margin: 0;
  cursor: pointer;
}

.portfolio-item img {
  width: 100%;
  display: block;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.4s ease;
  box-shadow: 0 20px 60px rgba(0,0,0,0.1);
}

.portfolio-item img.loaded {
  opacity: 1;
}

.portfolio-caption {
  margin-top: 0.9rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.portfolio-item:hover img {
  transform: scale(1.03);
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 3rem 1rem;
}

/* --- lightbox (acelasi fundal light ca restul galeriei) --- */

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.97);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 4px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

.lightbox-close {
  position: absolute;
  top: 1.2rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--text);
  font-size: 2.2rem;
  cursor: pointer;
  line-height: 1;
  transition: opacity 0.3s ease;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 2.4rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  cursor: pointer;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  transition: opacity 0.3s ease;
}

/* in timpul slideshow-ului, sagetile si butonul de play/pauza dispar -
   imaginea ramane curata. Reapar cat timp misti mausul (vezi .show-controls) */
.lightbox.slideshow-playing .lightbox-nav,
.lightbox.slideshow-playing .lightbox-play,
.lightbox.slideshow-playing .lightbox-close {
  opacity: 0;
  pointer-events: none;
}

.lightbox.slideshow-playing.show-controls .lightbox-nav,
.lightbox.slideshow-playing.show-controls .lightbox-play,
.lightbox.slideshow-playing.show-controls .lightbox-close {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-nav:hover {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

@media (max-width: 700px) {
  .lightbox-nav { width: 2.4rem; height: 2.4rem; font-size: 1.8rem; }
  .lightbox-prev { left: 0.4rem; }
  .lightbox-next { right: 0.4rem; }
}

.lightbox-play {
  position: absolute;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  cursor: pointer;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  transition: opacity 0.3s ease;
}

.lightbox-play:hover {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

.rotate-hint {
  display: none;
}

@media (max-width: 700px) and (orientation: portrait) {
  .lightbox.slideshow-playing .rotate-hint {
    display: block;
    position: absolute;
    top: 1.2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(26, 26, 26, 0.85);
    color: #fff;
    font-size: 0.82rem;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    text-align: center;
    max-width: 85%;
    z-index: 10;
  }
}

.slideshow-start-bar {
  display: flex;
  justify-content: center;
  margin: 0 0 1.8rem;
}

.slideshow-start-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.4rem 1.1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
}

.slideshow-start-btn:hover {
  color: var(--text);
  border-color: var(--text);
}

/* --- home --- */

/* poza ramane fixa in viewport cat timp pagina se scroleaza - continutul de
   dedesubt (home-intro, cu fundal opac) culiseaza peste ea, acoperind-o
   treptat. Poza nu mai trebuie taiata "din cap in picioare" ca sa umple orice
   raport lat/scund de ecran, pentru ca acum are voie sa fie intreaga inaltime
   a viewport-ului (100vh), nu doar o banda de sus. */
.home-hero {
  height: 100vh;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

/* poza sursa are raport 3:2 (mai lata decat inalta). Pe ecrane de desktop
   (mai late decat acest raport) trebuie taiat din sus/jos ca sa umple 100vh -
   mutam punctul de crop putin spre partea de sus a pozei (unde e capul),
   calibrat ca la orice rezolutie sa ramana vizibile atat capul cat si
   picioarele pasarii. */
@media (min-aspect-ratio: 3/2) {
  .home-hero {
    background-position: center 35%;
  }
}

/* pe mobil (portret, ingust), efectul de parallax pe toata inaltimea
   ecranului (100vh) taie prea mult din poza (ciocul/capul) - revenim la
   forma originala: o banda mai scunda, sus de tot, ca inainte de parallax. */
@media (max-width: 899px) {
  .home-hero {
    height: min(78vh, calc(100vw / 1.5));
    background-attachment: scroll;
    background-position: center;
  }
}

.home-intro {
  max-width: 640px;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
  z-index: 1;
  padding: 3rem 1.5rem 4rem;
  text-align: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  margin: 0 0 0.8rem;
}

.home-intro h1 {
  font-size: 1.6rem;
  font-weight: 800;
  margin: 0 0 1.2rem;
  letter-spacing: 0.01em;
}

.home-intro p {
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0 0 2rem;
}

.cta-button {
  display: inline-block;
  border: 1px solid var(--text);
  color: var(--text);
  text-decoration: none;
  padding: 0.7rem 1.6rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 999px;
}

.cta-button:hover {
  background: var(--text);
  color: #fff;
}

/* --- about / contact --- */

.about-content, .contact-content {
  max-width: 700px;
  margin: 0 auto;
  padding: 1rem 1.5rem 4rem;
  text-align: center;
}

.placeholder-note {
  color: var(--text-muted);
  font-style: italic;
}

.about-content p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
  text-align: left;
}

.about-photo {
  width: 100%;
  margin-top: 2.5rem;
  border-radius: 4px;
  display: block;
}

.contact-content p {
  font-size: 1rem;
  line-height: 1.7;
}

.contact-content a {
  color: var(--text);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.6rem;
  margin-top: 2rem;
  font-weight: 600;
}

.social-links a {
  text-decoration: none;
  border-bottom: 2px solid var(--border);
  padding-bottom: 2px;
}

.social-links a:hover {
  border-bottom-color: var(--accent);
}

/* --- subscribe (newsletter, Buttondown) --- */

.subscribe-block {
  margin-top: 2rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.subscribe-title {
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 0.4rem;
}

.subscribe-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0 0 1.2rem;
}

.subscribe-form {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.subscribe-form input[type="email"] {
  padding: 0.65rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.9rem;
  font-family: inherit;
  min-width: 240px;
  background: var(--bg-elevated);
  color: var(--text);
}

.subscribe-form button {
  padding: 0.65rem 1.4rem;
  border: none;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}

.subscribe-form button:hover {
  opacity: 0.85;
}

.subscribe-thanks[hidden] {
  display: none;
}

.subscribe-thanks {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  display: inline-block;
  padding: 0.65rem 1.4rem;
  margin: 0;
}

.subscribe-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.subscribe-error[hidden] {
  display: none;
}

.subscribe-error {
  font-size: 0.85rem;
  color: #b3261e;
  margin: 0.8rem 0 0;
}

.subscribe-unsub {
  margin: 0.9rem 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.subscribe-unsub-link {
  color: var(--text-muted);
  text-decoration: underline;
}

.subscribe-unsub-link:hover {
  color: var(--text);
}

/* --- buton "inapoi sus" --- */

.scroll-top-btn {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  z-index: 60;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(26, 26, 26, 0.5);
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.15s ease;
}

.scroll-top-btn.visible {
  opacity: 0.5;
  pointer-events: auto;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  opacity: 0.9;
  background: rgba(26, 26, 26, 0.75);
}

@media (max-width: 700px) {
  .scroll-top-btn {
    right: 0.8rem;
    bottom: 0.8rem;
    width: 2.4rem;
    height: 2.4rem;
    font-size: 1.1rem;
  }
}

/* --- footer --- */

.site-footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
  padding: 2rem 1rem 3rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.admin-unlock-link {
  color: inherit;
  text-decoration: none;
}

/* zona in care ajung Blog + selectorul de limba pe mobil (mutate din navbar
   prin JS - vezi js/mobile-nav.js), ca navbarul sa ramana neaglomerat */
.footer-mobile-extras {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.footer-mobile-extras > a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
}

.footer-mobile-extras .lang-switcher {
  border-left: 1px solid var(--border);
  padding-left: 1rem;
}

.footer-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 2px;
}

.footer-link:hover {
  text-decoration-color: var(--text-muted);
}

.legal-content {
  max-width: 700px;
  margin: 0 auto;
  padding: 1rem 1.5rem 4rem;
  text-align: left;
  color: var(--text);
  line-height: 1.7;
}

.legal-content h2 {
  font-size: 1.4rem;
  margin-top: 2.5rem;
  margin-bottom: 0.8rem;
}

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

.legal-content h3 {
  font-size: 1.05rem;
  margin-top: 1.6rem;
  margin-bottom: 0.4rem;
}

.legal-content p {
  margin-bottom: 1rem;
  color: var(--text);
}

.legal-content a {
  color: var(--text);
}

.legal-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

.admin-unlock-link.unlocked {
  color: var(--accent, #b8860b);
}
