:root{
  --accent: #ff6f00;
  --accent-2: #28a745;
  --bg: #fafafa;
  --card: #fff;
  --muted: #f1f1f1;
  --text: #333;
}

/* ====== Global Styles ====== */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
}

h1, h2, h3 { margin: 0 0 15px; line-height: 1.2; }
p { margin: 0 0 15px; }

/* Base section spacing (mobile first) */
section {
  padding: 60px 20px;
  
}

/* helper: center inner content without constraining section background */
.section-inner-max {
  max-width: 1100px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}




/* ====== Hero Section: Epic Fantasy Battle ====== */
/* Mobile-first default */
.hero {
  position: relative;
  background: url('herocastle-mobile.png') no-repeat center 35%;
  background-size: 110% auto;
  color: white;
  text-align: left;
  padding: 140px 20px 120px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  overflow: hidden;
}

/* Desktop / Larger Screens */
@media (min-width: 1024px) {
  .hero {
    background: url('herocastle-desktop.png') no-repeat left 45%;
    background-size: 100% auto;
    background-position: left 45%;
  }
}

/* Vignette overlay for depth */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 60% 50%, rgba(0,0,0,0.15), rgba(0,0,0,0.55) 80%);
  pointer-events: none;
  z-index: 1;
}

/* Mist overlay */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('mist.png') repeat;
  background-size: 800px auto;
  opacity: 0.15;
  pointer-events: none;
  z-index: 2;
  animation: mistMove 80s linear infinite;
}

@keyframes mistMove {
  0% { background-position: 0 0; }
  100% { background-position: 1000px 0; }
}

/* Hero Content */
.hero-content {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding-left: 40px;
}

/* Game Title */
.hero .game-name {
  font-size: 1.9rem;
  font-weight: 900;
  color: #d4af37;
  letter-spacing: 1px;
  margin-bottom: 12px;
  text-transform: uppercase;
}

/* Headline */
.hero h1 {
  font-size: 3rem;
  line-height: 1.2;
  margin-bottom: 16px;
  font-weight: 900;
}

.hero h1 span {
  color: #d4af37;
}

/* Subtitle */
.hero p.subtitle {
  font-size: 1.3rem;
  color: rgba(255,255,255,0.9);
  max-width: 640px;
  margin-bottom: 28px;
  line-height: 1.5;
}

/* Buttons Row */
.hero-buttons {
  display: flex;
  flex-direction: row;
  gap: 14px;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap; /* allows buttons to wrap gracefully on small screens */
}

/* Button Styles */
.cta-btn {
  display: inline-block;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 14px 32px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  white-space: nowrap;
}

/* Primary CTA */
.cta-btn.primary {
  background-color: #b03a2e;
  color: white;
}

.cta-btn.primary:hover {
  background-color: #8e2c23;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 18px rgba(176,58,46,0.4);
}

/* Secondary CTA */
.cta-btn.secondary {
  background-color: #f39c12;
  color: #111;
}

.cta-btn.secondary:hover {
  background-color: #d4880a;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 18px rgba(243,156,18,0.4);
}

/* ====== Responsive Adjustments ====== */

/* Medium screens (tablets/laptops) */
@media (max-width: 1200px) {
  .hero {
    background-position: center 45%;
  }
}

/* Mobile screens */
@media (max-width: 768px) {
  .hero {
    padding: 120px 20px;
    text-align: left;
    justify-content: center;
    background-position: center 35%;
  }

  .hero-content {
    padding-left: 0;
    margin: 0 auto;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero p.subtitle {
    font-size: 1.05rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: flex-start; /* Left-aligned buttons */
    gap: 10px;
  }

  .cta-btn {
    width: auto;              /* No full-width stretch */
    max-width: 90%;           /* Prevent from getting too wide */
    text-align: center;
  }
}












/* ====== Gameplay Info Section ====== */
.gameplay-info {
  background-color: #f9f9f9;
  padding: 40px 12px;
  border-radius: 8px;
  display: flex;
  justify-content: center; /* center inner content horizontally */
}

.gameplay-info .section-inner {
  max-width: 900px; /* prevents stretching on large screens */
  width: 100%;
}

/* Section heading */
.gameplay-info h2 {
  text-align: center; /* center on large screens */
  margin-bottom: 30px;
  font-size: 2rem;
}

/* Grid with even number of boxes */
.gameplay-info .contents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); /* even boxes, flexible width */
  gap: 20px;
  width: 100%;
}

