/* ═══════════════════════════════════════
   ПОКLONIK — Main styles
   Themes: blue (default), purple, vintage, red
   ═══════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,700;0,900;1,400;1,700&family=Lora:ital,wght@0,400;0,500;0,600;1,400;1,500&display=swap');

/* ── THEME: BLUE (default) ── */
:root {
  --bg:           #FFFFFF;
  --bg2:          #E8E8E8;
  --bg3:          #FFFFFF;
  --accent:       #006BAF;
  --accent-hover: #1A7EC4;
  --gold:         #005A96;
  --gold-hover:   #006BAF;
  --text:         #111111;
  --text-muted:   #4A4A4A;
  --border:       rgba(0,107,175,0.18);
  --nav-bg:       rgba(255,255,255,0.96);
  --block-bg:     #006BAF;
  --accent-rgb:   0,107,175;

  --font-heading: 'Playfair Display', serif;
  --font-body:    'Lora', serif;
  --max-w:        1160px;
  --section-pad:  5.5rem 2rem;
}

/* ── THEME: DARK (navy + gold) ── */
html[data-theme="purple"] {
  --bg:           #06090F;
  --bg2:          #0D1520;
  --bg3:          #141F2E;
  --accent:       #E8C030;
  --accent-hover: #F0CE48;
  --gold:         #C9A420;
  --gold-hover:   #E8C030;
  --text:         #EDE8D5;
  --text-muted:   #8898A8;
  --border:       rgba(232,192,48,0.18);
  --nav-bg:       rgba(6,9,15,0.97);
  --block-bg:     #020306;
  --accent-rgb:   232,192,48;
}

/* ── THEME: VINTAGE (dark amber) ── */
html[data-theme="vintage"] {
  --bg:           #0C0906;
  --bg2:          #14100A;
  --bg3:          #1E180E;
  --accent:       #F5B800;
  --accent-hover: #FFC820;
  --gold:         #E09000;
  --gold-hover:   #F5B800;
  --text:         #EDE0BE;
  --text-muted:   #9A8060;
  --border:       rgba(212,160,70,0.2);
  --nav-bg:       rgba(12,9,6,0.96);
  --block-bg:     #060402;
  --accent-rgb:   212,160,70;
}

/* ── THEME: CREAM (warm light) ── */
html[data-theme="cream"] {
  --bg:           #FAF6EF;
  --bg2:          #EEE5D3;
  --bg3:          #FAF6EF;
  --accent:       #7B1D2E;
  --accent-hover: #9A2540;
  --gold:         #8A5C1A;
  --gold-hover:   #A87830;
  --text:         #1C1410;
  --text-muted:   #5C4030;
  --border:       rgba(123,29,46,0.15);
  --nav-bg:       rgba(250,246,239,0.96);
  --block-bg:     #7B1D2E;
  --accent-rgb:   123,29,46;
}


/* ── THEME: RED (black + crimson) ── */
html[data-theme="red"] {
  --bg:           #080000;
  --bg2:          #150000;
  --bg3:          #1E0005;
  --accent:       #CC1010;
  --accent-hover: #E02424;
  --gold:         #B00000;
  --gold-hover:   #CC1010;
  --text:         #F5EEE8;
  --text-muted:   #A88080;
  --border:       rgba(204,16,16,0.22);
  --nav-bg:       rgba(8,0,0,0.97);
  --block-bg:     #040000;
  --accent-rgb:   204,16,16;
}

/* Grain texture — blue theme only */
html[data-theme="blue"] body::before,
:root:not([data-theme]) body::before {
  content: '';
  position: fixed; inset: 0;
  z-index: 1; pointer-events: none; opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  overflow-x: hidden;
  transition: background-color 0.3s, color 0.3s;
  animation: pageLoad 0.35s ease 0.08s both;
}

@keyframes pageLoad  { from { opacity: 0; } to { opacity: 1; } }
@keyframes pageUnload { to  { opacity: 0; transform: translateY(-5px); } }

/* ── NAV ── */
nav {
  position: fixed; top: 0; width: 100%;
  z-index: 200;
  padding: 1rem 3.5rem;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 20px rgba(var(--accent-rgb),0.07);
  transition: background 0.3s;
}

.nav-logo {
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 1.5rem; font-weight: 900;
  color: var(--accent); letter-spacing: 0.01em;
}

.nav-links { display: flex; gap: 2.2rem; list-style: none; }

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.88rem; letter-spacing: 0.07em;
  transition: color 0.25s; position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute; bottom: -3px; left: 0; right: 0;
  height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform 0.25s;
}

.nav-links a:hover         { color: var(--accent); }
.nav-links a:hover::after  { transform: scaleX(1); }
.nav-links a.active        { color: var(--accent); font-weight: 600; }
.nav-links a.active::after { transform: scaleX(1); }

/* ── THEME PICKER ── */
.theme-picker { display: flex; gap: 6px; align-items: center; margin-left: 1.5rem; }

.theme-btn {
  width: 13px; height: 13px;
  border-radius: 50%; cursor: pointer;
  padding: 0; border: 1.5px solid transparent;
  transition: all 0.2s; flex-shrink: 0;
}

