/* =========================================================
   TutorLagbe | Premium Aesthetic Stylesheet
   Theme: Modern Education, Premium SaaS, Sylhet Focus
   Aesthetic: Quiet Luxury, Glassmorphism, Clean
========================================================= */

/* -----------------------------
   1. CSS Variables & Theming
------------------------------ */
:root {
    /* Colors */
    --primary-blue: #1a4dbe;
    --primary-dark: #0f172a; 
    --emerald-accent: #10b981;
    --emerald-dark: #059669;
    --soft-gray: #f8fafc;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --white: #ffffff;
    
    /* Premium Glass & Shadow Variables */
    --glass-bg: rgba(255, 255, 255, 0.92); /* Slightly higher opacity for readability */
    --glass-border: rgba(255, 255, 255, 0.4);
    --shadow-soft: 0 4px 20px -2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
    --shadow-heavy: 0 25px 30px -12px rgba(0, 0, 0, 0.15);
    
    /* Transitions */
    --transition-smooth: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Bouncy */
    --transition: all 0.3s ease;
}

/* -----------------------------
   2. Global Reset & Base
------------------------------ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Hind Siliguri', sans-serif;
    background-color: var(--soft-gray);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden; /* Prevents horizontal scroll on mobile */
}

a {
    text-decoration: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Typography & Language Handling */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.bn { display: none; }
body.lang-bn .en { display: none; }
body.lang-bn .bn { display: inline-block; }

/* -----------------------------
   3. Premium Glassmorphism Navbar
------------------------------ */
.navbar {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    min-height: 85px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 2000;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
}

.nav-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -1px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-dark);
}

.logo .accent {
    color: var(--emerald-accent);
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-dark);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 35px;
}

.nav-item {
    color: var(--text-muted);
    font-weight: 600;
    transition: var(--transition);
    position: relative;
}

.nav-item:hover {
    color: var(--primary-blue);
}

/* Underline Hover Effect */
.nav-item::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary-blue);
    transition: width 0.3s ease;
}

.nav-item:hover::after {
    width: 100%;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), #2563eb);
    color: var(--white);
    padding: 12px 28px;
    border-radius: 12px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 20px -5px rgba(26, 77, 190, 0.4);
    transition: var(--transition-smooth);
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255,255,255,0.15);
    transform: rotate(45deg);
    transition: 0.6s ease;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px -5px rgba(26, 77, 190, 0.5);
    color: var(--white);
}

.btn-primary:hover::after {
    left: 120%;
}

.btn-lang {
    background: #f1f5f9;
    color: var(--text-main);
    border: 1px solid #e2e8f0;
    padding: 8px 18px;
    border-radius: 100px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-lang:hover {
    background: white;
    box-shadow: var(--shadow-soft);
}

/* -----------------------------
   4. Hero Section & Search Box
------------------------------ */
.hero {
    background: radial-gradient(circle at top right, #f0f9ff 0%, #ffffff 100%);
    padding: 120px 0 100px;
    position: relative;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 25px;
    color: var(--primary-dark);
    line-height: 1.15;
    animation: fadeInUp 0.8s ease-out;
}

.hero-content .highlight {
    color: var(--emerald-accent);
    position: relative;
}

.hero-content p {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 50px;
    max-width: 500px;
    animation: fadeInUp 1s ease-out;
}

.hero-image img {
    width: 100%;
    filter: drop-shadow(0 30px 40px rgba(0,0,0,0.08));
    animation: float 6s ease-in-out infinite;
}

/* Floating Search Box */
.search-box {
    background: var(--white);
    padding: 12px;
    border-radius: 20px;
    display: flex;
    gap: 12px;
    box-shadow: var(--shadow-heavy);
    border: 1px solid rgba(0,0,0,0.03);
    animation: slideUp 1.2s ease forwards;
}

.input-group {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    padding: 15px 20px;
    border-radius: 14px;
    border: 1px solid transparent;
    transition: var(--transition);
}

.input-group:focus-within {
    background: #ffffff;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 4px rgba(26, 77, 190, 0.1);
}

.input-group i {
    color: var(--primary-blue);
    font-size: 1.1rem;
}

.input-group input, 
.input-group select {
    border: none;
    background: transparent;
    width: 100%;
    font-size: 1rem;
    outline: none;
    color: var(--text-main);
    font-family: inherit;
}

.btn-search {
    background: var(--emerald-accent);
    color: white;
    border: none;
    padding: 0 35px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 10px 20px -5px rgba(16, 185, 129, 0.4);
}

.btn-search:hover {
    background: var(--emerald-dark);
    transform: translateY(-2px);
    box-shadow: 0 15px 25px -5px rgba(16, 185, 129, 0.5);
}

/* -----------------------------
   5. Tutor Section & Cards
------------------------------ */
.tutor-section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.2rem;
    color: var(--primary-dark);
}

.header-line {
    width: 80px;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-blue), var(--emerald-accent));
    margin: 20px auto;
    border-radius: 10px;
}

.tutor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 40px;
}

.tutor-card {
    background: var(--white);
    border-radius: 24px;
    overflow: hidden;
    transition: var(--transition-smooth);
    border: 1px solid rgba(0,0,0,0.02);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
}

.tutor-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: var(--shadow-heavy);
    border-color: rgba(26, 77, 190, 0.1);
}

.tutor-img {
    height: 220px;
    background: #e2e8f0;
    position: relative;
    overflow: hidden;
}

