/* ============================================
   KARATE DOJO WEBSITE - MAIN STYLESHEET
   ============================================ */

/* ---------- CSS Variables (easy to customize) ---------- */
:root {
  --primary-color: #1a1a2e;
  --secondary-color: #dc2626;
  --accent-color: #0f3460;
  --text-color: #f5f5f5;
  --text-dark: #1a1a2e;
  --bg-light: #f0f0f0;
  --bg-dark: #16213e;
  --card-bg: #ffffff;
  --shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  --transition: all 0.3s ease;
  --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --max-width: 1200px;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  color: var(--text-dark);
  background-color: var(--bg-light);
  line-height: 1.6;
}

body.dark-mode {
  --primary-color: #0b1220;
  --secondary-color: #ef4444;
  --accent-color: #1d4ed8;
  --text-color: #f8fafc;
  --text-dark: #e2e8f0;
  --bg-light: #020617;
  --bg-dark: #0f172a;
  --card-bg: #111827;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

body.dark-mode .event-description,
body.dark-mode .partner-item p,
body.dark-mode .about-content .about-placeholder {
  color: rgba(226, 232, 240, 0.82);
}

body.dark-mode .section-title,
body.dark-mode .store-item-info h3,
body.dark-mode .store-contact h3 {
  color: rgba(248, 250, 252, 0.94);
}

body.dark-mode .store-item-info .item-description,
body.dark-mode .store-item-info .stock,
body.dark-mode .store-contact p {
  color: rgba(226, 232, 240, 0.82);
}

body.dark-mode .partner-placeholder {
  border-color: rgba(248, 250, 252, 0.22);
  background: rgba(148, 163, 184, 0.08);
  color: rgba(226, 232, 240, 0.75);
}

body.dark-mode .map-placeholder {
  background: #1e293b;
  color: var(--text-dark);
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  list-style: none;
}

/* ---------- Header / Navigation ---------- */
.site-header {
  background: var(--primary-color);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
}

.logo-area img {
  height: 50px;
  width: auto;
}

.site-name {
  color: var(--text-color);
  font-size: 1.3rem;
  font-weight: 700;
   letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Navigation */
.main-nav ul {
  display: flex;
  gap: 5px;
}

.main-nav a {
  display: block;
  padding: 18px 20px;
  color: var(--text-color);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.9rem;
   letter-spacing: 0.02em;
  transition: var(--transition);
  border-bottom: 3px solid transparent;
}

.main-nav a:hover,
.main-nav a.active {
  background: rgba(255, 255, 255, 0.1);
  border-bottom-color: var(--secondary-color);
  color: var(--secondary-color);
}

/* Hamburger (mobile) */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 10px;
  background: none;
  border: none;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--text-color);
  border-radius: 2px;
  transition: var(--transition);
}

/* ---------- Hero Section ---------- */
.hero {
  background: var(--primary-color);
  color: var(--text-color);
  text-align: center;
  padding: 12px 20px 14px;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 4px;
  text-transform: uppercase;
   letter-spacing: 0.04em;
}

.hero p {
  font-size: 1.2rem;
  opacity: 0.9;
}

/* ---------- Section Styles ---------- */
.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 12px 20px 16px;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 10px;
  color: var(--primary-color);
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--secondary-color);
  margin: 6px auto 0;
  border-radius: 2px;
}

/* ---------- Current Event Section ---------- */
.current-event {
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 16px;
}

.event-header {
  background: var(--primary-color);
  color: var(--text-color);
  padding: 12px 18px;
}

.event-header h2 {
  font-size: 1.6rem;
  margin-bottom: 5px;
}

.event-header .event-date {
  font-size: 1rem;
  opacity: 0.85;
}

.event-body {
  padding: 14px;
}

/* ---------- Image Carousel ---------- */
.carousel {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 0 auto 12px;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 10;
}

.carousel-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.carousel-slide.active {
  opacity: 1;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

/* Carousel Arrows */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  padding: 15px 12px;
  font-size: 1.4rem;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition);
  opacity: 0;
  border-radius: 4px;
}

.carousel.paused .carousel-arrow {
  opacity: 1;
}

.carousel-arrow:hover {
  background: rgba(0, 0, 0, 0.8);
}

.carousel-arrow.prev {
  left: 10px;
}

.carousel-arrow.next {
  right: 10px;
}

