/* Desktop (default) */
.header-controls {
  display: flex;
  gap: 15px;
}
.mobile-controls {
  display: none;
}

/* Mobile check wrapper */
#mobileCheck {
  display: none;             /* default hidden */
  flex-direction: column;    /* keep stacked layout */
  gap: 12px;
  width: 100%;
  max-height: 80vh;          /* ✅ don’t exceed screen height */
  overflow-y: auto;          /* ✅ allow vertical scrolling */
  overflow-x: hidden;        /* 🚫 prevent horizontal scroll */
  padding: 16px;
  box-sizing: border-box;
}

/* On very small screens */
@media (max-width: 600px) {
  #mobileCheck {
    max-height: 90vh;       /* ✅ give a bit more space */
  }
}

/* Mobile styles */
@media (max-width: 768px) {
  .header-controls {
    display: none !important;   /* ✅ force-hide desktop version */
  }
  .mobile-controls {
    display: flex !important;   /* ✅ force-show mobile version */
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
    width: 100%;
  }

  #mobileSearch,
  #mobileCurriculum {
    padding: 8px;
    font-size: 1rem;
    width: 100%;
  }
}

body {
  font-family: "Avenir", Arial, sans-serif;
  margin: 0;
  background: #f9f9f9;
  color: #333;
  font-size: 18px; /* increased global font size */
}

header {
  background: #0A65C1;
  color: #fff;
  padding: 15px 20px;
}

/* Site logo at the top */
.site-header {
  display: flex;
  align-items: left;
  gap: 15px;
}

.header-row {
  display: flex;
  justify-content: space-between; /* logo/moto left, controls right */
  align-items: center;            /* vertical centering */
  padding: 10px 20px;
}

.site-logo {
  width: 250px;
  height: auto;
  padding: 0px 0px;
}

.site-title {
  text-align: left;
}

.site-moto {
  font-size: 1.2rem;
  font-style: italic;
  margin: 0;
  color: #f1f1f1;
  padding-top: 10px;
  padding-right: 0px;
  padding-bottom: 20px;
  padding-left: 30px;
}

.header-controls {
  display: flex;
  justify-content: center;   /* centers the whole row */
  align-items: center;       /* vertically aligns search + nav */
  gap: 20px;                 /* spacing between search and menu */
  margin-top: 15px;
}

.search-filter {
  display: flex;
  gap: 10px;
  padding-top: 10px;
  padding-right: 0px;
  padding-bottom: 10px;
  padding-left: 0px;
}

.search-filter input {
  padding: 8px 12px;
  font-size: 1rem;
}

#searchBar {
  padding: 8px;
  border-radius: 5px;
  border: none;
  width: 200px;
}

/* Curriculum Menu */
.curriculum-menu {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.curriculum-menu button {
  background: #fff;
  color: #0A65C1;
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
}

.curriculum-menu button:hover {
  background: #e8f2ff;
}

.curriculum-menu button:disabled {
  background: #ccc;
  color: #666;
  cursor: not-allowed;
}

.curriculum-menu button.active {
  background: #084E94;  /* darker color for selected */
  color: #FFFFFF;       /* change text color when selected */
  font-weight: bold;
  transform: translateY(-1px);
  border-color: #084E94;
}

/* Tutors stacked vertically */
#tutorsList {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
}

.tutor-card {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  background: #EFEFEF;
  border-radius: 8px;
  box-shadow: 0 6px 12px rgba(0,0,0,0.1);
  padding: 15px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.tutor-card:hover {
  background: #f0f8ff;
  transform: translateY(-2px);
}

/* Tutor profile images */
.tutor-photo {
  width: 160px;
  /* height: 100px; */
  margin-right: 15px;
  aspect-ratio: 4 / 3;    /* lock to 4:3 */
  object-fit: cover;      /* crop to fill the box while keeping ratio */
  border-radius: 12px;    /* rounded corners */
}

.tutor-info {
  flex: 1;
}

.tutor-subjects {
  display: none;
  width: 100%;
  margin-top: 15px;
  flex-direction: column; /* categories stacked */
  gap: 1.5rem; /* space between categories */
}


.tutor-card.active .tutor-subjects {
  display: flex;
  gap: 12px;
}

.card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 6px 10px rgba(0,0,0,0.1);
  padding: 15px;
  text-align: center;
}

/* Netflix-style subject rows */
.category-row {
  margin: 20px 0;
}
.category-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.category-block {
  display: flex;
  flex-direction: column;
  gap: 0.5rem; /* spacing between subjects in the same category */
  width: 100%; /* take full width under tutor card */
}

.category-block .subject-row {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  overflow-x: auto;   /* horizontal scroll for subjects */
  white-space: nowrap;
  padding-bottom: 5px; /* little space for scrollbar */
}

.subjects-row {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  padding: 10px 0;
}
.subject-btn {
  min-width: 160px;
  padding: 10px;
  border-radius: 8px;
  border: none;
  background: #eee;
  cursor: pointer;
  transition: background 0.2s;
}
.subject-btn:hover {
  background: #ddd;
}

/* Subject cards */
.subject-card {
  background: #EFEFEF;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  padding: 12px;
  display: inline-block;
  width: 320px;              /* fixed width */
  position: relative;
  vertical-align: top;
  margin-right: 12px;
  overflow: hidden;          /* 🔹 prevents content overflow */
  text-overflow: ellipsis;   /* 🔹 adds "..." for long text */
  white-space: normal;       /* 🔹 allows wrapping instead of single line */
  flex: 0 0 auto;       /* prevent shrinking, stay in row */
  border: 1px solid #ddd;
}

