:root {
    --primary: #006A70;
    --accent: #d4af37;
    --text-light: #f8fafc;
}

body {
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    background-color: #f8fafc;
    transition: background-color 0.5s ease, color 0.5s ease;
    overflow-x: hidden;
}

html {
    overflow-x: hidden;
}

* {
    box-sizing: border-box;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Premium Glass Nav */
.glass-nav {
    background: var(--primary);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.15);
}

/* Link Hover Effect */
.nav-link {
    position: relative;
    padding-bottom: 4px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Slider Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* --- Pro Reveal System --- */
.reveal-on-scroll {
    opacity: 0;
    transition: opacity 1s cubic-bezier(0.25, 1, 0.5, 1), transform 1s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: opacity, transform;
}

/* Initial States */
.reveal-up { transform: translateY(60px); }
.reveal-down { transform: translateY(-60px); }
.reveal-left { transform: translateX(-60px); }
.reveal-right { transform: translateX(60px); }
.reveal-zoom { transform: scale(0.85); }
.reveal-rotate-left { transform: rotate(-5deg) translateY(30px); }
.reveal-rotate-right { transform: rotate(5deg) translateY(30px); }

/* Trigger State */
.reveal-on-scroll.animated {
    opacity: 1;
    transform: translate(0) scale(1) rotate(0);
}

/* Staggered Children Delay will be handled by JS or utility classes if needed */

.slide.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 10;
}

/* Gallery Pro Styles */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    will-change: transform;
}

.gallery-item img {
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item:hover img {
    transform: scale(1.1) rotate(-1deg);
}

.gallery-overlay-icon {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8) !important;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.gallery-item:hover .gallery-overlay-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) !important;
}

.gallery-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: skewX(-25deg);
    transition: 0.5s;
    pointer-events: none;
}

.gallery-item:hover .gallery-shine {
    left: 200%;
    transition: 1s ease-in-out;
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(10, 20, 35, 0.98);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    backdrop-filter: blur(10px);
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content-container {
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lightbox.active .lightbox-content-container {
    transform: scale(1);
}

/* Ensure images inside the generic container behave well if we pass them */
.lightbox-content-container img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}

/* Article Card Pro Styles */
.article-card {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -5px rgba(30, 58, 95, 0.25);
}

.article-card:hover .article-image-overlay {
    opacity: 0.6;
}

.article-shine {
    position: absolute;
    inset: 0;
    transform: skewX(-20deg) translateX(-150%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: transform 1s;
    pointer-events: none;
    z-index: 20;
}

.article-card:hover .article-shine {
    transform: skewX(-20deg) translateX(150%);
    transition: transform 0.8s ease-in-out;
}
/* Mobile audio player controls fix */
@media (max-width: 768px) {
    .max-w-7xl {
        max-width: 100vw;
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    img, video, iframe {
        max-width: 100%;
        height: auto;
    }
    
    .container {
        width: 100%;
        max-width: 100vw;
    }
    
    /* Show audio controls on mobile */
    #bottom-audio-player .hidden.md\\:flex {
        display: flex !important;
    }
    
    /* Adjust audio player layout for mobile */
    #bottom-audio-player .max-w-7xl {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
    }
    
    #bottom-audio-player .flex.items-center.gap-4.flex-1 {
        width: 100%;
        justify-content: center;
    }
    
    #bottom-audio-player .flex.flex-col.items-center.gap-1 {
        width: 100%;
        gap: 0.25rem;
    }
}
