/* =========================================
   1. NEO-OASIS VARIABLES & RESET
   ========================================= */
:root {
    /* Palette: Midnight Sand & Glowing Gold */
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --bg-card: rgba(30, 41, 59, 0.7);

    --gold-primary: #fbbf24;
    --gold-glow: #d97706;
    --gold-dim: #b45309;

    --text-main: #f8fafc;
    --text-muted: #94a3b8;

    --accent-teal: #14b8a6;

    /* Gradients */
    --gradient-gold: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
    --gradient-dark: linear-gradient(to bottom, #0f172a, #020617);
    --gradient-glass: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));

    /* Effects */
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --glow-shadow: 0 0 20px rgba(251, 191, 36, 0.3);
    --card-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);

    /* Typography */
    --font-heading: 'El Messiri', serif;
    --font-body: 'Tajawal', sans-serif;

    /* Transitions */
    --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
}

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

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: var(--gold-dim);
    border-radius: 4px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.7;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 15% 50%, rgba(251, 191, 36, 0.05), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(20, 184, 166, 0.05), transparent 25%);
    background-attachment: fixed;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-main);
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    transition: 0.3s;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* =========================================
   2. UTILITY CLASSES
   ========================================= */
.text-gold {
    color: var(--gold-primary) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.bg-dark-glass {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
}

.section-padding {
    padding: 120px 0;
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: 80px;
}

.section-title h2 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    background: linear-gradient(to right, #fff, var(--text-muted));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.section-title p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    transition: all 0.8s var(--ease-out-expo);
}

.animate-in {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.delay-100 {
    transition-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
}

.delay-300 {
    transition-delay: 0.3s;
}

/* =========================================
   3. COMPONENTS
   ========================================= */
/* Buttons */
.btn-premium {
    background: var(--gradient-gold);
    color: var(--bg-darker);
    padding: 16px 40px;
    border-radius: 12px;
    font-weight: 800;
    border: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: var(--glow-shadow);
    transition: all 0.4s var(--ease-out-expo);
}

.btn-premium:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 40px rgba(251, 191, 36, 0.5);
    color: var(--bg-darker);
}

.btn-outline-premium {
    background: transparent;
    border: 1px solid var(--gold-primary);
    color: var(--gold-primary);
    padding: 16px 40px;
    border-radius: 12px;
    font-weight: 700;
    transition: all 0.4s var(--ease-out-expo);
}

.btn-outline-premium:hover {
    background: var(--gold-primary);
    color: var(--bg-darker);
    box-shadow: var(--glow-shadow);
}

/* Cards (Neo-Glass) */
.card-premium {
    background: var(--bg-card);
    border: var(--glass-border);
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.5s var(--ease-out-expo);
    position: relative;
    height: 100%;
}

.card-premium::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(251, 191, 36, 0.1), transparent 40%);
    opacity: 0;
    transition: 0.5s;
    pointer-events: none;
}

.card-premium:hover {
    transform: translateY(-10px);
    border-color: var(--gold-primary);
    box-shadow: var(--glow-shadow);
}

.card-premium:hover::before {
    opacity: 1;
}

.card-img-wrapper {
    height: 280px;
    overflow: hidden;
    position: relative;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s var(--ease-out-expo);
}

.card-premium:hover .card-img-wrapper img {
    transform: scale(1.1);
}

.card-body-premium {
    padding: 30px;
    position: relative;
    z-index: 2;
}

.card-title {
    color: var(--text-main);
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.card-text {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 25px;
}

/* =========================================
   4. NAVBAR (FLOATING ISLAND)
   ========================================= */
.navbar {
    padding: 20px 0;
    transition: all 0.4s var(--ease-out-expo);
}

.navbar .container {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(16px);
    border: var(--glass-border);
    border-radius: 100px;
    padding: 10px 40px;
    transition: all 0.4s;
    max-width: 98%;
    width: fit-content;
    margin: 0 auto;
}

.lang-dropdown .dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lang-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}


.navbar.scrolled .container {
    background: rgba(15, 23, 42, 0.9);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.05);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main) !important;
    letter-spacing: 1px;
}

.nav-link {
    color: var(--text-muted) !important;
    font-weight: 500;
    padding: 8px 16px !important;
    border-radius: 20px;
    transition: 0.3s;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    color: var(--gold-primary) !important;
    background: rgba(251, 191, 36, 0.1);
}

