/* --- CSS VARIABLES & THEME SETUP --- */
:root {
  /* Brand Colors - Professional Orange/Amber Palette */
  --primary-color: #d97706; /* Rich Amber/Orange - Elegant & Energetic */
  --secondary-color: #f59e0b; /* Golden Orange - For accents and borders */
  --accent-color: #451a03; /* Deep Burnt Umber - High contrast for text/icons */
  --cta-hover-color: #b45309; /* Darker Amber for interaction */

  /* UI Surfaces & Backgrounds */
  --bg-color: #fffcf9; /* Warm Off-white - Like high-quality paper */
  --card-bg: #ffffff; /* Pure white */
  --footer-bg: #fff7ed; /* Very light orange-tinted white for footer */
  --hero-gradient-end: #ffedd5; /* Soft sunrise cream for gradients */
  --placeholder-bg: #fef3c7; /* Light amber for empty states */
  --border-light: #fde68a; /* Subtle golden border */

  /* Text Colors */
  --text-color: #451a03; /* Deep warm brown for readability */
  --text-muted: #92400e; /* Muted terracotta for descriptions */
  --text-placeholder: #d97706;
  --white: #ffffff;
  --black: #1a0a02;

  /* Shadows & Transparency Effects (Warm) */
  --shadow-subtle: rgba(69, 26, 3, 0.04);
  --shadow-soft: rgba(180, 83, 9, 0.1); /* Tinted with primary color */
  --shadow-minimal: rgba(0, 0, 0, 0.02);
  --overlay-shadow: rgba(69, 26, 3, 0.25);
  --overlay-gradient: rgba(69, 26, 3, 0.05);
  --glow-accent: rgba(217, 119, 6, 0.15); /* Warm Amber glow */
  --glow-accent-subtle: rgba(217, 119, 6, 0.1);
}

/* --- GLOBAL STYLES --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Quicksand", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

/* --- HERO SECTION --- */
.hero {
  text-align: center;
  padding: 5rem 1rem;
  /* Using variables for the gradient */
  background: linear-gradient(
    135deg,
    var(--bg-color) 0%,
    var(--hero-gradient-end) 100%
  );
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--text-color);
  font-weight: 700;
}

.hero p {
  font-size: 1.3rem;
  margin-bottom: 2.5rem;
  color: var(--text-muted);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Hero mobile adjustment */
@media (max-width: 768px) {
  .hero {
    padding: 3rem 1rem;
  }
  .hero h1 {
    font-size: 2.2rem;
  }
}

/* --- HOME SPECIFIC: FEATURES & CARDS --- */
.features-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
}

.feature-card {
  background-color: var(--card-bg);
  border-radius: 20px;
  padding: 2rem;
  flex: 1 1 250px;
  text-align: center;
  box-shadow: 0 5px 15px var(--shadow-subtle);
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.feature-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-5px);
  box-shadow: 0 10px 25px var(--glow-accent-subtle);
}

.icon-circle {
  width: 60px;
  height: 60px;
  background-color: var(--bg-color);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
  color: var(--primary-color);
}

/* --- HOME SPECIFIC: ABOUT PREVIEW SECTION --- */
.about-preview {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2rem;
  background-color: var(--card-bg);
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 5px 20px var(--shadow-subtle);
}

.about-img-placeholder {
  background-color: var(--secondary-color);
  border-radius: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--white);
  font-size: 3rem;
  overflow: hidden;
  img {
    height: 350px;
  }
}

.about-text {
  flex: 1 1 300px;
}

/* --- REELS PAGE SPECIFIC --- */
.reels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 2rem;
  padding: 1rem 0;
}

.reel-card {
  background-color: var(--white);
  border-radius: 25px;
  overflow: hidden;
  box-shadow: 0 8px 20px var(--shadow-soft);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  position: relative;
  cursor: pointer;
  border: 1px solid var(--secondary-color);
}

.reel-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px var(--glow-accent);
  border-color: var(--primary-color);
}

.reel-thumbnail {
  position: relative;
  width: 100%;
  padding-top: 177.77%;
  background-color: var(--placeholder-bg);
}

.reel-content-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: var(--text-placeholder);
  background: linear-gradient(
    180deg,
    transparent 0%,
    var(--overlay-gradient) 100%
  );
}

.reel-play-icon {
  font-size: 3rem;
  color: var(--white);
  opacity: 0.8;
  text-shadow: 0 2px 10px var(--overlay-shadow);
  transition: transform 0.2s;
}