/* Individual content items */
.gameplay-info .content-item {
  background: #e0e0e0; /* muted gray */
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gameplay-info .content-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.gameplay-info .content-item .icon {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.gameplay-info .content-item p {
  margin: 0;
  font-size: 1rem;
  font-weight: bold;
  color: #222;
  line-height: 1.3;
}

/* Large screens: 4 boxes per row */
@media (min-width: 900px) {
  .gameplay-info h2 {
    text-align: center;
  }
  .gameplay-info .contents-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Medium screens: 2 boxes per row */
@media (max-width: 899px) {
  .gameplay-info .contents-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Small screens: left-align heading and slightly reduce box width */
@media (max-width: 700px) {
  .gameplay-info h2 {
    text-align: left;
    padding-left: 12px;
    padding-right: 12px;
  }
  .gameplay-info .contents-grid {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
    gap: 15px;
  }
  .gameplay-info .content-item {
    padding: 15px;
  }
}





/* ====== Video Section ====== */
.video-section {
  background: #f9f9f9;
  text-align: center;
  padding: 60px 20px;
}

/* Keep title aligned left but centered within section */
.video-section > h2 {
  max-width: 1000px;
  margin: 0 auto 20px auto;
  text-align: left;
  font-size: 2rem;
  line-height: 1.3;
  color: #222;
}

/* Video Container */
.video-container {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  aspect-ratio: 16 / 9; /* Keeps perfect proportions */
  background: #000;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Make iframe fill container */
.video-container iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .video-section {
    padding: 40px 15px;
  }

  .video-section > h2 {
    font-size: 1.6rem;
    text-align: center; /* recenters heading on small screens */
  }

  .video-container {
    max-width: 100%;
    border-radius: 8px;
  }
}

.contents-section {
  background-color: var(--card);
  padding: 40px 20px;
  margin-bottom: 10px;     /* reduce gap to next section */
}

.contents-section h2 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 2rem;
}

.contents-list {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 700px;
}

.contents-list li {
  display: flex;
  align-items: flex-start;
  margin-bottom: 25px;
}

.contents-list .icon {
  font-size: 2rem;
  margin-right: 15px;
  flex-shrink: 0;
}

.contents-list .content-text {
  display: flex;
  flex-direction: column;
}

.contents-list .content-text strong {
  font-size: 1.2rem;
  margin-bottom: 5px;
}

.contents-list .content-text p {
  margin: 0;
  color: #555;
  line-height: 1.4;
  font-size: 1rem;
}

/* Mobile optimization */
@media (max-width: 600px) {
  .contents-list li {
    flex-direction: row;
    align-items: flex-start;
  }

  .contents-list .icon {
    font-size: 1.8rem;
    margin-right: 12px;
  }

  .contents-list .content-text strong {
    font-size: 1.1rem;
  }

  .contents-list .content-text p {
    font-size: 0.95rem;
  }
}



/* fallback simple gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 15px;
  margin: 20px 0;
}

/* ====== Carousel Styles ====== */
.carousel {
  position: relative;
  max-width: 900px;
  margin: 30px auto;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.carousel-track {
  display: flex;
  transition: transform 0.45s ease-in-out;
  padding: 0;
  margin: 0;
  list-style: none;
}

.carousel-slide { min-width: 100%; }
.carousel-slide img { width: 100%; height: auto; display: block; border-radius: 12px; }

/* Carousel Buttons - refined for mobile & desktop */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.85);
  border: none;
  color: #222;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 10px 12px;
  border-radius: 50%;
  transition: transform .12s ease, box-shadow .12s ease;
  z-index: 12;
  box-shadow: 0 6px 18px rgba(0,0,0,0.14);
}

.carousel-btn:hover { transform: translateY(-50%) scale(1.06); box-shadow: 0 8px 22px rgba(0,0,0,0.18); }

.carousel-btn.prev { left: 12px; }
.carousel-btn.next { right: 12px; }

@media (max-width: 600px) {
  .carousel { margin: 18px auto; border-radius: 8px; }
  .carousel-btn { font-size: 1rem; padding: 8px; }
}

/* ====== Rules Section ====== */
.rules-section {
  background: #f7f7f7;
  max-width: 800px;
  margin: 0 auto;
  border-radius: 8px;
  padding: 20px;
}

.rules-section h2,
.rules-section h3 {
  text-align: left;
  margin-bottom: 20px;
}

.rules-section p {
  margin-bottom: 12px;
}

/* ====== Rules Section ====== */
.rules-section {
  background: #f7f7f7;
  max-width: 800px;
  margin: 0 auto;
  border-radius: 8px;
  padding: 20px;
}

.rules-section h2,
.rules-section h3 {
  text-align: left;
  margin-bottom: 20px;
}

.rules-section p {
  margin-bottom: 12px;
}

/* ====== Flag Effects List (inline style) ====== */
.rules-section .flag-list {
  list-style: none;
  padding: 0;
  margin: 0 0 30px 0;
}

.rules-section .flag-list li {
  margin-bottom: 15px;
  line-height: 1.4;
}

.rules-section .flag-list li strong {
  font-size: 1.05rem;
  color: #222;
}

.rules-section .flag-list li em {
  display: block;
  margin-left: 15px; /* indent for description */
  color: #555;
  font-style: normal;
  font-weight: 500;
  font-size: 0.95rem;
}

/* Mobile tweaks */
@media (max-width: 600px) {
  .rules-section {
    padding: 15px 12px;
  }

  .rules-section h2,
  .rules-section h3 {
    font-size: 1.6rem;
  }

  .rules-section .flag-list li em {
    margin-left: 10px;
    font-size: 0.9rem;
  }
}





/* ====== Strategy Tips Section ====== */
.strategy-tips {
  background-color: #f8f8f8; /* light background for spacing */
  padding: 40px 12px;
}

.strategy-tips .section-inner {
  max-width: 900px;
  margin: 0 auto;
}

.strategy-card {
  background: #f7f7f7; 
  border-radius: 8px;
  padding: 30px 24px;
  text-align: left;       /* Left-align text inside */
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* Keep content aligned to left */
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  max-width: 700px;       /* limits horizontal width */
  margin: 0 auto;         /* center the card horizontally */
}


.strategy-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

.strategy-card .icon {
  font-size: 3rem;
  margin-bottom: 15px;
}

.strategy-card h2 {
  font-size: 2rem;
  margin-bottom: 12px;
}

.strategy-card p {
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 18px;
  max-width: 700px;
}

.strategy-card .cta-btn.large-btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 12px 24px;
  font-size: 1rem;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.strategy-card .cta-btn.large-btn:hover {
  background: darken(var(--accent), 10%);
  transform: translateY(-2px);
}

/* Small screens: left-aligned and slightly smaller */
@media (max-width: 700px) {
  .strategy-card {
    text-align: left;
    align-items: flex-start;
    padding: 20px 16px;
    max-width: 90%; /* slightly smaller width */
    margin: 0 auto;
  }

  .strategy-card h2 {
    font-size: 1.6rem;
  }

  .strategy-card p {
    font-size: 0.95rem;
  }

  .strategy-card .cta-btn.large-btn {
    width: auto;
    padding: 10px 20px;
  }

  .strategy-card .icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
  }
}



/* ====== Testimonials Section ====== */
.testimonials-section {
  background: var(--card);
  padding: 60px 20px;
  text-align: center;
}

/* center heading and keep reviews constrained */
.testimonials-section > h2 { max-width: 900px; margin: 0 auto 18px; text-align: left; padding-left: 12px; padding-right: 12px; }

.testimonials-section .testimonial {
  max-width: 820px;
  margin: 14px auto;
  font-style: italic;
  background: #f9f9f9;
  padding: 18px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.testimonial .stars { color: #ff9800; font-size: 1.1rem; margin: 8px 0; }

/* ====== Footer (unchanged per request) ====== */
/* Footer */
.footer, .footer * {
    background-color: #111;
    color: white !important;
    text-align: center;
    padding: 10px;
    width: 100%;
}

/* ====== Responsive Table (Rules Section) ====== */
.rules-section table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  overflow-x: auto;
  display: block; /* allows horizontal scroll on small screens */
}

.rules-section thead th {
  background-color: #333;
  color: white;
  padding: 10px;
  text-align: left;
}

.rules-section tbody td {
  padding: 8px;
  border-bottom: 1px solid #ddd;
}

.rules-section tbody tr:nth-child(even) {
  background-color: #f5f5f5;
}

/* Mobile-friendly: Stack the table on narrow screens */
@media (max-width: 700px) {
  .rules-section table,
  .rules-section thead,
  .rules-section tbody,
  .rules-section th,
  .rules-section td,
  .rules-section tr {
    display: block;
    width: 100%;
  }

  .rules-section thead {
    display: none; /* hide header row on mobile */
  }

  .rules-section tbody tr {
    background: white;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
  }

  .rules-section tbody td {
    border: none;
    padding: 8px 10px;
    position: relative;
  }

  .rules-section tbody td::before {
    content: attr(data-label);
    display: block;
    font-weight: bold;
    color: #555;
    margin-bottom: 5px;
  }
}
