/* Základní nastavení a proměnné */
:root {
  --font-heading: "Gabriela", serif;
  --font-body: "Arial", sans-serif;
  --color-dark: #222222; /* Used for dark backgrounds, original was #1a1a1a */
  --color-background: #1a1a1a; /* Very dark background */
  --color-text: #e0e0e0; /* Light text for dark backgrounds */
  --color-primary: #e47d3a; /* Mírnější oranžová */
  --color-highlight: #ff9a57;
  --color-border: #444;

  /* New colors for alternating sections */
  --color-light-background: #f0f0f0; /* Lighter background */
  --color-dark-text: #333333; /* Dark text for lighter backgrounds */
  --color-white: #ffffff; /* Pure white for elements on dark background if needed */

  --container-width: 1024px;
  --base-font-size: 16px; /* Standardní velikost textu */
  --border-radius: 6px;
}

/* Reset a globální styly */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: var(--base-font-size);
}

body {
  font-family: var(--font-body);
  background-color: var(--color-background); /* Default dark background */
  color: var(--color-text); /* Default light text */
  line-height: 1.65;
}

/* Kontejner */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 2rem;
}

/* Typografie */
h1,
h2,
h3 {
  font-family: var(--font-heading);
  color: var(
    --color-primary
  ); /* Primary color for headings on dark backgrounds */
  line-height: 1.3;
  margin-bottom: 1rem;
  text-align: center; /* Centering headings */
}

/* Dark text for headings and general text on light backgrounds */
.alternate-background-light h2,
.alternate-background-light h3,
.alternate-background-light p,
.dark-text {
  color: var(--color-dark-text);
}

h1 {
  font-size: 2.8rem;
}
h2 {
  font-size: 2.2rem;
}
h3 {
  font-size: 1.4rem;
}

p {
  margin-bottom: 1.2rem;
}

a {
  color: var(--color-highlight);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--color-primary);
}
img {
  max-width: 100%;
  height: auto;
  border-radius: var(--border-radius);
}

/* Tlačítko (Ghost button styl) */
.cta-button {
  display: inline-block;
  background: transparent;
  color: var(--color-primary);
  padding: 0.75rem 1.75rem;
  border-radius: var(--border-radius);
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid var(--color-primary);
  cursor: pointer;
  font-family: var(--font-body);
}

.cta-button:hover {
  background: var(--color-primary);
  color: var(--color-background); /* Dark text on primary background */
}

/* === Struktura a Layout === */
section {
  padding: 5rem 0;
  border-bottom: 1px solid var(--color-border);
}
section:last-of-type {
  border-bottom: none;
}

/* Alternating background styles */
.alternate-background-light {
  background-color: var(--color-light-background); /* Lighter background */
}
/* Ensure elements within light sections adopt dark text */
.alternate-background-light .container {
  color: var(--color-dark-text);
}

.two-column-layout {
  display: flex;
  align-items: center;
  gap: 4rem;
}
.column-text,
.column-image {
  flex: 1;
}

/* Obrátí pořadí sloupců (obrázek vlevo, text vpravo) */
.two-column-layout.layout-reverse {
  flex-direction: row-reverse;
}

/* === Jednotlivé sekce === */

/* Hero sekce */
.hero {
  padding: 5rem 0;
  background-color: var(--color-background); /* Hero section remains dark */
}
.hero .subtitle {
  font-size: 1.2rem;
  font-style: italic;
  color: var(--color-text);
  margin-bottom: 1.5rem;
}
/* Center hero text only if it's a single column */
.hero .column-text {
  text-align: center;
}
.hero .cta-button {
  margin-top: 1rem; /* Adjust spacing for hero button */
}

/* Why this section as blocks */
.why-this-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.why-this-item {
  background-color: var(--color-white); /* White background for blocks */
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
  color: var(--color-dark-text); /* Ensure text is dark */
}

.why-this-item h3 {
  margin-bottom: 0.5rem;
  color: var(--color-dark-text); /* Ensure headings are dark */
}

