/*
Theme Name:   Studio Child Theme
Description:  Child theme dla Studio Rezerwacje — minimalistyczny, czytelny
Author:       Studio
Template:     generatepress
Version:      1.2.1
*/

/* ============================================================
   ZMIENNE / DESIGN TOKENS
   ============================================================ */
/* Paleta: slate (neutralne) + indygo (akcent). Spójna w jasnym i ciemnym. */
:root {
  --studio-primary: #6366F1;         /* akcent — wypełnienia, przyciski */
  --studio-primary-hover: #4F46E5;
  --studio-on-primary: #FFFFFF;      /* tekst na przycisku */
  --studio-accent: #4F46E5;          /* akcent tekstowy — linki, etykiety */
  --studio-ink: #0F172A;             /* nagłówki */
  --studio-text: #334155;            /* tekst body */
  --studio-muted: #64748B;           /* tekst drugorzędny */
  --studio-line: #E2E8F0;            /* obramowania */
  --studio-bg: #FFFFFF;              /* tło strony */
  --studio-bg-soft: #F8FAFC;         /* delikatne tło sekcji */
  --studio-surface: #FFFFFF;         /* karty, pola */
  --studio-radius: 12px;
  --studio-radius-sm: 8px;
  --studio-maxw: 1080px;
  --studio-gap: 24px;
  color-scheme: light;
}

/* Ciemny motyw — automatyczny (system) gdy brak jawnego wyboru „light" */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --studio-primary: #6366F1;
    --studio-primary-hover: #818CF8;
    --studio-on-primary: #FFFFFF;
    --studio-accent: #A5B4FC;
    --studio-ink: #F1F5F9;
    --studio-text: #CBD5E1;
    --studio-muted: #94A3B8;
    --studio-line: #334155;
    --studio-bg: #0F172A;
    --studio-bg-soft: #172033;
    --studio-surface: #1E293B;
    color-scheme: dark;
  }
}
/* Ciemny motyw — jawny wybór (przełącznik) */
:root[data-theme="dark"] {
  --studio-primary: #6366F1;
  --studio-primary-hover: #818CF8;
  --studio-on-primary: #FFFFFF;
  --studio-accent: #A5B4FC;
  --studio-ink: #F1F5F9;
  --studio-text: #CBD5E1;
  --studio-muted: #94A3B8;
  --studio-line: #334155;
  --studio-bg: #0F172A;
  --studio-bg-soft: #172033;
  --studio-surface: #1E293B;
  color-scheme: dark;
}

/* ============================================================
   RESET / PODSTAWY
   ============================================================ */
* { box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--studio-text);
  background: var(--studio-bg);
  line-height: 1.65;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { color: var(--studio-ink); line-height: 1.2; font-weight: 700; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; }
p  { margin: 0 0 1rem; }
a  { color: var(--studio-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  max-width: var(--studio-maxw);
  margin: 0 auto;
  padding: 0 24px;
}
.section { padding: 72px 0; }
.section--soft { background: var(--studio-bg-soft); }
.section__head { max-width: 640px; margin: 0 0 40px; }
.eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--studio-accent);
  margin-bottom: 12px;
}
.lead { font-size: 1.125rem; color: var(--studio-muted); }

/* ============================================================
   PRZYCISKI
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 1rem;
  padding: 13px 26px;
  border-radius: var(--studio-radius-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--studio-primary); color: var(--studio-on-primary); }
.btn--primary:hover { background: var(--studio-primary-hover); color: var(--studio-on-primary); }
.btn--ghost { background: transparent; color: var(--studio-ink); border-color: var(--studio-line); }
.btn--ghost:hover { border-color: var(--studio-ink); }
.btn--block { width: 100%; }

/* ============================================================
   PLACEHOLDER NA ZDJĘCIE
   ============================================================ */
