:root {
    --primary: #2563EB;
    --primary-hover: #1D4ED8;
    --primary-light: #EFF6FF;
    --bg-page: #F8FAFC;
    --card-bg: #FFFFFF;
    --border-color: #E2E8F0;
    --text-main: #0F172A;
    --text-muted: #64748B;
    --success: #16A34A;
    --success-bg: #DCFCE7;
    --warning: #F59E0B;
    --warning-bg: #FEF3C7;
    --danger: #EF4444;
    --danger-bg: #FEE2E2;
    --purple: #8B5CF6;
    --purple-bg: #F3E8FF;
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 6px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-card: 0 10px 25px -5px rgba(15, 23, 42, 0.05), 0 8px 10px -6px rgba(15, 23, 42, 0.03);
    --shadow-hover: 0 20px 30px -10px rgba(37, 99, 235, 0.12), 0 10px 15px -5px rgba(0, 0, 0, 0.04);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Match standard TutorMatch navbar container (layout.css .tm-container) */
.tm-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}


/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    width: 100%;
}

/* Hero Header */
.hero-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2rem;
    gap: 2rem;
}

.hero-title h1 {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.hero-title p {
    color: var(--text-muted);
    font-size: 0.98rem;
}

.hero-stats {
    display: flex;
    gap: 1rem;
}

.stat-card {
    background: white;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--shadow-sm);
}

.stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.stat-icon.fire { background: #FEF2F2; color: #EF4444; }
.stat-icon.green { background: #F0FDF4; color: #16A34A; }

.stat-info .count {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1;
}

.stat-info .label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 3px;
}

/* Search and Filter Bar */
.filter-wrapper {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.search-box {
    position: relative;
    margin-bottom: 1rem;
}

/* Select Group Inputs & Dropdown Matching Style */
.select-group input,
.select-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 500; /* Dark aur bold text ke liye */
    color: #0f172a;   /* Deep Dark/Black text color */
    background-color: #F8FAFC;
    transition: var(--transition);
    outline: none;
}

/* Placeholder Ko Bhi Slightly Darker Aur Clear Banane Ke Liye */
.select-group input::placeholder {
    color: #475569;
    font-weight: 500;
}

/* Focus State (Click karne par blue glow) */
.select-group input:focus,
.select-group select:focus {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}
.search-box i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.05rem;
}

.search-box input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    background-color: #F8FAFC;
    transition: var(--transition);
    outline: none;
}

.search-box input:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.select-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main);
    background-color: white;
    cursor: pointer;
    outline: none;
    transition: var(--transition);
}

.select-group select:hover {
    border-color: #CBD5E1;
}

.btn-more-filters {
    background: var(--primary-light);
    color: var(--primary);
    border: 1px dashed var(--primary);
    padding: 10px 16px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    transition: var(--transition);
}

.btn-more-filters:hover {
    background: #DBEAFE;
}

/* Tuition Grid Layout - STRICTLY 3 CARDS PER ROW */
.tuition-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

/* Premium Tuition Card */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    min-height: 320px;
}

.card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: var(--shadow-hover);
}

