/* Reset & Variables */
:root {
    --primary-color: #2a07f9;
    --secondary-color: #ee0034;
    --bg-light: #f8f9fa;
    --bg-dark: #0e1c41;
    --text-dark: #333333;
    --text-light: #ffffff;
    --text-muted: #6c757d;
    --font-ar: 'Tajawal', sans-serif;
    --font-en: 'Poppins', sans-serif;
    --transition: all 0.3s ease-in-out;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --glass-bg-dark: rgba(14, 28, 65, 0.8);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-ar);
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--bg-dark);
}

p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.bg-light { background-color: #ffffff; }
.bg-dark { background-color: var(--bg-dark); }
.text-white { color: var(--text-light); }
.text-white h2, .text-white h3 { color: var(--text-light); }

/* Utilities */
.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--bg-dark);
    margin-bottom: 10px;
}

.text-white .section-title h2 {
    color: var(--text-light);
}

.line {
    width: 60px;
    height: 4px;
    background-color: var(--secondary-color);
    margin: 0 auto;
    border-radius: 2px;
}

.line-light {
    background-color: var(--primary-color);
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-contact {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

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

.btn-primary:hover {
    background-color: transparent;
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-3px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-light);
    border-color: var(--text-light);
}

.btn-secondary:hover {
    background-color: var(--text-light);
    color: var(--bg-dark);
    transform: translateY(-3px);
}

.btn-contact {
    background-color: var(--secondary-color);
    color: var(--text-light);
    padding: 8px 24px;
}

.btn-contact:hover {
    background-color: #c9002b;
    color: var(--text-light);
    box-shadow: 0 4px 15px rgba(238, 0, 52, 0.4);
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--glass-shadow);
}

.glass-card-dark {
    background: var(--glass-bg-dark);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
    padding: 20px 0;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 10px 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.navbar.scrolled .nav-links a {
    color: var(--bg-dark);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 60px;
    transition: var(--transition);
}

.navbar.scrolled .logo img {
    height: 50px;
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 30px;
}

.nav-links a {
    color: var(--text-light);
    font-weight: 600;
    font-size: 1.1rem;
    position: relative;
}

.nav-links a:not(.btn-contact)::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: var(--transition);
}

.nav-links a:not(.btn-contact):hover::after,
.nav-links a.active:not(.btn-contact)::after {
    width: 100%;
    left: 0;
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
}

.navbar.scrolled .hamburger {
    color: var(--bg-dark);
}

/* Hero Section */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-light);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(14, 28, 65, 0.9) 0%, rgba(42, 7, 249, 0.6) 100%);
    z-index: -1;
}

.hero-content {
    max-width: 900px;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
    color: var(--text-light);
    text-shadow: 2px 2px 10px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-family: var(--font-en);
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 40px;
    letter-spacing: 2px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text h3 {
    color: var(--primary-color);
    margin-top: 30px;
    font-family: var(--font-en);
}

.about-images {
    position: relative;
    height: 500px;
}

.img-main {
    position: absolute;
    top: 0;
    right: 0;
    width: 80%;
    height: 80%;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    z-index: 1;
}

.img-sub {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60%;
    height: 60%;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    z-index: 2;
    border: 10px solid var(--bg-light);
}

/* Policy Section */
.policy-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.rounded-img {
    width: 100%;
    border-radius: 20px;
    object-fit: cover;
}

.shadow-lg {
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

/* Gallery Section */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    height: 300px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 0.6s ease;
}

.gallery-item.shuffle-fade {
    opacity: 0;
    transform: scale(0.5) rotateY(90deg);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.gallery-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(14,28,65,0.7) 0%, rgba(238, 0, 52, 0.4) 100%);
    opacity: 0;
    transition: var(--transition);
}

.gallery-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    color: var(--text-light);
    font-size: 3rem;
    opacity: 0;
    z-index: 2;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
}

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

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

.gallery-item {
    cursor: pointer;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(14, 28, 65, 0.95);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.5);
    transform: scale(0.8);
    transition: all 0.3s ease;
}

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

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: var(--text-light);
    font-size: 2.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.lightbox-close:hover {
    color: var(--secondary-color);
    transform: rotate(90deg);
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.contact-card {
    text-align: center;
    transition: transform 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-10px);
}

.contact-card i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

/* Footer */
footer {
    background-color: #081128;
    color: var(--text-light);
    padding: 60px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.footer-logo img {
    height: 80px;
    margin-bottom: 15px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: var(--text-light);
    font-size: 1.2rem;
}

.social-links a:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Scroll to Top */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--secondary-color);
    color: var(--text-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 5px 15px rgba(238, 0, 52, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.scroll-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background-color: var(--primary-color);
    transform: translateY(-5px);
}

/* CV Section */
.cv-content {
    text-align: center;
    padding: 40px;
    margin-top: -30px;
    margin-bottom: 50px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}
.cv-text {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--primary-color);
    line-height: 1.8;
}
.center-line {
    margin: 10px auto 30px;
}

/* Vision & Mission Section */
.vm-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}
.vm-card {
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s ease;
}
.vm-card:hover {
    transform: translateY(-10px);
}
.vm-icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}
.vm-card h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.5rem;
}
.vm-card p {
    margin-bottom: 15px;
    text-align: justify;
}

/* Policy Additions */
.policy-divider {
    border: 0;
    height: 1px;
    background: rgba(0,0,0,0.1);
    margin: 20px 0;
}

/* Projects Table */
.table-responsive {
    overflow-x: auto;
    border-radius: 15px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}
.projects-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}
.projects-table th, .projects-table td {
    padding: 15px;
    text-align: right;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.projects-table th {
    background-color: var(--primary-color);
    color: var(--text-light);
    font-weight: 600;
}
.projects-table tr:last-child td {
    border-bottom: none;
}
.projects-table tbody tr {
    transition: background-color 0.3s ease;
}
.projects-table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.float-anim {
    animation: float 6s ease-in-out infinite;
}

.float-anim-delayed {
    animation: float 6s ease-in-out infinite;
    animation-delay: 2s;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

/* Responsive */
@media (max-width: 992px) {
    .about-grid, .policy-grid, .vm-grid {
        grid-template-columns: 1fr;
    }
    
    .about-images {
        margin-top: 50px;
        height: 400px;
    }
    
    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-title {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background-color: var(--bg-dark);
        flex-direction: column;
        justify-content: center;
        transition: var(--transition);
        box-shadow: -5px 0 20px rgba(0,0,0,0.2);
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links a {
        color: var(--text-light) !important;
        font-size: 1.5rem;
    }
    
    .hamburger {
        display: block;
        z-index: 1001;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
}
