/* --- Global Typography & Reset --- */
body {
    font-family: 'Tajawal', sans-serif;
    color: var(--color-text);
    line-height: 1.7; 
    overflow-x: hidden;
    background: var(--color-bg);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

/* --- Cyber/Modern Background --- */
.cyber-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: var(--gradient-bg);
}

.grid-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(var(--border-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.15;
}

/* --- Header & Nav --- */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.25rem 0;
    z-index: 1000;
    transition: var(--transition);
    background: var(--color-surface);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-color);
}

.main-header.scrolled {
    padding: 0.75rem 0;
    background: var(--color-surface-2);
    box-shadow: var(--shadow);
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--color-text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-arabic);
}

.logo i {
    font-size: 2.2rem;
    color: var(--color-primary);
    filter: drop-shadow(0 0 8px var(--color-primary-rgb));
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.desktop-nav a {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    padding: 0.5rem 0;
    transition: var(--transition);
    font-size: 1.05rem;
}

.desktop-nav a:after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 3px;
    transition: var(--transition);
}

.desktop-nav a:hover {
    color: var(--color-primary);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem 1.75rem;
    border-radius: var(--border-radius-xl);
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition-bounce);
    border: none;
    cursor: pointer;
    font-family: var(--font-arabic);
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--color-text-light);
    box-shadow: 0 4px 15px rgba(var(--color-primary-rgb), 0.3);
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(var(--color-primary-rgb), 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--color-text);
    border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
    background: var(--color-primary);
    color: var(--color-text-dark);
    transform: translateY(-5px);
}

/* --- Navigation & Mobile Overhaul --- */
.desktop-only {
    display: flex !important;
}

@media (max-width: 992px) {
    .desktop-nav, .desktop-only {
        display: none !important;
    }
    
    .mobile-menu-btn {
        display: flex !important;
    }
}

.mobile-menu-btn {
    display: none;
    background: rgba(var(--color-primary-rgb), 0.1);
    border: 1px solid rgba(var(--color-primary-rgb), 0.2);
    color: var(--color-primary); /* Vibrant color for visibility */
    width: 44px;
    height: 44px;
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001;
}

.mobile-menu-btn:hover {
    background: var(--color-primary);
    color: var(--color-text-dark);
}

.mobile-menu-btn.active {
    background: var(--color-primary);
    color: var(--color-text-dark);
}

.nav-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    left: 4%;
    right: 4%;
    width: auto;
    background: rgba(13, 17, 30, 0.98);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(var(--color-primary-rgb), 0.3);
    border-radius: 22px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    padding: 0.6rem 1rem; /* Highly compact height */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-15px) scale(0.96);
    transition: all 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.2);
    z-index: 1000;
    pointer-events: none;
}

.nav-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.dropdown-content {
    display: flex;
    flex-direction: column;
    gap: 0.2rem; /* Tight gap for compactness */
}

.dropdown-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    color: var(--color-text);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    border-radius: 14px;
    transition: all 0.25s ease;
    background: rgba(255, 255, 255, 0.02);
}

.dropdown-link:hover {
    background: rgba(var(--color-primary-rgb), 0.15);
    color: var(--color-primary);
    transform: translateX(-5px);
}

.dropdown-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    color: var(--color-primary);
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 0.8rem 0.5rem;
}

.dropdown-auth {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding: 0.2rem;
}

.dropdown-auth .btn {
    height: 48px;
    font-size: 1.05rem;
    border-radius: 12px;
    padding: 0 1rem;
}

/* --- Hero Section --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 120px 0 60px;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4rem;
}

/* Interactive Cover */
.cover-container {
    perspective: 1500px;
}

.interactive-cover {
    position: relative;
    width: 100%;
    max-width: 850px;
    height: 420px;
    background: var(--gradient-card);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    transform-style: preserve-3d;
    transition: transform 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cover-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-around;
    width: 100%;
    padding: 3rem;
}

