/* ─── Reset & Base ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --gold:    #f0bd33;
  --gold-lt: #f7c956;
  --dark:    #050c16ec;
  --text:    #fffcf6;
  --muted:   #9a9080;
  --accent:  #8b2020;
}
.pergamen {
  background-color: #1d1d1d86;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Georgia', serif;
  color: var(--text);
  overflow-x: hidden;
  
  background: url(img/pergamen3.jpg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100vh;
  margin: 0;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ─── Navbar ───────────────────────────────────────────── */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  height: 80px; padding: 0 2rem;
  background: rgba(10,8,5,0.52);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(201,168,76,0.25);
  transition: background 0.3s;
}
.nav-brand {
  display: flex; align-items: center; gap: 0.75rem;
}
.nav-brand img { height: 50px; width: auto; }
.nav-brand span {
  font-size: 1.8rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gold); text-shadow: 0 0 12px rgba(201,168,76,0.5);
}
.nav-links {
  display: flex; gap: 1.8rem; list-style: none;
}
.nav-links a {
  font-size: 1.1rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text); transition: color 0.2s;
  padding: 0.2rem 0; border-bottom: 2px solid transparent;
}
.nav-links a:hover { color: var(--gold); border-bottom-color: var(--gold); }

/* hamburger */
.nav-toggle {
  display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px;
  background: none; border: none; outline: none;
}
.nav-toggle span { display: block; width: 26px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.3s; }

@media (max-width: 875px) {
  .nav-links {
    display: none; flex-direction: column; gap: 0;
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(10,8,5,0.97);
    border-bottom: 1px solid rgba(201,168,76,0.2);
    padding: 1rem 2rem;
    align-items: center; text-align: center;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block; padding: 0.9rem 0; font-size: 1rem;
    color: var(--gold);
    border-bottom: 1px solid rgba(201,168,76,0.1);
  }
  .nav-links li:last-child a { border-bottom: none; }
  .nav-toggle { display: flex; }
}
@media (max-width: 1125px) {
  .ohre-grid {
    display: flex !important; flex-direction: column;
  }
  .ohre-left, .ohre-right {
    max-width: 680px;
  }
}

/* ─── Main ─────────────────────────────────────────────── */
#main {
  position: relative; height: 100vh; min-height: 500px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: url('img/Background_2.png') center center / cover no-repeat;
}
#main::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.25) 50%, rgba(0,0,0,0.75) 100%);
}
.main-content {
  position: relative; z-index: 1;
  text-align: center;
  flex: 1; display: flex; align-items: center; justify-content: center;
}
.main-title {
  font-size: clamp(3.5rem, 10vw, 8rem);
  text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--gold-lt);
  text-shadow: 0 0 30px rgba(201,168,76,0.6), 0 4px 20px rgba(0,0,0,0.9);
  line-height: 1;
}
.main-bottom {
  position: relative; z-index: 1;
  width: 100%; padding: 1.5rem 1rem 2.5rem;
  display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
}
.countdown-label {
  font-size: 1.1rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text);
}
.countdown {
  display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: center;
}
.countdown-block {
  display: flex; flex-direction: column; align-items: center; min-width: 64px;
}
.countdown-num {
  font-size: 2.6rem; font-weight: 700; line-height: 1;
  color: var(--gold); text-shadow: 0 0 14px rgba(201,168,76,0.5);
  font-variant-numeric: tabular-nums;
}
.countdown-unit {
  font-size: 1rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text); margin-top: 2px;
}
@media (min-width: 481px) and (max-width: 1024px) {
  .countdown-num { font-size: 3.125rem; } /* ≈50px */
  .countdown-unit { font-size: 1.25rem; } /* ≈20px */
  .countdown-label{ font-size: 1.25rem; }
}
@media (max-width: 480px) {
  .countdown { gap: 1rem; }
  .countdown-num { font-size: 1.9rem; }
}

