/* ===================================
   ROOT VARIABLES & RESET
   =================================== */
:root {
    /* Colors - Academic & Professional Palette */
    --primary-color: #1a3a5c;
    --primary-dark: #0f2742;
    --primary-light: #2d5580;
    --accent-color: #c9a961;
    --accent-dark: #b39654;
    --accent-light: #d4b876;

    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --text-light: #6a6a6a;

    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-dark: #1a3a5c;

    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.15);

    /* Typography */
    --font-primary: 'Cairo', sans-serif;
    --font-secondary: 'Tajawal', sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
    --spacing-xxl: 6rem;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    line-height: 1.8;
    overflow-x: hidden;
    direction: rtl;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-base);
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

/* ===================================
   UTILITY CLASSES
   =================================== */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section {
    padding: var(--spacing-xxl) 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.section-badge {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-md);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 50px;
    margin-bottom: var(--spacing-sm);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
    line-height: 1.2;
}

.section-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ===================================
   NAVBAR
   =================================== */
.navbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
    background: rgba(255, 255, 255, 0.98);
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-sm) 0;
}

.logo img {
    height: 60px;
    width: auto;
    transition: transform var(--transition-base);
}

.logo:hover img {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

.nav-link {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    position: relative;
    transition: all var(--transition-base);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: all var(--transition-base);
    transform: translateX(50%);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: var(--spacing-xs);
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
    transition: all var(--transition-base);
}

.mobile-menu {
    position: fixed;
    top: 80px;
    right: -100%;
    width: 280px;
    height: calc(100vh - 80px);
    background: white;
    box-shadow: var(--shadow-lg);
    padding: var(--spacing-md);
    transition: right var(--transition-base);
    z-index: 999;
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

.mobile-link {
    display: block;
    padding: var(--spacing-sm);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-xs);
    transition: all var(--transition-base);
}

.mobile-link:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
}

/* ===================================
   HERO SECTION
   =================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(135deg,
            var(--primary-dark) 0%,
            var(--primary-color) 50%,
            var(--primary-light) 100%);
    overflow: hidden;
    padding-top: 80px;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(26, 58, 92, 0.95) 0%,
            rgba(26, 58, 92, 0.85) 100%);
}

.hero-pattern {
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(255, 255, 255, .02) 35px, rgba(255, 255, 255, .02) 70px),
        repeating-linear-gradient(-45deg, transparent, transparent 35px, rgba(255, 255, 255, .02) 35px, rgba(255, 255, 255, .02) 70px);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 900px;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-md);
    width: 100%;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-md);
    background: rgba(201, 169, 97, 0.2);
    border: 2px solid var(--accent-color);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    animation: fadeInUp 0.8s ease;
}

.hero-badge svg {
    color: var(--accent-color);
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: var(--spacing-md);
    animation: fadeInUp 0.8s ease 0.2s both;
}

.title-line {
    display: block;
}

.hero-subtitle {
    font-size: clamp(1.125rem, 3vw, 1.5rem);
    font-weight: 400;
    margin-bottom: var(--spacing-md);
    opacity: 0.95;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-highlight {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    font-size: 1rem;
    margin-bottom: var(--spacing-lg);
    animation: fadeInUp 0.8s ease 0.6s both;
}

.hero-highlight svg {
    color: var(--accent-color);
    flex-shrink: 0;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.8s both;
}

.btn {
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.btn:hover::before {
    transform: translateX(100%);
}

.btn-primary {
    background: var(--accent-color);
    color: var(--primary-dark);
    box-shadow: 0 4px 16px rgba(201, 169, 97, 0.3);
}

.btn-primary:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(201, 169, 97, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    right: 50%;
    transform: translateX(50%);
    z-index: 3;
    animation: bounce 2s infinite;
}

.scroll-arrow {
    width: 30px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 25px;
    position: relative;
}

.scroll-arrow::after {
    content: '';
    position: absolute;
    top: 10px;
    right: 50%;
    transform: translateX(50%);
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    animation: scrollDown 2s infinite;
}

/* ===================================
   ABOUT SECTION
   =================================== */
.about-section {
    background: var(--bg-secondary);
}

.about-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-md);
}

.about-card {
    background: white;
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    border: 1px solid var(--border-color);
}

.about-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
}

.card-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
    color: white;
}

.about-card h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
}

.about-card p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ===================================
   DIRECTOR SECTION
   =================================== */
.director-section {
    background: white;
}

.director-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--spacing-xl);
    align-items: start;
}

.director-image {
    position: relative;
}

.image-wrapper {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

.image-decoration {
    position: absolute;
    top: -20px;
    left: -20px;
    right: 20px;
    bottom: 20px;
    border: 3px solid var(--accent-color);
    border-radius: var(--radius-xl);
    z-index: -1;
}

.director-info {
    padding: var(--spacing-md) 0;
}

.director-name {
    font-size: 2.5rem;
    color: var(--primary-color);
    font-weight: 800;
    margin-bottom: var(--spacing-xs);
}

.director-title {
    font-size: 1.25rem;
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 2px solid var(--border-color);
}

.qualifications {
    margin-bottom: var(--spacing-lg);
}

.qualifications-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.qualifications-title::before {
    content: '';
    width: 4px;
    height: 24px;
    background: var(--accent-color);
    border-radius: 2px;
}

.qualification-item {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
    padding: var(--spacing-sm);
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
}

.qualification-item:hover {
    background: var(--bg-secondary);
}

.qual-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.qualification-item.award .qual-icon {
    color: var(--accent-color);
}

.qualification-item p {
    color: var(--text-secondary);
    line-height: 1.6;
    flex: 1;
}

/* ===================================
   SPECIALIZATIONS SECTION
   =================================== */
.specializations-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: white;
}

