:root {
  --red: #e74c3c;

  --blue: #3498db;

  --yellow: #f1c40f;

  --green: #2ecc71;

  --bg: #f6f8fa;

  --card-bg: #ffffffdd;

  --text: #222;

  --sidebar-bg: #ffffffcc;

  --shadow: 0 4px 18px rgba(0, 0, 0, 0.08);

  --btn-bg: #3498db;

  --btn-hover: #2980b9;
}

* {
  box-sizing: border-box;

  margin: 0;

  padding: 0;
}

body {
  font-family: "Poppins", "Noto Sans JP", sans-serif;

  background: var(--bg);

  color: var(--text);

  overflow-x: hidden;
}

a {
  text-decoration: none;

  color: inherit;
}

/* Sidebar */

.sidebar {
  position: fixed;

  left: 0;

  top: 0;

  height: 100%;

  width: 250px;

  background: var(--sidebar-bg);

  backdrop-filter: blur(12px);

  border-right: 1px solid #eee;

  box-shadow: var(--shadow);

  padding: 2rem 1.5rem;

  transform: translateX(-260px);

  transition: transform 0.5s ease;

  z-index: 1000;
}

.sidebar.open {
  transform: translateX(0);
}

.sidebar h2 {
  text-align: center;

  font-weight: 700;

  font-size: 1.5rem;

  color: var(--red);

  margin-bottom: 2rem;
}

.sidebar a {
  display: block;

  margin: 0.8rem 0;

  padding: 0.6rem 1rem;

  border-radius: 10px;

  font-weight: 500;

  transition: background 0.3s;
}

.sidebar a.active {
  background: var(--red);

  color: #000; /* black text for current page */

  font-weight: 600;
}

.sidebar a:hover {
  background: #f0f0f0;

  cursor: pointer;
}

.dropdown-content {
  display: none;

  margin-left: 1rem;
}

.dropdown.open .dropdown-content {
  display: block;

  animation: fadeIn 0.3s ease;
}

/* Header */

header {
  display: flex;

  justify-content: space-between;

  align-items: center;

  padding: 1rem 2rem;

  position: sticky;

  top: 0;

  background: var(--bg);

  border-bottom: 1px solid #ddd;

  z-index: 900;
}

.menu-btn {
  font-size: 1.5rem;

  cursor: pointer;

  color: var(--red);

  transition: transform 0.3s;
}

.menu-btn:hover {
  transform: rotate(90deg);
}

.logo {
  font-size: 1.3rem;

  font-weight: 700;

  color: var(--red);
}

/* Language toggle */
.lang-toggle {
  position: relative;
  /* Removed: display: flex; align-items: center; as flags are external */
  display: block; /* Use block to contain the absolute children */
  width: 60px;
  height: 24px;
  background: #ccc;
  border-radius: 12px;
  cursor: pointer;
}

.lang-toggle input {
  opacity: 0;
  width: 100%;
  height: 100%;
  position: absolute;
  z-index: 2;
  margin: 0;
  cursor: pointer;
}

.slider-knob {
  position: absolute;
  top: 1px;
  left: 1px;
  width: 22px;
  height: 22px;
  background: #fff; /* Keep the white background for the knob */
  border-radius: 50%;
  transition: transform 0.3s ease;
  z-index: 1;
}

.lang-toggle input:checked ~ .slider-knob {
  transform: translateX(36px);
}

/* Add styling for the new static flag icons */
.static-flag-icon {
  width: 20px;
  height: 14px;
  border-radius: 2px;
  object-fit: cover;
  opacity: 0.6;
  transition: opacity 0.3s ease;
  position: relative; /* ensures z-index works */
  z-index: 20; /* flags are above music button */
}

#musicToggle {
  z-index: 10; /* behind flags */
  position: relative;
}

/* Hero */

