/* PHP Öğreniyorum - Modern Elegant Theme */

/* Color Variables - Improved Contrast */
:root {
    --primary: #0d9488;
    --primary-dark: #0f766e;
    --primary-light: #5eead4;
    --secondary: #94a3b8;
    --success: #10b981;
    --info: #0ea5e9;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #0f172a;
    --light: #f8fafc;
    
    /* Background Colors */
    --bg-elegant: #0f172a;
    --bg-nav: #1e293b;
    --bg-features: #1e293b;
    --bg-stats: #0f172a;
    --bg-cta: #1e293b;
    --bg-footer: #0f172a;
    --bg-card: #1e293b;
    
    /* Text Colors - Better Contrast */
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-light: #e2e8f0;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #0d9488 0%, #0891b2 100%);
    --gradient-secondary: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    
    /* Spacing */
    --spacer-1: 0.25rem;
    --spacer-2: 0.5rem;
    --spacer-3: 1rem;
    --spacer-4: 1.5rem;
    --spacer-5: 3rem;
    --spacer-6: 4rem;
    --spacer-7: 5rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* Base Styles */
.bg-elegant {
    background-color: var(--bg-elegant);
    color: var(--text-primary);
}

.bg-nav {
    background-color: var(--bg-nav);
}

.bg-features {
    background-color: var(--bg-features);
}

.bg-stats {
    background-color: var(--bg-stats);
}

.bg-cta {
    background-color: var(--bg-cta);
}

.bg-footer {
    background-color: var(--bg-footer);
}

.text-primary {
    color: var(--primary) !important;
}

.text-secondary {
    color: var(--text-secondary) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

/* Typography */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-elegant);
    color: var(--text-primary);
    line-height: 1.6;
    font-weight: 400;
    /* Sticky footer */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#main-content {
    flex: 1;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation */
.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
}

.navbar-nav .nav-link {
    font-weight: 500;
    position: relative;
    transition: all 0.3s ease;
    margin: 0 0.5rem;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary) !important;
}

/* Bootstrap 5.3 navbar-dark / data-bs-theme override */
.navbar-dark .navbar-nav .nav-link.active,
.navbar[data-bs-theme="dark"] .navbar-nav .nav-link.active {
    color: var(--primary) !important;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 100%;
}

/* Navbar Dropdown */
.navbar .dropdown-menu {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    min-width: 200px;
}

.navbar .dropdown-menu .dropdown-item {
    color: rgba(255, 255, 255, 0.85);
    border-radius: var(--radius-sm);
    padding: 0.55rem 1rem;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.navbar .dropdown-menu .dropdown-item:hover,
.navbar .dropdown-menu .dropdown-item:focus {
    background-color: rgba(99, 102, 241, 0.18);
    color: #fff;
}

.navbar .dropdown-menu .dropdown-divider {
    border-color: rgba(255, 255, 255, 0.08);
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
}

/* Code Window */
.code-window {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.window-header {
    background: var(--bg-nav);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.window-dots {
    display: flex;
    gap: 0.5rem;
    margin-right: 1rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.window-title {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
}

.window-content {
    padding: 1.5rem;
}

.code-content {
    color: var(--text-light);
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

/* Course Cards */
.course-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    height: 100%;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(99, 102, 241, 0.3);
}

.card-title {
    color: var(--text-light) !important;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

.rounded-xl {
    border-radius: var(--radius-xl);
}

.bg-card {
    background-color: var(--bg-card) !important;
}

/* Feature Cards */
.feature-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 2.5rem 2rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(99, 102, 241, 0.3);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 2rem;
    color: white;
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-light);
}

.feature-text {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Stats Section */
.stat-item {
    padding: 1.5rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Buttons */
.btn {
    font-weight: 600;
    border-radius: var(--radius-lg);
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    border: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: white;
}

.btn-light {
    background: white;
    color: var(--dark);
    font-weight: 600;
}

.btn-light:hover {
    background: var(--text-light);
    color: var(--dark);
}

.btn-outline-light {
    border: 2px solid white;
    color: white;
    background: transparent;
}

.btn-outline-light:hover {
    background: white;
    color: var(--dark);
}

/* Form Elements - Improved Contrast */
.form-control {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-light);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary);
    box-shadow: 0 0 0 0.25rem rgba(99, 102, 241, 0.25);
    color: var(--text-light);
}

.form-control::placeholder {
    color: var(--text-secondary);
}

.form-check-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.form-check-label {
    color: var(--text-light);
    font-weight: 400;
}

.form-check-label.fw-medium {
    font-weight: 500;
}

.text-light {
    color: var(--text-light) !important;
}

.text-secondary {
    color: var(--text-secondary) !important;
}

.card-header.bg-primary {
    background: var(--gradient-primary) !important;
    border: none;
}

.card-header.bg-success {
    background: var(--gradient-success) !important;
    border: none;
}

/* New Filter Card Styles */
.filter-card .card-header,
.stats-card .card-header {
    position: relative;
    overflow: hidden;
}

.filter-card .card-header::after,
.stats-card .card-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
}

.bg-gradient-success {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%) !important;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
}

.progress-bar.bg-gradient-primary {
    background: linear-gradient(90deg, #6366f1, #8b5cf6) !important;
}

/* Filter Group Styles */
.filter-group {
    transition: all 0.3s ease;
}

.filter-group:hover {
    background: rgba(99, 102, 241, 0.05);
}

.filter-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
}

.bg-primary-subtle {
    background: rgba(99, 102, 241, 0.2) !important;
}

.bg-success-subtle {
    background: rgba(16, 185, 129, 0.2) !important;
}

.bg-warning-subtle {
    background: rgba(245, 158, 11, 0.2) !important;
}

/* Filter Option Styles */
.filter-option {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: background 0.2s ease;
    cursor: pointer;
}

.filter-option:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.2);
}

