@import 'variables.css';

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: radial-gradient(circle at 20% 20%, #eef2ff, transparent 25%),
        radial-gradient(circle at 80% 0%, #e0f2fe, transparent 22%),
        radial-gradient(circle at 50% 75%, #fef9c3, transparent 28%),
        var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    transition: var(--transition);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
    box-sizing: border-box;
}

/* Responsive container for different screen sizes */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
}

.flex {
    display: flex;
}

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

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.w-full {
    width: 100%;
}

.max-w-2xl {
    max-width: 42rem;
    margin-inline: auto;
}

.text-center {
    text-align: center;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.p-4 {
    padding: 1rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-8 {
    gap: 2rem;
}

.gap-6 {
    gap: 1.5rem;
}

.grid {
    display: grid;
}

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

@media (min-width: 768px) {
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .md\:grid-cols-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .lg\:grid-cols-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-8 {
    margin-top: 2rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.p-4 {
    padding: 1rem;
}

.p-6 {
    padding: 1.5rem;
}

.py-12 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.25rem;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    font-size: 1rem;
    white-space: nowrap;
    text-align: center;
    min-height: 48px;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 1rem 2.25rem;
}

.btn-outline:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* Additional Button Variants */
.btn-secondary {
    background-color: #6b7280;
    color: white;
    border: 1px solid #6b7280;
}

.btn-secondary:hover {
    background-color: #4b5563;
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    min-height: 36px;
}

.btn-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Text Utilities */
.text-muted {
    color: var(--text-muted);
}

.text-main {
    color: var(--text-main);
}

.text-primary {
    color: var(--primary);
}

.text-success {
    color: var(--success);
}

.text-warning {
    color: var(--warning);
}

.text-danger {
    color: var(--danger);
}

.text-xs {
    font-size: 0.75rem;
}

.text-sm {
    font-size: 0.875rem;
}

.text-lg {
    font-size: 1.125rem;
}

.text-xl {
    font-size: 1.25rem;
}

.text-2xl {
    font-size: 1.5rem;
}

.text-3xl {
    font-size: 1.875rem;
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

.uppercase {
    text-transform: uppercase;
}

.italic {
    font-style: italic;
}

/* Navbar */
.navbar {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    width: 100%;
    box-sizing: border-box;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    width: 100%;
    box-sizing: border-box;
    padding: 0 1rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
    z-index: 1001;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    color: var(--text-main);
    padding: 0.5rem 0;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary);
}

.nav-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.desktop-actions {
    display: flex;
}

.mobile-actions {
    display: none;
}

@media (max-width: 768px) {
    .desktop-actions {
        display: none;
    }

    .mobile-actions {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex-direction: column;
    background: white;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    z-index: 1001;
}

.nav-toggle:hover {
    background: var(--bg-body);
    border-color: var(--primary);
}

.nav-toggle span {
    width: 22px;
    height: 2.5px;
    background: var(--text-main);
    border-radius: 2px;
    transition: all 0.3s ease;
    display: block;
}

.nav-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.nav-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ===== NAVBAR & HERO SPACING FIX ===== */
.navbar {
    margin-bottom: 1.5rem;
    /* navbar ke niche space */
}

.hero-section {
    padding-top: 3rem;
    /* hero text ko niche push karega */
}

/* Mobile specific fine-tuning */
@media (max-width: 768px) {

    .navbar {
        margin-bottom: 1.8rem;
    }

    .hero-section {
        padding-top: 3.5rem;
    }
}

.hero-section {
    padding: 4rem 0;
}

.hero-heading {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.2;
}

.hero-tagline {
    margin-top: 1rem;
    color: #555;
}

.hero-image {
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0);
    }
}

/* Tablet and Medium Screens */
@media (max-width: 1024px) {
    .hero-section {
        padding: 3.5rem 1.5rem 4rem;
    }

    .hero-heading {
        font-size: clamp(2rem, 4vw, 3rem);
        margin-bottom: 1.25rem;
    }

    .hero-tagline {
        font-size: clamp(0.95rem, 1.8vw, 1.15rem);
        margin-bottom: 1.75rem;
    }

    .hero-image {
        max-width: 450px;
        max-height: 400px;
    }
}

/* Mobile Devices */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 1rem 3rem;
    }

    .hero-content {
        text-align: center;
        padding: 0;
    }

    .hero-heading {
        font-size: clamp(1.5rem, 6vw, 2rem);
        margin-bottom: 1rem;
    }

    .hero-tagline {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
        max-width: 100%;
    }

    .hero-image-container {
        min-height: 200px;
        margin-top: 1.5rem;
    }

    .hero-image {
        max-width: 100%;
        max-height: 250px;
    }

    .hero-buttons {
        justify-content: center;

    }
}

/* ===== MOBILE HERO FIX (ALL IN ONE) ===== */
@media (max-width: 768px) {

    /* Container padding fix */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Hero section spacing */
    .hero-section {
        padding: 2.5rem 1rem;
    }

    /* Remove 2-column layout on mobile */
    .hero-section .grid {
        grid-template-columns: 1fr !important;
        text-align: center;
    }

    /* Center text content */
    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-heading,
    .hero-tagline {
        text-align: center;
    }

    /* Center button */
    .hero-buttons {
        display: flex;
        justify-content: center;
        width: 100%;

    }

    /* Image center + size fix */
    .hero-image-container {
        display: flex;
        justify-content: center;
        margin-top: 2rem;
    }

    .hero-image {
        width: 90%;
        max-width: 320px;
        border-radius: 20px;
    }
}

/* Stats Section */
.stats-section {
    background-color: white;
    padding: 4rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 1px;
}

/* Mobile responsive styles */
@media (max-width: 768px) {

    /* Features section */
    .features-section {
        padding: 3rem 0;
    }

    .feature-card {
        padding: 1.5rem 1rem;
    }

    .feature-icon-wrapper {
        width: 70px;
        height: 70px;
    }

    .feature-icon-svg {
        width: 35px;
        height: 35px;
    }

    .feature-title {
        font-size: 1.125rem;
    }

    .feature-desc {
        font-size: 0.875rem;
    }

    /* Teacher showcase - mobile */
    .teachers-showcase {
        flex-direction: column;
        gap: 1rem;
    }

    .teacher-showcase-item {
        width: 100%;
        max-width: 100%;
        min-width: auto;
        padding: 1rem;
    }

    .teacher-showcase-img {
        width: 60px;
        height: 60px;
    }

    .teacher-showcase-name {
        font-size: 1rem;
    }

    .teacher-showcase-subject {
        font-size: 0.8rem;
    }

    /* Stats section (if still used) */
    .stats-section .grid.grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .stat-number {
        font-size: 1.5rem;
        margin-bottom: 0.25rem;
    }

    .stat-label {
        font-size: 0.75rem;
        letter-spacing: 0.5px;
    }

    /* Teacher cards - 2 per line on mobile */
    .teachers-section .grid.grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .teacher-card {
        min-height: auto;
    }

    .teacher-img {
        height: 150px;
    }

    .teacher-name {
        font-size: 1rem;
    }

    .teacher-subject {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .teacher-showcase-item {
        flex-direction: column;
        text-align: center;
        padding: 1.25rem;
    }

    .teacher-showcase-img {
        width: 80px;
        height: 80px;
    }

    .feature-card {
        padding: 1.25rem 0.75rem;
    }
}

.stat-card {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
}

/* How It Works */
.steps-section {
    padding: 6rem 0;
    background-color: var(--bg-body);
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-main);
}

/* Responsive breakpoints for all sections */
@media (max-width: 1024px) {
    .steps-section {
        padding: 4rem 0;
    }

    .teachers-section {
        padding: 4rem 0;
    }

    .features-section {
        padding: 3.5rem 0;
    }

    .section-title {
        font-size: clamp(1.5rem, 3.5vw, 2rem);
        margin-bottom: 2.5rem;
    }
}

@media (max-width: 768px) {
    .steps-section {
        padding: 3rem 0;
    }

    .teachers-section {
        padding: 3rem 0;
    }

    .section-title {
        font-size: clamp(1.5rem, 5vw, 1.75rem);
        margin-bottom: 2rem;
    }
}

.section-subtitle {
    text-align: center;
    margin-top: -2rem;
    margin-bottom: 2.5rem;
    color: var(--text-muted);
}

.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.9rem;
    border-radius: 9999px;
    background: #e0f2fe;
    color: #0369a1;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.4px;
    margin: 0 auto 1rem;
}

