.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 5vw, 3rem);
}

/* Header - Fluid responsive */
header {
  width: 100%;
  height: clamp(250px, 50vh, 400px);
  background-image: url("../../assets/index-background.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

.header-content {
  background: rgba(0, 0, 0, 0.5);
  padding: clamp(20px, 5vw, 30px);
  border-radius: 12px;
  text-align: center;
  color: #fff;
  max-width: 90%;
  width: min(700px, 90vw);
  margin: 0 auto;
}

.header-content h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.header-content p {
  font-size: clamp(1rem, 2.5vw, 1.1rem);
  margin-bottom: 2rem;
}

.header-content .cta-button {
  background: #fff;
  color: #0070f3;
  font-size: clamp(1rem, 2.5vw, 1.1rem);
  padding: clamp(0.8rem, 2vw, 1rem) clamp(1.5rem, 4vw, 2rem);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  max-width: clamp(250px, 50vw, 300px);
  margin: 0 auto;
  font-weight: 600;
  white-space: nowrap;
  min-width: fit-content;
  flex-shrink: 0;
  animation: pulse 5s infinite;
  position: relative;
  z-index: 1;
}

.header-content .cta-button:hover {
  background: #f0f0f0;
  animation: none;
  transform: scale(1.05);
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(0, 112, 243, 0.7);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(0, 112, 243, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(0, 112, 243, 0);
  }
}

/* Sections - More fluid spacing */
section {
  width: 100%;
  padding: 0;
  background-color: #fff;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Typography - Responsive scaling */
h1 {
  font-size: clamp(1.8rem, 4vw, 2.2rem);
  margin-bottom: 1rem;
  line-height: 1.3;
}

h2 {
  font-size: clamp(1.3rem, 3vw, 1.5rem);
  margin-bottom: 1rem;
  line-height: 1.4;
}

.italic-heading {
  font-style: italic;
}

.underline-heading {
  text-decoration: underline;
  text-underline-position: under;
  text-decoration-thickness: 2px;
  text-underline-offset: 8px;
}

p {
  font-size: clamp(1rem, 2vw, 1.1rem);
  margin-bottom: 2rem;
  max-width: 800px;
  line-height: 1.6;
}

#why-raffles p {
  max-width: none;
}
/* Video Section Styles */
#how-it-works {
  background-color: #FFFFFF;
  padding: clamp(40px, 8vw, 60px) 0;
}

#how-it-works .heading {
  color: #000000;
  margin-bottom: clamp(30px, 5vw, 40px);
}

.video-container {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 112, 243, 0.2);
  background: #000; /* Fallback color */
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-description {
  text-align: center;
  margin-top: clamp(20px, 4vw, 30px);
}

.video-description h3 {
  font-size: clamp(1.1rem, 2.5vw, 1.3rem);
  color: #000000;
  margin-bottom: 15px;
}

.video-description p {
  color: #000000;
  max-width: 700px;
  margin: 0 auto;
}

.video-cta {
  text-align: center;
  margin-top: clamp(30px, 5vw, 40px);
}

/* Buttons - More responsive */
.cta-button {
  background: #fff;
  color: #0070f3;
  padding: clamp(0.7rem, 2vw, 0.9rem) clamp(1.5rem, 3vw, 2rem);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: clamp(0.9rem, 2vw, 1rem);
  margin-top: 20px;
  margin-bottom: 10px;
  transition: all 0.3s ease;
  text-align: center;
  display: inline-block;
  font-weight: 600;
  border: 1px solid #0070f3;
  white-space: nowrap;
  min-width: fit-content;
  flex-shrink: 0;
}

.cta-button:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
}

/* Section backgrounds - maintained */
#why {
  background-color: #fff;
}

/* Two-column layout - More responsive */
.two-column-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0;
  padding: clamp(40px, 8vw, 60px) clamp(1rem, 5vw, 3rem) 0
    clamp(1rem, 5vw, 3rem);
  gap: clamp(20px, 5vw, 40px);
}

.two-column-row.flipped {
  flex-direction: row-reverse;
}

.text-block,
.image-block {
  flex: 1;
  min-width: min(300px, 100%);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.text-block.visible,
.image-block.visible {
  opacity: 1;
  transform: translateY(0);
}

.image-block {
  display: flex;
  justify-content: center;
  align-items: center;
}

.image-block img {
  width: 100%;
  max-width: clamp(280px, 60vw, 360px);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.two-column {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(20px, 5vw, 40px);
}

.two-column > div {
  flex: 1;
  min-width: min(280px, 100%);
}

/* Section-specific styling - maintaining colors */
#why {
  padding: clamp(40px, 8vw, 60px) 0 clamp(30px, 5vw, 40px) 0;
}

#why .underline-heading {
  margin-bottom: clamp(30px, 5vw, 40px);
}

