/* ==============================================
   YOWAMCA EDUCATIONAL PLATFORM STYLES
   ============================================== */

/* ==================== VISIBILITY FIX ==================== */
/* Force all cards and elements to be visible immediately */
.card,
.card-grid .card,
.tutor-card,
.feature-box,
.stat-card,
.hero,
section .card,
.lesson-content,
.quiz-container,
.auth-container,
.dashboard-stats .stat-card {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    transform: none !important;
    transition: none !important;
}

/* Override any inline styles that hide elements */
[style*="opacity: 0"] {
    opacity: 1 !important;
}

[style*="display: none"]:not(.dropdown-content):not(.tab-content) {
    display: block !important;
}

/* Ensure grid items stay visible */
.card-grid {
    display: grid !important;
}

.card-grid .card {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* ==================== RESET ==================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: #f4f6f9;
    color: #333;
}

/* ==================== HEADER & NAVIGATION ==================== */

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
    z-index: 100;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-brand:hover {
    color: #ffd700;
}

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 5px;
    transition: all 0.3s;
}

.nav-links a:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.nav-links .btn-login {
    background: white;
    color: #764ba2;
    font-weight: 600;
}

.nav-links .btn-login:hover {
    background: #ffd700;
    color: #333;
    transform: translateY(-2px);
}

.nav-links .btn-register {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.nav-links .btn-register:hover {
    background: white;
    color: #764ba2;
    transform: translateY(-2px);
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: white;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    border-radius: 8px;
    z-index: 1000;
    padding: 8px 0;
}

.dropdown-content a {
    color: #333 !important;
    padding: 12px 20px !important;
    display: block;
    border-radius: 0 !important;
    border-bottom: 1px solid #eee;
}

.dropdown-content a:hover {
    background: #f4f6f9 !important;
    transform: none !important;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* ==================== HERO SECTION ==================== */

.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    animation: fadeInDown 0.8s ease;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero .btn {
    padding: 15px 40px;
    font-size: 1.1rem;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s;
    display: inline-block;
    margin: 0 10px;
}

.hero .btn-primary {
    background: white;
    color: #764ba2;
}

.hero .btn-primary:hover {
    background: #ffd700;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.hero .btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.hero .btn-secondary:hover {
    background: white;
    color: #764ba2;
    transform: translateY(-3px);
}

/* ==================== CONTAINER ==================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 60px 0;
}

/* ==================== CARDS ==================== */

.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    padding: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 20px;
    /* Force visibility */
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.card-grid .card {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

/* ==================== FEATURES ==================== */

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-box {
    background: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 1 !important;
    visibility: visible !important;
}

.feature-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.feature-box i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 20px;
}

.feature-box h3 {
    margin-bottom: 15px;
    color: #333;
}

.feature-box p {
    color: #666;
    line-height: 1.6;
}

/* ==================== FORMS ==================== */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
    background: white;
}

.form-control:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-control.error {
    border-color: #e74c3c;
}

.form-control.success {
    border-color: #2ecc71;
}

.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: #2ecc71;
    color: white;
}

.btn-success:hover {
    background: #27ae60;
    transform: translateY(-2px);
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.btn-warning {
    background: #f39c12;
    color: white;
}

.btn-warning:hover {
    background: #d68910;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-lg {
    padding: 16px 40px;
    font-size: 1.1rem;
}

/* ==================== LOGIN / REGISTER ==================== */

.auth-container {
    max-width: 450px;
    margin: 60px auto;
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 30px rgba(0,0,0,0.1);
    opacity: 1 !important;
    visibility: visible !important;
}

.auth-container h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.auth-container .form-group {
    margin-bottom: 20px;
}

.auth-container .btn {
    width: 100%;
    padding: 14px;
    font-size: 1.1rem;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

.auth-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    opacity: 1 !important;
    visibility: visible !important;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* ==================== DASHBOARD ==================== */

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    opacity: 1 !important;
    visibility: visible !important;
}

.stat-card h3 {
    color: #667eea;
    font-size: 2rem;
    margin-bottom: 5px;
}

.stat-card p {
    color: #666;
    margin: 0;
}

.stat-card .stat-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

/* ==================== TUTOR CARDS ==================== */

.tutor-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 1 !important;
    visibility: visible !important;
}

.tutor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.tutor-card .avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 2.5rem;
    color: white;
}

.tutor-card .rating {
    color: #f39c12;
    margin: 10px 0;
}

.tutor-card .subjects {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 15px 0;
}

.tutor-card .subject-tag {
    background: #f4f6f9;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #555;
}

/* ==================== LESSON VIEWER ==================== */

.lesson-content {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    opacity: 1 !important;
    visibility: visible !important;
}

.lesson-content h1 {
    color: #333;
    margin-bottom: 20px;
}

.lesson-content .meta {
    color: #666;
    margin-bottom: 30px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.lesson-content .video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin: 30px 0;
    border-radius: 12px;
}

.lesson-content .video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.lesson-content .voice-player {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.lesson-content .voice-player audio {
    flex: 1;
}

.lesson-content .content-text {
    line-height: 1.8;
    font-size: 1.05rem;
    color: #444;
}

.lesson-content .content-text img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

/* ==================== QUIZ ==================== */

.quiz-container {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    opacity: 1 !important;
    visibility: visible !important;
}

.question {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.question:last-child {
    border-bottom: none;
}

.question .question-text {
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.question .options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.question .options label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    border: 2px solid #eee;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.question .options label:hover {
    background: #f8f9fa;
    border-color: #667eea;
}

.question .options input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

/* ==================== QUIZ RESULTS ==================== */

.quiz-results {
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    text-align: center;
}

.quiz-results h3 {
    margin-bottom: 10px;
}

/* ==================== FOOTER ==================== */

footer {
    background: #2c3e50;
    color: white;
    padding: 40px 0;
    margin-top: 60px;
}

footer .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

footer h4 {
    margin-bottom: 15px;
    color: #ffd700;
}

footer a {
    color: #bdc3c7;
    text-decoration: none;
    display: block;
    padding: 5px 0;
    transition: color 0.3s;
}

footer a:hover {
    color: white;
}

footer .copyright {
    text-align: center;
    padding-top: 30px;
    margin-top: 30px;
    border-top: 1px solid #34495e;
    color: #bdc3c7;
}

/* ==================== ANIMATIONS ==================== */

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero .btn {
        display: block;
        margin: 10px auto;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .auth-container {
        padding: 20px;
        margin: 30px 15px;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
    
    .lesson-content {
        padding: 20px;
    }
    
    .tutor-card {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .stat-card h3 {
        font-size: 1.5rem;
    }
    
    .container {
        padding: 0 15px;
    }
}

/* ==================== PRINT STYLES ==================== */

@media print {
    header, footer, .nav-links, .btn, .no-print {
        display: none !important;
    }
    
    .card, .lesson-content, .quiz-container {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}