/* Card Badges Header */
.card-header-badges {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.badge-tag {
    font-size: 0.72rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-tag.new { background: var(--success-bg); color: var(--success); } 
.badge-tag.high-budget { background: var(--warning-bg); color: #B45309; }
.badge-tag.urgent { background: var(--danger-bg); color: var(--danger); }
.badge-tag.recommended { background: var(--purple-bg); color: var(--purple); }

.slots-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
}

.slots-green { background: #DCFCE7; color: #15803D; }
.slots-orange { background: #FEF3C7; color: #B45309; }
.slots-red { background: #FEE2E2; color: #B91C1C; }

/* Card Title */
.card-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 12px;
    line-height: 1.3;
}

/* Specifications Grid */
.specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
    margin-bottom: 12px;
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
}

.spec-item i {
    color: var(--primary);
    width: 14px;
    text-align: center;
}

.spec-item.budget {
    grid-column: span 2;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-main);
    background: #F8FAFC;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary);
}

.spec-item.budget i {
    color: var(--success);
}

.card-meta {
    font-size: 0.78rem;
    color: #94A3B8;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Card Footer & Match Score */
.card-footer {
    border-top: 1px solid #F1F5F9;
    padding-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.match-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #F0FDF4;
    border: 2px solid #BBF7D0;
    color: #16A34A;
    line-height: 1;
    flex-shrink: 0;
}

.match-score .num {
    font-size: 0.95rem;
    font-weight: 800;
}

.match-score .lbl {
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 1px;
    color: #15803D;
}

.card-actions {
    display: flex;
    gap: 8px;
    flex-grow: 1;
    justify-content: flex-end;
}

.btn {
    padding: 9px 14px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
}

.btn-outline {
    background: white;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

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

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
    color: #ffffff;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    background: #F8FAFC;
    border: 1px solid var(--border-color);
}

.btn-icon:hover {
    color: var(--danger);
    background: #FEF2F2;
    border-color: #FCA5A5;
}

.btn-icon.saved {
    color: var(--danger);
    background: #FEF2F2;
    border-color: #FCA5A5;
}

/* Load More Section */
.load-more-container {
    text-align: center;
    margin: 2rem 0 3rem;
}

.btn-load-more {
    background: white;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 14px 32px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.1);
}

.btn-load-more:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.25);
}

.load-count-text {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 10px;
    font-weight: 500;
}

/* Modal / Dialog */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-card {
    background: white;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 480px;
    padding: 1.75rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.9);
    transition: var(--transition);
}

.modal-overlay.active .modal-card {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
}

.modal-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.modal-header h3 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-main);
}

.rules-list {
    background: #F8FAFC;
    border-radius: var(--radius-md);
    padding: 1rem;
    margin: 1.25rem 0;
    border: 1px solid var(--border-color);
}

.rules-list li {
    list-style: none;
    font-size: 0.88rem;
    color: var(--text-main);
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.4;
}

.rules-list li:last-child {
    margin-bottom: 0;
}

.rules-list li i {
    color: var(--success);
    font-size: 1rem;
    margin-top: 2px;
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.modal-actions .btn {
    flex: 1;
    padding: 12px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: var(--radius-lg);
    border: 1px dashed var(--border-color);
    display: none;
}

.empty-state-icon {
    font-size: 3.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
    background: var(--primary-light);
    width: 90px;
    height: 90px;
    line-height: 90px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
}

.empty-state h3 {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-muted);
    max-width: 420px;
    margin: 0 auto 1.5rem;
    font-size: 0.92rem;
}

/* Responsive Design */
/* Tablet: 2-column grids */
@media (min-width: 769px) and (max-width: 1024px) {
    .tuition-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .filters-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

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

    .container {
        max-width: 1100px;
    }
}

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

    .navbar {
        padding: 0 1rem;
    }
    .nav-links {
        display: none;
    }
    .hero-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }

    .hero-title h1 {
        font-size: 1.45rem;
    }

    .hero-stats {
        width: 100%;
        flex-direction: column;
    }
    .stat-card {
        flex: 1;
        width: 100%;
    }
    .tuition-grid {
        grid-template-columns: 1fr;
    }
    .filters-grid {
        grid-template-columns: 1fr;
    }

    .filter-wrapper {
        padding: 1rem;
    }

    .btn-more-filters,
    .btn-apply-filters,
    .btn-clear-filters {
        width: 100%;
        min-height: 44px;
    }

    .filter-actions {
        flex-direction: column;
        width: 100%;
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* ==========================================
   TUITION ID BADGE STYLES
   ========================================== */
.tuition-id-badge {
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
}

.tuition-id-badge:hover {
    background-color: #e2e8f0;
    color: #0f172a;
    border-color: #94a3b8;
    transform: translateY(-1px);
}