#why .container,
#why-raffles .container,
#register .container {
  overflow-wrap: break-word;
  word-break: break-word;
  padding: clamp(24px, 5vw, 40px);
  background-color: #daf0f7;
  border-radius: 12px;
}

#why-raffles .container {
  background-color: #daf0f7;
}

#register {
  text-align: center;
  padding: clamp(30px, 5vw, 40px) 0;
}

#register p {
  margin: 0 auto 2rem auto;
}

#contact-info {
  background-color: #cccccc;
  color: #000;
  opacity: 1 !important;
  transform: none !important;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: clamp(20px, 5vw, 40px);
  text-align: center;
  padding: clamp(20px, 5vw, 30px) clamp(1rem, 5vw, 3rem);
}

.info-grid div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100px;
  padding: 20px;
  opacity: 1 !important;
  transform: none !important;
}

#testimonials {
  background: rgba(253, 242, 208, 0.85)
    url("https://images.unsplash.com/photo-1588072432836-e10032774350?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80")
    center/cover no-repeat;
  background-blend-mode: overlay;
  position: relative;
  padding-bottom: clamp(30px, 5vw, 40px);
}

.testimonial-box {
  background-color: rgba(255, 255, 255, 0.95);
  border: 1px solid #f0e6c3;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

#testimonials .container {
  text-align: center;
  padding: clamp(40px, 8vw, 60px) clamp(1rem, 5vw, 3rem);
}

.testimonial-carousel {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
  padding: 0 15px;
  box-sizing: border-box;
}

.testimonial-slides {
  position: relative;
  min-height: clamp(180px, 30vw, 200px);
  overflow: hidden;
  width: 100%;
}

.testimonial-box {
  position: absolute;
  width: calc(100% - 30px);
  left: 15px;
  padding: clamp(20px, 4vw, 30px);
  box-sizing: border-box;
  background-color: #fff9e6;
  border: 2px solid #f5d678;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
  opacity: 0;
  transform: translateX(100%) scale(0.95);
  z-index: 1;
}

.testimonial-box.active {
  opacity: 1;
  transform: translateX(0) scale(1);
  z-index: 2;
}

.testimonial-box.leaving {
  transform: translateX(-100%) scale(0.95);
  opacity: 0;
}

.testimonial-box p {
  font-size: clamp(1rem, 2vw, 1.1rem);
  font-style: italic;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.testimonial-box h3 {
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  font-weight: 600;
  color: #555;
}

.carousel-dots {
  text-align: center;
  margin-top: 20px;
}

.dot {
  display: inline-block;
  width: clamp(10px, 2vw, 12px);
  height: clamp(10px, 2vw, 12px);
  border-radius: 50%;
  background-color: #bbb;
  margin: 0 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.dot.active {
  background-color: #0070f3;
}

#testimonials .cta-button {
  background-color: #fff;
  color: #0070f3;
  border: 1px solid #0070f3;
  transition: all 0.3s ease;
  font-weight: 600;
  white-space: nowrap;
  min-width: fit-content;
  flex-shrink: 0;
}

#testimonials .cta-button:hover {
  background-color: #f0f0f0;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.section-cta {
  text-align: center;
  margin-top: clamp(30px, 5vw, 40px);
}

.section-cta .cta-button {
  margin: 0 auto;
  display: block;
  max-width: clamp(200px, 40vw, 250px);
  white-space: nowrap;
  min-width: fit-content;
  flex-shrink: 0;
}

#methodology {
  background-color: #f8f9fa;
}

#methodology .container {
  padding: clamp(40px, 8vw, 60px) clamp(1rem, 5vw, 3rem) clamp(30px, 5vw, 40px)
    clamp(1rem, 5vw, 3rem);
}

#in-a-rush {
  background-color: #f5f9ff;
}

#in-a-rush .container {
  padding: clamp(40px, 8vw, 60px) clamp(1rem, 5vw, 3rem);
}

#why-raffles {
  background: linear-gradient(
      rgba(255, 255, 255, 0.7),
      rgba(255, 255, 255, 0.7)
    ),
    url("https://images.unsplash.com/photo-1588072432836-e10032774350?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80")
      center/cover no-repeat;
}

#why-raffles .container {
  margin: clamp(40px, 8vw, 60px) auto;
}

#tutor-types {
  background-color: #f8f9fa;
}

#tutor-types .container {
  padding: clamp(40px, 8vw, 60px) clamp(1rem, 5vw, 3rem) clamp(30px, 5vw, 40px)
    clamp(1rem, 5vw, 3rem);
}

/* Form and button specific styles */
#rush-form button[type="submit"] {
  background-color: #fff;
  color: #0070f3;
  border: 1px solid #0070f3;
  font-weight: 600;
  white-space: nowrap;
  min-width: fit-content;
  flex-shrink: 0;
  padding: clamp(12px, 2vw, 16px);
  font-size: clamp(1rem, 2vw, 1.1rem);
}

#rush-form button[type="submit"]:hover {
  background-color: #f0f0f0;
}

#rush-form input,
#rush-form select {
  padding: clamp(12px, 2vw, 16px);
  font-size: clamp(0.9rem, 2vw, 1rem);
  border-radius: 4px;
  border: 1px solid #ddd;
  width: 100%;
  margin-bottom: 1rem;
}

/* Specific colors for each button type - maintaining original colors */
#tutor-types .cta-button[style*="2196F3"] {
  background-color: #2196f3 !important;
  color: white !important;
}

#tutor-types .cta-button[style*="4CAF50"] {
  background-color: #4caf50 !important;
  color: white !important;
}

#tutor-types .cta-button[style*="9C27B0"] {
  background-color: #9c27b0 !important;
  color: white !important;
}

#tutor-types .cta-button:hover {
  opacity: 0.9;
}

/* Specific styles for each tutor type button - maintaining original colors */
.part-time-tutor-btn {
  background-color: #2196f3 !important;
  color: white !important;
  white-space: nowrap;
  min-width: fit-content;
  flex-shrink: 0;
}

.full-time-tutor-btn {
  background-color: #4caf50 !important;
  color: white !important;
  white-space: nowrap;
  min-width: fit-content;
  flex-shrink: 0;
}

.moe-tutor-btn {
  background-color: #9c27b0 !important;
  color: white !important;
  white-space: nowrap;
  min-width: fit-content;
  flex-shrink: 0;
}

/* Add this CSS rule to remove borders from tutor type buttons */
#tutor-types .cta-button {
  border: 0px !important;
}

/* Hover effects - maintaining original colors */
.part-time-tutor-btn:hover {
  background-color: #1e88e5 !important;
}

.full-time-tutor-btn:hover {
  background-color: #43a047 !important;
}

.moe-tutor-btn:hover {
  background-color: #8e24aa !important;
}

/* Mobile-specific breakpoints */
@media (max-width: 768px) {
  .text-block {
    text-align: center;
    margin-top: 20px;
  }

  .two-column {
    flex-direction: column;
  }

  .header-content .cta-button {
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .cta-button {
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  /* Replace with this more targeted approach */
  .two-column-row {
    flex-direction: column;
  }

  /* For flipped rows, we want to reverse the order on mobile */
  .two-column-row.flipped {
    flex-direction: column-reverse;
  }

  .text-block {
    text-align: center;
    margin-top: 20px;
  }

  .two-column {
    flex-direction: column;
  }

  .header-content .cta-button {
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .cta-button {
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
}

/* Tablet breakpoint */
@media (min-width: 769px) and (max-width: 1024px) {
  .two-column-row {
    gap: 30px;
  }

  .image-block img {
    max-width: 320px;
  }
}

/* Large desktop adjustments */
@media (min-width: 1400px) {
  .container {
    max-width: 1400px;
  }

  .header-content {
    max-width: 800px;
  }

  .image-block img {
    max-width: 400px;
  }
}

/* Ultra-wide screens */
@media (min-width: 1920px) {
  .container {
    max-width: 1600px;
  }

  .header-content h1 {
    font-size: 2.5rem;
  }

  .header-content p {
    font-size: 1.2rem;
  }
}

/* Portrait tablet adjustments */
@media (max-width: 1024px) and (orientation: portrait) {
  .two-column-row {
    flex-direction: column;
  }

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

/* Landscape phone adjustments */
@media (max-width: 896px) and (orientation: landscape) {
  header {
    height: 70vh;
  }

  .header-content {
    padding: 20px;
  }

  .header-content h1 {
    font-size: 1.8rem;
  }
}
/* Responsive adjustments */
@media (max-width: 768px) {
  .video-wrapper {
    border-radius: 8px;
  }
  
  .video-description h3 {
    font-size: 1.2rem;
  }
  
  .video-description p {
    padding: 0 20px;
  }
}

/* Small devices */
@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .header-content {
    padding: 16px;
  }

  .testimonial-carousel {
    padding: 0 5px;
  }

  .testimonial-box {
    width: calc(100% - 10px);
    left: 5px;
    padding: 16px;
  }

  .info-grid {
    padding: 20px 1rem;
  }
}

/* Print styles */
@media print {
  header {
    height: 200px;
  }

  .header-content {
    background: rgba(0, 0, 0, 0.8);
  }

  .cta-button {
    display: none;
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .header-content .cta-button {
    animation: none;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .header-content {
    background: rgba(0, 0, 0, 0.8);
  }

  .testimonial-box {
    border: 3px solid #000;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  /* Keep existing color scheme but could add dark mode variants if needed */
}

/* Focus management for better accessibility */
.cta-button:focus {
  outline: 2px solid #0070f3;
  outline-offset: 2px;
}

/* Ensure touch targets are large enough */
@media (hover: none) and (pointer: coarse) {
  .cta-button {
    min-height: 44px;
    padding: 12px 24px;
  }
}
