/* ==========================================================================
   MATES COFFEE HOUSE - GLOBAL STYLES
   ========================================================================== */

/* ── 1. BASE & RESET ── */
html { 
  scroll-behavior: smooth; 
}

body {
  background-color: white;
  font-family: 'DM Sans', sans-serif;
  color: #2C1810;
  overflow-x: hidden !important;
  position: relative;
  max-width: 100%;
}

html {
  overflow-x: hidden;
  max-width: 100%;
}

@media (min-width: 768px) {
  body {
    padding-top: 165px;
  }
}

@media (max-width: 767px) {
  #hero-image {
    height: calc(100vh - 110px); /* 110px ≈ marquee 44px + navbar mobil ~66px */
  }
}

/* ── 2. SCROLLBAR ELEGANT ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #FAF7F2; }
::-webkit-scrollbar-thumb {
  background: #8FAF8A;
  border-radius: 10px;
  border: 2px solid #FAF7F2;
}
::-webkit-scrollbar-thumb:hover { background: #5C7A57; }
* {
  scrollbar-width: thin;
  scrollbar-color: #8FAF8A #FAF7F2;
}

/* ── 3. PRELOADER ── */
#preloader {
  position: fixed; inset: 0; z-index: 9999;
  background: white;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.8s ease;
}
#preloader img { 
  width: 190px; 
  animation: pulse-logo 1.5s ease-in-out infinite; 
}
@keyframes pulse-logo {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(0.97); }
}

/* ── 4. NAVBAR & MARQUEE (Banda Neagră) ── */
.fixed-marquee {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 44px;
  z-index: 100;
  display: flex; align-items: center;
  background-color: black;
  overflow: hidden; 
}
.marquee-container {
  display: flex;
  width: max-content;
  animation: marquee 25s linear infinite;
}
.marquee-item {
  display: flex; flex-shrink: 0;
  white-space: nowrap; padding-right: 15px;
}
@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-25%); }
}

#navbar {
  position: fixed; top: 44px !important; left: 0; right: 0;
  z-index: 50;
  background: white; margin: 0 !important;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  transition: background 0.4s ease, box-shadow 0.4s ease;
}
#navbar.nav-scrolled {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 24px rgba(44,24,16,0.07);
}

.bg-black.fixed {
  height: 36px; display: flex; align-items: center;
}