.step-card {
    text-align: center;
    padding: 2.5rem 2rem;
    position: relative;
    border-radius: 1rem;
    background: white;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    height: 100%;
}

.step-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: inline-block;
}

.step-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.step-desc {
    color: var(--text-muted);
}

/* Popular Teachers */
.teachers-section {
    padding: 6rem 0;
    background-color: var(--bg-body);
}

.teachers-showcase {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
}

.teacher-showcase-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    flex: 0 1 auto;
    min-width: 280px;
    max-width: 350px;
}

.teacher-showcase-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.teacher-showcase-img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-light);
    flex-shrink: 0;
}

.teacher-showcase-info {
    flex: 1;
    min-width: 0;
}

.teacher-showcase-name {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-main);
}

.teacher-showcase-subject {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.teacher-card {
    background: white;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.teacher-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.teacher-img {
    height: 200px;
    width: 100%;
    object-fit: cover;
    object-position: top center;
    background-color: var(--primary-light);
}

.teacher-info {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.teacher-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.teacher-subject {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.rating {
    color: #FBBF24;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    background: #eef2ff;
    color: #312e81;
    font-weight: 700;
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
}

.view-profile-btn {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-weight: 600;
    color: var(--text-main);
    transition: var(--transition);
    text-align: center;
    display: block;
    margin-top: auto;
}

.view-profile-btn:hover {
    background-color: var(--bg-body);
    border-color: var(--text-muted);
}

.trusted-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 2rem;
}

.trusted-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    border-radius: 9999px;
    background: #ecfdf3;
    color: #047857;
    font-weight: 700;
}

/* Site Footer */
.site-footer {
    background: #3B82F6;
    border-top: none;
    padding: 4rem 0 0;
    margin-top: auto;
    width: 100%;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-brand {
    max-width: 350px;
}

.footer-brand .logo {
    font-size: 1.75rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 1rem;
    display: inline-block;
}

.footer-brand .tagline {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    font-size: 0.95rem;
}

.footer-groups {
    display: flex;
    gap: 4rem;
}

.footer-group h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-group a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-group a:hover {
    color: #ffffff;
    transform: translateX(4px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 0;
    text-align: center;
    background: rgba(0, 0, 0, 0.05);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .footer-brand {
        margin: 0 auto;
    }

    .footer-groups {
        flex-direction: row;
        justify-content: center;
        gap: 3rem;
    }

    .footer-group a:hover {
        transform: none;
    }
}

@media (max-width: 480px) {
    .footer-groups {
        flex-direction: column;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Ensure no horizontal overflow */
    body {
        overflow-x: hidden;
        width: 100%;
    }

    html {
        overflow-x: hidden;
        width: 100%;
    }

    /* Hero section mobile styles are now in dedicated media query above */

    .search-bar {
        width: 100%;
        margin-bottom: 1.5rem;
        padding: 0.25rem;
    }

    .search-input {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .search-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    /* Mobile Nav */
    .nav-content {
        flex-wrap: wrap;
        padding: 0 1rem;
        width: 100%;
        box-sizing: border-box;
    }

    .logo {
        font-size: 1.25rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 150px;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        flex-direction: column;
        width: 100%;
        padding: 1.5rem;
        gap: 0;
        background: white;
        border-top: 1px solid var(--border-color);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        transform: translateY(-100%);
        opacity: 0;
        transition: all 0.3s ease;
        z-index: 999;
    }

    .nav-links.open {
        display: flex;
        transform: translateY(0);
        opacity: 1;
    }

    .nav-link {
        padding: 1rem 0;
        width: 100%;
        border-bottom: 1px solid var(--border-color);
        font-size: 1rem;
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    .nav-links .nav-actions {
        display: flex;
        flex-direction: column;
        width: 100%;
        padding: 1rem 0 0;
        gap: 0.75rem;
        border-top: 1px solid var(--border-color);
        margin-top: 0.5rem;
    }

    .nav-toggle {
        display: flex;
        margin-left: auto;
    }

    .btn-outline,
    .btn-primary {
        width: 100%;
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }

    /* Hero section small mobile styles are now in dedicated media query above */

    .search-bar {
        width: 100%;
        margin-bottom: 1.5rem;
        padding: 0.25rem;
    }

    .search-input {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .search-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .flex.gap-4 {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }

    .btn-outline,
    .btn-primary,
    .btn-secondary {
        width: 100%;
        margin-bottom: 0;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 0.875rem 1.75rem;
        font-size: 0.95rem;
        min-height: 44px;
    }

    .nav-actions .btn {
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .stats-section {
        padding: 3rem 0;
    }

    .steps-section {
        padding: 4rem 0;
    }

    .teachers-section {
        padding: 4rem 0;
    }

    .step-card {
        padding: 2rem 1.5rem;
    }

    main.container {
        padding: 1rem !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin: 0 !important;
    }

    /* Fix container padding for pages without dashboard layout */
    .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    h1 {
        font-size: 1.75rem !important;
        margin-bottom: 1.5rem !important;
        word-wrap: break-word;
        overflow-wrap: break-word;
        padding: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100%;
        box-sizing: border-box;
    }

    /* Fix header alignment */
    header.flex {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 1rem;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        box-sizing: border-box;
    }

    header.flex h1 {
        width: 100% !important;
        margin-bottom: 0.5rem !important;
        padding: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        font-size: 1.5rem !important;
    }

    /* Ensure no content overflows */
    * {
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Fix input fields */
    .form-input {
        width: 100%;
        box-sizing: border-box;
    }

    /* Fix card padding */
    .card {
        padding: 1rem !important;
        width: 100%;
        box-sizing: border-box;
    }

    h2 {
        font-size: 1.75rem !important;
    }

    h3 {
        font-size: 1.25rem !important;
    }

    .card {
        padding: 1.5rem !important;
    }

    .teacher-card {
        padding: 1.75rem 1.25rem !important;
    }

    #teachers-grid {
        gap: 1.5rem !important;
    }

    /* Table Responsiveness - Add horizontal scroll for all tables */
    .card>div[style*="overflow-x"] {
        overflow-x: auto !important;
        overflow-y: visible !important;
        -webkit-overflow-scrolling: touch;
    }

    /* Add horizontal scroll to all tables */
    table {
        display: table;
        width: 100%;
        min-width: 600px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Keep table structure on mobile but make it scrollable */
    thead {
        display: table-header-group;
    }

    tbody {
        display: table-row-group;
    }

    tbody tr {
        display: table-row;
        border-bottom: 1px solid var(--border-color);
    }

    tbody td {
        display: table-cell;
        padding: 0.75rem;
        border-bottom: 1px solid var(--border-color);
        text-align: left;
        vertical-align: top;
        word-wrap: break-word;
        overflow-wrap: break-word;
        white-space: nowrap;
    }

    tbody td:last-child {
        border-bottom: none;
    }

    /* For very small screens, allow text wrapping in cells */
    @media (max-width: 480px) {
        tbody td {
            white-space: normal;
            min-width: 120px;
        }
    }



    /* Form Responsiveness */
    .form-group {
        margin-bottom: 1rem;
    }

    .grid.grid-cols-1.md\:grid-cols-2 {
        grid-template-columns: 1fr !important;
    }

    .grid.grid-cols-1.md\:grid-cols-3 {
        grid-template-columns: 1fr !important;
    }

    /* Header Button Groups */
    header.flex {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 1rem;
    }

    header.flex .flex.gap-2 {
        width: 100%;
        flex-direction: column;
        gap: 0.75rem;
    }

    header.flex .flex.gap-2 .btn {
        width: 100%;
    }

    /* Modal Responsiveness */
    [id*="modal"],
    [id*="booking-modal"] {
        padding: 1rem !important;
    }

    [id*="modal"] .card,
    [id*="booking-modal"] .card {
        max-width: 100% !important;
        margin: 0 !important;
        max-height: 90vh;
        overflow-y: auto;
    }

    /* Text Sizes */
    .text-sm {
        font-size: 0.875rem;
    }

    .text-lg {
        font-size: 1rem;
    }

    .text-xl {
        font-size: 1.125rem;
    }

    /* Spacing Adjustments */
    .mb-4 {
        margin-bottom: 1rem;
    }

    .mb-6 {
        margin-bottom: 1.5rem;
    }

    .mt-4 {
        margin-top: 1rem;
    }

    .mt-8 {
        margin-top: 1.5rem;
    }

    .gap-4 {
        gap: 1rem;
    }

    .gap-6 {
        gap: 1rem;
    }

    .gap-8 {
        gap: 1.5rem;
    }

}

/* --- Restored Application Styles --- */

/* Generic Card (for Dashboard/Login) */
.card {
    background-color: var(--bg-card);
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    padding: 1.75rem;
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-main);
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
    color: var(--text-main);
    transition: var(--transition);
    font-size: 1rem;
    min-height: 44px;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* --- Dashboard Layout (Responsive) --- */

/* Global Table Responsiveness */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -1rem;
    padding: 0 1rem;
}

.card .table-wrapper {
    margin: 0 -1.75rem;
    padding: 0 1.75rem;
}

/* Ensure all tables are wrapped for horizontal scrolling */
table {
    min-width: 600px;
    width: 100%;
    border-collapse: collapse;
}

.dashboard-layout {
    display: flex;
    min-height: calc(100vh - 74px);
    /* Fallback */
    position: relative;
    padding-top: 0;
}

.sidebar {
    width: 280px;
    background-color: white;
    border-right: 1px solid var(--border-color);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 74px;
    /* Below navbar */
    height: calc(100vh - 74px);
    overflow-y: auto;
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 50;
    /* Below toggle button */
}

/* Sidebar UI */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.sidebar-header h3 {
    margin: 0;
    font-weight: 700;
    color: var(--text-main);
}

.sidebar-close {
    background: #F5F7FF;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    width: 36px;
    height: 36px;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    color: var(--text-main);
}

.sidebar-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-link {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    color: var(--text-main);
}

.sidebar-link:hover {
    background: var(--bg-card);
}

.sidebar-link.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

.btn-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Sidebar Toggle (Floating Button) */
.sidebar-toggle {
    display: none;
    /* Hidden on desktop */
}

/* Main Content Area */
.main-content {
    flex: 1;
    padding: 2rem;
    background-color: var(--bg-body);
    width: 100%;
    /* Ensure it takes full width */
    min-width: 0;
    /* Prevent flex overflow */
    box-sizing: border-box;
}

/* Ensure proper button sizing across all screens */
.btn {
    min-height: 44px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.btn-sm {
    min-height: 40px;
}

/* --- Mobile / Tablet Styles --- */
@media (max-width: 991px) {

    /* Layout Logic */
    .dashboard-layout {
        display: block;
        /* Stack */
    }

    /* Fixed Sidebar on Mobile */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        height: 100vh;
        width: 280px;
        max-width: 85vw;
        z-index: 2001;
        /* Higher than toggle */
        transform: translateX(-100%);
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
        border: none;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    /* Backdrop */
    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 2000;
        /* Behind sidebar */
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
        backdrop-filter: blur(2px);
    }

    .sidebar-backdrop.active {
        opacity: 1;
        pointer-events: auto;
    }

    /* Show Toggle Button */
    .sidebar-toggle {
        display: flex;
        /* Visible on mobile */
        align-items: center;
        justify-content: center;
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background: var(--primary);
        color: white;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
        border: none;
        position: fixed;
        bottom: 25px;
        right: 25px;
        z-index: 2002;
        /* Topmost */
        cursor: pointer;
        transition: transform 0.2s ease;
        -webkit-tap-highlight-color: transparent;
    }

    .sidebar-toggle:active {
        transform: scale(0.95);
    }

    .sidebar-toggle span {
        width: 24px;
        height: 2px;
        background: white;
        display: block;
        position: relative;
    }

    .sidebar-toggle span::before,
    .sidebar-toggle span::after {
        content: '';
        position: absolute;
        width: 24px;
        height: 2px;
        background: white;
        left: 0;
    }

    .sidebar-toggle span::before {
        top: -8px;
    }

    .sidebar-toggle span::after {
        bottom: -8px;
    }

    /* Content Adjustment */
    .main-content {
        padding: 1.5rem 1rem;
        padding-bottom: 100px;
        /* Space for FAB */
        width: 100%;
        box-sizing: border-box;
    }

    /* Ensure tables in main content are responsive */
    .main-content table {
        width: 100% !important;
        min-width: 100% !important;
    }

    /* Fix modal on mobile */
    .modal,
    [id*="modal"],
    [id*="booking-modal"] {
        padding: 1rem !important;
        align-items: flex-start !important;
        overflow-y: auto;
    }

    .modal .card,
    [id*="modal"] .card,
    [id*="booking-modal"] .card {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        max-height: 90vh;
        overflow-y: auto;
    }
}

/* Cards & Grid Enhancements */
.card {
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

/* Responsive Grid */
.grid {
    display: grid;
    gap: 1.5rem;
}

@media (max-width: 639px) {
    .grid {
        grid-template-columns: 1fr !important;
        /* Force single column on mobile */
    }

    /* Buttons on mobile */
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
        justify-content: center;
    }

    .btn-group {
        flex-direction: column;
        width: 100%;
    }


    /* Additional mobile table fixes */
    table {
        min-width: 100% !important;
        max-width: 100% !important;
    }

    /* Remove any min-width constraints on tables */
    table[style*="min-width"] {
        min-width: 100% !important;
    }

    /* Ensure table wrappers don't scroll */
    div[style*="overflow-x"] {
        overflow-x: hidden !important;
        overflow-y: visible !important;
    }
}

/* Sidebar Toggle Button Visibility */
@media (max-width: 991px) {
    .sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        background: var(--primary);
        color: white;
        border: none;
        position: fixed;
        bottom: 2rem;
        right: 1.5rem;
        z-index: 2002;
        box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
        cursor: pointer;
        transition: transform 0.2s;
    }

    .sidebar-toggle:active {
        transform: scale(0.95);
    }
}

/* --- Restored Global Components --- */

/* Badges */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.badge-pending {
    background-color: #fef3c7;
    color: #d97706;
}

.badge-approved {
    background-color: #d1fae5;
    color: #059669;
}

.badge-rejected {
    background-color: #fee2e2;
    color: #dc2626;
}

/* Button Variants */
.btn-secondary {
    background-color: white;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background-color: var(--bg-body);
    border-color: var(--text-muted);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Utility Overrides for Dashboard */
.text-muted {
    color: var(--text-muted);
}

.font-bold {
    font-weight: 700;
}

.text-xl {
    font-size: 1.25rem;
}

/* Button Groups */
.btn-group {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.btn-group .btn {
    margin: 0;
    flex: 0 1 auto;
}

@media (max-width: 768px) {
    .btn-group {
        flex-direction: column;
        width: 100%;
    }

    .btn-group .btn {
        width: 100%;
    }
}

/* Fix inline button margins */
.btn+.btn {
    margin-left: 0;
}

/* Enhanced Mobile Table Styles */
@media (max-width: 768px) {

    /* Remove all table scrolling - CHANGED: No more display: block */
    table,
    .card table,
    table[style*="min-width"] {
        display: table !important; /* Restore table display */
        width: 100% !important;
        min-width: 600px !important; /* Ensure a minimum width for content */
        max-width: none !important;
        overflow: visible !important;
    }

    /* Table wrapper containers */
    .card>div,
    div[style*="overflow-x"] {
        overflow-x: auto !important; /* Enable horizontal scroll */
        overflow-y: visible !important;
        width: 100% !important;
    }

    /* Table cells */
    table td {
        padding-left: 0;
        padding-right: 0;
        font-size: 0.9rem;
    }

    table td:first-child {
        padding-top: 0.5rem;
    }

    /* Badge and button sizing in tables */
    table .badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
        display: inline-block;
    }

    table .btn {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
        min-height: 40px;
    }

    /* Links in tables */
    table a {
        word-break: break-all;
        font-size: 0.875rem;
    }
}

/* Better form layouts */
.form-grid {
    display: grid;
    gap: 1rem;
}

@media (min-width: 768px) {
    .form-grid.grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Card improvements */
.card h3 {
    margin-bottom: 0.75rem;
    font-size: 1.125rem;
}

/* Text utilities */
.text-sm {
    font-size: 0.875rem;
}

.text-lg {
    font-size: 1.125rem;
}

/* Width utilities */
.w-full {
    width: 100%;
}

.max-w-2xl {
    max-width: 42rem;
}

/* Additional mobile fixes */
@media (max-width: 768px) {

    /* Fix overflow issues */
    * {
        max-width: 100%;
    }

    /* Better button spacing in sidebars */
    .sidebar>div:last-child {
        margin-top: auto;
    }

    /* Fix header alignment */
    header h1 {
        margin-bottom: 1rem;
    }

    /* Better card spacing */
    .card+.card {
        margin-top: 1rem;
    }

    /* Fix teacher card layout */
    .teacher-card {
        min-height: auto;
    }

    /* Better grid spacing */
    .grid {
        gap: 1rem;
    }

    /* Ensure buttons don't overflow */
    .btn {
        word-break: break-word;
        white-space: normal;
        padding: 0.875rem 1rem;
    }

    /* Better form input sizing */
    .form-input {
        font-size: 16px;
        /* Prevents zoom on iOS */
    }

    /* Fix table button groups */
    table .btn-group {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }

    table .btn-group .btn {
        width: 100%;
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
        min-height: 44px;
    }

    /* Ensure no content is cut off */
    .card {
        overflow: visible !important;
    }

    /* Better spacing for mobile */
    .main-content {
        padding: 1rem !important;
    }

    /* Header button groups on mobile */
    header.flex {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    header.flex .btn-group {
        width: 100%;
        flex-direction: column;
    }

    header.flex .btn-group .btn {
        width: 100%;
    }

    /* Ensure proper spacing between elements */
    .card+.card {
        margin-top: 1rem;
    }

    /* Fix grid on very small screens */
    @media (max-width: 480px) {
        .grid {
            gap: 0.75rem !important;
        }

        .card {
            padding: 1rem !important;
        }

        h1 {
            font-size: 1.5rem !important;
            line-height: 1.3 !important;
        }

        h2 {
            font-size: 1.25rem !important;
            line-height: 1.3 !important;
        }

        h3 {
            font-size: 1.125rem !important;
            line-height: 1.3 !important;
        }

        /* Smaller font sizes for very small screens */
        body {
            font-size: 0.9rem;
        }

        .btn {
            font-size: 0.875rem;
            padding: 0.75rem 1rem;
            min-height: 44px;
        }

        /* Better table cell spacing on very small screens */
        table td {
            padding: 0.5rem 0;
            font-size: 0.85rem;
        }

        table td::before {
            font-size: 0.8rem;
            min-width: 80px;
        }

        /* Ensure buttons are always visible and clickable */
        .btn,
        .btn-sm,
        .btn-primary,
        .btn-secondary,
        .btn-outline {
            min-height: 44px;
            min-width: 44px;
            touch-action: manipulation;
        }
    }
}