/* 
 * assets/css/main.css - Global Styles
 * Bahrainna Educational Platform Design System
 * 
 * Standards: Premium, Modern, Professional Academy
 */

:root {
    /* Core Palette: Royal Bahrainna Series */
    --primary: #8B0000;
    --primary-light: #A52A2A;
    --secondary: #FEFCE8;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --white: #ffffff;
    
    /* Glassmorphism Settings */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-blur: 12px;
}

.dark {
    --glass-bg: rgba(15, 23, 42, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
}

/* Base Smoothing & Transition */
body {
    transition: background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Glassmorphism Classes */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
}

.glass-nav {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.dark .glass-nav {
    background: rgba(15, 23, 42, 0.85);
}

/* Premium Elevation Shadows */
.shadow-premium {
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.08);
}

.shadow-premium-hover:hover {
    box-shadow: 0 20px 40px -15px rgba(139, 0, 0, 0.15);
}

/* Typography Hierarchy Enhancements */
.font-heading {
    font-family: inherit;
    letter-spacing: -0.025em;
    line-height: 1.1;
}

/* RTL Specific Overrides for Arabic Fonts */
[dir="rtl"] .font-outfit {
    font-family: 'Cairo', sans-serif !important;
}

/* Custom Scrollbar - Minimal Style */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Floating Animation for Hero Assets */
@keyframes premium-float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(1deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

.animate-premium-float {
    animation: premium-float 6s ease-in-out infinite;
}

/* --- New Study & Discovery Animations --- */

/* 3-Column Picker Styles */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(139, 0, 0, 0.1);
    border-radius: 10px;
}
.dark .custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.05);
}

.custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: rgba(139, 0, 0, 0.1) transparent;
}

/* Floating Book Animation */
@keyframes book-float {
    0% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-15px) rotate(2deg); }
    66% { transform: translateY(-5px) rotate(-1deg); }
    100% { transform: translateY(0) rotate(0deg); }
}

.animate-book-open {
    animation: book-float 8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* Selection Tier Glow */
.selection-card {
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
}

.selection-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 30px 60px -15px rgba(139, 0, 0, 0.1);
}

.selection-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s;
}

.selection-card:hover::after {
    opacity: 1;
}

/* Step Transition */
.discovery-step {
    animation: slide-up 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes slide-up {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Isometric Book Effect */
.book-spine {
    background: linear-gradient(90deg, rgba(0,0,0,0.1) 0%, transparent 100%);
    width: 20px;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
}

/* Button & Card Hover Transforms */
.hover-lift {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.hover-lift:hover {
    transform: translateY(-5px);
}

/* Alpine.js Initial State Support */
[x-cloak] { display: none !important; }
