/* ========== Google Fonts ========== */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&family=Playfair+Display:wght@600;700&display=swap');

/* ========== Reset & Anti-Scroll-X ========== */
*, *::before, *::after { box-sizing: border-box; }
html, body { width: 100%; max-width: 100%; overflow-x: hidden; }
* { margin: 0; padding: 0; }
img, video, canvas, iframe { display: block; max-width: 100%; height: auto; }

/* ========== Bază ========== */
body {
  font-family: 'Nunito', sans-serif;
  line-height: 1.6;
  color: #fff;
  background: #000;
  transition: background 0.3s, color 0.3s;
  position: relative;font-family: IBM Plex Mono, sans-serif;
}

/* ========== Fundal: Stele + ThreeJS ========== */
#stars-canvas, #threejs-container {
  position: fixed; inset: 0;
  width: 100vw; height: 100vh; max-width: 100%;
}
#stars-canvas { z-index: -2; }
#threejs-container { z-index: -1; opacity: 0.5; }

/* ========== Layout ========== */
.container {
  width: min(1200px, 100%);
  margin-inline: auto;
  padding-inline: 16px;
}
a { color: #66b3ff; text-decoration: none; transition: color .2s; }
a:hover { color: #b3d9ff; }

.cta {
  background: #007bff; color: #fff;
  padding: 8px 14px; border: 0; border-radius: 8px;
  cursor: pointer; transition: transform .15s ease, opacity .2s ease;
}
.cta:active { transform: scale(.98); opacity: .9; }

/* ========== Header ========== */
.header {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 4px rgba(0,0,0,.12);
  padding-block: 12px;
  position: sticky; top: 0; z-index: 100;
}
.header .container {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.logo {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.1rem, 1.2rem + .5vw, 1.6rem);
  color: #fff; white-space: nowrap;
}
.menu ul {
  list-style: none; display: flex; align-items: center;
  gap: clamp(10px, 2vw, 24px); flex-wrap: wrap;
}
.menu a { color: #fff; }
.actions input[type="checkbox"]{ margin:0 6px 0 12px; }
.actions label{ color:#fff; margin-right:10px; }

.actions { display: flex; align-items: center; gap: 10px; }
.dark-mode-toggle { accent-color: #66b3ff; }
.hamburger { display: none; cursor: pointer; font-size: 1.6rem; color: #fff; line-height: 1; }

/* ========== Hero ========== */
.hero {
  min-height: 50vh; display: grid; place-items: center;
  text-align: center; color: #fff; position: relative; z-index: 1; padding: 40px 0;
}
.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 1.5rem + 3vw, 3.2rem);
  max-width: 70%; margin: 0 auto 12px;
}
.hero p {
  font-size: clamp(1rem, .9rem + .6vw, 1.2rem);
  max-width: 70%; margin: 0 auto 20px;
}

/* ========== Articole ========== */
.articles { padding-block: clamp(32px, 5vw, 60px); position: relative; z-index: 1; }
.articles h2 {
  font-family: 'Playfair Display', serif;
  text-align: center; color: #fff;
  font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.2rem);
  max-width: 70%; margin: 0 auto 26px;
}

.article-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }

.article-card {
  display: grid; grid-template-columns: 1fr; gap: 16px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px; overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
  transition: transform .25s ease;
  backdrop-filter: blur(6px);
  padding: 14px;
}
.article-card:hover { transform: translateY(-2px); }

.article-card video {
  grid-column: 1; width: 100%;
  aspect-ratio: 16 / 9; object-fit: cover; background: #111;
  border-radius: 10px;
}

.article-card h3 {
  font-family: 'Playfair Display', serif;
  color: #fff;
  font-size: clamp(1.2rem, 1rem + .8vw, 1.6rem);
  max-width: 70%; margin: 0 auto;
}
.article-card .preview {
  color: #ddd; margin-top: 8px;
  max-width: 70%; margin-inline: auto;
}
.article-card .read-buttons {
  display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px;
  max-width: 70%; margin-inline: auto;
}
.article-card .read-buttons button {
  background: #007bff; color: #fff; border: none;
  border-radius: 8px; padding: 8px 12px; cursor: pointer;
}

/* ========== Modal (pentru „Citește mai mult”) ========== */
.modal {
  display: none; position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.9); overflow-y: auto; padding: 24px 12px;
}
.modal-content {
  background: rgba(255,255,255,.1); border: 1px solid #666;
  width: min(100%, 860px); margin: 0 auto;
  color: #ddd; border-radius: 12px; backdrop-filter: blur(10px);
  padding: clamp(16px, 3vw, 24px);
}
.modal-content h2 {
  font-family: 'Playfair Display', serif;
  max-width: 70%; margin: 0 auto 16px; text-align: center;
}
.modal-content p { white-space: pre-wrap; }
.close {
  color: #ddd; float: right; font-size: 28px; font-weight: 700;
  line-height: 1; cursor: pointer; margin-left: 8px;
}
.close:hover, .close:focus { color: #fff; }
.modal-content button {
  margin-top: 16px; display: inline-block;
  background: #007bff; color: #fff; border: none; border-radius: 8px; padding: 8px 12px; cursor: pointer;
}

/* ========== Resurse, Retreats, Comunitate ========== */
.resources, .retreats, .community { padding-block: clamp(32px, 5vw, 60px); }
.resources h2, .retreats h2, .community h2 {
  font-family: 'Playfair Display', serif; max-width: 70%; margin: 0 auto 26px; text-align: center;
}

.resource-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.resource-card {
  background: rgba(255,255,255,.08); border-radius: 12px;
  overflow: hidden; box-shadow: 0 4px 16px rgba(0,0,0,.25);
  backdrop-filter: blur(6px); padding: 14px;
}
.resource-card iframe, .resource-card video { width: 100%; aspect-ratio: 16/9; border-radius: 10px; background:#111; }
.resource-card h3 { font-family: 'Playfair Display', serif; margin-top: 10px; }
.resource-card p { color: #ddd; margin-top: 6px; }
.resource-card a {
  margin-top: 10px; text-align: center; display: block;
  background: #007bff; color: #fff; padding: 8px 12px; border-radius: 8px;
}

/* ========== Footer ========== */
.footer {
  background: rgba(0,0,0,.7); color: #fff; text-align: center;
  padding: 22px 0; position: relative; z-index: 1;
}
.footer ul { list-style: none; display: flex; gap: 12px; justify-content: center; margin-top: 10px; }

/* ========== Dark Mode ========== */
body.dark-mode { background: #000; color: #ddd; }
body.dark-mode .header, body.dark-mode .article-card { background: rgba(30,30,30,.7); }
body.dark-mode .logo, body.dark-mode a { color: #ddd; }
body.dark-mode .footer { background: rgba(0,0,0,.7); }

/* ========== Responsive Breakpoints ========== */
@media (min-width: 768px) {
  .article-card { grid-template-columns: 1fr 1fr; align-items: start; }
  .article-card video { grid-column: 1; grid-row: 1 / span 3; }
  .article-card h3, .article-card .preview, .article-card .read-buttons {
    grid-column: 2; max-width: 100%; margin-inline: 0;
  }
  .resource-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .resource-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .menu ul {
    display: none; position: absolute; left: 0; right: 0; top: calc(100% + 6px);
    padding: 12px 16px; background: rgba(0,0,0,.9); backdrop-filter: blur(6px);
    flex-direction: column; gap: 12px;
  }
  .menu ul.active { display: flex; }
  .hamburger { display: block; }
}

/* =========================================================
   BARBIE MODE (activezi cu body.barbie-mode)
========================================================= */
body.barbie-mode {
  background: radial-gradient(1200px 700px at 20% 0%, #ffd6ec 0%, #ffb3dd 35%, #ff8ecb 65%, #ff74bf 85%, #ff5ab3 100%);
  color: #2c1338;
}
body.barbie-mode a { color: #8b2b7e; }
body.barbie-mode a:hover { color: #b43aa7; }

body.barbie-mode .header {
  background: rgba(255, 182, 218, 0.6);
  box-shadow: 0 8px 24px rgba(255, 90, 179, 0.25);
}
body.barbie-mode .logo { color: #2c1338; }

body.barbie-mode .article-card,
body.barbie-mode .resource-card,
body.barbie-mode .modal-content {
  background: rgba(255, 255, 255, 0.55);
  color: #2c1338;
  border: 1px solid rgba(255, 90, 179, 0.25);
  box-shadow: 0 12px 28px rgba(255, 90, 179, 0.25);
}
body.barbie-mode .article-card h3,
body.barbie-mode .modal-content h2,
body.barbie-mode .resources h2,
body.barbie-mode .retreats h2,
body.barbie-mode .community h2 { color: #2c1338; }

body.barbie-mode .cta,
body.barbie-mode .article-card .read-buttons button,
body.barbie-mode .resource-card a,
body.barbie-mode .modal-content button {
  background: linear-gradient(90deg, #ff5ab3 0%, #ff7ec6 50%, #ffa3d8 100%);
  color: #fff; border: none;
  box-shadow: 0 8px 18px rgba(255, 90, 179, 0.35);
}
body.barbie-mode .cta:hover,
body.barbie-mode .article-card .read-buttons button:hover,
body.barbie-mode .resource-card a:hover,
body.barbie-mode .modal-content button:hover {
  filter: brightness(1.05);
}

body.barbie-mode .footer {
  background: rgba(255, 182, 218, 0.5);
  color: #2c1338;
}

/* Accente suplimentare */
body.barbie-mode .menu a { color: #2c1338; }
body.barbie-mode .close { color: #2c1338; }
body.barbie-mode .close:hover { color: #8b2b7e; }

/* Videouri pe fundal întunecat pentru contrast */
body.barbie-mode .article-card video,
body.barbie-mode .resource-card video,
body.barbie-mode .resource-card iframe { background: #2c1338; }
/* ====== Alternare poziție video/text în articole (FĂRĂ modificări HTML) ====== */
.articles .article-grid .article-card{
  display:grid;
  grid-template-columns: 1fr 1fr;   /* video jumătate de pagină, text jumătate */
  align-items:center;
  gap:24px;
}

/* Dimensiuni video (ignoră atributele width din HTML) */
.articles .article-card video{
  width:100% !important;
  height:auto;
  display:block;
  aspect-ratio:16/9;
  object-fit:cover;
  border-radius:8px;
}

/* Dacă ai un wrapper .media, tratează-l ca pe video */
.articles .article-card .media{ width:100%; }
.articles .article-card .media video{
  width:100% !important;
  height:auto;
  aspect-ratio:16/9;
  object-fit:cover;
  display:block;
  border-radius:8px;
}

/* ODD (1,3,5...) — video în stânga, text în dreapta */
.articles .article-card:nth-child(odd) video,
.articles .article-card:nth-child(odd) .media{
  grid-column:1;
}
.articles .article-card:nth-child(odd) h3,
.articles .article-card:nth-child(odd) .preview,
.articles .article-card:nth-child(odd) .read-buttons{
  grid-column:2;
}

/* EVEN (2,4,6...) — video în dreapta, text în stânga */
.articles .article-card:nth-child(even) video,
.articles .article-card:nth-child(even) .media{
  grid-column:2;
}
.articles .article-card:nth-child(even) h3,
.articles .article-card:nth-child(even) .preview,
.articles .article-card:nth-child(even) .read-buttons{
  grid-column:1;
}

/* Prevenim derularea orizontală și asigurăm responsive pe mobil */
html, body{ overflow-x:hidden; }
@media (max-width: 900px){
  .articles .article-grid .article-card{
    grid-template-columns: 1fr;     /* stivă pe o coloană */
  }
  .articles .article-card video,
  .articles .article-card .media,
  .articles .article-card h3,
  .articles .article-card .preview,
  .articles .article-card .read-buttons{
    grid-column:1 !important;       /* totul pe 1 coloană */
  }
  .articles .article-card{ gap:16px; }
}

/* Mic polish vizual (opțional, nu schimbă layoutul existent) */
.articles .article-card h3{ line-height:1.25; }
.articles .article-card .read-buttons button{ white-space:nowrap; }
/* Modal Retreat */
.modal {
  display: none; 
  position: fixed; 
  z-index: 2000; 
  left: 0; 
  top: 0; 
  width: 100%; 
  height: 100%; 
  background: rgba(0,0,0,0.6); 
  overflow: auto;
}

.modal-content {
  background: #fff; 
  margin: 8% auto; 
  padding: 20px; 
  border-radius: 12px;
  width: 80%; 
  max-width: 700px; 
  color: black;
  font-family: 'IBM Plex Mono', sans-serif;
  line-height: 1.6;
}

.modal .close {
  float: right; 
  font-size: 24px; 
  cursor: pointer;
  color: #333;
}

.modal .close:hover {
  color: crimson;
}