/* ─── Section shared ───────────────────────────────────── */
section { padding: 80px 5vw; }
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--gold); margin: 0 auto 1.8rem;
  display: block; width: fit-content; text-align: center;
}
.section-title::after {
  content: ''; display: block; margin-top: 0.4rem;
  height: 2px; background: linear-gradient(to right, var(--gold), transparent);
  width: 100%;
}
.section-desc {
  max-width: 990px; line-height: 1.75; color: var(--text);
  font-size: 1.1rem; margin-bottom: 2.5rem; font-weight: 600;
}

/* ─── Platformy ────────────────────────────────────────── */
#platformy {text-align: center; }
#platformy .section-desc, #o-hre .section-desc { margin: 0 auto 2.5rem; text-align: center; }
.platform-logos {
  display: flex; justify-content: center; align-items: center;
  gap: 3rem; flex-wrap: wrap;
}
.platform-logo {
  display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
  opacity: 0.7; transition: opacity 0.25s, transform 0.25s;
}
.platform-logo:hover { opacity: 1; transform: scale(1.05); }

/* ─── O hre ────────────────────────────────────────────── */
.ohre-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center;
  margin-top: 2rem;
  max-width: calc(1360px + 3rem);
  margin: 0 auto;
}
.ohre-left {
  position: relative;
  background: url('img/Random_Events_Scroll.png') center / 100% 100% no-repeat;
  /* Initial fallback padding; JS fitScrollPadding() will recalculate on load/resize */
  padding: 12% 13.75%;
  min-height: 200px;
}
.scroll-bg { display: none; }
.ohre-text p { line-height: 1.8; margin-bottom: 1rem; color: #1e1e1e; font-weight: 600; font-size: 1.1rem;}
.ohre-right {
  position: relative;
}
.ohre-right::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 30%, #312321b9 75%, #29130ef1 100%);
  border-radius: 12px;
  pointer-events: none;
}
.ohre-right img {
  width: 100%; object-fit: cover;
  border-radius: 12px;
  border: 2px solid rgba(201,168,76,0.3);
  box-shadow: 0 8px 32px rgba(0,0,0,0.7);
  filter: saturate(0.7);
}
@media (max-width: 768px) {
  .ohre-grid { grid-template-columns: 1fr; }
}

/* ─── Povolani ─────────────────────────────────────────── */
#povolani {text-align: center; }
#povolani .section-desc { margin: 0 auto 2.5rem; }
.gender-toggle {
  display: inline-flex; border: 1px solid var(--gold); border-radius: 4px;
  overflow: hidden; margin-bottom: 2rem;
}
.gender-btn {
  padding: 0.6rem 1.8rem; cursor: pointer; border: none; background: transparent;
  color: var(--muted); font-family: inherit; font-size: 1rem;
  letter-spacing: 0.08em; text-transform: uppercase; transition: 0.2s;
}
.gender-btn.active { background: var(--gold); font-weight: 700; color: var(--text);}
.character-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 250px));
  gap: 1.5rem;
  justify-content: center;
}
.char-card {
  display: flex; flex-direction: column; align-items: center;
  transition: transform 0.25s;
  cursor: pointer;
  max-width: 250px; width: 100%;
}
.char-card:hover { transform: translateY(-5px); }
.char-card img { width: 100%; aspect-ratio: 3/4; object-fit: contain; display: block; }
.char-base {
  width: 60%; height: 14px; margin-top: -4px;
  background: radial-gradient(ellipse at center, rgba(5,4,3,0.88) 0%, transparent 70%);
  border-radius: 50%;
  flex-shrink: 0;
}
.char-label {
  padding: 1rem 0.6rem 0.5rem;
  font-size: 1rem; letter-spacing: 0.08em; text-align: center; color: var(--gold);
}
@media (max-width: 900px) {
  .character-grid { grid-template-columns: repeat(2, minmax(0, 250px)); }
}
@media (max-width: 480px) {
  .character-grid { grid-template-columns: repeat(2, minmax(0, 180px)); gap: 0.8rem; }
}