.why-this-item p {
  margin-bottom: 0;
  color: var(--color-dark-text); /* Ensure text is dark */
}

/* O hře - Rámeček s parametry */
.game-params-box {
  display: flex;
  justify-content: space-between;
  text-align: center;
  background-color: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  padding: 1rem;
  margin-top: 2rem;
  color: var(--color-text); /* Ensure text is light on this dark box */
}
.param-item span {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
  color: #aaa;
}
.param-item strong {
  font-size: 1.2rem;
  color: var(--color-highlight);
}

/* New icon block for game parameters */
.game-params-icons {
  display: flex;
  justify-content: space-around;
  text-align: center;
  margin-top: 2rem;
  background-color: var(--color-dark); /* Dark background for this new block */
  border-radius: var(--border-radius);
  padding: 1.5rem 1rem;
  color: var(--color-text); /* Light text on dark background */
}
.icon-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.icon-item img {
  width: 50px; /* Adjust icon size as needed */
  height: 50px;
  margin-bottom: 0.5rem;
  filter: brightness(0) invert(1); /* Makes dark icons white on dark background */
}
.icon-item p {
  font-weight: bold;
  margin-bottom: 0;
}

/* Seznam s plamínky */
.flame-list {
  list-style: none;
  padding-left: 0;
}
.flame-list li {
  padding-left: 2rem;
  position: relative;
  margin-bottom: 0.8rem;
  font-size: 1.05rem;
}
.flame-list li::before {
  content: "🔥";
  position: absolute;
  left: 0;
  top: 0;
  font-size: 1rem;
}
/* Ensure flame list items on light background have dark text */
.alternate-background-light .flame-list li {
  color: var(--color-dark-text);
}

/* Ohlasy hráčů */
.reviews h2 {
  text-align: center;
}
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}
.testimonial-card {
  background: var(--color-dark);
  padding: 1.5rem;
  border-left: 3px solid var(--color-primary);
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
}
.quote-text {
  font-style: italic;
  margin-bottom: 1rem;
}
.quote-author {
  text-align: right;
  font-weight: bold;
  margin-bottom: 0;
}

/* Video Responsive Container */
.video-responsive {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  max-width: 100%;
  background: var(--color-dark); /* Fallback/background for loading */
  border-radius: var(--border-radius);
}

.video-responsive iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Videos section as two columns */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.video-item {
  text-align: center;
}

.video-item iframe {
  /* Removed fixed height here as it's handled by .video-responsive */
}

.video-title {
  margin-top: 0.8rem;
  font-weight: bold;
}

/* Newsletter sekce */
.newsletter {
  background-color: var(
    --color-background
  ); /* Explicitly set dark background */
  text-align: center;
  padding: 4rem 0; /* Slightly reduce padding */
}
.newsletter h3 {
  font-size: 1.8rem;
  color: var(--color-primary); /* Ensures heading is primary color on dark bg */
}
.newsletter p {
  color: var(--color-text); /* Ensures text is light on dark bg */
}
.newsletter-form {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  gap: 0.75rem; /* Increased gap */
  flex-wrap: wrap;
  max-width: 600px; /* Limit form width */
  margin-left: auto;
  margin-right: auto;
}
.newsletter-form input {
  flex-grow: 1; /* Allow input to grow */
  max-width: 300px; /* Max width for input */
  padding: 0.75rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--color-border);
  background: #333;
  color: var(--color-text);
  font-size: 1rem;
  line-height: 1.5; /* Ensure text sits well */
}
.newsletter-form input:focus {
  outline: none;
  border-color: var(--color-primary);
}
.newsletter-form .cta-button {
  padding: 0.75rem 2rem; /* Make button slightly larger */
  min-width: 150px; /* Ensure button has min width */
}

/* Styles for newsletter form messages and loading indicator */
.form-message {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: var(--border-radius);
  font-weight: bold;
  /* Hidden by default, made visible by JS */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
  pointer-events: none; /* Prevents interaction when hidden */
}

