/* Global utilities to complement Tailwind CDN build */
:root {
    color-scheme: light;
}

html {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: -apple-system, "SF Pro Display", "SF Pro Text", "Helvetica Neue", "Cairo", "Inter", sans-serif;
    background: linear-gradient(135deg, rgba(0, 163, 169, 0.08), rgba(243, 104, 41, 0.04));
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

/* Prevent horizontal overflow */
main {
    max-width: 100%;
    overflow-x: hidden;
}

section {
    max-width: 100%;
}

.hero-gradient {
    background: radial-gradient(circle at 20% 20%, rgba(0, 163, 169, 0.18), transparent 50%),
                radial-gradient(circle at 80% 0%, rgba(243, 104, 41, 0.16), transparent 40%),
                rgba(255, 255, 255, 0.75);
}

.ai-section-gradient {
    background:
        radial-gradient(circle at 10% 0%, rgba(56, 189, 248, 0.18), transparent 55%),
        radial-gradient(circle at 90% 100%, rgba(251, 146, 60, 0.16), transparent 55%),
        linear-gradient(135deg, #ffffff, #f8fafc);
    position: relative;
    overflow: visible; /* allow particles to float outside the section */
}

.ai-section-gradient--alt1 {
    background:
        radial-gradient(circle at 90% 0%, rgba(56, 189, 248, 0.20), transparent 55%),
        radial-gradient(circle at 5% 100%, rgba(251, 146, 60, 0.14), transparent 55%),
        linear-gradient(135deg, #ffffff, #f9fafb);
}

.ai-section-gradient--alt2 {
    background:
        radial-gradient(circle at 0% 30%, rgba(59, 130, 246, 0.18), transparent 55%),
        radial-gradient(circle at 100% 70%, rgba(249, 115, 22, 0.16), transparent 55%),
        linear-gradient(135deg, #ffffff, #f8fafc);
}

[dir="rtl"] .rtl {
    direction: rtl;
}

.glass-card {
    backdrop-filter: blur(16px);
    background: rgba(255, 255, 255, 0.8);
}

.floating {
    animation: floating 10s ease-in-out infinite;
}

@keyframes floating {
    0% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(0, -10px, 0); }
    100% { transform: translate3d(0, 0, 0); }
}

.particle {
    position: absolute;
    transform-origin: center;
    opacity: 0.8;
    pointer-events: none;
    will-change: transform, opacity;
    animation: particleFloat 12s linear infinite;
}

@keyframes particleFloat {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg) scale(0.9);
        opacity: 0.5;
    }
    50% {
        transform: translateY(-60px) translateX(10px) rotate(8deg) scale(1.1);
        opacity: 1;
    }
    100% {
        transform: translateY(-120px) translateX(-10px) rotate(-8deg) scale(0.9);
        opacity: 0;
    }
}

@keyframes particleFloatReverse {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg) scale(0.9);
        opacity: 0.5;
    }
    50% {
        transform: translateY(-60px) translateX(-10px) rotate(-8deg) scale(1.1);
        opacity: 1;
    }
    100% {
        transform: translateY(-120px) translateX(10px) rotate(8deg) scale(0.9);
        opacity: 0;
    }
}

.particle.particle--reverse {
    animation-name: particleFloatReverse;
}

/* Straight float (no rotation) */
@keyframes particleFloatStraight {
    0% {
        transform: translateY(0) translateX(0) scale(0.9);
        opacity: 0.5;
    }
    50% {
        transform: translateY(-60px) translateX(5px) scale(1.1);
        opacity: 1;
    }
    100% {
        transform: translateY(-120px) translateX(0) scale(0.9);
        opacity: 0;
    }
}

.particle.particle--no-rotate {
    animation-name: particleFloatStraight;
}

/* From top: mirrored vertical movement with zoom in/out */
@keyframes particleFloatFromTop {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg) scale(0.9);
        opacity: 0.5;
    }
    50% {
        transform: translateY(60px) translateX(-10px) rotate(-6deg) scale(1.1);
        opacity: 1;
    }
    100% {
        transform: translateY(120px) translateX(10px) rotate(6deg) scale(0.9);
        opacity: 0;
    }
}

.particle.particle--from-top {
    animation-name: particleFloatFromTop;
}

.parallax-image {
    will-change: transform;
    transition: transform 600ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.payment-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99990;
}

.payment-overlay__card {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 1.5rem;
    box-shadow: 0 25px 80px rgba(15, 23, 42, 0.25);
    padding: 1.75rem 2rem;
    max-width: 420px;
    width: 100%;
}

.payment-spinner {
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    border: 3px solid rgba(148, 163, 184, 0.3);
    border-top-color: #00a3a9;
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Full width banner section */
.banner-section {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    position: relative;
    overflow: hidden;
}

.banner-slider {
    position: relative;
    width: 100%;
    height: clamp(320px, 56vw, 640px);
    overflow: hidden;
    border-radius: 0;
}

.banner-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    padding: min(5vw, 48px);
    color: #fff;
    opacity: 0;
    pointer-events: none;
    transition: opacity 600ms ease;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #0f172a;
}