/* ─── Schopnosti ───────────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 280px));
  gap: 1.5rem;
  margin-bottom: 8rem;
  justify-content: center;
}
.skill-card {
  position: relative; overflow: hidden; border-radius: 8px;
  border: 1px solid rgba(201,168,76,0.2);
  cursor: pointer;
  max-width: 280px; width: 100%;
}
.skill-card img {
  width: 100%; aspect-ratio: 1; object-fit: cover; display: block;
  filter: contrast(1.1) saturate(1.08);
  image-rendering: -webkit-optimize-contrast;
}
.skill-overlay {
  position: absolute; inset: 0;
  background: rgba(10,5,0,0.90);
  display: flex; flex-direction: column; justify-content: center;
  align-items: center; padding: 1.2rem; text-align: center;
  opacity: 0; transition: opacity 0.3s;
}
.skill-card:hover .skill-overlay { opacity: 1; }
.skill-overlay h4 {
  font-size: 1.2rem; color: var(--gold); letter-spacing: 0.1em;
  text-transform: uppercase; margin-bottom: 0.6rem;
}
.skill-overlay p { font-size: 1.1rem; line-height: 1.6; color: var(--text); }

@media (max-width: 900px) {
  .skills-grid { grid-template-columns: repeat(2, minmax(0, 250px)); }
}
@media (max-width: 600px) {
  .skills-grid {
    display: flex;
    flex-direction: column; gap: 1.5rem;
    justify-content: center; align-items: center;
    max-width: 320px;
    margin-left: auto; margin-right: auto;
  }
}

/* Special event */
.special-title {
  font-size: clamp(1.3rem, 3vw, 2rem);
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--gold); margin-bottom: 0.8rem;
  display: block; width: fit-content; margin-left: auto; margin-right: auto;
}
.special-title::after {
  content: ''; display: block; margin-top: 0.4rem;
  height: 2px; background: linear-gradient(to right, var(--gold), transparent);
  width: 100%;
}
.special-desc {
  max-width: 640px; line-height: 1.75; color: var(--text);
  margin-bottom: 2rem; 
  font-size: 1.1rem;
  margin-left: auto; margin-right: auto; text-align: center;
  font-weight: 600;
}
.special-event {
  display: flex; align-items: center; justify-content: center;
  gap: 2rem; flex-wrap: nowrap;
}
.special-event .se-img {
  flex: 1; max-width: 420px;
}
.special-event .se-img img, .se-pet img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.5);
}
/* DumDum pet wrapper */
.se-pet {
  flex: 1; max-width: 420px;
  display: flex; flex-direction: column; align-items: center; gap: 0.7rem;
}
.pet-name {
  font-size: 1.2rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold-lt); text-shadow: 0 0 10px rgba(240,208,128,0.4);
  font-weight: 700;
}
.pet-reward {
  display: inline-block;
  padding: 0.35rem 1.1rem;
  background: linear-gradient(135deg, var(--accent) 0%, #6b1010 100%);
  border: 1px solid rgba(201,168,76,0.5);
  border-radius: 4px;
  font-size: 1.1rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold-lt); font-weight: 700;
  animation: reward-glow 2s ease-in-out infinite;
}
@keyframes reward-glow {
  0%, 100% { box-shadow: 0 0 6px rgba(201,168,76,0.3); }
  50%       { box-shadow: 0 0 18px rgba(201,168,76,0.7); }
}
.pulse-arrow {
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; width: 60px;
  animation: pulse-right 1.2s ease-in-out infinite;
}
.pulse-arrow.arrow-down {
  animation: pulse-down 1.2s ease-in-out infinite;
  width: auto; height: 60px;
}
.pulse-arrow svg { width: 44px; height: 44px; fill: var(--gold); }
@keyframes pulse-right {
  0%, 100% { transform: translateX(0) scale(1); opacity: 1; }
  50%       { transform: translateX(8px) scale(1.15); opacity: 0.6; }
}
@keyframes pulse-down {
  0%, 100% { transform: translateY(0) scale(1); opacity: 1; }
  50%       { transform: translateY(8px) scale(1.15); opacity: 0.6; }
}
@media (max-width: 700px) {
  .special-event { flex-direction: column; }
}