.reel-card:hover .reel-play-icon {
  transform: scale(1.2);
  color: var(--primary-color);
}

.reel-info {
  padding: 1.2rem;
  text-align: center;
}

.reel-title {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.reel-tag {
  display: inline-block;
  background-color: var(--bg-color);
  color: var(--primary-color);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* --- NAVIGATION --- */
header {
  background-color: var(--card-bg);
  box-shadow: 0 2px 10px var(--shadow-soft);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 1rem 2rem;
}

nav {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}
.nav-links a {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--primary-color);
}
.menu-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* --- LAYOUT UTILS --- */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  flex: 1;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  font-size: 2rem;
  position: relative;
}

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

.cta-button {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 0.8rem 2rem;
  border-radius: 50px;
  font-weight: 700;
  display: inline-block;
  box-shadow: 0 4px 15px var(--glow-accent);
  transition: transform 0.2s;
  border: none;
  cursor: pointer;
  max-width: 300px;
  width: fit-content;
}
.cta-button:hover {
  transform: translateY(-2px);
  background-color: var(--cta-hover-color);
}

/* --- SPECIFIC: PRICING CARDS (lessons.html) --- */
.pricing-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}
.pricing-card {
  height: max-content;
  background: var(--card-bg);
  border-radius: 20px;
  padding: 2rem;
  flex: 1 1 280px;
  max-width: 350px;
  text-align: center;
  box-shadow: 0 5px 15px var(--shadow-subtle);
  border-top: 5px solid var(--secondary-color);
}
.pricing-card.featured {
  border-top: 5px solid var(--primary-color);
  transform: scale(1.05);
}
.price {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin: 1rem 0;
}
.features-list {
  list-style: none;
  text-align: left;
  margin: 1.5rem 0;
}
.features-list li {
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.features-list i {
  color: var(--accent-color);
}

/* --- SPECIFIC: RULES LIST (lessons.html) --- */
.rules-section {
  background: var(--white);
  padding: 2rem;
  border-radius: 20px;
  margin-top: 3rem;
  box-shadow: 0 5px 15px var(--shadow-minimal);
}
.rule-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
}
.rule-icon {
  color: var(--primary-color);
  font-size: 1.2rem;
  margin-top: 3px;
}

/* --- SPECIFIC: BOOK GRID (books.html) --- */
.book-card {
  display: flex;
  flex-wrap: wrap;
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 2rem;
  box-shadow: 0 5px 15px var(--shadow-subtle);
}
.book-img {
  flex: 1 1 200px;
  background: var(--secondary-color);
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 3rem;
}
.book-details {
  flex: 2 1 300px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* --- SPECIFIC: REELS/ABOUT (about.html) --- */
.bio-section {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  margin-bottom: 4rem;
}
.bio-img {
  flex: 1 1 300px;
  height: 350px;
  background-color: var(--border-light);
  border-radius: 20px;
  object-fit: cover;
}
.reels-grid {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 1rem;
}
.reel-placeholder {
  min-width: 200px;
  height: 350px;
  background: var(--black);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
}

/* --- FOOTER --- */
footer {
  background-color: var(--footer-bg);
  text-align: center;
  padding: 2rem;
  margin-top: auto;
}
.social-icons a {
  margin: 0 10px;
  font-size: 1.2rem;
  color: var(--primary-color);
}
/* --- FOOTER ADDITIONS --- */
.footer-quote {
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.4;
}

.footer-contact {
  margin: 1.5rem 0;
}

/* Styling the email link to look like a subtle button */
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-color);
  font-weight: 600;
  font-size: 1.1rem;
  transition: transform 0.2s ease;
}

.contact-link:hover {
  color: var(--cta-hover-color);
  transform: translateY(-2px);
}

/* Layout for legal links */
.footer-links {
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.footer-links a {
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.footer-links .divider {
  color: var(--border-light);
  margin: 0 10px;
}

.copyright {
  font-size: 0.85rem;
  color: var(--text-muted);
}
/* --- SPECIFIC: CERTIFICATIONS SECTION --- */
.certifications-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  margin-bottom: 4rem;
}

.cert-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  overflow: hidden;
  flex: 1 1 350px;
  max-width: 450px;
  box-shadow: 0 5px 15px var(--shadow-subtle);
  transition: transform 0.3s ease;
}

.cert-card:hover {
  transform: translateY(-5px);
  border-color: var(--secondary-color);
}

