/* Arab Board Event 2025 - Enhanced Custom Styles */

/* CSS Variables */
:root {
    /* الألوان الأساسية */
    --primary-color: #156b68;
    --accent-color: #caa453;
    --secondary-color: #0f5855;
    --background-color: #f8fafa;
    --text-color: #2c3e50;
    --text-light: #5a6c7d;
    --border-color: #e1e8ed;
    --shadow-color: rgba(21, 107, 104, 0.15);
    --white: #ffffff;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --error-color: #e74c3c;
    --info-color: #3498db;
    
    /* التدرجات */
    --gradient-primary: linear-gradient(135deg, #156b68 0%, #0f5855 100%);
    --gradient-accent: linear-gradient(135deg, #caa453 0%, #b8934a 100%);
    --gradient-light: linear-gradient(135deg, #f8fafa 0%, #ffffff 100%);
    
    /* الظلال والحدود */
    --shadow-sm: 0 2px 8px rgba(21, 107, 104, 0.1);
    --shadow-md: 0 4px 16px rgba(21, 107, 104, 0.15);
    --shadow-lg: 0 8px 32px rgba(21, 107, 104, 0.2);
    --border-radius: 12px;
    --border-radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Typography */
    --font-primary: 'Almarai', 'Cairo', Arial, sans-serif;
    --font-secondary: 'Cairo', 'Roboto', Arial, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;
}

/* Global Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--text-color);
    background: var(--gradient-light);
    margin: 0;
    padding: 0;
    direction: rtl;
    text-align: right;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header Section */
.event-header {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border-bottom: 4px solid var(--accent-color);
}

.event-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 25% 25%, rgba(202, 164, 83, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(202, 164, 83, 0.1) 0%, transparent 50%),
        linear-gradient(45deg, transparent 49%, rgba(255, 255, 255, 0.03) 50%, transparent 51%);
    animation: subtleMove 20s ease-in-out infinite;
}

@keyframes subtleMove {
    0%, 100% { transform: translateX(0) translateY(0); }
    25% { transform: translateX(1px) translateY(-1px); }
    50% { transform: translateX(-1px) translateY(1px); }
    75% { transform: translateX(1px) translateY(1px); }
}

.event-header .container {
    position: relative;
    z-index: 2;
}

.event-title {
    font-size: var(--font-size-5xl);
    font-weight: 900;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.4);
    line-height: 1.2;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding: 0.5rem 0;
    animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    from { filter: drop-shadow(0 0 10px rgba(202, 164, 83, 0.3)); }
    to { filter: drop-shadow(0 0 20px rgba(202, 164, 83, 0.5)); }
}

.event-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    font-size: var(--font-size-lg);
}

.event-location,
.event-dates {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.event-description {
    font-size: var(--font-size-lg);
    opacity: 0.95;
    max-width: 800px;
    margin: 0 auto;
}

/* Language Toggle */
.language-toggle {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 0.5rem;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--primary-color);
}

.lang-btn {
    background: transparent;
    color: var(--primary-color);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 700;
    font-size: var(--font-size-base);
    transition: var(--transition);
    min-width: 60px;
}

.lang-btn.active {
    background: var(--gradient-primary);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.lang-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-1px);
}

/* Navigation Tabs */
.event-navigation {
    background: var(--white);
    border-bottom: 3px solid var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(15px);
}

.nav-tabs {
    display: flex;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
}

.nav-tabs li {
    margin: 0;
}

.nav-tab {
    display: inline-block;
    padding: 1.2rem 2.5rem;
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 4px solid transparent;
    transition: var(--transition);
    font-weight: 700;
    position: relative;
    font-size: var(--font-size-lg);
    background: linear-gradient(135deg, transparent 0%, rgba(21, 107, 104, 0.05) 100%);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    margin: 0 0.2rem;
}