.subject-card img {
  width: 320px;
  /* height: 120px; */
  aspect-ratio: 16 / 9;    /* lock to 16:9 */
  object-fit: cover;      /* crop to fill the box while keeping ratio */
  border-radius: 12px;    /* rounded corners */
}

.subject-card .content {
  margin-top: 8px;
}

.subject-card h3 {
  font-size: 1rem;
  margin: 5px 0;
  max-width: 100%;           /* 🔹 force text to stay inside */
  word-wrap: break-word;     /* 🔹 break long words */
  overflow-wrap: break-word;
}

.subject-card p {
  font-size: 0.9rem;
  color: #555;
  max-height: 5.4em;          /* ~3 lines (1.8em × 3) */
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;      /* 🔹 show up to 3 lines */
  -webkit-box-orient: vertical;
}

.subject-badge {
  position: absolute;
  top: 16px;
  right: 16px;            /* move inside the card */
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: bold;
  color: white;
  white-space: nowrap;    /* prevent wrapping */
}

.subject-badge.free {
  background: #23AE03; /* green */
}

.subject-badge.paid {
  background: rgba(239, 239, 239, 1); /* EFEFEF with 100% opacity */
  color: #23AE03;
}

/* Video Popup */
.popup {
  display: none; 
  position: fixed; 
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.8);
  justify-content: center; 
  align-items: center;
  z-index: 9999;
}
.popup-content {
  position: relative;
  background: white;
  padding: 20px;
  border-radius: 12px;
  width: 80%;
  max-width: 600px;
  text-align: center;
}
.close {
  position: absolute;
  top: 15px; right: 25px;
  font-size: 28px;
  cursor: pointer;
}

footer {
  text-align: center;
  padding: 20px;
  background: #0A65C1;
  color: #fff;
}
footer .social-links a {
  margin: 0 12px;
  color: #fff;
  font-size: 1.5rem;
  transition: color 0.3s ease, transform 0.2s ease;
}
footer .social-links a:hover {
  color: #FFD700;
  transform: scale(1.2);
}

.video-popup {
  display: none; /* hide by default */
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
  z-index: 1000;
  box-sizing: border-box;
}

.video-popup.show {
  display: flex;
}

.popup-content {
  position: relative;
  width: 90%;
  max-width: 1200px;
  aspect-ratio: 16 / 9; /* responsive 16:9 */
  display: flex;
  justify-content: center;
  align-items: center;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}


/* Mobile verification overlay */
.mobile-check {
  position: absolute; /* overlay on top */
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10001;
}

/* Fade-in animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-20px);}
  to { opacity: 1; transform: translateY(0);}
}

.mobile-card {
  background: #EFEFEF;
  padding: 30px 40px;
  border-radius: 12px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  color: #0A65C1;
  box-shadow: 0 10px 25px rgba(0,0,0,0.6);
  animation: fadeIn 0.4s ease;
}

.mobile-card h2 {
  font-size: 1.6rem;
  margin-bottom: 10px;
  color: #000;
}

.mobile-card p {
  font-size: 0.95rem;
  margin-bottom: 20px;
  color: #000;
}

.mobile-card input {
  width: 100%;
  padding: 12px 15px;
  margin-bottom: 15px;
  border-radius: 8px;
  border: none;
  font-size: 1rem;
  outline: none;
  transition: box-shadow 0.2s ease;
}

.mobile-card input:focus {
  box-shadow: 0 0 8px #0A65C2;
}

.mobile-card button {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: none;
  background: #0A65C1;
  color: #fff;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s, opacity 0.2s, width 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-card button:disabled {
  opacity: 0.6;       /* greyed out */
  cursor: not-allowed;
}

.mobile-card button:hover {
  transform: translateY(-2px);
}

.mobile-card button i.fa-spinner {
  margin-right: 8px;
}

.mobile-check h2 {
  font-size: 1.5rem;
  margin-bottom: 15px;
}

.mobile-check input {
  padding: 10px;
  border-radius: 6px;
  border: none;
  font-size: 1rem;
  width: 220px;
  margin-bottom: 10px;
}

.mobile-check button {
  padding: 20px 16px;
  border-radius: 6px;
  border: none;
  background: #0A65C2;
  cursor: pointer;
  font-weight: bold;
  font-size: 1rem;
}

/* Video container */
.video-container {
  width: 100%;
  height: 100%;
}

.video-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Close button */
.close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1002;
  background: rgba(255,255,255,0.9);
  border: none;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.close-btn:hover {
  background: #fff;
  transform: scale(1.1);
}


.whatsapp-info {
  margin-top: 15px;
  font-size: 0.9rem;
  color: #555;
  line-height: 1.3;
  text-align: center;
}

.whatsapp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  padding: 10px 15px;
  border-radius: 8px;
  background: #25D366; /* WhatsApp green */
  color: #fff;
  font-weight: bold;
  text-decoration: none;
  font-size: 0.95rem;
  transition: background 0.3s, transform 0.2s;
}

.whatsapp-btn:hover {
  background: #1ebe57; /* slightly darker green on hover */
  transform: translateY(-2px);
}
