/* FILE: /assets/css/style.css */
/* Main Stylesheet for Yemlek Tutors */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --dark-color: #1f2937;
    --light-color: #f9fafb;
    --border-color: #e5e7eb;
    --text-color: #374151;
    --text-light: #6b7280;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #ffffff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}


/* HEADER */
.main-header {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    gap: 1rem;
}

.logo {
    flex-shrink: 0;
    min-width: fit-content;
}

.logo h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin: 0;
    white-space: nowrap;
}

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

.main-nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
    white-space: nowrap;
}

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

.nav-btn {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    background: var(--light-color);
    border: 1px solid var(--border-color);
    display: inline-block;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    transition: all 0.3s;
}

.nav-btn:hover {
    background: var(--border-color);
}

.nav-btn.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
}

.nav-btn.btn-primary:hover {
    background: var(--secondary-color);
}

.nav-btn.btn-logout {
    color: var(--danger-color);
    border-color: var(--danger-color);
}

.nav-btn.btn-logout:hover {
    background: var(--danger-color);
    color: white;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
}

/* Ensure smooth scrolling on mobile */
@supports (overflow-y: overlay) {
    .main-nav {
        overflow-y: overlay;
    }
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .header-content {
        padding: 0.75rem 0;
        gap: 0.5rem;
    }
    
    .logo h1 {
        font-size: 1.1rem;
    }
    
    .main-nav {
        gap: 0.25rem;
        flex: 1;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0.5rem 0;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
    
    .main-nav::-webkit-scrollbar {
        height: 3px;
    }
    
    .main-nav::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .main-nav::-webkit-scrollbar-thumb {
        background: var(--border-color);
        border-radius: 2px;
    }
    
    .main-nav a {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .nav-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
        border-radius: 3px;
    }
}

@media (max-width: 768px) and (min-width: 481px) {
    .header-content {
        padding: 0.9rem 0;
    }
    
    .logo h1 {
        font-size: 1.3rem;
    }
    
    .main-nav {
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    .main-nav a {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .nav-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
}


/* HERO SECTION */
.hero {
    position: relative;
    min-height: 80vh;
    overflow: hidden;
    color: white;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-slider {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    animation: heroFade 15s infinite;
    transform: scale(1.05);
}

.slide-1 {
    background-image: url('/assets/images/hero-teachers-1.jpg');
    animation-delay: 0s;
}

.slide-2 {
    background-image: url('/assets/images/hero-teachers-2.jpg');
    animation-delay: 5s;
}

.slide-3 {
    background-image: url('/assets/images/hero-teachers-3.jpg');
    animation-delay: 10s;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1;
}

.hero-inner {
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 6rem 1rem;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

@keyframes heroFade {
    0% { opacity: 0; }
    8% { opacity: 1; }
    33% { opacity: 1; }
    41% { opacity: 0; }
    100% { opacity: 0; }
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        min-height: 70vh;
    }

    .hero-content {
        padding: 4rem 1rem;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .hero-cta .btn {
        width: 100%;
        max-width: 280px;
    }
}


/* BUTTONS */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--light-color);
}

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

.btn-block {
    width: 100%;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

/* SECTIONS */
.about, .services, .how-it-works, .teacher-profiles, .testimonials, .faq-preview, .contact-cta {
    padding: 4rem 0;
}

.about {
    background: var(--light-color);
}

.services {
    background: white;
}

.how-it-works {
    background: var(--light-color);
}

section h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--dark-color);
}

/* GRID LAYOUTS */
.services-grid, .profiles-grid, .testimonials-grid, .teachers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card, .profile-card, .testimonial-card, .teacher-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.service-card:hover, .profile-card:hover, .teacher-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* STATS */
.about-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.stat {
    text-align: center;
}

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

/* HOW IT WORKS */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.step {
    text-align: center;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

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

.badge.verified {
    background: #d1fae5;
    color: #065f46;
}

.badge.pending {
    background: #fef3c7;
    color: #92400e;
}

.badge.passed {
    background: #d1fae5;
    color: #065f46;
}

.badge.failed {
    background: #fee2e2;
    color: #991b1b;
}

/* FORMS */
.auth-container, .page-container {
    padding: 2rem 0;
    min-height: 60vh;
}

.auth-box {
    max-width: 500px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.auth-form, .admin-form, .contact-form, .profile-form, .search-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-color);
}

.form-group input, .form-group select, .form-group textarea {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group small {
    margin-top: 0.25rem;
    color: var(--text-light);
    font-size: 0.875rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* ALERTS */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-info {
    background: #dbeafe;
    color: #0c2d6b;
    border: 1px solid #bfdbfe;
}

/* DASHBOARD */
.dashboard-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    padding: 2rem 0;
    min-height: 80vh;
}

.dashboard-sidebar {
    background: var(--light-color);
    padding: 1.5rem;
    border-radius: 8px;
    height: fit-content;
}

.user-profile {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.user-profile h3 {
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.dashboard-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dashboard-nav a {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s;
}

.dashboard-nav a:hover, .dashboard-nav a.active {
    background: var(--primary-color);
    color: white;
}

.dashboard-content h1 {
    margin-bottom: 2rem;
    color: var(--dark-color);
}

.dashboard-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.dashboard-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.status-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.status-card {
    background: var(--light-color);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
}

.status-card h4 {
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.status-card .status {
    font-weight: 700;
    font-size: 1.1rem;
}

.status-card .status.verified {
    color: var(--success-color);
}

.status-card .status.pending {
    color: var(--warning-color);
}

/* TABLES */
.admin-table, .results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.admin-table thead, .results-table thead {
    background: var(--light-color);
}

.admin-table th, .results-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--dark-color);
    border-bottom: 2px solid var(--border-color);
}

.admin-table td, .results-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.admin-table tbody tr:hover {
    background: var(--light-color);
}

/* FOOTER */
.main-footer {
    background: var(--dark-color);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3, .footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    color: #9ca3af;
}

/* TEST INTERFACE */
.test-interface {
    background: white;
    padding: 2rem;
    border-radius: 8px;
}

.test-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.test-timer {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.question-block {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--light-color);
    border-radius: 8px;
}

.question-text {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
}

.options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.option-label {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.option-label:hover {
    border-color: var(--primary-color);
    background: #f0f9ff;
}

.option-label input[type="radio"] {
    margin-right: 1rem;
    cursor: pointer;
}

.option-label input[type="radio"]:checked + span {
    font-weight: 700;
}

/* PAGE HEADER */
.page-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 3rem 0;
    text-align: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* FAQS */
.faq-item {
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 1.5rem;
    background: var(--light-color);
    border: none;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s;
}

.faq-question:hover {
    background: #e5e7eb;
}

.faq-toggle {
    font-size: 1.5rem;
    transition: transform 0.3s;
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 1.5rem;
    background: white;
    display: none;
}

.faq-item.active .faq-answer {
    display: block;
}

/* CONTACT */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.contact-form-wrapper {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.contact-info {
    background: var(--light-color);
    padding: 2rem;
    border-radius: 8px;
}

.info-item {
    margin-bottom: 2rem;
}

.info-item h4 {
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

/* UTILITY CLASSES */
.text-center {
    text-align: center;
}

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

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

.view-all-teachers, .view-all-faqs, .contact-buttons, .cta-buttons {
    text-align: center;
    margin-top: 2rem;
}

.view-all-teachers a, .view-all-faqs a, .contact-buttons a, .cta-buttons a {
    margin: 0 0.5rem;
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-nav {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .dashboard-container {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    section h2 {
        font-size: 1.8rem;
    }
}