.tutor-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.tutor-card:hover .tutor-img img {
    transform: scale(1.05);
}

.status-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(16, 185, 129, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: white;
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

.tutor-info {
    padding: 25px;
    flex-grow: 1; /* Ensures buttons align nicely at bottom */
}

.tutor-name {
    font-size: 1.4rem;
    margin-bottom: 8px;
    color: var(--primary-dark);
}

.tutor-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.tutor-meta i {
    color: var(--emerald-accent);
    font-size: 1.1rem;
}

.subjects {
    margin-top: 15px;
}

.subject-tag {
    display: inline-block;
    background: #f1f5f9;
    color: var(--text-muted);
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-right: 8px;
    margin-bottom: 8px;
    border: 1px solid #e2e8f0;
    transition: var(--transition);
}

.tutor-card:hover .subject-tag {
    background: #eff6ff;
    color: var(--primary-blue);
    border-color: #bfdbfe;
}

.view-profile {
    margin-top: auto;
    padding: 20px;
    border-top: 1px solid #f1f5f9;
    text-align: center;
    color: var(--primary-blue);
    font-weight: 700;
    font-size: 1.05rem;
    transition: var(--transition);
    background: #f8fafc;
    display: block;
}

.view-profile:hover {
    background: var(--primary-blue);
    color: white;
}

/* -----------------------------
   6. CTA Section
------------------------------ */
.cta-section {
    padding: 80px 0;
}

.cta-card {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-blue) 100%);
    border-radius: 30px;
    padding: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--white);
    box-shadow: var(--shadow-heavy);
    position: relative;
    overflow: hidden;
}

.cta-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.4) 0%, transparent 70%);
    border-radius: 50%;
}

.cta-text h2 {
    font-size: 3rem;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.cta-text p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 500px;
    position: relative;
    z-index: 1;
}

.btn-white {
    background: var(--white);
    color: var(--primary-blue);
    padding: 18px 45px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: var(--transition-smooth);
    display: inline-block;
    position: relative;
    z-index: 1;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.btn-white:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 30px rgba(0,0,0,0.2);
    color: var(--primary-dark);
}

/* -----------------------------
   7. Footer
------------------------------ */
footer {
    background: var(--primary-dark);
    color: #94a3b8;
    padding: 100px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 80px;
    margin-bottom: 80px;
}

.footer-about h3 {
    color: var(--white);
    margin-bottom: 25px;
    font-size: 2rem;
    letter-spacing: -1px;
}

.footer-about span {
    color: var(--emerald-accent);
}

.footer-links h4, .footer-contact h4 {
    color: var(--white);
    margin-bottom: 25px;
    font-size: 1.2rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 15px;
}

.footer-links ul li a {
    color: #cbd5e1;
    transition: var(--transition);
}

.footer-links ul li a:hover {
    color: var(--emerald-accent);
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 30px;
    text-align: center;
    font-size: 0.9rem;
}

/* -----------------------------
   8. Keyframe Animations
------------------------------ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

/* -----------------------------
   9. RESPONSIVE ENGINE (Media Queries)
------------------------------ */

/* Large Tablets / Small Laptops */
@media (max-width: 992px) {
    .hero-grid { 
        grid-template-columns: 1fr; 
        text-align: center; 
    }
    .hero-content h1 { font-size: 2.8rem; }
    .hero-content p { margin: 0 auto 40px; }
    .hero-image img { max-width: 500px; margin: 0 auto; }
    
    .cta-card {
        flex-direction: column;
        text-align: center;
        gap: 40px;
        padding: 60px 40px;
    }
    .cta-text p { margin: 0 auto; }
    
    .footer-grid {
        gap: 40px;
    }
}

/* Tablets & Mobile Devices (< 768px) */
@media (max-width: 768px) {
    /* Container & Spacing */
    .container { padding: 0 20px; }
    
    /* Navbar Mobile Logic */
    .menu-toggle { display: block; }
    
    .nav-container {
        padding: 10px 0;
    }

    .nav-links {
        display: none; /* Hide by default */
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        padding: 30px;
        box-shadow: 0 15px 30px rgba(0,0,0,0.1);
        gap: 20px;
        text-align: center;
        border-top: 1px solid #f1f5f9;
    }

    .nav-links.active {
        display: flex; /* Show when toggled via JS */
        animation: slideDown 0.3s ease forwards;
    }

    /* Hero Section */
    .hero { padding: 60px 0; }
    .hero h1 { font-size: 2.2rem; }
    
    .search-box {
        flex-direction: column;
        padding: 20px;
    }
    
    .input-group {
        width: 100%;
    }

    .btn-search {
        padding: 15px;
        width: 100%;
    }

    /* Tutors Grid - Force 1 Column on Mobile */
    .tutor-section { padding: 60px 0; }
    .section-header h2 { font-size: 1.8rem; }
    
    .tutor-grid {
        grid-template-columns: 1fr !important;
        max-width: 400px; /* Keeps cards from stretching too wide on landscape phones */
        margin: 0 auto;
        gap: 30px;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }
    
    /* Hide unnecessary desktop elements */
    .desktop-only { display: none; }
}

/* Extra small devices (Phones < 480px) */
@media (max-width: 480px) {
    .hero-content h1 { font-size: 1.8rem; }
    .cta-text h2 { font-size: 2.2rem; }
    .cta-card { padding: 40px 20px; }
    
    .btn-primary {
        width: 100%;
        text-align: center;
    }
}