.chemistry-symbol {
    font-size: clamp(4rem, 10vw, 9rem);
    font-weight: 900;
    color: var(--color-primary);
    text-shadow: 0 0 30px rgba(var(--color-primary-rgb), 0.4);
    opacity: 0.9;
    font-family: 'Outfit', sans-serif;
}

.professor-name h1 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2rem, 5vw, 4.5rem);
    font-weight: 900;
    line-height: 1;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 15px rgba(var(--color-primary-rgb), 0.2));
}

.professor-name .title {
    font-size: 1.5rem;
    color: var(--color-text-muted);
    font-weight: 600;
    margin-top: 1rem;
}

/* Professor Hero */
.professor-hero {
    display: flex;
    align-items: center;
    gap: 4rem;
    max-width: 1100px;
    width: 100%;
}

.professor-image-container {
    position: relative;
    width: 320px;
    height: 320px;
    flex-shrink: 0;
}

.professor-image-container::before {
    content: '';
    position: absolute;
    inset: -10px;
    background: conic-gradient(from 0deg, var(--color-primary), var(--color-accent), var(--color-primary));
    border-radius: 50%;
    animation: rotate 6s linear infinite;
    z-index: -1;
}

.professor-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 8px solid var(--color-bg);
    box-shadow: var(--shadow-lg);
}

.hero-text {
    text-align: right;
    flex: 1;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.2rem);
    font-weight: 900;
    color: var(--color-text);
    margin-bottom: 2rem;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    color: var(--color-text-muted);
    line-height: 1.7;
    margin-bottom: 3rem;
}

