/* Typografia: Playfair Display na nadpisy (elegantný, svadobný charakter),
   Inter na text (výborne čitateľný na mobiloch). Oba majú latin-ext,
   takže zvládnu slovenskú diakritiku (ľ, š, č, ť, ž, ô, ä). */
@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap");

/* ---------- Farebné premenné ----------
   Predvolený je tmavý režim; svetlý sa zapína cez [data-theme="light"]. */
:root {
  --bg: #14110f;
  --bg-alt: #1a1613;
  --surface: #1f1a17;
  --surface-hover: #272120;
  --text: #f5f0ea;
  --text-muted: #a2988c;
  --border: #322b26;
  --border-strong: #443b34;
  --accent: #c89b6a;
  --accent-hover: #d8ad7c;
  --accent-soft: rgba(200, 155, 106, 0.12);
  --accent-text: #14110f;
  --danger: #e5646f;
  --success: #55c47a;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 50px -12px rgba(0, 0, 0, 0.6);
  --radius: 12px;
  --radius-lg: 20px;
}

[data-theme="light"] {
  --bg: #faf7f3;
  --bg-alt: #f2ece4;
  --surface: #ffffff;
  --surface-hover: #faf7f3;
  --text: #1c1917;
  --text-muted: #6f6459;
  --border: #e7ded3;
  --border-strong: #d5c8b8;
  --accent: #9a6b3d;
  --accent-hover: #855a30;
  --accent-soft: rgba(154, 107, 61, 0.09);
  --accent-text: #ffffff;
  --danger: #c1121f;
  --success: #157f3c;
  --shadow: 0 1px 2px rgba(60, 45, 30, 0.06);
  --shadow-lg: 0 20px 50px -12px rgba(60, 45, 30, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* ---------- Rozloženie aplikácie ---------- */
.page {
  width: 100%;
  max-width: 940px;
  margin: 0 auto;
  padding: 2rem 1.25rem 5rem;
}

.page.narrow {
  max-width: 420px;
  padding-top: 4rem;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.top-bar h1 {
  margin: 0;
  font-size: 1.9rem;
}

.top-bar-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

h2 {
  font-size: 1.4rem;
  margin: 2.5rem 0 1rem;
}

h2:first-of-type {
  margin-top: 0;
}

.muted {
  color: var(--text-muted);
  font-size: 0.925rem;
}

.hidden {
  display: none !important;
}

/* ---------- Karty ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}

.card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}

/* ---------- Formuláre ---------- */
form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

input,
textarea,
select {
  padding: 0.75rem 0.85rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--bg-alt);
  color: var(--text);
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

textarea {
  resize: vertical;
  min-height: 100px;
}

/* Pole s heslom + ikonka očka */
.password-field {
  position: relative;
}

.password-field input {
  padding-right: 3rem;
}

.password-toggle {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.35rem;
  font-size: 1.05rem;
  line-height: 1;
  color: var(--text-muted);
  width: auto;
  box-shadow: none;
}

.password-toggle:hover {
  background: none;
  filter: none;
}

button {
  padding: 0.75rem 1.25rem;
  font-size: 0.975rem;
  font-family: inherit;
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-text);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
}

button:hover:not(:disabled) {
  background: var(--accent-hover);
}

button:active:not(:disabled) {
  transform: translateY(1px);
}

button:disabled {
  opacity: 0.5;
  cursor: default;
}

button.secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

button.secondary:hover:not(:disabled) {
  background: var(--surface-hover);
  border-color: var(--accent);
}

button.danger {
  background: transparent;
  color: var(--danger);
  border-color: var(--border-strong);
}

button.danger:hover:not(:disabled) {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

button.small {
  padding: 0.4rem 0.7rem;
  font-size: 0.85rem;
}

button.large {
  padding: 0.9rem 1.75rem;
  font-size: 1.05rem;
}

/* Formulár je flex stĺpec, takže by sa tlačidlo roztiahlo na celú šírku karty.
   Na širokých stránkach ho necháme len tak veľké, aké potrebuje... */
form > button {
  align-self: flex-start;
}

/* ...na úzkych (prihlásenie, heslo) je naopak plná šírka prirodzenejšia. */
.page.narrow form > button {
  align-self: stretch;
}

.button-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ---------- Správy ---------- */
.message {
  font-size: 0.9rem;
  font-weight: 500;
  min-height: 1.3rem;
  margin: 0;
}

.message.ok {
  color: var(--success);
}

.message.error {
  color: var(--danger);
}

/* ---------- Odznaky ---------- */
.badge {
  display: inline-block;
  font-family: "Inter", sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  vertical-align: middle;
}

.badge.pending {
  color: #d9a441;
  border-color: rgba(217, 164, 65, 0.5);
  background: rgba(217, 164, 65, 0.1);
}

.badge.approved {
  color: var(--success);
  border-color: color-mix(in srgb, var(--success) 45%, transparent);
  background: color-mix(in srgb, var(--success) 10%, transparent);
}

.badge.rejected {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 45%, transparent);
  background: color-mix(in srgb, var(--danger) 10%, transparent);
}

/* ---------- Zoznam eventov ---------- */
.event-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.event-list .card {
  margin: 0;
  transition: border-color 0.15s, transform 0.15s;
}

.event-list .card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.event-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

/* ---------- Galéria (masonry cez CSS stĺpce) ---------- */
.gallery {
  column-count: 2;
  column-gap: 0.85rem;
}

@media (min-width: 620px) {
  .gallery { column-count: 3; }
}

@media (min-width: 900px) {
  .gallery { column-count: 4; }
}

.photo {
  break-inside: avoid;
  margin: 0 0 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

/* Iba priamy potomok = samotná fotka. */
.photo > img {
  width: 100%;
  display: block;
}

.photo-meta {
  padding: 0.6rem 0.7rem 0.2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.photo-actions {
  display: flex;
  gap: 0.35rem;
  padding: 0.5rem 0.7rem 0.7rem;
}

.photo-actions button {
  flex: 1;
}

/* ---------- Kniha hostí ---------- */
.message-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.guest-message {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  box-shadow: var(--shadow);
}

.guest-message-head {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
  flex-wrap: wrap;
}

.guest-message-head strong {
  font-size: 0.95rem;
}

.guest-message p {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ---------- Záložky ---------- */
.tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
  /* Na úzkom mobile sa nezmestia - dajú sa posunúť prstom.
     Posuvník skryjeme, aby nezaberal miesto. */
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: var(--text-muted);
  padding: 0.7rem 1rem;
  white-space: nowrap;
}

.tab:hover:not(.active) {
  background: none;
  color: var(--text);
}

.tab.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* ---------- QR kód ---------- */
.qr-box {
  text-align: center;
}

.qr-box img {
  max-width: 280px;
  width: 100%;
  background: #fff;
  padding: 0.75rem;
  border-radius: var(--radius);
}

.copy-row {
  display: flex;
  gap: 0.5rem;
}

.copy-row input {
  flex: 1;
  font-size: 0.875rem;
}

/* ---------- Upload ---------- */
.upload-box {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 1.75rem 1.25rem;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}

.upload-box:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* Natívne pole na výber súboru vyzerá v každom prehliadači inak a nedá sa
   priamo naštýlovať. Preto ho skryjeme a klikanie preberie <label>,
   ktorý si už naštýlovať vieme. Kliknutie na label otvorí dialóg rovnako. */
.file-button {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-text);
  font-family: inherit;
  font-size: 0.975rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: normal;
  cursor: pointer;
  transition: background 0.15s;
}

.file-button:hover {
  background: var(--accent-hover);
}

.file-button input[type="file"] {
  display: none;
}

progress {
  width: 100%;
  height: 6px;
}

.empty {
  color: var(--text-muted);
  text-align: center;
  padding: 3rem 1rem;
}

/* ======================================================================
   ÚVODNÁ STRÁNKA (index.html)
   ====================================================================== */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.logo span {
  color: var(--accent);
}

.section {
  max-width: 1080px;
  margin: 0 auto;
  padding: 5rem 1.25rem;
}

.section-tight {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

/* Farebný pruh cez celú šírku okna. Obsah vnútri drží .section,
   takže zostáva zarovnaný rovnako ako v ostatných sekciách. */
.band {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.eyebrow {
  font-size: 0.775rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1rem;
}

.section-head {
  max-width: 620px;
  margin-bottom: 3rem;
}

.section-head h2 {
  font-size: clamp(1.75rem, 4vw, 2.4rem);
  margin: 0 0 0.75rem;
}

/* :not(.eyebrow) - bez toho by toto pravidlo prebilo zlatú farbu nadpisku
   .eyebrow, pretože má vyššiu špecificitu (trieda + element vs. trieda). */
.section-head p:not(.eyebrow) {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin: 0;
}

/* Hero */
.hero {
  display: grid;
  gap: 3.5rem;
  align-items: center;
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 4rem;
  }
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 3.9rem);
  margin: 0 0 1.25rem;
}

.hero h1 em {
  font-style: italic;
  color: var(--accent);
}

.hero-lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin: 0 0 2rem;
  max-width: 34rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

/* Na mobile sú tlačidlá pod sebou - nech sú rovnako široké, inak to pôsobí neusporiadane. */
@media (max-width: 520px) {
  .hero-actions,
  .hero-actions a {
    width: 100%;
  }
  .hero-actions button {
    width: 100%;
  }
}

.hero-note {
  margin: 1.75rem 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Mockup telefónu v hero sekcii */
.phone {
  position: relative;
  width: 100%;
  max-width: 290px;
  margin: 0 auto;
  aspect-ratio: 9 / 18.5;
  background: var(--surface);
  border: 8px solid var(--border-strong);
  border-radius: 38px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  padding: 1rem 0.75rem;
}

.phone::before {
  content: "";
  position: absolute;
  top: 0.6rem;
  left: 50%;
  transform: translateX(-50%);
  width: 34%;
  height: 5px;
  border-radius: 999px;
  background: var(--border-strong);
}

.phone-head {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  margin: 0.9rem 0 0.85rem;
}

.phone-grid {
  column-count: 2;
  column-gap: 0.4rem;
}

/* Dlaždice len naznačujú fotky - striedame odtiene, nech nástenka
   nepôsobí ako prázdne sivé obdĺžniky. */
.phone-tile {
  break-inside: avoid;
  margin-bottom: 0.4rem;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: linear-gradient(155deg, #c89b6a55, #8b5e3433);
}

.phone-tile:nth-child(3n) { background: linear-gradient(155deg, #7d6a5a55, #c89b6a33); }
.phone-tile:nth-child(3n + 1) { background: linear-gradient(155deg, #a8845f66, #4a3b2f44); }
.phone-tile:nth-child(4n) { background: linear-gradient(155deg, #d8b48a55, #6b533e33); }

/* V svetlom režime sú tie isté odtiene na bielom podklade takmer neviditeľné,
   preto ich zosilníme. */
[data-theme="light"] .phone-tile { background: linear-gradient(155deg, #c89b6aaa, #8b5e3466); }
[data-theme="light"] .phone-tile:nth-child(3n) { background: linear-gradient(155deg, #b09a86aa, #c89b6a77); }
[data-theme="light"] .phone-tile:nth-child(3n + 1) { background: linear-gradient(155deg, #a8845fbb, #6b533e55); }
[data-theme="light"] .phone-tile:nth-child(4n) { background: linear-gradient(155deg, #d8b48aaa, #8b6b4d66); }

/* QR karta vedľa telefónu */
.hero-visual {
  position: relative;
}

.qr-float {
  position: absolute;
  right: 0;
  bottom: 6%;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 0.85rem;
  box-shadow: var(--shadow-lg);
  text-align: center;
  width: 130px;
}

.qr-float img {
  width: 100%;
  display: block;
  border-radius: 6px;
  background: #fff;
}

.qr-float span {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.45rem;
  letter-spacing: 0.03em;
}

@media (max-width: 899px) {
  .qr-float {
    right: 50%;
    margin-right: -180px;
    bottom: 12%;
  }
}

@media (max-width: 480px) {
  .qr-float {
    position: static;
    margin: 1.25rem auto 0;
  }
}

/* Kroky */
.steps {
  display: grid;
  gap: 2rem;
  counter-reset: step;
}

@media (min-width: 760px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
}

.step {
  counter-increment: step;
}

.step::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 1.15rem;
  border-radius: 50%;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
}

.step h3 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}

.step p {
  margin: 0;
  color: var(--text-muted);
}

/* Vlastnosti */
.features {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .features { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 940px) {
  .features { grid-template-columns: repeat(3, 1fr); }
}

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  transition: border-color 0.15s, transform 0.15s;
}

.feature:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.feature-icon {
  font-size: 1.5rem;
  line-height: 1;
  margin-bottom: 0.9rem;
  display: block;
}

.feature h3 {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
}

.feature p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Pre koho */
.audience {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.pill {
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  font-size: 0.925rem;
  color: var(--text-muted);
  background: var(--surface);
}

/* Záverečná výzva */
.cta {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 3.5rem 1.5rem;
  box-shadow: var(--shadow-lg);
}

.cta h2 {
  font-size: clamp(1.75rem, 4vw, 2.4rem);
  margin: 0 0 0.85rem;
}

.cta p {
  color: var(--text-muted);
  max-width: 34rem;
  margin: 0 auto 2rem;
  font-size: 1.05rem;
}

/* Pätička */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.site-footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
