/* Dark Academic Elegance */

/* Base Settings */
html {
    scroll-behavior: smooth;
    cursor: default;
}

body {
    font-family: var(--font-body, 'Tajawal', sans-serif);
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary, #E8E6E3);
    overflow-x: hidden;
    line-height: 1.7;
}

/* Removed Texture/Noise to reduce visual noise and eye strain */
body::before {
    display: none;
}

/* Navbar Scroll Transition */
.nav-bar {
    transition: all 0.4s ease;
    background: transparent;
    padding: 20px 60px;
    color: var(--primary-navy);
}

.nav-bar.scrolled {
    background: rgba(26, 35, 50, 0.95);
    padding: 15px 60px;
    border-bottom: 2px solid var(--accent-gold);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

/* Scroll Animations */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(20px); /* Less movement */
    transition: all 0.8s ease-out;
}

.reveal-active {
    opacity: 1;
    transform: translateY(0);
}

/* Dark Academic Card */
.royal-card {
    background: var(--card-bg);
    border: 1px solid var(--border-subtle);
    transition: all 0.35s var(--ease-smooth);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.royal-card:hover {
    transform: translateY(-4px);
    background: var(--card-hover);
    border-color: var(--accent-gold);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--accent-gold);
}

/* Floating Shapes - Removed for cleaner look */
.floating-shape {
    display: none;
}

/* FAB Menu (LEFT) */
#fab-container {
    left: 30px;
    right: auto;
}

.fab-item {
    transition: all 0.4s;
    opacity: 0;
    transform: scale(0) translateX(-20px);
    pointer-events: none;
    position: absolute;
    left: 0;
}

.fab-menu-active .fab-item {
    opacity: 1;
    transform: scale(1) translateX(0);
    pointer-events: auto;
    position: relative;
}

.fab-item span {
    left: 60px;
    right: auto;
    transform: translateY(-50%) translateX(-10px);
}

.fab-item:hover span {
    transform: translateY(-50%) translateX(0);
}

/* Side Nav Dots (RIGHT) */
.side-nav {
    position: fixed;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 30px;
    z-index: 100;
}

.nav-dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
}

.nav-dot.active {
    background: #d4af37;
    box-shadow: 0 0 10px #d4af37;
}

.nav-dot.active::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border: 1px solid #d4af37;
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

/* WordPress Specific Overrides */
.site-main {
    position: relative;
    z-index: 10;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Form Elements Override for Dark Theme */
input,
select,
textarea {
    background: rgba(10, 16, 31, 0.8) !important;
    border: 1px solid rgba(212, 175, 55, 0.3) !important;
    color: #fff !important;
    padding: 10px;
    border-radius: 5px;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #d4af37 !important;
    outline: none;
}

/* Pagination */
.pagination .page-numbers {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    margin: 0 5px;
}

.pagination .page-numbers.current {
    background: #d4af37;
    color: #000;
}

/* Location Hierarchy */
.location-hierarchy,
.location-hierarchy ul {
    list-style: none;
    padding-left: 0;
}

.location-hierarchy ul {
    padding-left: 20px;
    /* Indent child lists */
    border-left: 1px solid rgba(212, 175, 55, 0.2);
    margin-top: 5px;
    margin-bottom: 5px;
}

.location-hierarchy li {
    margin-bottom: 8px;
    position: relative;
}

.location-hierarchy a {
    color: #94a3b8;
    transition: all 0.3s;
    display: block;
    font-size: 0.95em;
}

.location-hierarchy a:hover {
    color: #d4af37;
    transform: translateX(5px);
}

.location-hierarchy .current-cat>a {
    color: #d4af37;
    font-weight: bold;
}

/* Animated Words - Hero Title */
h1 span {
    display: inline-block;
    opacity: 0;
    margin: 0 10px;
    animation-fill-mode: forwards;
    will-change: transform, opacity, filter;
}

/* Animation from Top */
.animate-word-top {
    animation: slideFromTop 1.5s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

@keyframes slideFromTop {
    0% {
        opacity: 0;
        transform: translateY(-120%) scale(0.85);
        filter: blur(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

/* Animation from Bottom */
.animate-word-bottom {
    animation: slideFromBottom 1.5s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards;
}

@keyframes slideFromBottom {
    0% {
        opacity: 0;
        transform: translateY(120%) scale(0.85);
        filter: blur(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

/* Animation from Left */
.animate-word-left {
    animation: slideFromLeft 1.5s cubic-bezier(0.16, 1, 0.3, 1) 0.8s forwards;
}

@keyframes slideFromLeft {
    0% {
        opacity: 0;
        transform: translateX(-80px) scale(0.9) skewX(10deg);
        filter: blur(20px);
    }

    100% {
        opacity: 1;
        transform: translateX(0) scale(1) skewX(0);
        filter: blur(0);
    }
}

/* Animation from Right */
.animate-word-right {
    animation: slideFromRight 1.5s cubic-bezier(0.16, 1, 0.3, 1) 1.1s forwards;
}

@keyframes slideFromRight {
    0% {
        opacity: 0;
        transform: translateX(80px) scale(0.9) skewX(-10deg);
        filter: blur(20px);
    }

    100% {
        opacity: 1;
        transform: translateX(0) scale(1) skewX(0);
        filter: blur(0);
    }
}

/* Add glow effect on hover for each word */
h1 span:hover {
    text-shadow: 0 0 30px rgba(212, 175, 55, 0.6),
        0 0 60px rgba(212, 175, 55, 0.3);
    transform: scale(1.08);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: default;
}