/* --- Mobile & Dropdown Refinements --- */
@media (max-width: 992px) {
    .hero-content {
        gap: 2rem;
    }
    
    .professor-hero {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-text {
        text-align: center;
    }
    
    .professor-image-container {
        width: 250px;
        height: 250px;
    }
}

/* --- Features Section --- */
.features {
    padding: 8rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-title {
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    font-weight: 900;
    color: var(--color-text);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.3rem;
    color: var(--color-text-muted);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.feature-card {
    background: var(--color-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 3.5rem 2.5rem;
    text-align: center;
    transition: var(--transition-bounce);
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-15px);
    border-color: var(--color-primary);
    background: var(--color-surface-2);
    box-shadow: var(--shadow-glow);
}

.feature-icon {
    width: 90px;
    height: 90px;
    background: var(--gradient-primary);
    color: var(--color-text-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 2rem;
    box-shadow: 0 10px 20px rgba(var(--color-primary-rgb), 0.3);
}

.feature-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1.25rem;
    color: var(--color-text);
}

.feature-card p {
    color: var(--color-text-muted);
    line-height: 1.8;
}

/* --- Locations Section Styles (Updated from Screenshot) --- */
.locations-section {
    padding: 80px 0;
    position: relative;
    background: radial-gradient(circle at top, rgba(var(--color-primary-rgb), 0.05) 0%, transparent 70%);
}

.title-divider {
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    margin: 1.5rem auto 0;
    border-radius: 2px;
}

.locations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-bottom: 4rem;
}

.location-card {
    background: rgba(13, 17, 30, 0.7);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(var(--color-primary-rgb), 0.15);
    border-top: 4px solid var(--color-primary); /* Theme-integrated top-border */
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.location-card:hover {
    transform: translateY(-10px);
    border-color: var(--color-primary);
    background: rgba(13, 17, 30, 0.85);
    box-shadow: 0 20px 50px rgba(var(--color-primary-rgb), 0.2), 0 0 20px rgba(var(--color-primary-rgb), 0.1);
}

.location-map-container {
    height: 200px;
    width: 100%;
    border-bottom: 2px solid rgba(var(--color-primary-rgb), 0.1);
}

.location-info {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    text-align: right; /* RTL Alignment */
}

.location-title {
    font-size: 1.5rem;
    font-weight: 900;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.info-icon {
    font-size: 1.1rem;
    color: #c0ff00; /* Vibrant Lime from screenshot */
    min-width: 20px;
    display: flex;
    justify-content: center;
}

.info-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    margin: 0;
    line-height: 1.5;
}

.phonelink {
    font-weight: 700;
}

.card-action {
    margin-top: 1rem;
}

.btn-location-view {
    display: block;
    width: 100%;
    padding: 0.9rem;
    background: linear-gradient(to right, #10b981, #3b82f6);
    color: white !important;
    text-align: center;
    border-radius: 50px;
    font-weight: 800;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    text-decoration: none;
    border: none;
}

.main-map-card {
    background: var(--color-surface);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    position: relative;
}

#main-map {
    height: 600px;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

/* Map Markers & Overlays - STABLE DIV VERSION */
.pulse-dot-container {
    display: flex !important;
    justify-content: center;
    align-items: center;
    background: none !important;
    border: none !important;
}

.pulse-dot-inner {
    width: 14px;
    height: 14px;
    background: #10b981;
    border: 2px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 10px #10b981;
    animation: markerPulse 2s infinite ease-in-out;
}

/* Disable scale animation during map movement to prevent 'blooming' or visual lag */
.map-moving .pulse-dot-inner {
    animation: none !important;
    opacity: 0.8;
}

@keyframes markerPulse {
    0% { transform: scale(0.9); opacity: 0.7; box-shadow: 0 0 5px #10b981; }
    100% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 15px #10b981; }
}

.radar-circle {
    transition: all 0.5s ease;
}

.radar-circle {
    stroke: var(--color-primary);
    stroke-width: 2;
    fill: rgba(var(--color-primary-rgb), 0.1);
    animation: radarPulse 3s infinite ease-out;
    pointer-events: none;
}

@keyframes radarPulse {
    0% { transform: scale(0.1); opacity: 1; }
    100% { transform: scale(1.2); opacity: 0; }
}
.palestine-overlay {
    filter: drop-shadow(0 0 10px rgba(255, 0, 0, 0.5));
}

.palestine-text-marker {
    background: none !important;
    border: none !important;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}
.palestine-text-content {
    background: rgba(255, 0, 0, 0.4);
    color: white;
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: 900;
    font-size: 24px;
    white-space: nowrap;
    border: 2px solid white;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.6);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    animation: textPulse 2s infinite alternate;
}
@keyframes textPulse {
    from { transform: scale(1); opacity: 0.9; }
    to { transform: scale(1.1); opacity: 1; }
}

/* --- Footer --- */
footer {
    background: var(--color-surface-2);
    padding: 6rem 0 3rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 3rem 0;
}

.social-links a {
    width: 55px;
    height: 55px;
    background: var(--gradient-primary);
    color: var(--color-text-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: var(--transition-bounce);
}

.social-links a:hover {
    transform: scale(1.2) rotate(15deg);
    box-shadow: var(--shadow-glow);
}

.footer-bottom {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--color-text-muted);
}

/* Animations */
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.scroll-animate {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s, transform 0.8s;
}

.scroll-animate.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 992px) {
    .professor-hero {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    .hero-text {
        text-align: center;
    }
    .professor-image-container {
        width: 250px;
        height: 250px;
    }
    .hero-content {
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .hero {
        padding-top: 100px;
    }
    .interactive-cover {
        height: 250px;
    }
    .cover-content {
        padding: 1.5rem;
    }
    .nav-dropdown {
        left: 4%;
        right: 4%;
        padding: 0.8rem 1rem;
    }
    .dropdown-content {
        gap: 0.3rem;
    }
    .chemistry-symbol {
        font-size: 4rem;
    }
    .professor-name h1 {
        font-size: 2rem;
        letter-spacing: -0.01em;
    }
    .professor-name .title {
        font-size: 1.1rem;
    }
    #main-map {
        height: 350px;
    }
    .features-grid {
        grid-template-columns: 1fr;
    }
    .main-map-card {
        padding: 1.5rem;
    }
}