/* Carousel Indicators */
.carousel-indicators {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.carousel-dot.active {
  background: var(--secondary-color);
  transform: scale(1.2);
}

/* Paused indicator */
.carousel-status-tray {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 20;
  pointer-events: none;
}

.carousel-pause-badge {
  position: static;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 0.8rem;
  display: none;
}

.carousel.paused .carousel-pause-badge {
  display: block;
}

/* ---------- Event Video ---------- */
.event-video {
  max-width: 800px;
  margin: 20px auto;
}

.event-video video,
.event-video iframe {
  width: 100%;
  border-radius: 8px;
  aspect-ratio: 16 / 9;
}

.event-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.event-video .plyr {
  border-radius: 8px;
  overflow: hidden;
}

/* ---------- Event Description ---------- */
.event-description {
  max-width: 800px;
  margin: 12px auto;
  font-size: 1.05rem;
  line-height: 1.8;
  color: #444;
}

/* ---------- Map Section ---------- */
.event-map {
  max-width: 800px;
  margin: 12px auto;
}

.event-map h3 {
  margin-bottom: 10px;
  color: var(--primary-color);
}

.map-container {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.map-container iframe {
  width: 100%;
  height: 350px;
  border: none;
}

.map-placeholder {
  min-height: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 52, 96, 0.12);
  color: var(--primary-color);
  font-weight: 600;
  text-align: center;
}

.map-link {
  display: inline-block;
  margin-top: 10px;
  color: var(--secondary-color);
  font-weight: 600;
  transition: var(--transition);
}

.map-link:hover {
  text-decoration: underline;
}

.map-link-placeholder {
  cursor: default;
}

.map-link-placeholder:hover {
  text-decoration: none;
}

/* Resume countdown overlay for carousels */
.carousel .resume-timer {
  position: static;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  padding: 6px 10px;
  border-radius: 14px;
  font-size: 0.85rem;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  min-width: 46px;
  text-align: center;
}

/* ---------- Partners Section ---------- */
.partners {
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 24px 24px 18px;
  margin-bottom: 12px;
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 18px;
  align-items: center;
  justify-items: center;
}

.partner-item {
  text-align: center;
  transition: var(--transition);
}

.partner-item:hover {
  transform: scale(1.05);
}

.partner-item img {
  max-height: 80px;
  width: auto;
  margin: 0 auto 10px;
  filter: grayscale(40%);
  transition: var(--transition);
}

.partner-placeholder {
  width: 100%;
  max-width: 140px;
  aspect-ratio: 16 / 9;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed rgba(26, 26, 46, 0.25);
  border-radius: 10px;
  background: rgba(15, 52, 96, 0.06);
  color: rgba(26, 26, 46, 0.6);
  font-weight: 700;
  text-transform: uppercase;
   letter-spacing: 0.03em;
}

.partner-item:hover img {
  filter: grayscale(0%);
}

.partner-item p {
  font-size: 0.85rem;
  color: #666;
  font-weight: 600;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--primary-color);
  color: var(--text-color);
  padding: 14px 20px 10px;
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
}

.footer-section h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--secondary-color);
  text-transform: uppercase;
   letter-spacing: 0.02em;
}

.footer-section p,
.footer-section a {
  font-size: 0.95rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.8);
}

.footer-section p + p {
  margin-top: 4px;
}

.footer-section a:hover {
  color: var(--secondary-color);
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 0;
  transition: var(--transition);
}

.contact-link svg,
.contact-link .contact-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.footer-bottom {
  text-align: center;
  padding-top: 10px;
  margin-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
  opacity: 0.7;
}

/* ---------- Scroll Buttons (Top & Bottom) ---------- */
.floating-controls {
  position: fixed;
  right: 25px;
  bottom: 25px;
  width: 36px;
  height: 120px;
  z-index: 999;
  pointer-events: none;
}

.scroll-btn {
  position: absolute;
  left: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--secondary-color);
  color: #fff;
  border: none;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
}

.scroll-btn.visible {
  opacity: 1;
  pointer-events: auto;
}

.scroll-btn:hover {
  background: var(--accent-color);
  transform: scale(1.1);
}

.theme-toggle-btn {
  position: absolute;
  left: 0;
  bottom: 42px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.95);
  background: #111827;
  color: #ffffff;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.3);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

.theme-toggle-btn:hover {
  background: #000000;
  transform: scale(1.1);
}

.theme-toggle-btn:focus-visible,
.scroll-btn:focus-visible {
  outline: 3px solid rgba(249, 115, 22, 0.35);
  outline-offset: 3px;
}

.floating-controls.top-visible .theme-toggle-btn {
  bottom: 84px;
}

.floating-controls.top-visible.bottom-hidden .theme-toggle-btn {
  bottom: 42px;
}

#scrollToTop {
  bottom: 42px;
}

.floating-controls.bottom-hidden #scrollToTop {
  bottom: 0;
}

#scrollToBottom {
  bottom: 0;
}