.banner-slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(0,0,0,0.75), rgba(0,0,0,0.4), rgba(0,0,0,0.2));
}

.banner-slide > * {
    position: relative;
    z-index: 1;
}

.banner-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.banner-slide__overlay {
    position: relative;
    z-index: 1;
}

.banner-slider__dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.banner-slider__dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    transition: all 200ms ease;
}

.banner-slider__dot.is-active {
    width: 26px;
    background: #fff;
}

/* Smaller banner size for PC/desktop view */
@media (min-width: 768px) {
    .banner-slider {
        height: clamp(240px, 38vw, 420px);
    }
}

/* Full width banner on mobile - no cropping, maintains aspect ratio */
@media (max-width: 640px) {
    /* Full width banner section */
    .banner-section {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
        overflow: hidden;
    }
    
    /* Banner slider - full width with auto height based on aspect ratio */
    .banner-slider {
        width: 100%;
        max-width: 100%;
        border-radius: 0;
        aspect-ratio: 1920 / 800; /* Maintain 1920:800 aspect ratio (2.4:1) */
        overflow: hidden;
        position: relative;
    }

    .banner-slide {
        padding: 16px 14px;
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center center;
    }
    
    .banner-slide__overlay {
        max-width: 100%;
    }
    
    .banner-slide__overlay > div {
        max-width: 100%;
        gap: 0.75rem;
    }
    
    .banner-slide__overlay span {
        font-size: 0.625rem;
        padding: 0.375rem 0.75rem;
    }
    
    .banner-slide__overlay h2 {
        font-size: 1.125rem;
        line-height: 1.3;
    }
    
    .banner-slide__overlay p {
        font-size: 0.75rem;
        line-height: 1.4;
    }
    
    .banner-slide__overlay a {
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
    }
    
    .banner-slider__dots {
        bottom: 12px;
    }
    
    .banner-slider__dot {
        width: 8px;
        height: 8px;
    }
    
    .banner-slider__dot.is-active {
        width: 20px;
    }
}

.course-tab-button {
    border-radius: 9999px;
    border: 1px solid rgba(15, 23, 42, 0.15);
    background: #fff;
    color: #0f172a;
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
    transition: all 200ms ease;
}

.course-tab-button:hover {
    border-color: rgba(0, 163, 169, 0.4);
    color: #00a3a9;
}

.course-tab-button.is-active {
    background: #00a3a9;
    border-color: #00a3a9;
    color: #fff;
    box-shadow: 0 8px 20px rgba(0, 163, 169, 0.25);
}

.course-tab-panel {
    display: none;
}

.course-tab-panel.is-active {
    display: block;
}

/* Floating Coming Soon Section */
.floating-coming-soon {
    position: fixed;
    inset: 0;
    z-index: 20;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: none !important;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.floating-coming-soon.is-visible {
    opacity: 0;
    display: none !important;
}

.floating-coming-soon__card {
    pointer-events: auto;
    max-width: 42rem;
    width: min(95%, 42rem);
    text-align: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.95) 100%);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1.5px solid rgba(255, 255, 255, 0.9);
    border-radius: 2.5rem;
    padding: 2.5rem 2rem;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.15),
        0 10px 20px -5px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(0, 163, 169, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    animation: floating-gentle 6s ease-in-out infinite;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-coming-soon__card h2 {
    margin: 0;
    padding: 0.5rem 0;
    word-break: keep-all;
    overflow-wrap: break-word;
    hyphens: none;
}

/* Mobile optimizations */
@media (max-width: 640px) {
    .floating-coming-soon {
        padding: 0.75rem;
    }
    
    .floating-coming-soon__card {
        padding: 2rem 1.5rem;
        border-radius: 2rem;
        gap: 1rem;
        max-width: 100%;
    }
    
    .floating-coming-soon__card h2 {
        padding: 0.75rem 0;
        margin-bottom: 0.5rem;
    }
}

@media (min-width: 641px) {
    .floating-coming-soon__card {
        padding: 2.5rem 2rem;
    }
}

@media (min-width: 1024px) {
    .floating-coming-soon__card {
        padding: 3rem 2.75rem;
    }
}

@keyframes floating-gentle {
    0%, 100% {
        transform: translateY(0px) scale(1);
    }
    50% {
        transform: translateY(-10px) scale(1.01);
    }
}

.floating-coming-soon__card:hover {
    box-shadow: 
        0 30px 60px -12px rgba(0, 0, 0, 0.2),
        0 15px 25px -5px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(0, 163, 169, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
    transform: translateY(-4px) scale(1.02);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

