/* ==========================================================================
   Kontextlora.online - Arabic Gaming Website CSS
   ========================================================================== */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    direction: rtl;
}

body {
    font-family: 'Cairo', 'Tajawal', Arial, sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background-color: #f9fafb;
    direction: rtl;
    text-align: right;
}

/* Color Variables */
:root {
    /* Primary Colors - Professional Blue */
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #60a5fa;
    --primary-lighter: #dbeafe;
    
    /* Secondary Colors */
    --secondary-color: #059669;
    --secondary-dark: #047857;
    --secondary-light: #34d399;
    
    /* Accent Colors */
    --accent-color: #7c3aed;
    --accent-light: #a78bfa;
    
    /* Neutral Colors */
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --background: #ffffff;
    --background-light: #f9fafb;
    --background-dark: #f3f4f6;
    --border: #e5e7eb;
    --border-light: #f3f4f6;
    
    /* Status Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Transitions */
    --transition-fast: 0.15s ease-in-out;
    --transition: 0.3s ease-in-out;
    --transition-slow: 0.5s ease-in-out;
    
    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Cairo', 'Almarai', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.125rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.header {
    background: var(--background);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    gap: 2rem;
}

.logo h1 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.logo a {
    color: var(--primary-color);
    text-decoration: none;
}

.logo a:hover {
    color: var(--primary-dark);
}

/* Navigation */
.main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 2rem;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text-primary);
    font-weight: 500;
    border-radius: var(--radius);
    transition: var(--transition);
}

.nav-menu a:hover,
.nav-menu a.active {
    background: var(--primary-lighter);
    color: var(--primary-color);
}

/* Dropdown */
.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--background);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius);
    min-width: 200px;
    padding: 0.5rem 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 1001;
}

.dropdown-menu a {
    padding: 0.75rem 1rem;
    border-radius: 0;
    display: block;
}

.dropdown-menu a:hover {
    background: var(--background-light);
}

/* Search Box */
.search-box {
    display: flex;
    align-items: center;
    background: var(--background-light);
    border-radius: var(--radius-lg);
    padding: 0.25rem;
    gap: 0.5rem;
}

.search-box input {
    border: none;
    background: transparent;
    padding: 0.5rem;
    color: var(--text-primary);
    font-family: inherit;
    width: 200px;
}

.search-box input::placeholder {
    color: var(--text-light);
}

.search-box input:focus {
    outline: none;
}

.search-box button {
    background: var(--primary-color);
    border: none;
    padding: 0.5rem;
    border-radius: var(--radius);
    color: white;
    cursor: pointer;
    transition: var(--transition);
}

.search-box button:hover {
    background: var(--primary-dark);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: white;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin: 2rem 0;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: white;
}

.stat-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
}

/* CTA Button */
.cta-button {
    display: inline-block;
    background: white;
    color: var(--primary-color);
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--primary-dark);
}

.cta-button.secondary {
    background: var(--primary-color);
    color: white;
}

.cta-button.secondary:hover {
    background: var(--primary-dark);
    color: white;
}

/* Section Styles */
section {
    padding: 4rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.game-card {
    background: var(--background);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.game-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.game-card.featured {
    grid-column: span 2;
}

.game-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.game-card:hover .game-overlay {
    opacity: 1;
}

.play-button {
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.play-button:hover {
    background: var(--primary-dark);
    color: white;
    transform: scale(1.05);
}

.game-info {
    padding: 1.5rem;
}

.game-info h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.game-info p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.game-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.category {
    background: var(--primary-lighter);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius);
    font-weight: 500;
}

.rating {
    color: var(--warning);
    font-weight: 600;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.category-card {
    background: var(--background);
    padding: 2rem;
    text-align: center;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.category-card h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.category-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.category-link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.category-link:hover {
    color: var(--primary-dark);
}

/* Blog Section */
.blog-preview {
    background: var(--background-light);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.blog-card {
    background: var(--background);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.blog-image {
    height: 200px;
    overflow: hidden;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-content {
    padding: 1.5rem;
}

.blog-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.blog-date {
    color: var(--text-light);
}

.blog-category {
    color: var(--primary-color);
    font-weight: 600;
}

.blog-card h3 {
    margin-bottom: 1rem;
}

.blog-card h3 a {
    color: var(--text-primary);
    text-decoration: none;
}

.blog-card h3 a:hover {
    color: var(--primary-color);
}

.blog-card p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.read-more {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

.read-more:hover {
    color: var(--primary-dark);
}

.blog-cta {
    text-align: center;
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    color: white;
    margin-bottom: 1rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-links a:hover {
    color: white;
    transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-stats {
        gap: 2rem;
    }
    
    .game-card.featured {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
    }
    
    .main-nav {
        display: none;
        width: 100%;
        order: 3;
    }
    
    .main-nav.active {
        display: block;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 0;
        background: var(--background);
        padding: 1rem 0;
        border-radius: var(--radius);
        box-shadow: var(--shadow);
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .search-box {
        order: 2;
    }
    
    .search-box input {
        width: 150px;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .games-grid,
    .categories-grid,
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    section {
        padding: 2rem 0;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

/* Print Styles */
@media print {
    .header,
    .footer,
    .hero,
    .cta-button,
    .play-button {
        display: none !important;
    }
    
    body {
        color: black;
        background: white;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
}