.cert-img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  background-color: var(--placeholder-bg);
  border-bottom: 1px solid var(--border-light);
  display: block;
}

.cert-info {
  padding: 1.5rem;
  text-align: center;
}

.cert-info h3 {
  color: var(--primary-color);
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.cert-info p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* --- MOBILE --- */
@media (max-width: 768px) {
  .logo {
    font-size: 1em;
  }

  .certifications-container {
    flex-direction: column;
    align-items: center;
  }

  .cert-card {
    width: 100%;
  }

  /* Navigation Adjustments */
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background-color: var(--card-bg);
    padding: 1rem 0;
    box-shadow: 0 5px 10px var(--shadow-soft);
    text-align: center;
  }

  .nav-links.active {
    display: flex;
    padding: 2rem;
  }

  .menu-toggle {
    display: block;
  }

  /* Reset Transformations */
  .pricing-card.featured {
    transform: none;
  }

  /* --- BIO / CHI SONO FIX --- */
  .bio-section {
    flex-direction: column;
    gap: 1.5rem;
  }

  .bio-img,
  .about-text {
    flex: unset !important;
    width: 100%;
    min-width: 0;
  }

  .bio-img {
    height: 300px;
    margin-bottom: 1rem;
  }

  /* --- REELS GRID FIX (Single Column) --- */
  .reels-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 0 0.5rem;
  }

  .reel-card {
    width: 100%;
    max-width: 100%;
    box-shadow: 0 4px 10px var(--shadow-soft);
  }

  .reel-placeholder {
    height: 300px;
    min-width: auto;
  }
}

/* Featured card base styling */
.pricing-card.featured {
  transform: scale(1.05);
  border: 2px solid var(--primary-color, #f43f5e);
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  position: relative;
  z-index: 1;
  background: linear-gradient(to bottom, #ffffff, #fffafb);
}

/* Ensure the scale effect plays nicely with hover */
.pricing-card.featured:hover {
  transform: scale(1.08);
}

/* Floating badge for the featured card */
.featured-badge {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary-color, #f43f5e);
  color: white;
  padding: 6px 18px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* * Hero section background with Japanese autumn image 
 * Includes a warm gradient overlay to ensure text readability
 */
.hero {
  background:
    linear-gradient(
      135deg,
      rgba(255, 252, 249, 0.85) 0%,
      rgba(255, 237, 213, 0.9) 100%
    ),
    url("japanese-autumn-bg.webp") center/cover no-repeat;
}

/* * Styling for the section divider using a repeating pattern 
 * Make sure 'seigaiha-pattern-light.webp' is in the same folder as your CSS
 */
.japanese-divider {
  width: 100%;
  height: 40px;
  background: url("seigaiha-pattern-light.webp") repeat-x center;
  opacity: 0.3;
  margin: 2rem 0;
}

/* * Positioning the decorative branch relative to the about section 
 */
.about-preview {
  position: relative;
}

/* * Styling for the Japanese maple branch decoration
 */
.decor-branch {
  position: absolute;
  top: -30px;
  left: -30px;
  width: 120px;
  opacity: 0.8;
  z-index: 0;
  /* Disable dragging for decorative images */
  pointer-events: none;
}

/* * Ensure the main image stays above the decoration 
 */
.about-img-placeholder {
  position: relative;
  z-index: 1;
}

/* * Adding a subtle watermark to feature cards 
 */
.feature-card {
  position: relative;
  overflow: hidden;
}

/* * Watermark positioning and styling inside the feature card
 */
.feature-card::after {
  content: "";
  position: absolute;
  bottom: -10px;
  right: -10px;
  width: 100px;
  height: 100px;
  background: url("torii-watermark.webp") no-repeat center/contain;
  opacity: 0.05;
  pointer-events: none;
}

/* Container for the bio image */
.bio-img {
  width: 100%;
  max-width: 400px; /* Adjust this value to set the maximum size of the box */
  aspect-ratio: 1 / 1; /* Keeps the box perfectly square. Remove if you prefer a rectangle */
  border-radius: 12px; /* Optional: adds rounded corners for a softer look */
  overflow: hidden; /* Ensures the image respects the border-radius */
  margin: 0 auto; /* Centers the container if it's smaller than the parent */
}

/* The actual image styling */
.bio-img img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Magic rule: fills the box without distorting the image */
  object-position: center; /* Keeps the center of the image visible if it gets cropped */
  display: block; /* Removes tiny bottom gaps common with inline images */
}

.swiper-wrapper {
  align-items: center;
}