.form-message.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto; /* Allows interaction when visible */
}

.form-message.success {
  background-color: #4caf50; /* Green */
  color: white;
}

.form-message.error {
  background-color: #f44336; /* Red */
  color: white;
}

.form-message.info {
  background-color: #2196f3; /* Blue */
  color: white;
}

#loading-indicator {
  /* Hidden by default, made visible by JS */
  display: none;
  margin-top: 1rem;
  color: var(--color-highlight);
  font-weight: bold;
}

/* Footer */
footer {
  text-align: center;
  padding: 2.5rem;
  color: #aaa;
  background-color: var(--color-dark); /* Ensure footer is dark */
}
.social-links {
  margin-bottom: 1rem;
}
.social-links a {
  margin: 0 0.5rem;
  font-weight: bold;
}
.social-links span {
  color: var(--color-primary);
}
.social-links p {
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

/* New FAQ Styles - now similar to why-this-grid */
.faq-section {
  text-align: center;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(280px, 1fr)
  ); /* Same as why-this-grid */
  gap: 2rem;
  margin-top: 2rem;
}

.faq-card {
  background-color: var(--color-white); /* White background for blocks */
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
  color: var(--color-dark-text); /* Ensure text is dark */
}

.faq-card h3 {
  margin-bottom: 0.5rem;
  color: var(--color-dark-text); /* Ensure headings are dark */
}

.faq-card p {
  margin-bottom: 0;
  color: var(--color-dark-text); /* Ensure text is dark */
}

/* === Responzivita === */
@media (max-width: 768px) {
  html {
    font-size: 15px;
  }
  h1 {
    font-size: 2.2rem;
  }
  h2 {
    font-size: 1.8rem;
  }
  .container {
    padding: 0 1rem;
  }

  section {
    padding: 3rem 0;
  }

  .two-column-layout,
  .two-column-layout.layout-reverse {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
  }
  .game-params-box {
    flex-direction: column;
    gap: 1.5rem;
  }
  .flame-list li {
    text-align: left;
  }
  .video-grid,
  .why-this-grid,
  .faq-grid {
    /* Added faq-grid to responsive stack */
    grid-template-columns: 1fr; /* Stack videos, why-this, and faq items on small screens */
  }
  .game-params-icons {
    flex-direction: column; /* Stack icons vertically on small screens */
    gap: 1.5rem;
  }
  .newsletter-form {
    flex-direction: column;
    align-items: center;
  }
  .newsletter-form input,
  .newsletter-form .cta-button {
    width: 100%;
    max-width: 300px; /* Maintain max-width for better look */
  }
}
/* Styling for GDPR text under the newsletter form */
.gdpr-text {
  margin-top: 1.5rem;
  font-size: 0.9rem; /* Slightly smaller font size */
  line-height: 1.4;
  color: #a0a0a0; /* A slightly subdued color for a notice-like feel */
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* === Odpočet pro kampaň === */
.countdown-container {
  margin: 2rem 0; /* Odsazení od okolních prvků */
  text-align: center;
}

.countdown-title {
  font-size: 1.1rem;
  color: var(--color-text);
  margin-bottom: 1rem;
  font-style: italic;
}

#countdown-timer {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  font-family: var(--font-heading); /* Použije stylizovaný font pro čísla */
}

.timer-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.timer-unit span {
  font-size: 2.8rem;
  font-weight: bold;
  color: var(--color-highlight); /* Zvýrazněná barva pro čísla */
  line-height: 1;
}

.timer-unit label {
  font-size: 0.8rem;
  font-family: var(--font-body);
  color: #aaa; /* Jemnější barva pro popisky */
  text-transform: uppercase;
  margin-top: 0.25rem;
}

/* Úprava pro menší obrazovky */
@media (max-width: 768px) {
  .timer-unit span {
    font-size: 2rem;
  }
  #countdown-timer {
    gap: 1rem;
  }
}