.nav-tab:hover,
.nav-tab.active {
    color: var(--white);
    border-bottom-color: var(--accent-color);
    background: var(--gradient-primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* Day Sections */
.day-section {
    margin: 4rem 0;
    padding: 3rem 0;
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.day-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: var(--gradient-accent);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 0 2rem;
}

.section-header h2 {
    font-size: var(--font-size-4xl);
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-accent);
    border-radius: 2px;
}

.day-content {
    padding: 0 2rem;
}

.row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

@media (max-width: 768px) {
    .row {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* PDF Section */
.pdf-section {
    background: var(--gradient-light);
    border-radius: var(--border-radius);
    padding: 2rem;
    border: 2px solid var(--primary-color);
    box-shadow: var(--shadow-md);
}

.pdf-section h3 {
    color: var(--primary-color);
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
}

.pdf-viewer {
    position: relative;
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.pdf-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--primary-color);
    color: var(--white);
    flex-wrap: wrap;
}

.pdf-btn {
    background: var(--accent-color);
    color: var(--white);
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    font-size: var(--font-size-sm);
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.pdf-btn:hover {
    background: #b8934a;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.page-info {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-weight: 600;
}

.pdf-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    padding: 1rem;
    background: #f8f9fa;
}

.pdf-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: var(--primary-color);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Schedule Section */
.schedule-section {
    background: var(--gradient-light);
    border-radius: var(--border-radius);
    padding: 2rem;
    border: 2px solid var(--accent-color);
    box-shadow: var(--shadow-md);
}

.schedule-section h3 {
    color: var(--primary-color);
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.schedule-table {
    overflow-x: auto;
}

.schedule-table table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.schedule-table th {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 1rem;
    text-align: center;
    font-weight: 700;
    font-size: var(--font-size-base);
    border-bottom: 2px solid var(--accent-color);
}

.schedule-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.schedule-table .time {
    background: rgba(21, 107, 104, 0.05);
    font-weight: 700;
    color: var(--primary-color);
    width: 25%;
}

.schedule-table .activity {
    text-align: right;
    padding-right: 1.5rem;
}

.schedule-table tr:hover {
    background: rgba(21, 107, 104, 0.03);
    transform: scale(1.01);
    transition: var(--transition);
}

/* Images Gallery */
.images-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.images-section h3 {
    color: var(--primary-color);
    font-size: var(--font-size-2xl);
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
}

.images-section h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gradient-accent);
    border-radius: 2px;
}

.images-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.image-item {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: var(--transition);
    background: var(--white);
}

.image-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.image-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: var(--transition);
}

.image-item:hover img {
    transform: scale(1.1);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(21, 107, 104, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.image-item:hover .image-overlay {
    opacity: 1;
}

.zoom-icon {
    font-size: 2rem;
    color: var(--white);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* QR Cards Section */
.qr-section {
    background: var(--gradient-light);
    padding: 4rem 0;
    margin-top: 4rem;
    border-radius: var(--border-radius-lg);
    position: relative;
    overflow: hidden;
}

.qr-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: var(--gradient-accent);
}

.qr-section .section-header p {
    color: var(--text-light);
    font-size: var(--font-size-lg);
    margin-top: 1rem;
}

.qr-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.qr-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
    border: 3px solid var(--primary-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.qr-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-accent);
}

.qr-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
}