/* ─── Sponzori ─────────────────────────────────────────── */
#sponzori {text-align: center; }
#sponzori .section-desc { margin: 0 auto 2.5rem; text-align: center; }
.sponsor-logos {
  display: flex; justify-content: center; align-items: center;
  flex-wrap: wrap; gap: 4rem; margin-top: 2rem;
}
.sponsor-item {
  transition: opacity 0.3s, transform 0.3s;
}
.sponsor-item:hover { opacity: 1; transform: scale(1.06); }
.sponsor-item img {
  height: 130px; width: auto; max-width: 260px;
  object-fit: contain; display: block;
}

/* ─── Kontakty ─────────────────────────────────────────── */
#kontakty {padding: 50px 5vw; }
.kontakty-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 3rem;
}
.kontakty-col {
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.kontakty-col h3 {
  font-size: 1.2rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 1.2rem;
  border-bottom: 1.3px solid rgba(201,168,76,0.95); padding-bottom: 0.5rem;
  width: 100%;
}
.kontakty-col p {
  font-size: 1.1rem; line-height: 1.9; color: var(--text);
}
.kontakty-col a:not(.social-link) {
  display: inline-block; font-size: 1.1rem; line-height: 2;
  color: var(--text); transition: color 0.2s;
}
.kontakty-col a:hover { color: var(--gold); }
.social-icons {
  display: flex; flex-direction: row; gap: 1.4rem;
  flex-wrap: wrap; justify-content: center; margin-top: 0.4rem;
}
.social-link {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text); transition: color 0.2s;
  padding: 0.3rem;
}
.social-link svg {
  width: 32px; height: 32px; fill: currentColor; flex-shrink: 0;
  display: block;
}
.social-link:hover { color: var(--gold); }
.map-embed {
  width: 100%; height: 300px;
  border: 1px solid rgba(201,168,76,0.2); filter: grayscale(0.4) brightness(0.95);
}
@media (max-width: 900px) {
  .kontakty-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* ─── Footer ───────────────────────────────────────────── */
footer {
  background: var(--dark); text-align: center;
  padding: 1.2rem 1rem;
  border-top: 1px solid rgba(201,168,76,0.15);
  font-size: 1.1rem; color: var(--text); letter-spacing: 0.06em;
}

/* ─── Scroll reveal util ───────────────────────────────── */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s, transform 0.6s; }
.reveal.visible { opacity: 1; transform: none; }

/* ─── Touch & responsive improvements ─────────────────── */

/* Skill card tap-to-reveal (touch devices can't hover) */
.skill-card.tapped .skill-overlay { opacity: 1; }

/* Kontakty grid max-width on very wide screens */
.kontakty-grid { max-width: 1200px; margin-left: auto; margin-right: auto; }

/* Tablet (≤1024px) – reduce vertical section breathing room */
@media (max-width: 1023px) {
  section { padding: 64px 6vw; }
  .ohre-left, .ohre-right { width: 100%; }
  .skills-grid {
  grid-template-columns: repeat(2, minmax(0, 280px));
  gap: 2rem;
  }
}

/* Small tablet / large phone (≤768px) */
@media (max-width: 768px) {
  section { padding: 52px 5vw; }
  .section-desc { font-size: 1rem; }
  .kontakty-col p,
  .kontakty-col a:not(.social-link) { font-size: 1rem; }
  /* Stack special-event earlier so it isn't squeezed on tablet portrait */
  .special-event { flex-direction: column; }
  .se-img, .se-pet { max-width: 100%; width: 100%; }
  /* Bigger nav tap targets */
  .nav-links a { padding: 1rem 0; }
}

/* Phone (≤480px) */
@media (max-width: 480px) {
  section { padding: 40px 5vw; }
  .nav-brand span { font-size: 1.25rem; }
  .ohre-text p { font-size: 0.88rem; line-height: 1.65; }
  .sponsor-logos { gap: 2rem; }
  .sponsor-item img { height: 80px; max-width: 160px; }
  .map-embed { height: 240px; }
  .social-link svg { width: 28px; height: 28px; }
}

/* Very small phone (≤360px) */
@media (max-width: 360px) {
  .nav-brand span { font-size: 1.05rem; }
  .countdown-num { font-size: 1.6rem; }
  .countdown { gap: 0.75rem; }
}