.filter-option:active {
    background: rgba(99, 102, 241, 0.2);
}

.filter-option:has(input:checked) {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.3);
}

.filter-option input:checked ~ .text-light,
.filter-option input:checked ~ i {
    opacity: 1;
}

.filter-option .form-check-input {
    width: 18px;
    height: 18px;
    margin-top: 0;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.filter-option .form-check-input:checked {
    background: var(--primary);
    border-color: var(--primary);
}

.filter-option .badge {
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
}

/* Text Colors - Stronger Contrast */
.text-light {
    color: #e2e8f0 !important;
}

.text-secondary {
    color: #94a3b8 !important;
}

.text-muted {
    color: #64748b !important;
}

/* Stat Item Styles */
.stat-item {
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.stat-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Progress Wrapper */
.progress-wrapper {
    padding: 0.5rem;
}

/* Cursor Pointer */
.cursor-pointer {
    cursor: pointer;
}

/* Filter Styles */
.filter-section {
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.filter-item {
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-item:hover {
    background: rgba(99, 102, 241, 0.2);
}

.filter-item input:checked + label {
    color: var(--text-light) !important;
}

/* Progress Bar Improvements */
.progress {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    transition: width 1s ease-in-out;
}

.progress-bar-striped {
    background-image: linear-gradient(45deg, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
    background-size: 1rem 1rem;
}

@keyframes progress-bar-stripes {
    from { background-position: 1rem 0; }
    to { background-position: 0 0; }
}

.progress-bar-animated {
    animation: progress-bar-stripes 1s linear infinite;
}

/* Stat Row */
.stat-row {
    transition: all 0.3s ease;
}

.stat-row:hover {
    background: rgba(255, 255, 255, 0.05);
    margin-left: -10px;
    margin-right: -10px;
    padding-left: 10px !important;
    padding-right: 10px !important;
    border-radius: 8px;
}

/* Modal */
.modal-content {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    color: var(--text-primary);
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
}

.modal-title {
    font-weight: 700;
    color: var(--text-light);
}

.modal-body {
    padding: 1.5rem;
}

.nav-tabs {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-tabs .nav-link {
    color: var(--text-muted);
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    font-weight: 500;
    padding: 1rem;
}

.nav-tabs .nav-link:hover {
    color: var(--text-light);
    border-color: transparent;
}

.nav-tabs .nav-link.active {
    color: var(--primary);
    background: transparent;
    border-bottom: 2px solid var(--primary);
}

/* Footer */
.footer-brand h4 {
    color: var(--text-light);
    font-weight: 700;
}

.footer-text {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

.footer-heading {
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.contact-info {
    list-style: none;
    padding: 0;
}

.contact-info li {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.contact-info i {
    width: 20px;
    margin-right: 0.75rem;
    color: var(--primary);
}

.footer-divider {
    background: rgba(255, 255, 255, 0.1);
    margin: 2rem 0;
}

.footer-bottom {
    color: var(--text-muted);
}

/* Utility Classes */
.py-7 { padding-top: var(--spacer-7); padding-bottom: var(--spacer-7); }
.py-6 { padding-top: var(--spacer-6); padding-bottom: var(--spacer-6); }
.mb-6 { margin-bottom: var(--spacer-6); }
.mb-7 { margin-bottom: var(--spacer-7); }
.min-vh-75 { min-height: 75vh; }

/* Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    z-index: 1000;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 600;
}

.skip-link:focus {
    top: 6px;
}

.btn:focus, .form-control:focus, a:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Form elementleri erişilebilirlik için outline alır; navigasyon elemanları almaz */
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.nav-link:focus,
.nav-link:focus-visible,
.navbar-brand:focus,
.navbar-brand:focus-visible,
.navbar-toggler:focus,
.navbar-toggler:focus-visible,
.dropdown-toggle:focus,
.dropdown-toggle:focus-visible,
.dropdown-item:focus,
.dropdown-item:focus-visible,
.btn:focus,
.btn:focus-visible,
.btn-close:focus,
.btn-close:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 992px) {
    .hero-section {
        padding: 4rem 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
        text-align: center;
    }
    
    .hero-subtitle {
        text-align: center;
        margin: 0 auto 2rem;
    }
    
    .d-flex.flex-column.flex-sm-row {
        flex-direction: column !important;
        gap: 1rem !important;
    }
    
    .feature-card {
        margin-bottom: 2rem;
    }
    
    .stat-item {
        margin-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .btn-lg {
        padding: 1rem;
        font-size: 1.1rem;
    }
    
    .code-window {
        margin-top: 2rem;
    }
    
    .window-content {
        padding: 1rem;
    }
    
    .code-content {
        font-size: 0.8rem;
    }
    
    .feature-card {
        padding: 2rem 1.5rem;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .footer-links, .contact-info {
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .py-7 {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    
    .py-6 {
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .modal-dialog {
        margin: 1rem;
    }
    
    .modal-content {
        margin: 0;
    }
}

/* ── Dersler Sayfası ── */

.course-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3) !important;
}

.section-header-badge {
    background: var(--gradient-primary);
    padding: 0.35em 0.8em;
    border-radius: 12px;
    font-size: 0.75rem;
}

.unit-row {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg);
    transition: background 0.2s;
}

.unit-row:hover {
    background: rgba(99, 102, 241, 0.08);
}