/* Dersler sayfası modern tema stilleri */

body.lessons-page {
    background: linear-gradient(180deg, rgba(9, 17, 31, 1) 0%, rgba(18, 31, 51, 0.92) 42%, rgba(37, 54, 86, 0.88) 70%, rgba(243, 246, 252, 0.96) 100%);
    min-height: 100vh;
}

.lessons-wrapper {
    max-width: 1240px;
    margin: clamp(32px, 6vw, 56px) auto clamp(40px, 7vw, 68px);
    padding: clamp(32px, 5vw, 52px);
    border-radius: 36px;
    position: relative;
    border: 1px solid rgba(var(--charcoal-rgb, 18, 26, 36), 0.14);
    background: linear-gradient(160deg,
        rgba(9, 17, 31, 0.96) 0%,
        rgba(18, 31, 51, 0.9) 34%,
        rgba(37, 54, 86, 0.82) 62%,
        rgba(255, 255, 255, 0.95) 100%);
    box-shadow: 0 36px 80px rgba(9, 17, 31, 0.28);
    overflow: hidden;
}

.lessons-wrapper::before,
.lessons-wrapper::after {
    content: '';
    position: absolute;
    pointer-events: none;
    opacity: 0.7;
}

.lessons-wrapper::before {
    inset: -40% -15% auto -20%;
    height: 58%;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.22), transparent 70%);
}

.lessons-wrapper::after {
    inset: auto -30% -45% 18%;
    height: 62%;
    background: radial-gradient(circle at bottom left, rgba(255, 255, 255, 0.24), transparent 72%);
}

.lessons-content,
.lessons-hero {
    position: relative;
    z-index: 1;
}

.lessons-hero {
    text-align: center;
    margin-bottom: clamp(32px, 6vw, 48px);
    color: #ffffff;
    display: grid;
    justify-items: center;
    gap: 18px;
}

.lessons-hero-logo {
    width: clamp(88px, 12vw, 124px);
    height: clamp(88px, 12vw, 124px);
    border-radius: 28px;
    padding: clamp(12px, 2vw, 18px);
    background: linear-gradient(140deg, rgba(255, 255, 255, 0.95), rgba(255, 232, 240, 0.9));
    border: 1px solid rgba(var(--accent-rgb, 163, 14, 37), 0.18);
    box-shadow: 0 20px 40px rgba(var(--accent-rgb, 163, 14, 37), 0.26);
    display: grid;
    place-items: center;
    position: relative;
    overflow: hidden;
}

.lessons-hero-logo::after {
    content: '';
    position: absolute;
    inset: clamp(12px, 2.4vw, 18px);
    border-radius: 24px;
    border: 1px dashed rgba(var(--accent-rgb, 163, 14, 37), 0.2);
    opacity: 0.7;
}

.lessons-hero-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 1;
}

.lessons-hero-title {
    font-size: clamp(32px, 5vw, 44px);
    font-weight: 800;
    letter-spacing: 0.6px;
}

.lessons-hero-subtitle {
    font-size: clamp(16px, 2.6vw, 18px);
    max-width: 640px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.82);
}

.lesson-accordion-group {
    display: grid;
    gap: clamp(16px, 3vw, 22px);
}

.lesson-accordion {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 26px 48px rgba(9, 17, 31, 0.24);
    backdrop-filter: blur(18px);
    overflow: hidden;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.lesson-accordion:hover {
    transform: translateY(-4px);
    border-color: rgba(var(--accent-rgb, 163, 14, 37), 0.28);
    box-shadow: 0 32px 60px rgba(9, 17, 31, 0.3);
}

.lesson-toggle {
    width: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(245, 247, 252, 0.86));
    color: rgba(var(--charcoal-rgb, 18, 26, 36), 0.9);
    border: none;
    outline: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(18px, 3vw, 24px) clamp(20px, 3.4vw, 28px);
    font-size: clamp(17px, 2.6vw, 20px);
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease;
}

.lesson-toggle:hover,
.lesson-accordion.open .lesson-toggle {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 237, 243, 0.92));
    color: var(--ankahed-red, #a30e25);
}

.lesson-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
    margin-right: 24px;
}