.qr-image {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

.qr-image img {
    width: 150px;
    height: 150px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 0.5rem;
    background: var(--white);
    border: 2px solid var(--border-color);
}

.qr-title {
    color: var(--primary-color) !important;
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    margin-bottom: 1.5rem !important;
    margin-top: 0 !important;
    height: 75px !important;
    min-height: 75px !important;
    max-height: 75px !important;
    line-height: 1.5 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    overflow: hidden !important;
}

.qr-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.qr-link-btn,
.qr-share-btn {
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.qr-share-btn {
    background: var(--gradient-accent);
}

.qr-link-btn:hover,
.qr-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.qr-link-btn:hover {
    background: var(--secondary-color);
}

.qr-share-btn:hover {
    background: #b8934a;
}

/* Floating Action Buttons */
.floating-actions {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(21, 107, 104, 0.3);
}

.print-btn {
    background: var(--gradient-accent);
}

.share-btn {
    background: var(--info-color);
}

.scroll-top-btn {
    background: var(--gradient-primary);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    transition: var(--transition);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

#lightbox-image {
    max-width: 100%;
    max-height: 100%;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    width: 100%;
    pointer-events: none;
}

.lightbox-prev,
.lightbox-next {
    background: rgba(0, 0, 0, 0.5);
    color: var(--white);
    border: none;
    padding: 1rem;
    cursor: pointer;
    font-size: 1.5rem;
    border-radius: 50%;
    pointer-events: all;
    transition: var(--transition);
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(0, 0, 0, 0.8);
}

.lightbox-prev {
    margin-left: -50px;
}

.lightbox-next {
    margin-right: -50px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        padding: 0 2rem;
    }
}

@media (max-width: 768px) {
    .event-header {
        padding: 3rem 0;
    }
    
    .event-title {
        font-size: var(--font-size-3xl);
    }
    
    .event-meta {
        flex-direction: column;
        gap: 1rem;
    }
    
    .language-toggle {
        top: 1rem;
        right: 1rem;
        padding: 0.3rem;
    }
    
    .lang-btn {
        padding: 0.6rem 1rem;
        font-size: var(--font-size-sm);
    }
    
    .nav-tab {
        padding: 1rem 1.5rem;
        font-size: var(--font-size-base);
    }
    
    .day-section {
        margin: 2rem 0;
        padding: 2rem 0;
    }
    
    .day-content {
        padding: 0 1rem;
    }
    
    .pdf-section,
    .schedule-section {
        padding: 1.5rem;
    }
    
    .images-gallery {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .qr-cards-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .floating-actions {
        bottom: 1rem;
        left: 1rem;
    }
    
    .fab {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .event-header {
        padding: 2rem 0;
    }
    
    .event-title {
        font-size: var(--font-size-2xl);
    }
    
    .section-header h2 {
        font-size: var(--font-size-2xl);
    }
    
    .nav-tabs {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .nav-tab {
        padding: 0.8rem 1.2rem;
        margin: 0;
    }
    
    .pdf-controls {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.8rem;
    }
    
    .pdf-btn {
        padding: 0.5rem 0.8rem;
        font-size: var(--font-size-xs);
    }
    
    .images-gallery {
        grid-template-columns: 1fr;
    }
    
    .qr-card {
        padding: 1.5rem;
    }
    
    .qr-actions {
        flex-direction: column;
        align-items: center;
    }
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    animation: fadeIn 0.6s ease-in-out forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.slide-up {
    transform: translateY(30px);
    opacity: 0;
    animation: slideUp 0.6s ease-out forwards;
}

@keyframes slideUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.scale-in {
    transform: scale(0.8);
    opacity: 0;
    animation: scaleIn 0.5s ease-out forwards;
}

@keyframes scaleIn {
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

.rounded { border-radius: var(--border-radius); }
.rounded-lg { border-radius: var(--border-radius-lg); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* Print Styles */
@media print {
    .language-toggle,
    .floating-actions,
    .event-navigation,
    .pdf-controls,
    .lightbox,
    .qr-actions {
        display: none !important;
    }
    
    .event-header {
        background: var(--white) !important;
        color: var(--text-color) !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .day-section {
        page-break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid var(--border-color) !important;
    }
    
    .qr-card {
        page-break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid var(--border-color) !important;
    }
}

.day-section .day-header h2 {
    color: var(--primary-color);
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.day-section .day-header .day-date {
    color: var(--secondary-color);
    font-size: 1.2rem;
    font-weight: 600;
}

/* PDF Viewer */
.pdf-section {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.pdf-section .section-header {
    background: var(--primary-color);
    color: var(--white);
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pdf-section .section-header h3 {
    margin: 0;
    font-size: 1.3rem;
}

.pdf-section .section-header i {
    font-size: 1.5rem;
    color: var(--secondary-color);
}

.pdf-viewer {
    width: 100%;
    height: 600px;
    border: none;
    background: #f5f5f5;
}

.pdf-controls {
    padding: 1rem 2rem;
    background: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #e9ecef;
}

.pdf-controls .download-btn {
    background: var(--secondary-color);
    color: var(--text-dark);
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.pdf-controls .download-btn:hover {
    background: #b8941f;
    transform: translateY(-2px);
}

.pdf-controls .fullscreen-btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.pdf-controls .fullscreen-btn:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
}

/* Images Gallery */
.images-section {
    margin-bottom: 2rem;
}

.images-section .section-header {
    background: var(--white);
    padding: 1.5rem 2rem;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0;
}

.images-section .section-header h3 {
    color: var(--primary-color);
    margin: 0;
    font-size: 1.3rem;
}

.images-section .section-header i {
    font-size: 1.5rem;
    color: var(--secondary-color);
}

.images-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 2rem;
    background: var(--white);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    box-shadow: var(--shadow);
}

.gallery-item {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: var(--transition);
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.gallery-item .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 95, 92, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .overlay {
    opacity: 1;
}

.gallery-item .overlay i {
    color: var(--white);
    font-size: 2rem;
}

/* Schedule Table */
.schedule-section {
    margin-bottom: 2rem;
}

.schedule-section .section-header {
    background: var(--white);
    padding: 1.5rem 2rem;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0;
}

.schedule-section .section-header h3 {
    color: var(--primary-color);
    margin: 0;
    font-size: 1.3rem;
}

.schedule-section .section-header i {
    font-size: 1.5rem;
    color: var(--secondary-color);
}

.schedule-table {
    width: 100%;
    background: var(--white);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    border-collapse: collapse;
}

.schedule-table thead {
    background: var(--primary-color);
}

.schedule-table th {
    color: var(--white);
    padding: 1.5rem 1rem;
    font-weight: 600;
    text-align: center;
    border: none;
}

.schedule-table td {
    padding: 1.2rem 1rem;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.schedule-table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.schedule-table tbody tr:hover {
    background: #e3f2fd;
    transition: var(--transition);
}

.schedule-table .time-cell {
    font-weight: 600;
    color: var(--primary-color);
    text-align: center;
    width: 120px;
}

.schedule-table .activity-cell {
    font-weight: 500;
}

/* QR Cards Section */
.qr-section {
    margin: 4rem 0;
    text-align: center;
}

.qr-section .section-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 3rem;
    position: relative;
}

.qr-section .section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--secondary-color);
    border-radius: 2px;
}

.qr-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.qr-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
}

.qr-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.qr-card .card-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.qr-card .qr-image {
    width: 150px;
    height: 150px;
    margin: 0 auto 1.5rem;
    border: 3px solid var(--secondary-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
}

.qr-card .qr-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.qr-card .card-link {
    background: var(--primary-color);
    color: var(--white);
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.qr-card .card-link:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
}

.qr-card .card-link i {
    font-size: 1rem;
}

/* Lightbox for Images */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    animation: fadeIn 0.3s ease;
}

.lightbox-content {
    position: relative;
    margin: auto;
    padding: 20px;
    width: 90%;
    max-width: 800px;
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: var(--border-radius);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: var(--white);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.lightbox-close:hover {
    color: var(--secondary-color);
    transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .event-header h1 {
        font-size: 2rem;
    }
    
    .event-header .date-location {
        flex-direction: column;
        gap: 1rem;
    }
    
    .language-toggle {
        position: static;
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .day-section .day-header h2 {
        font-size: 1.8rem;
    }
    
    .pdf-viewer {
        height: 400px;
    }
    
    .images-gallery {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
        padding: 1rem;
    }
    
    .gallery-item img {
        height: 200px;
    }
    
    .schedule-table {
        font-size: 0.9rem;
    }
    
    .schedule-table th,
    .schedule-table td {
        padding: 0.8rem 0.5rem;
    }
    
    .qr-cards {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .qr-card .qr-image {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 480px) {
    .event-header {
        padding: 40px 0;
    }
    
    .event-header h1 {
        font-size: 1.6rem;
    }
    
    .event-header .subtitle {
        font-size: 1.1rem;
    }
    
    .pdf-viewer {
        height: 300px;
    }
    
    .images-gallery {
        grid-template-columns: 1fr;
    }
    
    .schedule-table {
        font-size: 0.8rem;
    }
    
    .qr-section .section-title {
        font-size: 2rem;
    }
}

/* Print Styles */
@media print {
    .language-toggle,
    .pdf-controls,
    .gallery-item .overlay,
    .qr-card .card-link {
        display: none !important;
    }
    
    .event-header {
        background: white !important;
        color: black !important;
        -webkit-print-color-adjust: exact;
    }
    
    .pdf-viewer {
        height: auto;
        min-height: 400px;
    }
    
    .qr-card {
        break-inside: avoid;
        margin-bottom: 1rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.slide-in-up {
    animation: slideInUp 0.6s ease-out;
}

/* ========================================
   إخفاء زر اللغة مؤقتاً
   ========================================
   لإظهار الزر مرة أخرى، قم بحذف أو تعليق القاعدة التالية
   ======================================== */
.language-toggle {
    display: none !important;
}

/* نهاية إخفاء زر اللغة */

/* ========================================
   تحسين جدول الأعمال للموبايل - Card Layout
   ======================================== */

/* للموبايل فقط - تحويل الجدول إلى بطاقات جميلة */
@media screen and (max-width: 768px) {
    /* إخفاء رأس الجدول */
    .schedule-table thead {
        display: none !important;
    }
    
    /* تحويل جميع عناصر الجدول إلى block */
    .schedule-table table,
    .schedule-table tbody,
    .schedule-table tr,
    .schedule-table td {
        display: block !important;
        width: 100% !important;
    }
    
    /* تنسيق كل صف كبطاقة منفصلة */
    .schedule-table tr {
        background: #ffffff !important;
        border: 2px solid #156b68 !important;
        border-radius: 12px !important;
        margin: 0 0 20px 0 !important;
        padding: 0 !important;
        box-shadow: 0 4px 12px rgba(21, 107, 104, 0.15) !important;
        overflow: hidden !important;
        transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    }
    
    /* تأثير hover للبطاقة */
    .schedule-table tr:hover {
        transform: translateY(-2px) !important;
        box-shadow: 0 6px 16px rgba(21, 107, 104, 0.25) !important;
    }
    
    /* خلية الوقت - رأس البطاقة */
    .schedule-table td.time {
        background: linear-gradient(135deg, #156b68 0%, #0f5855 100%) !important;
        color: #ffffff !important;
        font-size: 1.1rem !important;
        font-weight: 700 !important;
        text-align: center !important;
        padding: 15px 20px !important;
        margin: 0 !important;
        border: none !important;
        position: relative !important;
    }
    
    /* إضافة أيقونة الوقت */
    .schedule-table td.time::before {
        content: "🕐 " !important;
        font-size: 1.2rem !important;
        margin-left: 8px !important;
    }
    
    /* خلية النشاط - محتوى البطاقة */
    .schedule-table td.activity {
        padding: 20px !important;
        margin: 0 !important;
        border: none !important;
        font-size: 1rem !important;
        line-height: 1.8 !important;
        color: #2c3e50 !important;
        text-align: right !important;
    }
    
    /* تحسين النصوص داخل النشاط */
    .schedule-table td.activity div {
        width: 100% !important;
    }
    
    .schedule-table td.activity p {
        margin: 8px 0 !important;
        padding: 0 !important;
    }
    
    /* تمييز النصوص الهامة */
    .schedule-table td.activity strong,
    .schedule-table td.activity b {
        color: #156b68 !important;
        font-weight: 700 !important;
        display: block !important;
        margin: 4px 0 !important;
    }
    
    /* تحسين العناوين داخل البطاقة */
    .schedule-table td.activity h1,
    .schedule-table td.activity h2,
    .schedule-table td.activity h3,
    .schedule-table td.activity h4 {
        color: #156b68 !important;
        margin: 10px 0 !important;
        font-size: 1.1rem !important;
    }
    
    /* تحسين الروابط */
    .schedule-table td.activity a {
        color: #caa453 !important;
        text-decoration: underline !important;
    }
    
    /* تحسين المسافات في القسم */
    .schedule-section {
        padding: 20px 15px !important;
    }
    
    .schedule-section h3 {
        font-size: 1.5rem !important;
        margin-bottom: 20px !important;
        text-align: center !important;
        color: #156b68 !important;
    }
}

/* للتابلت (بين 768px و 1024px) - تحسين بسيط */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .schedule-table {
        overflow-x: auto !important;
    }
    
    .schedule-table table {
        min-width: 100% !important;
    }
    
    .schedule-table td {
        font-size: 0.95rem !important;
        padding: 12px !important;
    }
}

/* نهاية تحسين جدول الأعمال */