.hero {
  height: 60vh;

  display: flex;

  flex-direction: column;

  justify-content: center;

  align-items: center;

  text-align: center;

  background: linear-gradient(120deg, #fdf6f0, #e3f2fd);

  color: var(--text);

  padding: 0 1rem;
}

.hero h1 {
  font-size: 2.5rem;

  margin-bottom: 1rem;

  color: var(--blue);

  animation: fadeUp 1s ease;
}

.hero p {
  font-size: 1.2rem;

  max-width: 650px;

  animation: fadeUp 1s ease 0.5s;
}

.hero .cta-btn {
  margin-top: 1.5rem;

  padding: 0.8rem 1.8rem;

  background: var(--btn-bg);

  color: #fff;

  border: none;

  border-radius: 10px;

  font-weight: 600;

  font-size: 1rem;

  cursor: pointer;

  transition: 0.3s;
}

.hero .cta-btn:hover {
  background: var(--btn-hover);
}

/* Main Content */

main {
  padding: 2rem;

  margin-left: 0;

  transition:
    margin-left 0.5s ease,
    opacity 1s ease;

  opacity: 0;
}

main.loaded {
  opacity: 1;
}

section {
  margin: 3rem 0;
  /* animation: fadeUp 1s ease both; */ /* comment this out */
}

section h2 {
  font-size: 1.8rem;

  margin-bottom: 1rem;

  color: var(--red);
}

section p {
  line-height: 1.6;

  max-width: 700px;
}

/* Lesson Cards */

.card-container {
  display: flex;

  flex-wrap: wrap;

  gap: 1.5rem;

  margin-top: 1rem;
}

.card {
  flex: 1 1 250px;

  background: var(--card-bg);

  border-radius: 15px;

  padding: 1.5rem;

  box-shadow: var(--shadow);

  transition:
    transform 0.3s,
    box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-5px);

  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.card h3 {
  color: var(--blue);

  margin-bottom: 0.5rem;
}

.card p {
  font-size: 0.95rem;
}

.card .lesson-btn {
  margin-top: 1rem;

  padding: 0.6rem 1.2rem;

  background: var(--red);

  color: #fff;

  border: none;

  border-radius: 8px;

  font-weight: 500;

  cursor: pointer;

  transition: 0.3s;
}

.card .lesson-btn:hover {
  background: #c0392b;
}

/* Testimonial Carousel */

.carousel {
  position: relative;

  max-width: 700px;

  margin: 2rem auto;

  overflow: hidden;

  border-radius: 15px;

  background: var(--card-bg);

  padding: 2rem;

  box-shadow: var(--shadow);
}

.carousel-slide {
  display: flex;

  position: relative;
}

.testimonial {
  position: absolute;

  width: 100%;

  opacity: 0;

  transition: opacity 0.6s ease;
}

.testimonial.active {
  opacity: 1;

  position: relative;
}

.testimonial p {
  font-style: italic;

  margin-bottom: 1rem;
}

.testimonial span {
  font-weight: 600;

  color: var(--blue);
}

.carousel-btns {
  text-align: center;

  margin-top: 1rem;
}

.carousel-btns button {
  margin: 0 5px;

  padding: 0.4rem 0.8rem;

  border: none;

  border-radius: 5px;

  background: var(--blue);

  color: #fff;

  cursor: pointer;

  transition: 0.3s;
}

.carousel-btns button:hover {
  background: #2980b9;
}

/* Gallery */

.gallery-container {
  display: flex;

  flex-wrap: wrap;

  gap: 1rem;

  justify-content: center;

  margin-top: 1rem;
}

.gallery-container img {
  width: 150px;

  height: 100px;

  object-fit: cover;

  border-radius: 10px;

  cursor: pointer;

  transition: 0.3s;
}

.gallery-container img:hover {
  transform: scale(1.05);

  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Lightbox */

#lightbox {
  position: fixed;

  top: 0;

  left: 0;

  width: 100%;

  height: 100%;

  background: rgba(0, 0, 0, 0.8);

  display: none;

  justify-content: center;

  align-items: center;

  z-index: 2000;
}

#lightbox img {
  max-width: 90%;

  max-height: 80%;

  border-radius: 15px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;

    transform: translateY(20px);
  }

  to {
    opacity: 1;

    transform: translateY(0);
  }
}

@media (min-width: 768px) {
  main {
    margin-left: 250px;
  }
}

/* Remove sidebar padding at top for logo */

.sidebar {
  padding-top: 0; /* removes top padding */
}

/* Make logo fill the sidebar width */

.sidebar-logo {
  width: 100%;

  height: auto;

  display: block;

  margin: 0; /* flush at top */

  padding: 0;
}

