/**
 * Gymnastics Courses - Custom Premium CSS
 * Designed for ultimate responsiveness (mobile-first), premium glassmorphism aesthetics, and clean layouts.
 */

:root {
    --primary-color: #00a32a;
    --primary-hover: #007a1f;
    --bg-dark: #0b0f19;
    --bg-darker: #070a10;
    --card-bg: #1e293b;
    --text-white: #f8fafc;
    --text-muted: #94a3b8;
    --gold: #d4af37;
    --blue: #3b82f6;
    --border-color: rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   1. GLOBAL STYLES & TRANSITIONS
   ========================================================================== */
.gyc-portal-container,
.gyc-premium-checkout-wrapper,
.gyc-landing-wrapper {
    font-family: 'Almarai', 'Inter', Tahoma, Arial, sans-serif;
    transition: all 0.3s ease;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* ==========================================================================
   2. COURSE PORTAL & GRID STYLES
   ========================================================================== */
.gyc-grid-wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 20px;
}

.gyc-course-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #f1f5f9;
}

.gyc-course-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.gyc-card-body {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.gyc-course-title {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.4;
}

.gyc-course-desc {
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
    height: 48px;
    overflow: hidden;
    margin: 0 0 20px;
}

.gyc-course-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: auto;
}

.gyc-course-price {
    font-size: 22px;
    font-weight: 900;
    color: var(--primary-color);
}

.gyc-course-price-small {
    font-size: 11px;
    color: #64748b;
    font-weight: normal;
}

.gyc-course-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: #ffffff !important;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    text-align: center;
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 163, 42, 0.2);
}

.gyc-course-btn:hover {
    opacity: 0.95;
    transform: translateY(-1px);
}

