/**
 * نادي صغارنا - Retro Theme Styles
 * ألوان وتصميم ريترو
 */

/* ========== CSS Variables - Light Mode ========== */
:root {
    --bg-primary: #FFF9F5;
    --bg-secondary: #FFFFFF;
    --bg-card: #FFFFFF;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --border-color: #000000;
    --nav-bg: #B5EAD7;
    --footer-bg: #111827;
    --shadow-color: rgba(0, 0, 0, 0.1);

    /* Retro Colors */
    --retro-pink: #FF9AA2;
    --retro-mint: #B5EAD7;
    --retro-yellow: #FFDAC1;
    --retro-purple: #C7CEEA;
    --retro-accent: #FF6F61;
}

/* ========== Dark Mode - Standard Global Colors ========== */
[data-theme="dark"] {
    --bg-primary: #121212;
    --bg-secondary: #1e1e1e;
    --bg-card: #252525;
    --text-primary: #e4e4e7;
    --text-secondary: #a0a0a0;
    --border-color: #404040;
    --nav-bg: #1a1a1a;
    --footer-bg: #0a0a0a;
    --shadow-color: rgba(0, 0, 0, 0.5);
}

/* ========== Base Styles ========== */
html,
body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden !important;
    /* Prevent horizontal scroll on mobile */
    max-width: 100vw;
}

/* ========== Mobile Overflow Prevention ========== */
@media (max-width: 640px) {

    html,
    body {
        overflow-x: hidden !important;
    }

    /* Force all containers to be max 100% width */
    .container,
    main,
    section,
    div,
    article {
        max-width: 100% !important;
        box-sizing: border-box;
    }

    /* Override any inline fixed widths on mobile */
    *[style*="400px"],
    *[style*="500px"],
    *[style*="600px"] {
        max-width: 100% !important;
        width: auto !important;
    }

    /* Force flex items to be flexible on mobile */
    *[style*="flex: 0 0"] {
        flex: 1 1 auto !important;
        max-width: 100% !important;
    }
}

/* Override retro background pattern for dark mode */
[data-theme="dark"] body {
    background-image: radial-gradient(#4a3b4c 1px, transparent 1px), radial-gradient(#3d2a3e 1px, transparent 1px) !important;
}

/* ========== Navigation ========== */
nav {
    background-color: var(--nav-bg) !important;
    transition: background-color 0.3s ease;
}

[data-theme="dark"] nav {
    border-color: var(--border-color) !important;
}

[data-theme="dark"] nav a {
    color: var(--text-primary);
}

/* ========== Cards ========== */
.bg-white {
    background-color: var(--bg-card) !important;
    transition: background-color 0.3s ease;
}

[data-theme="dark"] .bg-white {
    color: var(--text-primary);
}

[data-theme="dark"] .border-black {
    border-color: var(--border-color) !important;
}

/* ========== Text Colors ========== */
[data-theme="dark"] .text-gray-600,
[data-theme="dark"] .text-gray-700 {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .text-gray-500 {
    color: #888 !important;
}

/* ========== Footer ========== */
footer {
    background-color: var(--footer-bg) !important;
    transition: background-color 0.3s ease;
}

/* ========== Forms ========== */
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: var(--text-secondary) !important;
}

/* ========== Swiper Slides ========== */
[data-theme="dark"] .swiper-slide {
    border-color: var(--border-color) !important;
}

/* ========== Video Card Overlays ========== */
[data-theme="dark"] .video-card .bg-black {
    background-color: rgba(0, 0, 0, 0.8) !important;
}

/* ========== Theme Toggle Button ========== */
.theme-toggle {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

/* ========== Smooth Transitions ========== */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Exclude video and swiper from transitions */
video,
.swiper-wrapper,
.swiper-slide img {
    transition: none !important;
}