:root {
  --main-color: #c0392b;
  --bg-light: #f5f3f0;
  --font-body: "Helvetica Neue", sans-serif;
}

body {
  font-family: var(--font-body);
  margin: 0;
  color: #222;
  background: #fff;
  line-height: 1.6;
  background: 
        radial-gradient(circle at 100% 50%, transparent 20%, rgba(255,255,255,.3) 21%, rgba(255,255,255,.3) 34%, transparent 35%, transparent),
        radial-gradient(circle at 0% 50%, transparent 20%, rgba(255,255,255,.3) 21%, rgba(255,255,255,.3) 34%, transparent 35%, transparent) 0 -50px;
    background-color: var(--bg-light);
    background-size: 75px 100px;
}

/* MOBILE-FIRST DESIGN */
header {
  position: relative;
  overflow: hidden;
  background: url("../img/kyoto2.avif") center/cover no-repeat;
  height: 55vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  padding: 0 1rem;
}

header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.6) 0%,
    rgba(0, 0, 0, 0.4) 50%,
    rgba(0, 0, 0, 0.6) 100%
  );
  z-index: 1;
  pointer-events: none;
}
/* ensure header children sit above overlay */
header > * {
  position: relative;
  z-index: 2;
}

/* improved heading styling */
header h1 {
  /* ...existing code... */
  background: linear-gradient(90deg, #fff 0%, #f8f8f8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 1px rgba(0,0,0,0.3);
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 1rem;
}
/* slightly tweak tagline so it remains visible on the now-lighter image */
header p {
  margin-top: 0.6rem;
  font-size: clamp(0.95rem, 2vw, 1.25rem);
  color: #fff;
  font-weight: 500;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
  padding: 0.5rem 1rem;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 4px;
}

/* CTA Button Styling  Start*/
.cta-button,
button[type="submit"] {
    display: inline-block;
    background: var(--main-color);
    color: white;
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 1rem;
}

.cta-button:hover,
button[type="submit"]:hover {
    background: #fff;
    color: var(--main-color);
    border: 2px solid var(--main-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Add responsive styles */
@media (max-width: 768px) {
    .cta-button {
        padding: 0.8rem 1.5rem;
        font-size: 0.95rem;
    }
}
/* CTA Button Styling End */

section {
  padding: 2rem 1.5rem;
  max-width: 800px;
  margin: auto;
}

h2 {
  color: var(--main-color);
  text-align: center;
  font-size: 1.4rem;
  position: relative;
  padding-bottom: 1rem;
  margin-bottom: 2rem;
}


p {
  font-size: 1rem;
  text-align: justify;
}

.courses {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.course {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
position: relative;
    border: none;
    background: linear-gradient(45deg, #fff 85%, #f5f5f5 100%);

}



.course h3 {
  margin-top: 0;
  color: #333;
}

.rate {
  color: var(--main-color);
  font-weight: bold;
}

form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

input,
textarea {
  padding: 0.9rem;
  border-radius: 5px;
  border: 1px solid #ccc;
  font-size: 1rem;
  width: 100%;
  background: rgba(255,255,255,0.9);
    transition: all 0.3s ease;
}

input:focus, textarea:focus {
    border-color: var(--main-color);
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.1);
    outline: none;
}

footer {
  text-align: center;
  padding: 1.5rem;
  background: var(--bg-light);
  font-size: 0.85rem;
  color: #666;
}

/* DESKTOP ENHANCEMENTS */
@media (min-width: 768px) {
  header h1 {
    font-size: 2.5rem;
  }

  header p {
    font-size: 1.2rem;
  }

  h2 {
    font-size: 1.8rem;
  }

  .courses {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .course {
    flex: 1 1 calc(33% - 1rem);
  }

  p {
    font-size: 1.05rem;
  }
}

/* Floating WhatsApp Button */
.whatsapp-float {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 20px;
  right: 20px;
  background-color: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  text-decoration: none;
  z-index: 999;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-float img {
  width: 30px;
  height: 30px;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  background-color: #1ebe57;
}

/* Make sure it doesn’t overlap content on small screens */
@media (max-width: 600px) {
  .whatsapp-float {
    width: 50px;
    height: 50px;
    bottom: 15px;
    right: 15px;
  }

  .whatsapp-float img {
    width: 26px;
    height: 26px;
  }
}

#contact {
    background: linear-gradient(to bottom, #fff 0%, var(--bg-light) 100%);
    position: relative;
    padding: 3rem 1.5rem;
}

#contact form {
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 0; /* keep spacing consistent with .courses */
background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 
        0 2px 15px rgba(0,0,0,0.05),
        0 0 1px rgba(0,0,0,0.1);
}

/* inputs/textarea/button fill the form width */
#contact form input,
#contact form textarea,
#contact form button {
  width: 100%;
  box-sizing: border-box;
}

/* optional: keep button visually consistent */
#contact form button {
  display: inline-block;
  text-align: center;
}

.japanese-word {
  display: inline-block;
  position: relative;
  margin-bottom: 1.5rem;
  padding: 0.5rem 1rem;
  background: rgba(192, 57, 43, 0.05);
  border-left: 3px solid var(--main-color);
  border-radius: 0 4px 4px 0;
}

.japanese-word .word {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--main-color);
}

.japanese-word .pronunciation {
  font-size: 0.9rem;
  color: #666;
  font-style: italic;
  margin-left: 0.5rem;
}

.japanese-word .meaning {
  font-size: 0.85rem;
  color: #444;
  display: block;
  margin-top: 0.2rem;
}

.word-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.speak-btn {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.speak-btn:hover {
    opacity: 1;
}

.speak-btn.speaking {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Privacy Policy Page Styles */
.privacy-container {
  max-width: 900px;
  margin: 2rem auto;
  padding: 1rem;
}

.privacy-container h1 {
  color: var(--main-color);
  margin-bottom: 0.5rem;
}

.privacy-container h2 {
  color: #333;
  font-size: 1.3rem;
  margin: 2rem 0 1rem;
  text-align: left;
  padding-bottom: 0.5rem;
}

.privacy-container ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.privacy-container li {
  margin-bottom: 0.5rem;
}

.privacy-footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
  font-size: 0.95rem;
  color: #444;
}

/* Back button styling */
.back-button {
  position: fixed;
  top: 20px;
  left: 20px;
  padding: 8px 16px;
  background: var(--main-color);
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.back-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  color: white;
}

.back-button::before {
  content: "←";
  font-size: 1.1em;
}

@media (max-width: 600px) {
  .back-button {
    top: 10px;
    left: 10px;
    padding: 6px 12px;
    font-size: 0.85rem;
  }
}

/* Testimonials Section */
/* Testimonials Section - Mobile First */
#testimonials {
  padding: 2rem 1rem;
  background: #f9f9f9;
  text-align: center;
}

#testimonials h2 {
  font-size: 1.75rem;
  color: #d32f2f;
  margin-bottom: 2rem;
}

.testimonials-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.testimonials-carousel {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 1rem;
  width: 100%;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 0 0.5rem;
}

.testimonials-carousel::-webkit-scrollbar {
  height: 4px;
}

.testimonials-carousel::-webkit-scrollbar-track {
  background: #e0e0e0;
  border-radius: 2px;
}

.testimonials-carousel::-webkit-scrollbar-thumb {
  background: #d32f2f;
  border-radius: 2px;
}

.testimonial-item {
  flex: 0 0 100%;
  scroll-snap-align: start;
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.testimonial-text {
  font-size: 0.95rem;
  color: #333;
  line-height: 1.6;
  margin-bottom: 1rem;
  font-style: italic;
}

.testimonial-author {
  font-weight: 600;
  color: #d32f2f;
  font-size: 0.9rem;
  margin-top: auto;
}

.testimonial-rating {
  color: #ffc107;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

/* Navigation Buttons */
.t-prev,
.t-next {
  background: white;
  border: 1px solid #ddd;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  color: #d32f2f;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.t-prev:hover,
.t-next:hover {
  background: #d32f2f;
  color: white;
  border-color: #d32f2f;
}

.t-prev:active,
.t-next:active {
  transform: scale(0.95);
}

/* Hide buttons on mobile, show on desktop */
@media (max-width: 640px) {
  .t-prev,
  .t-next {
    display: none;
  }
}

.testimonials-controls {
  text-align: center;
  margin-top: 1.5rem;
}

.btn-add-testimonial {
  display: inline-block;
  background: #d32f2f;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s ease;
  font-size: 0.95rem;
}

.btn-add-testimonial:hover {
  background: #b71c1c;
}

/* Tablet & Desktop */
@media (min-width: 768px) {
  #testimonials {
    padding: 3rem 2rem;
  }

  #testimonials h2 {
    font-size: 2rem;
    margin-bottom: 2.5rem;
  }

  .testimonials-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    overflow: visible;
    gap: 1.5rem;
  }

  .testimonial-item {
    flex: 1;
    min-height: 220px;
  }

  .t-prev,
  .t-next {
    display: flex;
  }
}

/* Loading State */
.testimonials-loading {
  text-align: center;
  padding: 2rem;
  color: #666;
  font-size: 1rem;
}