/* Grid Breakpoints */
@media (max-width: 991px) {
    .gyc-grid-wrapper {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 600px) {
    .gyc-grid-wrapper {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .gyc-course-card {
        border-radius: 12px;
    }
    .gyc-card-body {
        padding: 16px;
    }
    .gyc-course-title {
        font-size: 16px;
    }
    .gyc-course-desc {
        display: none; /* Hide to save space */
    }
    .gyc-course-footer {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    .gyc-course-btn {
        width: auto;
        padding: 8px 15px;
        font-size: 13px;
    }
}

/* ==========================================================================
   3. COURSE LANDING DETAILS SCREEN
   ========================================================================== */
.gyc-course-header {
    background: #0f172a;
    color: #ffffff;
    padding: 40px;
    border-radius: 16px;
    display: flex;
    gap: 40px;
    align-items: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.gyc-course-img-wrapper {
    flex: 1;
    width: 100%;
}

.gyc-course-info-wrapper {
    flex: 1;
}

@media (max-width: 768px) {
    .gyc-course-header {
        flex-direction: column;
        padding: 24px;
        text-align: center;
        gap: 20px;
    }
    .gyc-course-title {
        font-size: 26px !important;
    }
    .gyc-course-desc {
        font-size: 15px !important;
    }
}

/* ==========================================================================
   4. FOCUS PLAYER (LEARNING PLATFORM)
   ========================================================================== */
.gyc-focus-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-darker);
    z-index: 999999;
    display: flex;
    direction: rtl;
    font-family: 'Almarai', Tahoma, Arial, sans-serif;
    overflow: hidden;
}

.gyc-sidebar {
    width: 360px;
    background: var(--bg-dark);
    color: var(--text-white);
    height: 100vh;
    overflow-y: auto;
    border-left: 1px solid var(--border-color);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.gyc-main {
    flex: 1;
    height: 100vh;
    overflow-y: auto;
    background: var(--bg-darker);
    display: flex;
    flex-direction: column;
}

.gyc-nav-header {
    padding: 20px;
    background: rgba(7, 10, 16, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.gyc-nav-header a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    transition: 0.2s;
}

.gyc-nav-header a:hover {
    color: #ffffff;
    background: rgba(239, 68, 68, 0.2);
}

.gyc-chapter-header {
    padding: 16px 20px;
    background: rgba(30, 41, 59, 0.4);
    border-bottom: 1px solid var(--border-color);
    font-weight: 800;
    font-size: 14px;
    color: var(--text-white);
    letter-spacing: 0.5px;
}

.gyc-lesson-item {
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 13.5px;
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: 0.2s;
}

.gyc-lesson-item:hover {
    background: rgba(255, 255, 255, 0.03);
    color: #ffffff;
}

.gyc-lesson-item.active {
    background: rgba(0, 163, 42, 0.15);
    color: #ffffff;
    font-weight: bold;
    border-left: 4px solid var(--primary-color);
}

.gyc-video-container {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000000;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.gyc-interactive-tabs {
    background: var(--bg-dark);
    display: flex;
    padding: 0 20px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 5;
    overflow-x: auto;
    white-space: nowrap;
}

.gyc-tab {
    padding: 16px 24px;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    font-weight: 600;
    font-size: 14px;
    transition: 0.3s;
}

.gyc-tab:hover {
    color: #ffffff;
}

.gyc-tab.active {
    color: #ffffff;
    border-bottom-color: var(--primary-color);
}

.gyc-tab-content {
    padding: 30px 40px;
    display: none;
    color: #e2e8f0;
    background: var(--bg-darker);
    min-height: 200px;
    line-height: 1.7;
}

.gyc-tab-content.active {
    display: block;
}

/* Watermark floating CSS animation */
@keyframes gycFloatWatermark {
    0% { top: 12%; left: 12%; opacity: 0.35; transform: translate(-50%, -50%) scale(1); }
    25% { top: 88%; left: 88%; opacity: 0.65; transform: translate(-50%, -50%) scale(1.05); }
    50% { top: 12%; left: 85%; opacity: 0.45; transform: translate(-50%, -50%) scale(1); }
    75% { top: 88%; left: 12%; opacity: 0.75; transform: translate(-50%, -50%) scale(1.05); }
    100% { top: 12%; left: 12%; opacity: 0.35; transform: translate(-50%, -50%) scale(1); }
}

#gyc-watermark {
    position: absolute;
    z-index: 9999;
    pointer-events: none;
    color: rgba(255, 255, 255, 0.85);
    font-size: clamp(9px, 2.2vw, 14px);
    font-weight: 900;
    padding: 4px 8px;
    border-radius: 6px;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.95);
    background: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(2px);
    animation: gycFloatWatermark 30s linear infinite;
    white-space: nowrap;
    direction: ltr;
}

/* Bounded Plyr configuration */
:root {
    --plyr-color-main: #00a32a;
}
.plyr {
    height: 100%;
    width: 100%;
}
.plyr__video-embed iframe {
    pointer-events: none !important;
    height: 152% !important;
    top: -26% !important;
    max-height: none !important;
}

/* Responsive Focus Player */
@media (max-width: 991px) {
    .gyc-focus-wrapper {
        flex-direction: column;
        overflow-y: auto;
        height: 100vh;
    }
    .gyc-sidebar {
        width: 100%;
        height: auto;
        border-left: none;
        order: 2;
        border-top: 1px solid var(--border-color);
        max-height: 45vh;
    }
    .gyc-main {
        width: 100%;
        height: auto;
        order: 1;
        flex: none;
        display: block;
        overflow: visible;
    }
    .gyc-video-container {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
    }
    .gyc-tab-content {
        padding: 20px;
    }
}

/* ==========================================================================
   5. PREMIUM CHECKOUT FLOW & POPUPS
   ========================================================================== */
.gyc-premium-checkout-wrapper {
    max-width: 1100px;
    width: 95%;
    margin: 60px auto;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    direction: rtl;
}

.gyc-premium-checkout-inner {
    padding: 40px;
}

@media (max-width: 768px) {
    .gyc-premium-checkout-wrapper {
        margin: 10px auto !important;
        width: 100% !important;
        border-radius: 12px !important;
    }
    .gyc-premium-checkout-inner {
        padding: 15px 12px !important;
    }
}

/* Checkout Gate Modals (Responsive & Centered) */
.gyc-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(7, 10, 16, 0.85);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.gyc-modal-box {
    background: #ffffff;
    width: 90%;
    max-width: 460px;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
    position: relative;
    direction: rtl;
    text-align: right;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 480px) {
    .gyc-modal-box {
        padding: 20px 15px;
        border-radius: 16px;
    }
}