/* ── 5. ANIMATIONS (Reveal, Stagger, Hero) ── */
.reveal {
  opacity: 0; transform: translateY(32px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}
.reveal.fade-left  { transform: translateX(-32px); }
.reveal.fade-right { transform: translateX(32px); }
.reveal.revealed   { opacity: 1; transform: translate(0,0); }

.stagger-child {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.stagger-child.revealed { opacity: 1; transform: translateY(0); }

.hero-entrance {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.hero-entrance.entered { opacity: 1; transform: translateY(0); }

/* ── 6. SWAYING LEAVES ── */
.leaves-panel {
  position: fixed; top: 0; height: 100vh;
  width: 120px; z-index: 10; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.leaves-panel.left  { left: 0; }
.leaves-panel.right { right: 0; }
.leaf-left { 
  animation: sway-left 4s ease-in-out infinite alternate; 
  transform-origin: bottom center; will-change: transform; 
}
.leaf-right { 
  animation: sway-right 4s ease-in-out infinite alternate; 
  transform-origin: bottom center; will-change: transform; 
}
@keyframes sway-left  { 0% { transform: rotate(-6deg); } 100% { transform: rotate(4deg); } }
@keyframes sway-right { 0% { transform: rotate(6deg); } 100% { transform: rotate(-4deg); } }

@media (max-width: 1024px) { 
  .leaves-panel { display: none; } 
}

/* ── 7. UI COMPONENTS (Forms, Map, Dividers) ── */
section {
  margin: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.divider { 
  width: 48px; height: 1.5px; 
  background: #5E8261; margin: 0 auto; 
}

.about-img { 
  object-fit: cover; width: 100%; height: 100%; display: block; 
}

/* Culoarea Sage pe Formular cum ai cerut */
.form-input {
  background: transparent; border: none;
  border-bottom: 1.5px solid #5E8261; padding: 10px 0; width: 100%;
  font-family: 'DM Sans', sans-serif; color: #5E8261; font-size: 0.9rem;
  outline: none; transition: border-color 0.3s ease;
}
.form-input:focus { border-color: #5E8261; }
.form-input::placeholder { color: #5E8261; }

.map-frame { 
  border: none; width: 100%; height: 380px; border-radius: 4px; 
}


/* ==========================================================================
   PAGE SPECIFIC STYLES
   ========================================================================== */

/* ── INDEX.HTML ── */
#hero-image {
  width: 100%;
  height: calc(100vh - 165px); /* 165px = 44px marquee + ~121px navbar desktop */
  overflow: hidden;
  display: block;
  margin: 0 !important;
  padding: 0 !important;
}

#hero-image video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transform: scale(1.08) translateX(-3%);
}

/* ── WORKSHOP.HTML ── */
.process-step-line { 
  position: absolute; left: 20px; top: 40px; bottom: -40px; 
  width: 1px; background: #C4D9C0; 
}

#contact {
  padding-bottom: 48px !important;
}

/* ── PRODUCTS.HTML ── */
.product-card {
  background: white; 
  /* '0.1px' sau o opacitate mică pe negru creează acea linie foarte fină */
  border: 1px solid rgba(0, 0, 0, 0.1); 
  transition: border-color 0.3s ease, transform 0.4s ease, box-shadow 0.4s ease;
  overflow: hidden; /* Se asigură că imaginea nu depășește colțurile dacă ai rotunjire */
}

.product-card:hover {
  /* La hover, bordura devine puțin mai vizibilă sau poți folosi culoarea sage */
  border-color: rgba(0, 0, 0, 0.3); 
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.04);
}

.product-img-placeholder {
  background: white; 
  display: block;
  width: 100%;
  transition: background 0.3s ease;
  overflow: hidden;
}

.product-img-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.product-card:hover .product-img-placeholder {
  background: #C4D9C0;
}
.product-badge {
  display: inline-block; border: 1px solid #8FAF8A; color: #5C7A57;
  font-size: 0.65rem; letter-spacing: 0.15em; text-transform: uppercase; padding: 2px 8px;
}

.filter-btn {
  font-size: 0.7rem; letter-spacing: 0.15em; text-transform: uppercase;
  padding: 6px 16px; border: 1px solid #EFE9DF;
  background: transparent; cursor: pointer;
  transition: all 0.3s ease; color: #A89888;
}
.filter-btn.active, .filter-btn:hover {
  border-color: #8FAF8A; color: #2C1810; background: #FAF7F2;
}

/* ── LANGUAGE TOGGLE ── */
.lang-btn {
  color: #5E8261;
  background: transparent;
  cursor: pointer;
}
.lang-btn.active {
  background: #5E8261;
  color: white;
}

/* ── SPA PAGE TRANSITIONS ── */

.page-section {
  opacity: 1;
  will-change: opacity;
}

.hidden-page {
  display: none !important;
  opacity: 0;
}

/* ── LANGUAGE TRANSITION ── */
[data-ro], [data-en] {
  transition: opacity 0.4s ease, filter 0.4s ease, transform 0.4s ease;
  display: inline;
}
[data-ro].lang-exit, [data-en].lang-exit {
  opacity: 0;
  filter: blur(4px);
  transform: translateY(6px);
}
[data-ro].lang-enter, [data-en].lang-enter {
  opacity: 0;
  filter: blur(4px);
  transform: translateY(-6px);
}

/* ── PERFORMANCE ── */

/* GPU acceleration pe elementele animate */
#navbar,
.leaves-panel,
#page-overlay,
#preloader {
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Reduce repaints pe scroll */
#page-content {
  contain: paint;
}

/* Font rendering optimizat */
body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── REVEAL CONTACT ── */
.reveal-contact {
  cursor: pointer;
  display: inline-block;
}
.reveal-placeholder {
  font-size: 0.85rem;
  color: #5E8261;
  border-bottom: 1px dashed #5E8261;
  padding-bottom: 1px;
  transition: opacity 0.3s ease;
  font-style: italic;
}
.reveal-placeholder:hover {
  opacity: 0.7;
}
.reveal-value {
  color: inherit;
  font-size: inherit;
  text-decoration: none;
  transition: opacity 0.4s ease;
}
.reveal-value:hover {
  color: #5E8261;
}
.reveal-value.hidden {
  display: none;
}
.reveal-contact.revealed .reveal-placeholder {
  display: none;
}
.reveal-contact.revealed .reveal-value {
  display: inline;
}

/* ── Opening Hours ── */
.hours-section {
  padding: 0.5rem 0 0 0;
  max-width: 360px;
  margin: 0 auto;
  width: 100%;
}

.hours-section h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 1.5rem;
  color: #5E8261;
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
}

.hours-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 300;
  color: #2a2a2a;
  margin-bottom: 6px;
  transition: background 0.2s;
}

.hours-row .day-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: #5E8261;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.2s;
}

.hours-row .day-time {
  margin-left: auto;
  color: #5E8261;
  font-weight: 400;
}

.hours-row.active-day {
  background-color: #C4D9C0;
}

.hours-row.active-day .day-dot {
  opacity: 1;
}

/* ── COOKIE BANNER ── */
#cookie-banner {
  transform: translateZ(0);
  backface-visibility: hidden;
}