.theme-btn[data-theme="blue"]    { background: #006BAF; border-color: #1A7EC4; }
.theme-btn[data-theme="purple"]  { background: #0D1520; border-color: #E8C030; }
.theme-btn[data-theme="vintage"] { background: #1E180E; border-color: #F5B800; }
.theme-btn[data-theme="red"]     { background: #150000; border-color: #CC1010; }
.theme-btn[data-theme="cream"]   { background: #EEE5D3; border-color: #7B1D2E; }
.theme-btn.active { transform: scale(1.35); box-shadow: 0 0 0 2px var(--accent); }

/* ── BUTTONS ── */
.btn {
  font-family: var(--font-body);
  font-size: 0.85rem; letter-spacing: 0.12em;
  text-transform: uppercase; text-decoration: none;
  padding: 0.82rem 2.1rem;
  transition: all 0.28s; cursor: pointer;
  border: none; display: inline-block; font-weight: 600;
}

.btn-primary              { background: var(--accent); color: #fff; }
.btn-primary:hover        { background: var(--accent-hover); }
.btn-outline              { background: transparent; color: var(--accent); border: 1.5px solid rgba(var(--accent-rgb),0.4); }
.btn-outline:hover        { border-color: var(--accent); background: rgba(var(--accent-rgb),0.05); }

/* ── SECTIONS ── */
section { padding: var(--section-pad); position: relative; }
.inner  { max-width: var(--max-w); margin: 0 auto; }

.section-label {
  display: block; font-size: 0.7rem; letter-spacing: 0.42em;
  text-transform: uppercase; color: var(--gold);
  margin-bottom: 0.85rem; font-weight: 600;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 700; color: var(--accent);
  line-height: 1.12; margin-bottom: 1rem;
}

.section-desc {
  font-size: 1rem; color: var(--text-muted);
  font-style: italic; max-width: 480px;
  margin-bottom: 2.5rem; line-height: 1.8;
}

.section-alt {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* ── FOOTER ── */
.site-footer {
  background: var(--block-bg);
  color: rgba(250,244,232,0.85);
  padding: 4rem 2rem 0;
  transition: background 0.3s;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(250,244,232,0.12);
}

.footer-brand { max-width: 320px; }

.footer-logo    { font-family: var(--font-heading); font-size: 2rem; font-weight: 900; color: #FAF4E8; display: block; margin-bottom: 0.5rem; }
.footer-tagline { font-style: italic; color: rgba(250,244,232,0.55); font-size: 0.9rem; line-height: 1.7; margin-bottom: 1.8rem; }

.footer-social   { display: flex; gap: 1.2rem; align-items: center; }
.footer-social a { color: rgba(250,244,232,0.45); text-decoration: none; transition: color 0.2s; display: flex; }
.footer-social a:hover { color: rgba(250,244,232,0.9); }
.footer-social svg { width: 22px; height: 22px; }

.footer-nav { display: flex; gap: 3.5rem; }

.footer-nav-col {
  display: flex; flex-direction: column; gap: 0.6rem;
}
.footer-nav-heading {
  font-size: 0.65rem; letter-spacing: 0.38em; text-transform: uppercase;
  color: rgba(250,244,232,0.38); font-weight: 600; margin-bottom: 0.5rem;
  font-family: var(--font-body);
}
.footer-nav-col a {
  font-size: 0.88rem; color: rgba(250,244,232,0.6);
  text-decoration: none; transition: color 0.2s;
  font-family: var(--font-body);
}
.footer-nav-col a:hover { color: rgba(250,244,232,0.95); }

.footer-bottom {
  max-width: var(--max-w); margin: 0 auto;
  padding: 1.2rem 0;
  display: flex; gap: 0.6rem; align-items: center;
  font-size: 0.7rem; color: rgba(250,244,232,0.3); letter-spacing: 0.06em;
  font-family: var(--font-body);
}
.footer-dot { color: rgba(250,244,232,0.2); }

@media (max-width: 768px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .footer-nav { gap: 2rem; }
}

/* ── CARDS ── */
.card {
  background: var(--bg3);
  border: 1px solid var(--border);
  overflow: hidden; transition: all 0.32s;
  cursor: pointer; text-decoration: none; display: block;
}

.card:hover {
  border-color: rgba(var(--accent-rgb),0.35);
  transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(var(--accent-rgb),0.12);
}

.card-thumb {
  aspect-ratio: 16/9;
  background: var(--bg2);
  position: relative;
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}


.card-thumb img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}

.card-play {
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(var(--accent-rgb),0.1);
  border: 1.5px solid rgba(var(--accent-rgb),0.3);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s; position: relative; z-index: 1;
}

.card:hover .card-play    { background: var(--accent); border-color: var(--accent); }
.card-play svg            { width: 17px; height: 17px; fill: var(--accent); margin-left: 3px; transition: fill 0.3s; }
.card:hover .card-play svg { fill: #fff; }

.card-badge {
  position: absolute; bottom: 0.75rem; right: 0.75rem;
  font-size: 0.6rem; letter-spacing: 0.2em; text-transform: uppercase;
  padding: 0.22rem 0.55rem;
  background: var(--accent); color: #fff; font-weight: 600; z-index: 1;
}
.card-time {
  position: absolute; bottom: 0.45rem; left: 0.45rem;
  background: rgba(0,0,0,0.58); color: rgba(255,255,255,0.92);
  font-size: 0.6rem; font-weight: 600; line-height: 1;
  padding: 0.17rem 0.35rem; z-index: 1; pointer-events: none;
}

.card-body    { padding: 1.2rem 1.3rem; }
.card-title   { font-family: var(--font-heading); font-size: 1.02rem; font-weight: 600; color: var(--text); line-height: 1.45; margin-bottom: 0.4rem; }
.card-desc    { font-size: 0.86rem; color: var(--text-muted); font-style: italic; }

.card-footer {
  display: flex; justify-content: space-between;
  margin-top: 0.85rem; padding-top: 0.85rem;
  border-top: 1px solid var(--border);
  font-size: 0.7rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--gold);
}

.card[hidden] { display: none; }

/* ── VIDEO DIALOG ── */
.dialog-overlay {
  display: none; position: fixed; inset: 0;
  z-index: 9000;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(6px);
  align-items: center; justify-content: center;
}
.dialog-overlay.open { display: flex; gap: 10px; }

.dialog-box {
  position: relative;
  width: min(1280px, 94vw);
  max-height: 88vh;
  aspect-ratio: 16/9;
  background: #000;
  box-shadow: 0 24px 80px rgba(0,0,0,0.7);
}
.dialog-box.short-box { width: min(480px, 92vw); aspect-ratio: 9/16; }

.dialog-box iframe { width: 100%; height: 100%; border: none; display: block; }

.dialog-close {
  position: absolute; top: -2.5rem; right: 0;
  background: none; border: none;
  color: rgba(255,255,255,0.8); font-size: 1.8rem; line-height: 1;
  cursor: pointer; padding: 0.2rem 0.5rem; transition: color 0.2s;
}
.dialog-close:hover { color: #fff; }

.dialog-fallback {
  position: absolute; inset: 0;
  display: none; flex-direction: column;
  align-items: center; justify-content: center;
  background: #0a0a0a; color: rgba(255,255,255,0.75);
  text-align: center; padding: 2rem; gap: 1.4rem;
}
.dialog-fallback p   { font-style: italic; font-size: 0.9rem; }
.dialog-fallback a   { display: inline-block; padding: 0.7rem 2rem; background: #FF0000; color: #fff; text-decoration: none; font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600; transition: background 0.2s; }
.dialog-fallback a:hover { background: #CC0000; }

/* ── ORTHODOX CROSS ── */
.cross-svg {
  width: 90px; height: 162px;
  position: relative; z-index: 1;
  filter: drop-shadow(0 0 10px rgba(var(--accent-rgb),0.28));
}

/* ── VIEW ALL / SHOW MORE LINK ── */
.view-all {
  display: inline-flex; align-items: center; gap: 0.5rem;
  margin-top: 2rem; font-size: 0.85rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent);
  text-decoration: none; font-weight: 600;
  border-bottom: 1px solid rgba(var(--accent-rgb),0.3);
  padding-bottom: 2px; transition: border-color 0.25s;
}
.view-all:hover { border-color: var(--accent); }

/* ── CARD THUMB OVERLAY ── */
.card-thumb::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(
    160deg,
    rgba(var(--accent-rgb), 0.10) 0%,
    rgba(var(--accent-rgb), 0.05) 50%,
    rgba(var(--accent-rgb), 0.13) 100%
  );
  pointer-events: none; z-index: 1;
}

/* ── SHOW MORE / LIMIT ── */
.card-limited { display: none !important; }

/* ── ANIMATIONS ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  nav { padding: 0.9rem 1.4rem; }
  .nav-links { display: none; }
  .theme-picker { margin-left: auto; margin-right: 0.8rem; }

  .hamburger {
    display: flex; flex-direction: column; gap: 5px;
    cursor: pointer; background: none; border: none; padding: 4px;
  }
  .hamburger span { display: block; width: 24px; height: 2px; background: var(--accent); transition: all 0.3s; }

  .mobile-menu {
    display: none; position: fixed;
    top: 56px; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 1.5rem 2rem; z-index: 199;
    box-shadow: 0 8px 24px rgba(var(--accent-rgb),0.1);
  }
  .mobile-menu.open { display: block; }
  .mobile-menu ul   { list-style: none; display: flex; flex-direction: column; gap: 1.2rem; }
  .mobile-menu a    { color: var(--text); text-decoration: none; font-size: 1.1rem; font-family: var(--font-heading); }

  section { padding: 4rem 1.4rem; }
  .section-title { font-size: clamp(1.6rem, 7vw, 2.2rem); }
}

@media (min-width: 769px) {
  .hamburger    { display: none; }
  .mobile-menu  { display: none !important; }
}
