/* ============================================
   Elena_Lash — style.css
   Fonts: Playfair Display (serif) + Nunito (sans)
   ============================================ */

:root {
  --rose:  #B77C76;
  --gold:  #FCE194;
  --white: #FFFFFF;
  --dark:  #1F1F1D;
  --cream: #fdf8f7;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Nunito', 'Helvetica Neue', Arial, sans-serif;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font-body); color: var(--dark); line-height: 1.65; background: var(--white); }
img  { display: block; max-width: 100%; }
a    { color: inherit; }

/* ── Headings ── */
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.25; }

/* ── Container ── */
.container { width: 92%; max-width: 1200px; margin: 0 auto; }

/* ── Sections ── */
section { padding: 72px 0; }

/* ── Section title ── */
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: var(--rose);
  text-align: center;
  margin-bottom: 40px;
  letter-spacing: 0.02em;
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  padding: 13px 28px;
  min-height: 44px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s;
}
.btn--primary { background: var(--gold); color: var(--dark); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.12); }
.btn--primary:active { transform: translateY(0); }
.btn--large { padding: 16px 48px; font-size: 0.95rem; }

/* ── Reveal animation ── */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.65s ease, transform 0.65s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ============================================
   Scroll-to-top button (floating, left)
   ============================================ */
#scroll-top {
  position: fixed;
  bottom: 28px;
  left: 20px;
  z-index: 500;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--dark);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
#scroll-top.visible { opacity: 1; pointer-events: auto; }

/* ============================================
   Header & Nav
   ============================================ */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(31, 31, 29, 0.97);
  backdrop-filter: blur(8px);
}

#main-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  height: 62px;
  position: relative;
}

/* Logo */
.nav__logo { display: flex; align-items: center; text-decoration: none; }
.nav__logo-img { height: 80px; width: auto; object-fit: contain; }

/* Nav list */
.nav__list { display: none; list-style: none; gap: 22px; align-items: center; }
.nav__list a {
  color: var(--white);
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  font-weight: 600;
  transition: color 0.2s;
}
.nav__list a:hover { color: var(--gold); }

/* CTA in nav */
.nav__cta {
  background: var(--gold) !important;
  color: var(--dark) !important;
  padding: 7px 18px;
  border-radius: 5px;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  transition: opacity 0.2s !important;
}
.nav__cta:hover { opacity: 0.82 !important; color: var(--dark) !important; }

/* Burger */
.burger {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  width: 44px; height: 44px; background: none; border: none; cursor: pointer; gap: 5px;
}
.burger::before, .burger::after, .burger span {
  content: ''; display: block; width: 24px; height: 2px;
  background: var(--white); border-radius: 2px; transition: transform 0.3s, opacity 0.3s;
}

/* Mobile open */
#main-nav.nav--open .nav__list {
  display: flex; flex-direction: column; position: absolute;
  top: 62px; left: 0; right: 0;
  background: rgba(31,31,29,0.98);
  padding: 16px 5%; gap: 0;
}
#main-nav.nav--open .nav__list li { border-bottom: 1px solid rgba(255,255,255,0.07); }
#main-nav.nav--open .nav__list a { display: block; padding: 13px 0; font-size: 0.9rem; }

@media (min-width: 768px) {
  .nav__list { display: flex; }
  .burger { display: none; }
}

/* ============================================
   Hero
   ============================================ */
#hero { padding: 0; }
.hero__bg {
  background-image: url('hero-bg.jpg');
  background-size: cover;
  background-position: center center;
  background-color: var(--rose);
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  position: relative;
}
.hero__cta-wrap {
  position: relative;
  z-index: 1;
  padding: 0 6% 9rem;
  width: 100%;
  display: flex;
  justify-content: center;
}
.btn--hero {
  font-size: 1rem;
  padding: 16px 44px;
  letter-spacing: 0.12em;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

/* Mobile hero: use background-position top so face/design is visible */
@media (max-width: 767px) {
  .hero__bg {
    background-position: center top;
    background-size: cover;
    background-repeat: no-repeat;
    min-height: 35vh;
  }
  .hero__cta-wrap {
    padding: 0 6% 3rem;
  }
  .btn--hero {
    font-size: 0.8rem;
    padding: 12px 18px;
  }
}

/* ============================================
   About
   ============================================ */
#about { background: var(--cream); }

.about__inner {
  display: flex;
  align-items: stretch;
  gap: 48px;
}
.about__photo {
  flex: 0 0 40%;
  max-width: 420px;
}
.about__photo img {
  width: 100%;
  height: 100%;
  max-height: 540px;
  object-fit: cover;
  object-position: center top;
  border-radius: 12px;
}
.about__text { flex: 1; display: flex; align-items: center; }

/* Marble card */
.about__card {
  background-image: url('mramor.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 14px;
  padding: 36px 32px;
  position: relative;
  overflow: hidden;
}
.about__card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.78);
  border-radius: 14px;
}
.about__card > * { position: relative; z-index: 1; }
.about__card h2 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  color: var(--dark);
  margin-bottom: 16px;
}
.about__card p {
  color: var(--dark);
  font-size: 0.95rem;
  margin-bottom: 14px;
  line-height: 1.7;
}
.about__card .btn { margin-top: 8px; }

/* Social links */
.about__social, .contacts__social { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.social-link {
  display: inline-flex; align-items: center; gap: 9px;
  color: var(--dark); text-decoration: none; font-weight: 600; font-size: 0.9rem;
  transition: color 0.2s;
}
.social-link i { color: var(--rose); font-size: 1.1rem; }
.social-link:hover { color: var(--rose); }

@media (max-width: 767px) {
  .about__inner { flex-direction: column; gap: 24px; }
  .about__photo { flex: none; max-width: 100%; }
  .about__photo img { max-height: 320px; }
  .about__card { padding: 24px 20px; }
}

/* ============================================
   Services
   ============================================ */
#services { background: var(--white); }
.services__subtitle {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--rose);
  margin: 0 0 20px;
}
.services__cta {
  margin: 20px 0 40px;
  text-align: center;
}
.services__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}
@media (min-width: 480px) { .services__grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .services__grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); } }