/* Language Dropdown */
.lang-dropdown .nav-link {
    padding: 6px 12px !important;
    font-size: 0.85rem;
    border: 1px solid rgba(251, 191, 36, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.lang-dropdown .dropdown-menu {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 16px;
    padding: 10px;
    margin-top: 15px;
    min-width: 100px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    left: 50% !important;
    transform: translateX(-50%) translateY(10px) !important;
    transition: all 0.3s var(--ease-out-expo);
}

.lang-dropdown .dropdown-item {
    padding: 10px 16px;
    font-size: 0.9rem;
    color: var(--text-main) !important;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s;
    margin-bottom: 5px;
    font-weight: 600;
}

.lang-dropdown .dropdown-item:hover,
.lang-dropdown .dropdown-item.active {
    background: var(--gradient-gold);
    color: var(--bg-darker) !important;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.2);
}

.lang-dropdown .dropdown-item:last-child {
    margin-bottom: 0;
}

/* Professional Notification (Toast) */
.custom-toast {
    position: fixed;
    bottom: 30px;
    left: 30px;
    /* Start from left since we are mostly RTL base but keep it professional */
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px 24px;
    border-radius: 20px;
    color: white;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 9999;
    transform: translateY(150%) scale(0.9);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

[dir="rtl"] .custom-toast {
    left: 30px;
    right: auto;
}

.custom-toast.active {
    transform: translateY(0) scale(1);
}

.custom-toast.success {
    border-left: 4px solid var(--gold-primary);
}

.custom-toast.error {
    border-left: 4px solid #ef4444;
}

.toast-icon {
    width: 36px;
    height: 36px;
    background: rgba(251, 191, 36, 0.1);
    color: var(--gold-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.custom-toast.error .toast-icon {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Vertical Stacking for Languages if needed (optional based on image interpretation) */
/* For now, keeping it a dropdown but compact */

.hero {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    filter: contrast(1.1) saturate(1.1);
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.3), var(--bg-dark));
}

.hero-content {
    text-align: center;
    z-index: 2;
    max-width: 1000px;
    padding: 0 20px;
}

.hero-title {
    font-size: 5rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.1;
    background: linear-gradient(to bottom, #fff, #94a3b8);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0;
    animation: fadeUp 1s ease forwards 0.5s;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--gold-primary);
    margin-bottom: 40px;
    font-weight: 300;
    letter-spacing: 2px;
    opacity: 0;
    animation: fadeUp 1s ease forwards 0.8s;
}

.hero-btn-group {
    opacity: 0;
    animation: fadeUp 1s ease forwards 1.1s;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

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

/* =========================================
   6. FOOTER
   ========================================= */
footer {
    background: var(--bg-darker);
    padding: 100px 0 40px;
    border-top: var(--glass-border);
}

.footer-logo {
    font-size: 2.5rem;
    color: var(--text-main);
    font-weight: 800;
    margin-bottom: 20px;
    display: block;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.footer-links a:hover {
    color: var(--gold-primary);
    padding-inline-start: 10px;
}

.social-icons a {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    margin-inline-end: 10px;
    border: var(--glass-border);
}

.social-icons a:hover {
    background: var(--gold-primary);
    color: var(--bg-darker);
    transform: translateY(-5px);
    box-shadow: var(--glow-shadow);
}

/* =========================================
   7. RESPONSIVE
   ========================================= */
/* =========================================
   7. RESPONSIVE & MOBILE OPTIMIZATIONS
   ========================================= */
/* Navbar Mobile Enhancements */
@media (max-width: 991px) {
    .navbar {
        padding: 10px 0;
    }

    .navbar .container {
        border-radius: 15px;
        padding: 10px 20px;
        background: rgba(15, 23, 42, 0.95);
    }

    .navbar-toggler {
        border: var(--glass-border);
        color: var(--gold-primary);
        padding: 8px 12px;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.05);
    }

    .navbar-toggler:focus {
        box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.3);
    }

    .navbar-collapse {
        background: var(--bg-darker);
        padding: 20px;
        border-radius: 15px;
        margin-top: 15px;
        border: var(--glass-border);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
        max-height: 80vh;
        overflow-y: auto;
    }

    .nav-item {
        margin-bottom: 10px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-item:last-child {
        border-bottom: none;
    }

    .nav-link {
        padding: 12px 0 !important;
        font-size: 1.1rem;
        display: block;
        width: 100%;
    }

    .dropdown-menu {
        background: rgba(255, 255, 255, 0.03);
        border: none;
        padding-right: 15px;
        margin-top: 5px;
    }

    .d-flex.align-items-center.gap-3 {
        flex-direction: column;
        align-items: stretch !important;
        margin-top: 20px;
        gap: 15px !important;
    }

    .lang-dropdown {
        width: 100%;
    }

    .lang-dropdown .btn, .lang-dropdown .nav-link {
        width: 100%;
        justify-content: space-between;
        display: flex;
        align-items: center;
    }

    .lang-dropdown .dropdown-menu {
        width: 100%;
        position: static !important;
        transform: none !important;
        box-shadow: none !important;
        background: rgba(0, 0, 0, 0.2) !important;
        margin-top: 10px;
        border: 1px solid rgba(251, 191, 36, 0.1);
    }
}

/* Typography & Layout for Mobile */
@media (max-width: 768px) {
    .display-3 {
        font-size: 2.5rem;
    }

    .display-4 {
        font-size: 2rem;
    }

    .display-5 {
        font-size: 1.8rem;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
        letter-spacing: 1px;
    }

    .section-padding {
        padding: 60px 0;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .section-title p {
        font-size: 1rem;
        padding: 0 15px;
    }

    .hero-btn-group {
        flex-direction: column;
        width: 100%;
        padding: 0 10px;
        gap: 15px !important;
    }

    .btn-premium,
    .btn-outline-premium {
        width: 100%;
        padding: 14px 20px;
        font-size: 1.1rem;
    }

    /* Card Adjustments */
    .card-img-wrapper {
        height: 220px;
    }

    .card-body-premium {
        padding: 20px;
    }

    /* Footer Adjustments */
    footer {
        padding: 60px 0 30px;
        text-align: center;
    }

    .footer-logo {
        margin: 0 auto 20px;
    }

    .social-icons {
        justify-content: center;
        margin-bottom: 30px;
    }

    .col-lg-2,
    .col-lg-3 {
        margin-bottom: 30px;
    }

    .footer-links li {
        margin-bottom: 10px;
    }

    /* Stats Section */
    .col-6 {
        margin-bottom: 20px;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }

    .navbar-brand {
        font-size: 1.2rem;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    /* Ensure touch targets are large enough */
    a,
    button,
    .btn {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .nav-link {
        min-height: 48px;
    }
}

/* =========================================
   5. GALLERY STYLES
   ========================================= */
.gallery-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s var(--ease-out-expo);
    aspect-ratio: 4/3;
    display: block;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out-expo);
}

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

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s ease;
    backdrop-filter: blur(2px);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-icon {
    width: 50px;
    height: 50px;
    background: var(--gold-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-darker);
    transform: scale(0);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.gallery-item:hover .gallery-icon {
    transform: scale(1);
}

/* =========================================
   6. IMAGE MODAL (LIGHTBOX)
   ========================================= */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.modal-overlay.modal-active {
    opacity: 1;
    visibility: visible;
}

.image-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-width: 90vw;
    max-height: 90vh;
}

.image-modal.modal-active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.image-modal img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    cursor: pointer;
    font-size: 2rem;
    transition: 0.3s;
}

.modal-close:hover {
    color: var(--gold-primary);
    transform: rotate(90deg);
}

/* News List Card Redesign (Grid Layout) */
.news-list-card {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    display: flex;
    flex-direction: column;
    /* Always column for grid */
    position: relative;
    backdrop-filter: blur(10px);
    height: 100%;
    /* Full height of column */
}

.news-list-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(251, 191, 36, 0.03), transparent 60%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.news-list-card:hover {
    transform: translateY(-10px);
    border-color: rgba(251, 191, 36, 0.3);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(251, 191, 36, 0.1);
}

.news-list-card:hover::before {
    opacity: 1;
}

.news-list-img {
    width: 100%;
    height: 250px;
    /* Fixed height for consistency */
    position: relative;
    overflow: hidden;
}

.news-list-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.news-list-card:hover .news-list-img img {
    transform: scale(1.1);
}

.news-date-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(8px);
    padding: 8px 16px;
    border-radius: 12px;
    color: white;
    font-size: 0.9rem;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    line-height: 1.2;
    z-index: 2;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.news-date-badge .day {
    font-size: 1.4rem;
    color: var(--gold-primary);
    font-weight: 800;
}

.news-date-badge .month {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.news-list-body {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* Changed from center to avoid overlap */
    position: relative;
    z-index: 1;
    gap: 10px;
    /* Added gap for better spacing */
}

.news-category {
    color: var(--gold-primary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 5px;
    /* Reduced margin since we have gap */
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.news-category::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--gold-primary);
    border-radius: 50%;
    display: block;
}

.news-title {
    font-size: 1.4rem;
    /* Adjusted for grid card */
    margin-bottom: 10px;
    /* Reduced margin */
    color: var(--text-main);
    font-weight: 700;
    line-height: 1.4;
    /* Increased line height */
    transition: color 0.3s ease;
}

.news-list-card:hover .news-title {
    color: var(--gold-primary);
}

.news-excerpt {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 15px;
    /* Reduced margin */
}

.news-footer {
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    /* Push footer to bottom */
}

/* Swiper 3D Gallery */
.gallery-slider {
    width: 60%;
    padding-top: 50px;
    padding-bottom: 50px;
}

.gallery-slider .swiper-slide {
    background-position: center;
    background-size: cover;
    width: 300px;
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.gallery-slider .swiper-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.gallery-slider .swiper-slide:hover img {
    transform: scale(1.1);
}

.gallery-slider .swiper-pagination-bullet {
    background: var(--gold-primary);
    opacity: 0.5;
}

.gallery-slider .swiper-pagination-bullet-active {
    opacity: 1;
    background: var(--gold-glow);
}