.lesson-title {
    display: flex;
    align-items: center;
    gap: 14px;
}

.lesson-title i {
    font-size: 18px;
    color: var(--ankahed-red, #a30e25);
}

.lesson-meta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(var(--charcoal-rgb, 18, 26, 36), 0.62);
}

.lesson-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(var(--accent-rgb, 163, 14, 37), 0.1);
    border: 1px solid rgba(var(--accent-rgb, 163, 14, 37), 0.16);
}

.lesson-meta i {
    color: rgba(var(--accent-rgb, 163, 14, 37), 0.8);
}

.toggle-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(var(--accent-rgb, 163, 14, 37), 0.12);
    color: var(--ankahed-red, #a30e25);
    transition: transform 0.3s ease, background 0.3s ease;
}

.lesson-accordion.open .toggle-icon {
    transform: rotate(180deg);
    background: linear-gradient(135deg, var(--ankahed-red, #a30e25), var(--ankahed-red-dark, #6c0716));
    color: #ffffff;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.35s ease, padding 0.35s ease;
    opacity: 0;
    padding: 0 clamp(22px, 3vw, 30px);
}

.lesson-accordion.open .accordion-content {
    opacity: 1;
    padding-bottom: clamp(22px, 3vw, 32px);
}

.lesson-description {
    color: rgba(var(--charcoal-rgb, 18, 26, 36), 0.86);
    font-size: 15px;
    line-height: 1.68;
    margin-bottom: clamp(14px, 2.6vw, 20px);
}

.lesson-video {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    border-radius: 20px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.18);
    box-shadow: 0 24px 48px rgba(9, 17, 31, 0.28);
    margin-bottom: clamp(16px, 3vw, 24px);
}

.lesson-video iframe,
.lesson-video video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 20px;
}

.lesson-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.lesson-detail-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--ankahed-red, #a30e25), var(--ankahed-red-dark, #6c0716));
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    box-shadow: 0 20px 36px rgba(var(--accent-rgb, 163, 14, 37), 0.32);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.lesson-detail-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 44px rgba(var(--accent-rgb, 163, 14, 37), 0.36);
}

.lesson-detail-link i {
    font-size: 14px;
}

.lessons-loading,
.lessons-empty,
.lessons-error {
    margin: clamp(24px, 4vw, 32px) auto;
    padding: clamp(18px, 3vw, 26px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 22px 44px rgba(9, 17, 31, 0.22);
    color: rgba(255, 255, 255, 0.85);
    display: grid;
    gap: 12px;
    justify-items: center;
    text-align: center;
}

.lessons-loading i {
    font-size: 24px;
    animation: lessonsSpin 1s linear infinite;
    color: var(--ankahed-red, #a30e25);
}

@keyframes lessonsSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.lessons-empty {
    background: rgba(46, 204, 113, 0.12);
    border-color: rgba(46, 204, 113, 0.28);
    color: #0f5132;
}

.lessons-error {
    background: rgba(220, 53, 69, 0.14);
    border-color: rgba(220, 53, 69, 0.26);
    color: #842029;
}

@media (max-width: 960px) {
    .lessons-wrapper {
        margin: clamp(24px, 6vw, 40px) auto;
        padding: clamp(24px, 6vw, 42px);
        border-radius: 28px;
    }

    .lesson-toggle {
        align-items: flex-start;
        gap: 16px;
    }

    .toggle-icon {
        align-self: flex-start;
    }
}

@media (max-width: 640px) {
    body.lessons-page {
        background: linear-gradient(200deg, rgba(9, 17, 31, 1) 0%, rgba(18, 31, 51, 0.92) 45%, rgba(37, 54, 86, 0.82) 70%, rgba(243, 246, 252, 0.96) 100%);
    }

    .lessons-wrapper {
        border-radius: 22px;
        padding: clamp(20px, 7vw, 32px);
    }

    .lesson-toggle {
        flex-direction: column;
        align-items: flex-start;
        font-size: 17px;
    }

    .lesson-header {
        margin-right: 0;
    }

    .lesson-meta {
        flex-wrap: wrap;
        gap: 8px;
    }

    .lesson-detail-link {
        width: 100%;
        justify-content: center;
    }
}