.service-card {
  border-radius: 10px;
  overflow: hidden;
  background: var(--rose);
  position: relative;
}
.service-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

/* Overlay CTA button on hover */
.service-card__cta {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 14, 14, 0.55);
  border-radius: 10px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.25s ease;
  /* inner pill */
  padding: 0;
}
.service-card__cta::after {
  content: 'ЗАПИСАТЬСЯ';
  background: var(--gold);
  color: var(--dark);
  padding: 10px 22px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  pointer-events: none;
}
/* Hide the link text (it's in ::after) */
.service-card__cta {
  font-size: 0;
}
.service-card:hover .service-card__cta,
.service-card:focus-within .service-card__cta {
  opacity: 1;
}

/* Touch devices — show overlay on tap (handled via :focus-within) */
@media (hover: none) {
  .service-card__cta { opacity: 0; }
  .service-card:active .service-card__cta { opacity: 1; }
}

/* ============================================
   Portfolio — Masonry
   ============================================ */
#portfolio { background: var(--cream); }

.masonry {
  columns: 2;
  column-gap: 12px;
}
@media (min-width: 600px) { .masonry { columns: 3; } }
@media (min-width: 900px) { .masonry { columns: 4; } }

.masonry img {
  width: 100%;
  margin-bottom: 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s ease, opacity 0.3s;
  break-inside: avoid;
}
.masonry img:hover { transform: scale(1.02); opacity: 0.92; }

/* ── Lightbox ── */
#lightbox { display:none; position:fixed; inset:0; z-index:1000; align-items:center; justify-content:center; }
#lightbox.lb-open { display:flex; }
.lb-overlay { position:absolute; inset:0; background:rgba(0,0,0,0.88); }
.lb-img { position:relative; z-index:1; max-width:92vw; max-height:88vh; object-fit:contain; border-radius:6px; }
#lightbox button {
  position:absolute; z-index:2;
  background:rgba(255,255,255,0.12); border:none; color:#fff;
  font-size:1.2rem; width:48px; height:48px; border-radius:50%;
  cursor:pointer; transition:background 0.2s; display:flex; align-items:center; justify-content:center;
}
#lightbox button:hover { background:rgba(255,255,255,0.28); }
.lb-prev { left:14px; top:50%; transform:translateY(-50%); }
.lb-next { right:14px; top:50%; transform:translateY(-50%); }
.lb-close { top:14px; right:14px; }

/* ============================================
   Reviews
   ============================================ */
#reviews { background: var(--white); }

.reviews__rating { margin-bottom: 24px; }

.reviews__track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  gap: 20px;
  padding-bottom: 8px;
}

.review-card {
  flex: 0 0 82%;
  scroll-snap-align: start;
  background: var(--cream);
  border: 1px solid rgba(183,124,118,0.2);
  border-radius: 12px;
  padding: 20px 22px;
}

.review-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}
.review-card__meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.review-card__author { font-weight: 700; color: var(--rose); font-size: 0.95rem; }
.review-card__date   { font-size: 0.8rem; color: #999; }
.review-card__stars  { color: var(--gold); font-size: 1.1rem; letter-spacing: 2px; flex-shrink: 0; }
.review-card__text   { font-size: 0.9rem; line-height: 1.7; color: var(--dark); }

.reviews__more {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: #777;
  text-align: center;
}
.reviews__more a { color: var(--rose); font-weight: 600; text-decoration: underline; }
.reviews__more a:hover { color: var(--dark); }
.reviews__more iframe { flex-shrink: 0; }

@media (min-width: 768px) {
  .reviews__track {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    overflow-x: visible;
  }
  .review-card { flex: none; }
}

/* ============================================
   Contacts
   ============================================ */
#contacts { background: var(--cream); }

.contacts__inner {
  display: flex;
  flex-direction: column;
  gap: 36px;
}
@media (min-width: 768px) {
  .contacts__inner { flex-direction: row; align-items: flex-start; }
  .contacts__info { flex: 0 0 42%; }
  .contacts__map { flex: 1; }
}

/* Info list */
.contacts__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 28px;
}
.contacts__list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.95rem;
  line-height: 1.5;
}
.contacts__list li i {
  color: var(--rose);
  font-size: 1rem;
  margin-top: 2px;
  flex-shrink: 0;
  width: 18px;
  text-align: center;
}
.contacts__list a {
  color: var(--dark);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}
.contacts__list a:hover { color: var(--rose); }

/* Booking block inside contacts */
.contacts__booking {
  border-top: 1px solid rgba(183,124,118,0.25);
  padding-top: 20px;
}
.contacts__booking p {
  font-size: 0.88rem;
  color: #666;
  margin-bottom: 14px;
}

/* Map */
.contacts__map iframe {
  width: 100%;
  min-height: 300px;
  border-radius: 10px;
  display: block;
}
@media (min-width: 768px) {
  .contacts__map iframe { min-height: 420px; }
}

/* ============================================
   Footer
   ============================================ */
footer {
  background: var(--dark);
  color: rgba(255,255,255,0.55);
  padding: 20px 0;
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.82rem;
}
.footer__copy { color: rgba(255,255,255,0.4); }
.footer__tagline { text-align: right; color: rgba(255,255,255,0.55); }

@media (max-width: 480px) {
  .footer__inner { flex-direction: column; text-align: center; }
  .footer__tagline { text-align: center; }
}