.specializations-section .section-badge {
    background: rgba(201, 169, 97, 0.2);
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
}

.specializations-section .section-title {
    color: white;
}

.specializations-section .section-description {
    color: rgba(255, 255, 255, 0.9);
}

.specializations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

.spec-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.spec-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(201, 169, 97, 0.1), transparent);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.spec-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
}

.spec-card:hover::before {
    opacity: 1;
}

.spec-number {
    position: absolute;
    top: var(--spacing-md);
    left: var(--spacing-md);
    font-size: 3rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.1);
    line-height: 1;
}

.spec-icon {
    margin-bottom: var(--spacing-md);
    color: var(--accent-color);
}

.spec-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    position: relative;
    z-index: 1;
}

.spec-card p {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

/* ===================================
   ACTIVITIES & PUBLICATIONS SECTIONS
   =================================== */
.activities-section,
.publications-section {
    background: var(--bg-secondary);
}

.activity-placeholder,
.publication-placeholder {
    text-align: center;
    padding: var(--spacing-xxl) var(--spacing-md);
    background: white;
    border-radius: var(--radius-xl);
    border: 2px dashed var(--border-color);
}

.activity-placeholder svg,
.publication-placeholder svg {
    margin: 0 auto var(--spacing-md);
    color: var(--text-light);
}

.activity-placeholder p,
.publication-placeholder p {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

/* ===================================
   CONTACT SECTION
   =================================== */
.contact-section {
    background: white;
}

.contact-content {
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
    justify-items: center;
}

.contact-card-single {
    max-width: 400px;
    width: 100%;
}

.contact-card {
    background: var(--bg-secondary);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all var(--transition-base);
    border: 2px solid transparent;
}

.contact-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-color);
    box-shadow: var(--shadow-md);
}

.contact-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-md);
    color: white;
}

.contact-card h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
}

.contact-card p,
.contact-card a {
    color: var(--text-secondary);
    line-height: 1.6;
}

.contact-card a:hover {
    color: var(--accent-color);
}

.social-links {
    text-align: center;
    padding: var(--spacing-xl);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    border-radius: var(--radius-xl);
    color: white;
}

.social-links h3 {
    font-size: 1.75rem;
    margin-bottom: var(--spacing-md);
}

.social-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

.social-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-lg);
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    color: white;
    font-weight: 600;
    transition: all var(--transition-base);
}

.social-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

.social-btn.twitter:hover {
    background: #1DA1F2;
    border-color: #1DA1F2;
}

.social-btn.instagram:hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    border-color: transparent;
}

/* ===================================
   FOOTER
   =================================== */
.footer {
    background: var(--primary-dark);
    color: white;
    padding: var(--spacing-xl) 0 var(--spacing-md);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo img {
    height: 80px;
    margin-bottom: var(--spacing-md);
}

.footer-logo p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
    max-width: 400px;
}

.footer-links h4,
.footer-contact h4 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-md);
    color: var(--accent-color);
}

.footer-links a {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    padding: var(--spacing-xs) 0;
    transition: all var(--transition-base);
}

.footer-links a:hover {
    color: var(--accent-color);
    padding-right: var(--spacing-xs);
}

.footer-contact p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--spacing-md);
}

.footer-social {
    display: flex;
    gap: var(--spacing-sm);
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
}

.footer-social a:hover {
    background: var(--accent-color);
    transform: translateY(-4px);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

/* ===================================
   ANIMATIONS
   =================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(50%) translateY(0);
    }

    40% {
        transform: translateX(50%) translateY(-10px);
    }

    60% {
        transform: translateX(50%) translateY(-5px);
    }
}

@keyframes scrollDown {
    0% {
        opacity: 0;
        top: 10px;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        top: 30px;
    }
}

.card-animate {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.card-animate:nth-child(1) {
    animation-delay: 0.1s;
}

.card-animate:nth-child(2) {
    animation-delay: 0.2s;
}

.card-animate:nth-child(3) {
    animation-delay: 0.3s;
}

.card-animate:nth-child(4) {
    animation-delay: 0.4s;
}

.card-animate:nth-child(5) {
    animation-delay: 0.5s;
}

.card-animate:nth-child(6) {
    animation-delay: 0.6s;
}

.card-animate:nth-child(7) {
    animation-delay: 0.7s;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (max-width: 1024px) {
    .director-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
}

@media (max-width: 768px) {
    :root {
        --spacing-xxl: 3rem;
        --spacing-xl: 2.5rem;
    }

    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero {
        min-height: 90vh;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .about-cards {
        grid-template-columns: 1fr;
    }

    .specializations-grid {
        grid-template-columns: 1fr;
    }

    .contact-info {
        grid-template-columns: 1fr;
    }

    .social-buttons {
        flex-direction: column;
    }

    .social-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-sm);
    }

    .section {
        padding: var(--spacing-lg) 0;
    }

    .logo img {
        height: 50px;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .director-name {
        font-size: 1.75rem;
    }

    .spec-number {
        font-size: 2rem;
    }
}