.sidebar-logo-img {
  display: block;

  width: 100%; /* full width of sidebar */

  height: auto; /* maintain aspect ratio */

  object-fit: contain; /* keeps image fully visible without cropping */

  margin: 0; /* no extra space */

  border-radius: 0;
}

/* Optional: on mobile, slightly smaller but still flush */

@media (max-width: 768px) {
  .sidebar-logo-img {
    width: 100%;
  }
}

.header-logo-img {
  height: 50px; /* adjust as needed */

  width: auto; /* maintain aspect ratio */

  display: block;
}

.lesson-icon {
  width: 60px; /* same size for all icons */

  height: 60px;

  display: block;

  margin-bottom: 1rem;
}

/* Modal (Contact Form) */

.modal {
  display: none;

  position: fixed;

  z-index: 3000;

  left: 0;

  top: 0;

  width: 100%;

  height: 100%;

  background-color: rgba(0, 0, 0, 0.5);

  justify-content: center;

  align-items: center;
}

.modal-content {
  background: var(--card-bg);

  padding: 2rem;

  border-radius: 15px;

  box-shadow: var(--shadow);

  width: 90%;

  max-width: 400px;

  animation: fadeIn 0.4s ease;
}

.close-btn {
  float: right;

  font-size: 1.5rem;

  cursor: pointer;

  color: var(--red);
}

.modal-content h2 {
  margin-bottom: 1rem;

  color: var(--blue);
}

.modal-content label {
  display: block;

  margin-top: 0.8rem;

  font-weight: 500;
}

.modal-content input,
.modal-content textarea {
  width: 100%;

  margin-top: 0.4rem;

  padding: 0.6rem;

  border: 1px solid #ccc;

  border-radius: 8px;

  font-family: inherit;

  font-size: 1rem;
}

.submit-btn {
  margin-top: 1rem;

  padding: 0.8rem 1.5rem;

  background: var(--btn-bg);

  border: none;

  border-radius: 10px;

  color: #fff;

  font-weight: 600;

  cursor: pointer;

  transition: background 0.3s;
}

.submit-btn:hover {
  background: var(--btn-hover);
}

/* Weekly Schedule Styles */

#schedule {
  margin-top: 4rem;

  text-align: center;
}

.schedule-key {
  display: flex;

  justify-content: center;

  gap: 1.5rem;

  font-size: 1rem;

  margin-bottom: 1rem;
}

.schedule-grid {
  overflow-x: auto;
}

.schedule-table {
  border-collapse: collapse;

  width: 100%;

  max-width: 800px;

  margin: 0 auto;

  background: var(--card-bg);

  box-shadow: var(--shadow);

  border-radius: 10px;
}

.schedule-table th,
.schedule-table td {
  border: 1px solid #ccc;

  padding: 0.4rem;

  text-align: center;

  font-size: 0.9rem;
}

.schedule-table th {
  background: var(--blue);

  color: white;

  position: sticky;

  top: 0;
}

.schedule-table td {
  min-width: 60px;
}

/* Schedule color coding */

.schedule-table td.open {
  background-color: #c7f3c1; /* soft green */
}

.schedule-table td.limited {
  background-color: #fff3b0; /* gentle yellow */
}

.schedule-table td.closed {
  background-color: #f7c4c4; /* light red/pink */
}

.schedule-table td {
  transition: background-color 0.2s ease;
}
.fade-slide-up {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease-out;
}

.fade-slide-up.visible {
  opacity: 1;
  transform: translateY(0);
}
.floating-contact {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
}

.floating-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 50px;
  height: 50px;
  background-color: var(--btn-bg);
  color: #fff;
  border-radius: 50%;
  font-size: 24px;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition:
    transform 0.3s,
    background-color 0.3s;
}

.floating-btn:hover {
  transform: translateY(-5px);
  background-color: var(--btn-hover);
}

.floating-btn.line {
  background-color: #00c300; /* LINE green */
}

.floating-btn.line:hover {
  background-color: #00a000;
}

.floating-btn.email {
  background-color: var(--btn-bg);
}

.floating-btn.email:hover {
  background-color: var(--btn-hover);
}

#contact-info {
  text-align: center;
  margin: 3rem 0;
}

#contact-info .contact-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.contact-qr {
  width: 150px;
  height: 150px;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

#contact-info p {
  font-size: 1rem;
}

#contact-info a {
  color: var(--blue);
  text-decoration: underline;
}