body.dark-mode .theme-toggle-btn {
  background: #f59e0b;
  border-color: rgba(255, 255, 255, 0.9);
  color: #111827;
  font-size: 1.2rem;
}

body.dark-mode .theme-toggle-btn:hover {
  background: #fbbf24;
}

@media (max-width: 768px) {
  .floating-controls {
    width: 36px;
    height: 120px;
  }
}

/* ---------- History Page ---------- */
.history-event {
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 30px;
}

.history-event .event-header {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.history-event .event-header .toggle-icon {
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}

.history-event.expanded .event-header .toggle-icon {
  transform: rotate(180deg);
}

.history-event .event-body {
  display: none;
}

.history-event.expanded .event-body {
  display: block;
}

/* ---------- About Page ---------- */
.about-content {
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 40px;
  max-width: 900px;
  margin: 0 auto;
}

.about-content .about-placeholder {
  min-height: 200px;
  padding: 30px;
  border: 2px dashed #ccc;
  border-radius: 8px;
  text-align: center;
  color: #999;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Store Page ---------- */
.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}

.store-page .hero {
  padding: 6px 20px 8px;
}

.store-page .hero h1 {
  margin-bottom: 2px;
}

.store-page .section {
  padding: 6px 20px 12px;
}

.store-page .section-title {
  margin-bottom: 6px;
}

.store-page .section-title::after {
  margin-top: 4px;
}

.store-item {
  width: 100%;
  max-width: 150px;
  justify-self: center;
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
}

.store-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.store-item-image {
  width: 100%;
  aspect-ratio: 1;
  background: #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.store-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Store Item Mini-Carousel (for items with multiple images) */
.store-carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background: #eee;
  overflow: hidden;
}

.store-carousel .store-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.store-carousel .store-slide.active {
  opacity: 1;
}

.store-carousel .store-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.store-carousel .store-slide.store-slide-contain {
  background: #fff;
}

.store-carousel .store-slide.store-slide-contain img {
  object-fit: contain;
  object-position: center;
}

.store-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  padding: 6px 5px;
  font-size: 0.8rem;
  cursor: pointer;
  z-index: 5;
  transition: var(--transition);
  border-radius: 4px;
}

.store-carousel-arrow:hover {
  background: rgba(0, 0, 0, 0.8);
}

.store-carousel-arrow.prev {
  left: 6px;
}

.store-carousel-arrow.next {
  right: 6px;
}

.store-carousel-counter {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.62rem;
  padding: 2px 6px;
  border-radius: 10px;
  z-index: 5;
}

.store-item-info {
  padding: 10px;
}

.store-item-info h3 {
  font-size: 0.8rem;
  margin-bottom: 5px;
  color: var(--primary-color);
}

.store-item-info .price {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: 4px;
}

.store-item-info .stock {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 10px;
}

.store-item-info .stock.low {
  color: #e74c3c;
  font-weight: 600;
}

.store-item-info .item-description {
  font-size: 0.7rem;
  color: #555;
  line-height: 1.35;
}

.store-contact {
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 16px 20px;
  margin-top: 20px;
  text-align: center;
}

.store-contact h3 {
  margin-bottom: 8px;
  color: var(--primary-color);
}

.store-contact p {
  margin-bottom: 6px;
  color: #666;
}

.store-contact-links {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
}

.store-contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
}

.store-contact-btn.whatsapp {
  background: #25d366;
  color: #fff;
}

.store-contact-btn.whatsapp:hover {
  background: #1da851;
}

.store-contact-btn.email {
  background: var(--accent-color);
  color: #fff;
}

.store-contact-btn.email:hover {
  background: var(--primary-color);
}

/* ---------- Placeholder Styles ---------- */
.placeholder-box {
  min-height: 150px;
  border: 2px dashed #ccc;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 0.95rem;
  text-align: center;
  padding: 20px;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--primary-color);
    display: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  }

  .main-nav.open {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .main-nav a {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .carousel {
    aspect-ratio: 4 / 3;
  }

  .about-content {
    padding: 25px;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .site-footer {
    padding: 12px 16px 8px;
  }

  .footer-section h3 {
    margin-bottom: 6px;
  }

  .footer-section p,
  .footer-section a {
    line-height: 1.35;
  }

  .store-grid {
    grid-template-columns: 1fr;
  }

  .header-container {
    flex-wrap: wrap;
  }

  .site-name {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.4rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .event-header h2 {
    font-size: 1.2rem;
  }

  .section {
    padding: 25px 15px;
  }

  .footer-container {
    gap: 8px;
  }

  .contact-link {
    gap: 8px;
    padding: 1px 0;
  }

  .footer-bottom {
    padding-top: 8px;
    margin-top: 8px;
  }
}
