/* ============================================================
   GENERAL LANGUAGE COURSES - GLASSMORPHISM SECTION
   Premium, Modern Design with Playful Card Layout
   ============================================================ */

/* Section Container */
.general-courses-section {
    position: relative;
    padding: 5rem 0;
    background: linear-gradient(135deg, #0f1419 0%, #1a2332 50%, #0f1419 100%);
    overflow: hidden;
}

/* Animated Background Elements */
.general-courses-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 107, 157, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: float-slow 20s ease-in-out infinite;
    pointer-events: none;
}

.general-courses-section::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(52, 152, 219, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    animation: float-slow 25s ease-in-out infinite reverse;
    pointer-events: none;
}

@keyframes float-slow {
    0%, 100% {
        transform: translateY(0px) translateX(0px);
    }
    50% {
        transform: translateY(-30px) translateX(20px);
    }
}

/* Section Header */
.general-courses-header {
    text-align: center;
    margin-bottom: 3.5rem;
    position: relative;
    z-index: 2;
}

.general-courses-title {
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.general-courses-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

/* Courses Grid - Playful Layout */
.courses-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    perspective: 1000px;
    position: relative;
    z-index: 2;
    margin-top: 2rem;
}

/* Individual Course Card */
.course-card {
    position: relative;
    height: 420px;
    border-radius: 28px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.320, 1);
    transform-style: preserve-3d;
    
    /* Playful Rotation */
    transform: rotateZ(var(--rotation-angle, 0deg)) rotateX(0deg);
}

/* Assign different rotation angles */
.course-card:nth-child(1) {
    --rotation-angle: -3deg;
}

.course-card:nth-child(2) {
    --rotation-angle: 2deg;
}

.course-card:nth-child(3) {
    --rotation-angle: -2.5deg;
}

.course-card:nth-child(4) {
    --rotation-angle: 3deg;
}

.course-card:nth-child(5) {
    --rotation-angle: -1.5deg;
}

.course-card:nth-child(6) {
    --rotation-angle: 2.5deg;
}

.course-card:nth-child(7) {
    --rotation-angle: -2deg;
}

.course-card:nth-child(8) {
    --rotation-angle: 1.5deg;
}

/* Glassmorphism Background */
.course-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 28px;
    z-index: 1;
}

/* Light Reflection Effect */
.course-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.15),
        transparent
    );
    transform: skewX(-20deg);
    z-index: 2;
}

/* Card Content Container */
.course-card-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    z-index: 3;
    text-align: center;
}

/* Level Name - Large and Bold */
.course-level {
    font-size: 4.5rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Course Details List */
.course-details {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    width: 100%;
}

.detail-item {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0.01em;
}

.detail-label {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}

/* Color Coding for Levels */

/* A-Level: Yellow/Amber Shades */
.course-card.level-a1 {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.15), rgba(255, 152, 0, 0.12));
}

.course-card.level-a1::before {
    border-color: rgba(255, 193, 7, 0.25);
    background: rgba(255, 193, 7, 0.08);
}

.course-card.level-a2 {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.15), rgba(255, 87, 34, 0.12));
}

.course-card.level-a2::before {
    border-color: rgba(255, 152, 0, 0.25);
    background: rgba(255, 152, 0, 0.08);
}

/* B-Level: Red/Crimson Shades */
.course-card.level-b1 {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.15), rgba(211, 47, 47, 0.12));
}

.course-card.level-b1::before {
    border-color: rgba(244, 67, 54, 0.25);
    background: rgba(244, 67, 54, 0.08);
}

.course-card.level-b2 {
    background: linear-gradient(135deg, rgba(211, 47, 47, 0.15), rgba(165, 0, 0, 0.12));
}

.course-card.level-b2::before {
    border-color: rgba(211, 47, 47, 0.25);
    background: rgba(211, 47, 47, 0.08);
}

/* Hover Effects */
.course-card:hover {
    transform: rotateZ(0deg) rotateX(5deg) translateY(-12px) scale(1.05);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(255, 107, 157, 0.2);
}

.course-card:hover::before {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
}

.course-card:hover::after {
    animation: shine 0.6s ease-in-out;
}

@keyframes shine {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Focus State for Accessibility */
.course-card:focus {
    outline: 2px solid rgba(255, 107, 157, 0.5);
    outline-offset: 4px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .courses-grid-container {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 1.5rem;
    }

    .course-card {
        height: 380px;
    }

    .course-level {
        font-size: 3.5rem;
    }

    .detail-item {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .general-courses-section {
        padding: 3rem 0;
    }

    .general-courses-header {
        margin-bottom: 2.5rem;
    }

    .general-courses-title {
        font-size: 2rem;
    }

    .general-courses-subtitle {
        font-size: 1rem;
    }

    .courses-grid-container {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 1.2rem;
    }

    .course-card {
        height: 340px;
        border-radius: 20px;
        transform: rotateZ(0deg) !important;
    }

    .course-card:nth-child(n) {
        --rotation-angle: 0deg !important;
    }

    .course-level {
        font-size: 2.8rem;
        margin-bottom: 1rem;
    }

    .course-card-content {
        padding: 1.5rem;
    }

    .course-details {
        gap: 0.6rem;
    }

    .detail-item {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .general-courses-section {
        padding: 2rem 0;
    }

    .general-courses-title {
        font-size: 1.6rem;
        margin-bottom: 0.8rem;
    }

    .general-courses-subtitle {
        font-size: 0.95rem;
    }

    .courses-grid-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .course-card {
        height: 300px;
        border-radius: 18px;
    }

    .course-level {
        font-size: 2.2rem;
        margin-bottom: 0.8rem;
    }

    .course-card-content {
        padding: 1.2rem;
    }

    .detail-item {
        font-size: 0.8rem;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .general-courses-section::before,
    .general-courses-section::after {
        animation: none;
    }

    .course-card {
        transition: none;
    }

    .course-card:hover {
        transform: none;
    }

    .course-card:hover::after {
        animation: none;
    }
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .course-card {
        height: 380px;
        transform: rotateZ(var(--rotation-angle, 0deg)) rotateX(0deg);
        animation: continuous-move 4s ease-in-out infinite;
    }

    .course-card-content {
        padding: 1.5rem;
    }

    .course-level {
        font-size: 4.2rem;
        margin-bottom: 1rem;
    }

    .detail-item {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .course-card {
        height: 340px;
        transform: rotateZ(calc(var(--rotation-angle, 0deg) - 2deg)) rotateX(0deg);
        animation: continuous-move 3s ease-in-out infinite;
    }

    .course-card-content {
        padding: 1.2rem;
    }

    .course-level {
        font-size: 4rem;
        margin-bottom: 0.8rem;
    }

    .detail-item {
        font-size: 1.1rem;
    }
}

@keyframes continuous-move {
    0%, 100% {
        transform: rotateZ(var(--rotation-angle, 0deg)) translateY(0px);
    }
    50% {
        transform: rotateZ(var(--rotation-angle, 0deg)) translateY(-10px);
    }
}