.ph {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  background: var(--studio-bg-soft);
  border: 1.5px dashed var(--studio-line);
  border-radius: var(--studio-radius);
  color: var(--studio-muted);
  text-align: center;
  padding: 16px;
}
.ph__icon { font-size: 1.75rem; opacity: .5; }
.ph__label { font-size: .95rem; font-weight: 500; }
.ph__hint { font-size: .8rem; opacity: .7; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  border-bottom: 1px solid var(--studio-line);
  background: color-mix(in srgb, var(--studio-bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(8px);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.site-brand { font-weight: 700; font-size: 1.15rem; color: var(--studio-ink); }
.site-brand:hover { text-decoration: none; }
.site-nav ul { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; align-items: center; }
.site-nav a { color: var(--studio-text); font-weight: 500; font-size: .97rem; }
.site-nav a:hover { color: var(--studio-primary); text-decoration: none; }
.site-nav .btn { padding: 9px 18px; font-size: .95rem; }
.site-header__right { display: flex; align-items: center; gap: 18px; }

/* ============================================================
   HERO
   ============================================================ */
.hero { padding: 80px 0; }
.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.hero__title { margin-bottom: 20px; }
.hero__lead { font-size: 1.2rem; color: var(--studio-muted); margin-bottom: 32px; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__media .ph { aspect-ratio: 4 / 3; }

/* ============================================================
   KARTY SAL (strona główna)
   ============================================================ */
.sala-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--studio-gap);
}
.sala-card {
  border: 1px solid var(--studio-line);
  border-radius: var(--studio-radius);
  overflow: hidden;
  background: var(--studio-surface);
  display: flex;
  flex-direction: column;
  transition: border-color .15s ease, transform .15s ease;
}
.sala-card:hover { border-color: var(--studio-primary); transform: translateY(-2px); }
.sala-card__media .ph { border: none; border-radius: 0; aspect-ratio: 3 / 2; }
.sala-card__body { padding: 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.sala-card__name { display: flex; align-items: center; gap: 10px; margin: 0; }
.sala-card__dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.sala-card__meta { color: var(--studio-muted); font-size: .95rem; margin: 0; }
.sala-card__price { margin: 4px 0 16px; font-size: 1.05rem; color: var(--studio-ink); }
.sala-card__price strong { font-size: 1.5rem; }
.sala-card__foot { margin-top: auto; }

/* ============================================================
   PODSTRONA SALI
   ============================================================ */
.sala-detail { padding: 56px 0; }
.sala-detail__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start; }
.sala-detail__gallery { display: grid; gap: 12px; }
.sala-detail__gallery .ph:first-child { aspect-ratio: 16 / 10; }
.sala-detail__thumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sala-detail__thumbs .ph { aspect-ratio: 4 / 3; }
.sala-detail__aside {
  border: 1px solid var(--studio-line);
  border-radius: var(--studio-radius);
  padding: 28px;
  position: sticky;
  top: 92px;
}
.sala-detail__price { font-size: 2rem; font-weight: 700; color: var(--studio-ink); margin: 0 0 4px; }
.sala-detail__price span { font-size: 1rem; font-weight: 400; color: var(--studio-muted); }
.feature-list { list-style: none; padding: 0; margin: 20px 0; }
.feature-list li { padding: 10px 0; border-bottom: 1px solid var(--studio-line); display: flex; align-items: center; gap: 10px; }
.feature-list li:last-child { border-bottom: none; }
.feature-list li::before { content: "✓"; color: var(--studio-primary); font-weight: 700; }
.sala-facts { display: flex; gap: 28px; margin: 8px 0 24px; }
.sala-facts div span { display: block; font-size: .85rem; color: var(--studio-muted); }
.sala-facts div strong { font-size: 1.25rem; color: var(--studio-ink); }

/* ============================================================
   STRONA REZERWACJI
   ============================================================ */
.booking-embed {
  border: 1px dashed var(--studio-line);
  border-radius: var(--studio-radius);
  background: var(--studio-bg-soft);
  padding: 48px 24px;
  text-align: center;
  color: var(--studio-muted);
}

/* ============================================================
   TREŚĆ TEKSTOWA (regulamin, polityka)
   ============================================================ */
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { margin-top: 2em; }
.prose h3 { margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1rem; }
.prose li { margin-bottom: .4rem; }
.page-title { padding: 48px 0 0; }

/* ============================================================
   STOPKA
   ============================================================ */
.site-footer { border-top: 1px solid var(--studio-line); background: var(--studio-bg-soft); padding: 48px 0 32px; margin-top: 24px; }
.site-footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.site-footer h4 { font-size: .9rem; text-transform: uppercase; letter-spacing: .05em; color: var(--studio-muted); margin: 0 0 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: var(--studio-text); }
.site-footer__brand { font-weight: 700; color: var(--studio-ink); font-size: 1.1rem; margin-bottom: 8px; }
.site-footer__bottom { border-top: 1px solid var(--studio-line); margin-top: 32px; padding-top: 20px; font-size: .85rem; color: var(--studio-muted); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* ============================================================
   ZDJĘCIA SAL
   ============================================================ */
.sala-photo {
  width: 100%;
  object-fit: cover;      /* auto-kadrowanie — brak zniekształceń i wychodzenia poza ramkę */
  display: block;
  border-radius: var(--studio-radius);
  background: var(--studio-bg-soft);
}
.sala-detail__thumbs .sala-photo { border-radius: var(--studio-radius); }

/* ============================================================
   RESPONSYWNOŚĆ
   ============================================================ */
/* Zabezpieczenie: nic nie może wywoływać poziomego przewijania */
html { overflow-x: hidden; }
body { overflow-x: clip; }
img, .ph, .sala-photo { max-width: 100%; }
/* Elementy siatek mogą się kurczyć zamiast rozpychać */
.sala-grid > *, .sala-detail__grid > *, .sala-detail__thumbs > *, .hero__grid > * { min-width: 0; }

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; gap: 32px; }
  .sala-grid { grid-template-columns: 1fr; }
  .sala-detail__grid { grid-template-columns: 1fr; gap: 28px; }
  .sala-detail__aside { position: static; }
  .site-footer__grid { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 640px) {
  .container { padding: 0 18px; }
  .section { padding: 48px 0; }
  .hero { padding: 40px 0; }
  /* Nagłówek: zwarty, bez rozpychania; brand może się zwęzić */
  .site-header__inner { height: auto; min-height: 60px; padding-block: 10px; gap: 10px; }
  .site-brand { font-size: 1rem; line-height: 1.25; }
  .site-header__right { gap: 10px; }
  .site-nav ul { gap: 12px; }
  .site-nav .btn { padding: 8px 14px; font-size: .9rem; }
  /* Ukryj linki tekstowe w nagłówku na mobile, zostaw tylko CTA + przełącznik */
  .site-nav .nav-link { display: none; }
  h1 { font-size: clamp(1.7rem, 8vw, 2.2rem); }
}
@media (max-width: 380px) {
  .site-nav .btn { padding: 7px 12px; font-size: .85rem; }
  .theme-toggle { width: 36px; height: 36px; }
}

/* ============================================================
   PRZEŁĄCZNIK MOTYWU (jasny/ciemny)
   ============================================================ */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--studio-line);
  color: var(--studio-text);
  cursor: pointer;
  padding: 0;
  transition: border-color .15s ease, color .15s ease;
}
.theme-toggle:hover { border-color: var(--studio-primary); color: var(--studio-primary); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }
