:root {
  --primary: #0d6efd;
  --dark: #111;
  --light: #ffffff;
  --gray: #f5f5f5;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
}

body {
  background: var(--gray);
  color: var(--dark);
}

/* ================= HERO ================= */

.hero {
  position: relative;
  height: 80vh;
  background: url("https://images.unsplash.com/photo-1524995997946-a1c2e315a42f")
    center / cover no-repeat;
  color: var(--light);
}

/* Overlay */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1;
}

/* Centered content */
.hero-content {
  position: relative;
  z-index: 3;               /* ensure above overlay */
  height: 100%;
  display: flex;
  flex-direction: column;   /* stack title + subtitle */
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 20px;
}

/* Title */
.hero h1 {
  margin: 0;                /* remove default margins */
  font-size: 3rem;
  color: #ffc800;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.9);
}

/* Subtitle */
.hero-subtitle {
  margin-top: 14px;
  font-size: 1.2rem;
  font-weight: 400;

  color: #000000;                 /* black text */
  background-color: #ffc800;      /* yellow box */

  padding: 10px 18px;             /* space around text */
  border-radius: 12px;            /* smooth corners */

  display: inline-block;          /* box hugs text */
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);

  position: relative;             /* ensures visibility */
  z-index: 3;

  transition: all 0.3s ease;      /* smooth hover/animate */
}


/* Top bar */
.hero-top {
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  z-index: 4;
}

.logo,
.hotline {
  color: var(--light);
  font-weight: 600;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

/* Mobile */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.2rem;
  }

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

.scroll-down {
  margin-top: 50px;
  color: #fff;
  text-align: center;
  animation: blink 1.8s infinite;
}

.scroll-down a {
  font-size: 32px;
  text-decoration: none;
  color: #fff;
}

/* Blink animation */
@keyframes blink {
  0%   { opacity: 1; }
  50%  { opacity: 0.3; }
  100% { opacity: 1; }
}

/* ================= SEARCH BAR ================= */

.search-input {
  padding: 12px 14px;
  min-width: 260px;
  font-size: 0.95rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  transition: border-color 0.2s, box-shadow 0.2s;

  /* ✅ FORCE ROW 1 */
  flex-basis: 100%;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13,110,253,0.15);
}

/* ================= FILTER BAR ================= */

.filter-bar {
  display: flex;
  flex-direction: column; /* ✅ vertical rows */
  gap: 16px;
  padding: 20px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
  margin-bottom: 40px;
}

/* ================= ROW 1: SEARCH ================= */

.search-input {
  padding: 12px 14px;
  width: 100%;
  font-size: 0.95rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13,110,253,0.15);
}

/* ================= ROW 2: FILTERS ================= */

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* Filter groups */
.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Dropdowns */
.filter-row select {
  padding: 12px 14px;
  min-width: 160px;
  font-size: 0.95rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.filter-row select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13,110,253,0.15);
}

/* ================= CLEAR FILTER BUTTON ================= */

.clear-btn {
  background: #01a2ff;
  color: #fff;
  border: none;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}

.clear-btn:hover {
  background: #008ae6;
}

/* ================= MOBILE ================= */

@media (max-width: 768px) {

  .filter-row,
  .filter-group {
    flex-direction: column;
    width: 100%;
  }

  .filter-row select,
  .clear-btn {
    width: 100%;
    font-size: 1rem;
  }
}





/* ================= TEACHERS ================= */

.teachers {
  padding: 60px 40px;
  max-width: 1200px;
  margin: auto;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.card {
  background: var(--light);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.video-wrapper {
    position: relative;
    padding-top: 56.25%;
    cursor: pointer;
}

.video-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: none;
}

.video-wrapper img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

/* 🔒 Disable click when there is NO video */
.video-wrapper.no-video {
    pointer-events: none;
    cursor: default;
}



.card-content {
  padding: 20px;
  text-align: center;
}

.subjects {
  color: #666;
  margin-bottom: 0px;
}

.grades {
  color: #666;
  margin-bottom: 0px;
}

.modes {
  color: #666;
  margin-bottom: 0px;
  font-size: 0.95rem;
}

.location {
  color: #666;
  margin-bottom: 10px;
  font-size: 0.95rem;
}

.rates {
  color: #ffffff;              
  background-color: #3d3d3d;   
  padding: 6px 12px;           
  border-radius: 999px;        
  margin-bottom: 15px;
  font-size: 0.9rem;
  display: inline-block;       
}



.actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.btn {
  padding: 10px 15px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
}

.btn.primary {
  background: var(--primary);
  color: var(--light);
}

.btn.secondary {
  background: #e0e0e0;
}

/* Buttons inside models */

.modal-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.modal-actions .btn {
    width: 100%;
    max-width: 100%;
}



/* ================= MOBILE FIX: TEACHER CARD BUTTONS ================= */

@media (max-width: 600px) {

  .actions {
    flex-wrap: wrap;              /* allow buttons to wrap */
    gap: 8px;
  }

  .actions .btn {
    flex: 1 1 45%;                /* 2 buttons per row */
    font-size: 0.9rem;
    padding: 10px 8px;
  }

  /* Make Book button stand out */
  .actions .btn.primary {
    flex: 1 1 100%;               /* full width */
  }
}


/* ================= VIDEO MODAL ================= */

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal.active {
  display: flex;
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 900px;
  aspect-ratio: 16 / 9; /* perfect video ratio */
}

.modal-content iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 8px;
}

/* Close Button */
.modal-close {
  position: absolute;
  top: 20px;
  right: 25px;
  font-size: 2.2rem;
  color: #ffffff;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

/* Mobile fine-tuning */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
  }

  .modal-close {
    top: 15px;
    right: 15px;
    font-size: 2rem;
  }
}



/* ================= ABOUT MODAL ================= */

.about-content {
  background: #ffffff;
  padding: 30px;
  width: 90%;
  max-width: 600px;
  border-radius: 8px;
  overflow-y: auto;
  max-height: 90vh;
}

.about-content h2 {
  margin-bottom: 15px;
  text-align: center;
}

.about-content h4 {
  margin-top: 20px;
  margin-bottom: 10px;
}

.about-content p {
  margin-bottom: 15px;
  line-height: 1.6;
  text-align: justify;
}

.about-content ul {
  padding-left: 20px;
  margin-bottom: 20px;
}

.about-content li {
  margin-bottom: 6px;
}

.about-content .btn.primary {
  width: 100%;
  margin-top: 20px;
  padding: 14px;
  font-size: 1.05rem;
  border-radius: 6px;
}

/* ================= TEACHER PHOTO ================= */

.teacher-photo {
  display: flex;
  justify-content: center;
  margin-bottom: 15px;
}

.teacher-photo img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #f0f0f0;
}

/* Mobile adjustment */
@media (max-width: 768px) {
  .teacher-photo img {
    width: 100px;
    height: 100px;
  }
}


/* ================= AVAILABLE TIME MODAL ================= */

.time-content {
  background: #ffffff;
  padding: 30px;
  width: 90%;
  max-width: 700px;
  border-radius: 10px;
  max-height: 90vh;
  overflow-y: auto;
}

.time-content h2 {
  text-align: center;
  margin-bottom: 20px;
}

.time-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.time-table th,
.time-table td {
  border: 1px solid #ddd;
  padding: 12px;
  text-align: center;
}

.time-table th {
  background: #f5f5f5;
  font-weight: 600;
}

.time-table tr:nth-child(even) {
  background: #fafafa;
}

/* Mobile */
@media (max-width: 600px) {
  .time-table th,
  .time-table td {
    padding: 10px;
    font-size: 0.9rem;
  }
}


/* ================= CUSTOM ALERT MODAL ================= */

.alert-content {
  background: #ffffff;
  padding: 30px 25px;
  width: 90%;
  max-width: 400px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0,0,0,0.25);
  animation: scaleIn 0.2s ease;
}

.alert-content p {
  font-size: 1rem;
  margin-bottom: 20px;
  color: #333;
  line-height: 1.5;
}

@keyframes scaleIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}


/* ================= PROFESSIONAL BOOKING FORM ================= */

.booking-form {
  background: #ffffff;
  max-width: 520px;
  margin: 40px auto;
  padding: 32px 28px;
  border-radius: 12px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Title spacing */
.teachers h1 {
  text-align: center;
  margin-bottom: 10px;
}

.session-note {
    text-align: center;
    margin: 10px auto 25px auto;
    font-size: 0.95rem;
    color: #555;
    max-width: 500px;
}

/* Labels */
.booking-form label {
  font-weight: 600;
  font-size: 0.95rem;
  color: #333;
}

/* Inputs & Selects */
.booking-form input,
.booking-form select {
  padding: 12px 14px;
  font-size: 0.95rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  transition: border-color 0.2s, box-shadow 0.2s;
}

/* Focus state */
.booking-form input:focus,
.booking-form select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

/* Placeholder text */
.booking-form input::placeholder {
  color: #999;
}

/* Book Now Button */
.booking-form button {
  margin-top: 20px;
  padding: 14px;
  font-size: 1.05rem;
  font-weight: bold;
  border-radius: 8px;
  width: 100%;
  background: var(--primary);
  color: #ffffff;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* Button hover */
.booking-form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(13, 110, 253, 0.3);
}

/* Button active */
.booking-form button:active {
  transform: translateY(0);
  box-shadow: 0 5px 12px rgba(13, 110, 253, 0.25);
}

/* Mobile adjustments */
@media (max-width: 600px) {
  .booking-form {
    margin: 20px 16px;
    padding: 24px 20px;
  }
}

/* ================= NO RESULTS MESSAGE ================= */

.no-results {
  text-align: center;
  padding: 40px 20px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  margin: 30px auto;
  max-width: 700px;
}

.no-results h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
  color: #222;
}

.no-results p {
  color: #555;
  line-height: 1.6;
  font-size: 0.95rem;
}

.no-results .hint {
  margin-top: 15px;
  font-size: 0.9rem;
  color: #777;
}

/* ================= CONTACT PAYMENT MODAL – PROFESSIONAL POLISH ================= */

.contact-payment-content {
    background: #ffffff;
    padding: 32px 30px;
    width: 90%;
    max-width: 460px;
    border-radius: 14px;
    text-align: center;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
}

.contact-payment-content h2 {
    margin-bottom: 10px;
    font-size: 1.6rem;
}

.contact-payment-content h3 {
    margin: 18px 0;
    font-size: 1rem;
    font-weight: 600;
    color: #666;
}

/* Price highlight */
.contact-payment-content .price {
    margin: 14px 0 18px;
    font-size: 1.15rem;
    background: #f1f6ff;
    padding: 10px;
    border-radius: 8px;
    color: #0d47a1;
}

/* Benefits list */
.contact-payment-content .benefits {
    list-style: none;
    padding: 0;
    margin: 18px 0;
    text-align: left;
}

.contact-payment-content .benefits li {
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: #333;
    padding-left: 4px;
}

/* Trust notes */
.contact-payment-content .trust-note {
    font-size: 0.85rem;
    color: #555;
    margin: 10px 0;
    line-height: 1.5;
}

/* WhatsApp CTA */
.contact-payment-content .contact-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.contact-payment-content .contact-actions .btn.secondary {
    background: #25D366;
    color: #ffffff;
    border: none;
}

.contact-payment-content .contact-actions .btn.secondary:hover {
    background: #1ebe5d;
}

/* Card payment button emphasis */
.contact-payment-content .btn.primary {
    padding: 12px 20px;
    font-size: 1rem;
    border-radius: 8px;
}

/* Cancel button soft look */
#cancelContactPay {
    background: #e0e0e0;
    color: #333;
}

/* Mobile spacing */
@media (max-width: 480px) {
    .contact-payment-content {
        padding: 26px 22px;
    }
}


/* ===== TOP NAVIGATION ===== */
.main-nav {
  display: flex;
  align-items: center;
  position: relative;
}

/* MAIN MENU */
.menu {
  list-style: none;
  display: flex;
  gap: 22px;
  margin: 0;
  padding: 0;
}

.menu li {
  position: relative;
}

.menu a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 6px 6px;
  font-size: 15px;
}

/* ===== DROPDOWN (DESKTOP) ===== */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: transparent;
  padding-top: 6px;
  z-index: 2000;
}

.dropdown-menu,
.dropdown-menu li {
  list-style: none;
}

.dropdown-menu li a {
  color: #fff;
  font-size: 14px;
  padding: 4px 0;
  display: inline-block;
  opacity: 0.85;
}

.dropdown-menu li a:hover {
  opacity: 1;
  text-decoration: underline;
}

/* SHOW DROPDOWN ON HOVER (DESKTOP ONLY) */
@media (min-width: 769px) {
  .dropdown:hover > .dropdown-menu {
    display: block;
  }
}

/* DESKTOP submenu should stay on ONE line */
@media (min-width: 769px) {
  .dropdown-menu li a {
    white-space: nowrap;
  }
}

/* ===== MOBILE MENU ICON ===== */
.menu-toggle {
  display: none;
  font-size: 28px;
  cursor: pointer;
  color: #fff;
}

/* ===== MOBILE STYLES ===== */
@media (max-width: 768px) {

  .menu-toggle {
    display: block;
  }

  .menu {
    display: none;
    position: absolute;
    top: 60px;
    right: 16px;
    background: #0a2540;
    flex-direction: column;
    width: 220px;
    border-radius: 10px;
    padding: 12px 0;
  }

  .menu.show {
    display: flex;
  }

  .menu li {
    padding: 8px 18px;
  }

  /* MOBILE DROPDOWN */
  .dropdown-menu {
    position: static;
    display: none;
    padding: 4px 0 0 0;
  }

  .dropdown-menu li a {
    color: #fff;
    font-size: 14px;
    padding: 6px 0;
    display: block;
  }

  /* TAP TO OPEN SUBMENU */
  .dropdown.open > .dropdown-menu {
    display: block;
  }
}





