/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #1e7e34;
}

.btn-full {
    width: 100%;
}

.link-btn {
    background: none;
    border: none;
    color: #007bff;
    cursor: pointer;
    text-decoration: underline;
    font-size: 14px;
}

/* Header */
.header {
    background: white;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    font-size: 24px;
    color: #007bff;
}

.logo h1 {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #666;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 6px;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: rgba(0, 123, 255, 0.05);
}

.nav-link:hover,
.nav-link.active {
    color: #007bff;
    background-color: rgba(14, 114, 221, 0.253); /* Darker background on hover/active (light blue, adjust for preference) */
    transform: scale(1.05); /* Slight scale animation for "pop" effect (remove if you want no scale) */
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-submenu {
    position: relative;
}

.dropdown-link {
    display: block;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dropdown-link:hover {
    background-color: #f8f9fa;
}

.submenu {
    position: absolute;
    left: 100%;
    top: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.dropdown-submenu:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.subject-menu {
    position: relative;
}

.subject-link {
    display: block;
    padding: 10px 14px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.subject-link:hover {
    background-color: #f8f9fa;
}

.topic-menu {
    position: absolute;
    left: 100%;
    top: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.subject-menu:hover .topic-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.topic-link {
    display: block;
    padding: 8px 12px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}

.topic-link:hover {
    background-color: #f8f9fa;
}

.auth-buttons {
    display: flex;
    gap: 10px;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
}

/* Pages */
.page {
    display: none;
}

.page.active {
    display: block;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #007bff, #6610f2);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.hero-content p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Two Cards Section */
.two-cards-section {
    padding: 80px 0;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.card {
    background: white;
    border-radius: 16px;
    padding: 1rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.parent-card .card-icon {
    color: #007bff;
}

.tutor-card .card-icon {
    color: #28a745;
}

.card h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #333;
}

.card p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.features-list {
    list-style: none;
    margin-bottom: 2rem;
    text-align: left;
}

.features-list li {
    padding: 0.2rem 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.features-list i {
    color: #28a745;
    font-size: 14px;
}

/* Features Section */
.features-section {
    padding: 80px 0;
    background: white;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.section-header p {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature {
    text-align: center;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature:nth-child(1) .feature-icon {
    color: #007bff;
}

.feature:nth-child(2) .feature-icon {
    color: #ffc107;
}

.feature:nth-child(3) .feature-icon {
    color: #28a745;
}

.feature h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.feature p {
    color: #666;
    line-height: 1.6;
}

/* Tutors Page */
.page-header {
    padding: 2rem 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 1rem;
}

.search-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.search-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.filter-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #333;
}

.filter-group select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    transition: border-color 0.3s ease;
}

.filter-group select:focus {
    outline: none;
    border-color: #007bff;
}

/* Tutors Grid */
.tutors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.tutor-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tutor-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.tutor-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.tutor-avatar {
    width: 60px;
    height: 60px;
    background: #007bff;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 1rem;
}

.tutor-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
    color: #333;
}

.tutor-rating {
    display: flex;
    align-items: center;
    gap: 5px;
}

.tutor-rating i {
    color: #ffc107;
    font-size: 14px;
}

.tutor-rating span {
    font-size: 14px;
    color: #666;
}

.tutor-details {
    margin-bottom: 1rem;
}

.tutor-detail {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 14px;
    color: #666;
}

.tutor-detail i {
    width: 16px;
    margin-right: 8px;
    color: #999;
}

.tutor-experience {
    margin-bottom: 1rem;
    font-size: 14px;
    color: #666;
}

.tutor-testimonial {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid #007bff;
}

.tutor-testimonial h4 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #333;
}

.tutor-testimonial p {
    font-size: 13px;
    color: #666;
    font-style: italic;
    margin: 0;
}

.tutor-actions {
    display: flex;
    gap: 10px;
}

.tutor-actions .btn {
    flex: 1;
    padding: 10px;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* About Page */
.content-card {
    background: white;
    border-radius: 12px;
    padding: 3rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin: 2rem 0;
}

.content-card h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 1.5rem;
}

.lead {
    font-size: 1.2rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.about-item h3 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 1rem;
}

.about-item p {
    color: #666;
    line-height: 1.6;
}

.benefits-list {
    list-style: none;
    padding: 0;
}

.benefits-list li {
    padding: 0.5rem 0;
    color: #666;
    position: relative;
    padding-left: 1.5rem;
}

.benefits-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

/* Contact Page */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
    margin: 2rem 0;
}

.contact-form-section,
.contact-info-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.contact-form-section h2,
.contact-info-section h2 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #007bff;
}

.contact-info .info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.contact-info .info-item i {
    font-size: 1.2rem;
    color: #007bff;
    margin-right: 1rem;
    margin-top: 0.2rem;
}

.contact-info h4 {
    font-size: 1rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.contact-info p {
    color: #666;
    line-height: 1.5;
    margin: 0;
}

.business-hours {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.business-hours h4 {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.business-hours p {
    color: #666;
    line-height: 1.5;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    margin: auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: slideIn 0.3s ease;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.5rem;
    color: #333;
    margin: 0;
}

.close {
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

.close:hover {
    color: #333;
}

.login-form {
    padding: 1.5rem;
}

.signup-fields,
.tutor-fields {
    display: none;
}

.signup-fields.show,
.tutor-fields.show {
    display: block;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #eee;
    text-align: center;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: white;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
}

.footer-logo i {
    font-size: 1.5rem;
    color: #3498db;
}

.footer-section p {
    color: #bdc3c7;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: white;
}

.contact-details p {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    color: #bdc3c7;
}

.contact-details i {
    margin-right: 0.5rem;
    color: #3498db;
    width: 16px;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 1rem;
    text-align: center;
    color: #bdc3c7;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        border-top: 1px solid #eee;
        flex-direction: column;
        padding: 1rem;
        gap: 0;
    }

    .main-nav.open {
        display: flex;
    }

    .nav-link {
        width: 100%;
        padding: 1rem;
        border-bottom: 1px solid #eee;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .auth-buttons {
        display: none;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .card {
        margin-bottom: 1rem;
    }

    .search-filters {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .tutors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .modal-content {
        width: 95%;
        margin: 1rem;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: #f8f9fa;
    }

    .submenu,
    .topic-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: #e9ecef;
        margin-left: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero {
        padding: 60px 0;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .two-cards-section,
    .features-section {
        padding: 60px 0;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .content-card {
        padding: 2rem 1.5rem;
    }

    .content-card h1 {
        font-size: 2rem;
    }
}



.hero-slider {
  position: relative;
  width: 100%;
  height: 500px; /* adjust as needed */
  overflow: hidden;
}

.slides {
  display: flex;
  transition: transform 0.6s ease-in-out;
  height: 100%;
}

.slide {
  min-width: 100%;
  height: 100%;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Navigation Arrows */
.slider-nav span {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  color: white;
  padding: 10px;
  cursor: pointer;
  border-radius: 50%;
  user-select: none;
}

.slider-nav .prev { left: 15px; }
.slider-nav .next { right: 15px; }

/* Dots */



.two-cards-banner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 2rem;
  z-index: 10;
  width: 90%;
  max-width: 1000px;
}

.two-cards-banner .card {
  flex: 1;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(5px);
}


/* Cards inside banner */
.hero-slider .two-cards-section {
  position: absolute;
  top: 50%;
  right: 5%;
  transform: translateY(-50%); /* only vertical centering */
  width: 50%;
  max-width: 800px;
  z-index: 5; /* make sure it's above the images */
}

.hero-slider .two-cards-section .cards-grid {
  display: flex;
  flex-wrap: wrap; /* allow wrapping if too tight */
  justify-content: flex-end; /* keep aligned to right */
  gap: 1rem;
}

.hero-slider .two-cards-section .card {
  flex: 1 1 210px; /* flexible, but not smaller than 250px */
  max-width: 250px;  /* prevent them from stretching too wide */
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
  padding: 1.2rem;
  border-radius: 12px;
}



/* Slim Browse Study Material Section */
/* Browse Study Material - inline style */
.browse-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  background: #f1f3f5;   /* light background strip */
  padding: 0.6rem 1rem;
  margin: 0.5rem auto;
  border-radius: 8px;
  max-width: 1000px;
}

.browse-heading {
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  white-space: nowrap; /* keep on one line */
}

.browse-links {
  display: flex;
  gap: 1.5rem;
}

.browse-links a {
  text-decoration: none;
  font-weight: 500;
  color: #007bff;
  transition: color 0.2s ease;
}

.browse-links a:hover {
  color: #0056b3;
}


/* Main unified nav */
.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  background: #fff;
  padding: 0.7rem 1.2rem;
  
}

/* Keep existing nav-link style */
.main-nav .nav-link {
  text-decoration: none;
  font-weight: 500;
  color: #333;
  display: flex;
  align-items: center;
  gap: 6px;
}

.main-nav .nav-link:hover {
  color: #007bff;
}

/* Compact browse section inside menu */
.browse-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #f1f3f5;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
}

.browse-heading {
  font-size: 0.95rem;
  font-weight: 600;
  color: #333;
}

.browse-links {
  display: flex;
  gap: 1rem;
}

.browse-links a {
  text-decoration: none;
  font-weight: 500;
  color: #007bff;
  transition: color 0.2s ease;
}

.browse-links a:hover {
  color: #0056b3;
}


.phone-banner {
  position: absolute;
  top: 20px;     /* adjust spacing from top */
  left: 50px;    /* adjust spacing from left */
  width: 480px;  /* set size as needed */
  z-index: 20;   /* make sure it stays above the banner */
  pointer-events: none; /* so it doesn’t block clicks on other elements */
}
.register {
  position: absolute;
  top: 140px;     /* adjust spacing from top */
  left: 140px;    /* adjust spacing from left */
  width: 300px;  /* set size as needed */
  z-index: 20;   /* make sure it stays above the banner */
  pointer-events: none; /* so it doesn’t block clicks on other elements */
}

/* Fix modal size and scrolling */
.modal {
  display: none; /* hidden by default */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto; /* allow scrolling if content is too tall */
  background-color: rgba(0, 0, 0, 0.6);
}

.modal-content {
  background-color: #fff;
  margin: 5% auto;
  padding: 20px;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;  /* limit modal height */
  overflow-y: auto;  /* enable scrolling inside */
  box-sizing: border-box;
}

/* Ensure the submit button is always visible */
.login-form {
  display: flex;
  flex-direction: column;
}

.login-form button[type="submit"] {
  margin-top: 20px;
  align-self: flex-end;
}


/* ===== Responsive fixes for your current HTML structure ===== */

/* Make all images responsive */
img { max-width: 100%; height: auto; display: block; }

/* Header layout tweaks */
.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Ensure logo image scales */
.logo .logo-img { max-width: 180px; height: auto; }

/* Make nav a collapsible block on mobile (default desktop behavior unchanged) */
.main-nav {
  display: flex;             /* desktop: keep horizontal */
  align-items: center;
  gap: 1rem;
}

/* Hidden dropdowns become visible when .open is added via JS */
.dropdown.open > .dropdown-menu,
.dropdown.open .submenu,
.dropdown.open .topic-menu {
  opacity: 1;
  visibility: visible;
  transform: none;
  display: block;
}

/* Mobile-specific fixes */
@media (max-width: 768px) {
  /* Show hamburger */
  .mobile-menu-toggle { 
    display: block; 
    z-index: 1002;
  }

  /* Collapse main-nav into an off-canvas style block */
  .main-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #fff;
    padding: 1rem;
    flex-direction: column;
    gap: 0;
    z-index: 1001;
    border-top: 1px solid #eee;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    max-height: 70vh;
    overflow-y: auto;
  }

  /* Add open class to show */
  .main-nav.open { 
    display: flex; 
  }

  /* nav links become full-width tappable rows */
  .main-nav .nav-link {
    width: 100%;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
  }

  /* Browse nav stacks */
  .main-nav .browse-nav { 
    flex-direction: column; 
    gap: 0.6rem; 
    padding: 0.6rem 0;
    background: #f8f9fa;
    border-radius: 6px;
    margin: 0.5rem 0;
  }

  .browse-links { 
    flex-wrap: wrap; 
    gap: 0.5rem; 
    justify-content: center;
  }

  /* Dropdowns: make them static & default hidden until .open added */
  .dropdown-menu {
    position: static;
    opacity: 0;
    visibility: hidden;
    max-height: 0;
    overflow: hidden;
    transform: none;
    box-shadow: none;
    border: none;
    background: #f8f9fa;
    margin: 0;
    padding: 0;
    border-radius: 6px;
    transition: all 0.3s ease;
  }

  /* Show dropdown when parent has .open */
  .dropdown.open > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    max-height: 300px;
    padding: 0.5rem 0;
    margin: 0.5rem 0;
  }

  /* Dropdown links in mobile */
  .dropdown-link {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }

  /* Hide auth buttons on very small screens */
  .auth-buttons { 
    display: none; 
  }

  /* Hide large absolute banners that may overflow on mobile */
  .phone-banner, .register {
    display: none !important;
  }

  /* Hero slider: allow height to shrink and fix card positioning */
  .hero-slider { 
    height: auto;
    position: relative;
  }
  
  .slide img { 
    max-height: 40vh; 
    object-fit: cover; 
    width: 100%; 
  }

  /* Fix the cards positioning in hero slider for mobile */
  .hero-slider .two-cards-section {
    position: static; /* Remove absolute positioning */
    width: 100%;
    max-width: none;
    transform: none;
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem 1rem;
    margin-top: -50px; /* Slight overlap with image */
    z-index: 10;
  }

  .hero-slider .two-cards-section .cards-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    justify-content: center;
  }

  .hero-slider .two-cards-section .card {
    flex: none;
    max-width: none;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(6px);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  }

  /* Simplified card content for mobile */
  .hero-slider .card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    text-align: center;
  }

  .hero-slider .card .features-list {
    display: none; /* Hide feature list on mobile to save space */
  }

  .hero-slider .card .btn {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    margin-top: 1rem;
  }

  /* Regular cards outside hero */
  .cards-grid { 
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .card {
    margin-bottom: 1rem;
    padding: 1.5rem;
  }

  /* Tighter hero text if present */
  .hero-content h1 { 
    font-size: 2.2rem; 
  }

  /* Search filters stack vertically */
  .search-filters {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* Tutors grid responsive */
  .tutors-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* Contact grid single column */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Modal adjustments */
  .modal-content {
    width: 95%;
    margin: 1rem;
    max-height: 85vh;
  }

  /* Hide navigation arrows on mobile - they look cluttered */
  .slider-nav {
    display: none;
  }
}

/* Extra tiny-screen tweaks */
@media (max-width: 480px) {
  .logo .logo-img { 
    max-width: 140px; 
  }
  
  .container { 
    padding: 0 12px; 
  }
  
  .section-header h2 { 
    font-size: 1.6rem; 
  }

  /* Even more compact cards for very small screens */
  .hero-slider .two-cards-section {
    padding: 1.5rem 0.5rem;
    margin-top: -30px;
  }

  .hero-slider .card {
    padding: 1rem;
  }

  .hero-slider .card h3 {
    font-size: 1.1rem;
  }

  .hero-slider .card .btn {
    padding: 0.8rem;
    font-size: 0.9rem;
  }

  /* Adjust slider height for very small screens */
  .hero-slider {
    height: 300px;
  }

  .slide img {
    max-height: 300px;
  }
}