:root {
    --primary-color: #0c2f55;
    --primary-dark: #071d35;
    --secondary-color: #CB9C57;
    --secondary-light: #e4c48a;
    --dark-color: #1a1a1a;
    --light-color: #f8f9fa;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #ffffff;
    --card-bg: #ffffff;
    --pure-white: #ffffff;
    --white: #ffffff;
    --modal-bg: #ffffff;
    --footer-bg: #0c2f55;
    --footer-text: #ffffff;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
    --gradient: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.2);
}

.dark-theme {
    --primary-color: #1a4b81;
    --primary-dark: #0c2f55;
    --secondary-color: #dcb374;
    --secondary-light: #f1d7a8;
    --dark-color: #f8f9fa;
    --light-color: #1a1a1a;
    --text-color: #e0e0e0;
    --text-light: #aaa;
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --modal-bg: #1e1e1e;
    --footer-bg: #070e17;
    --footer-text: #e0e0e0;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.6);
    --glass-bg: rgba(30, 30, 30, 0.8);
    --glass-border: rgba(255, 255, 255, 0.05);
}

html {
    scroll-behavior: smooth;
}

body {
    transition: background-color 0.3s, color 0.3s;
    overflow-x: hidden;
    background-color: var(--bg-color);
}

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

body {
    font-family: 'Outfit', 'Cairo', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--pure-white);
}

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

/* Typography */
h1,
h2,
h3 {
    margin-bottom: 20px;
}

.section-title {
    font-size: 2.5rem;
    color: var(--secondary-color);
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
}

.text-center {
    text-align: center;
}

.text-center .section-title::after {
    right: 50%;
    transform: translateX(50%);
}

/* Header & Nav */
header {
    background: var(--bg-color);
    box-shadow: var(--shadow-sm);
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

header.scrolled {
    padding: 10px 0;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
}

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

.logo img {
    height: 50px;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-right: 30px;
}

.nav-links img {
    height: 50px;
}

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

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

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

.nav-links a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 600;
    transition: all 0.3s;
    position: relative;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
}

.btn.primary {
    background: var(--primary-color);
    color: var(--pure-white);
}

.btn.primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

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

.btn.secondary:hover {
    background: var(--pure-white);
    color: var(--dark-color);
}

.full-width {
    width: 100%;
}

.mobile-only {
    display: none;
}

/* Hero */
.hero {
    height: 80vh;
    /* Background logic moved to .video-background */
    position: relative;
    display: flex;
    align-items: center;
    color: var(--white);
    text-align: center;
    background: transparent !important;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-btns .btn {
    margin: 10px;
}

/* Video Background */
.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.video-background video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-background .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(12, 47, 85, 0.8), rgba(12, 47, 85, 0.5));
    z-index: 1;
}

/* Sections */
.py-large {
    padding: 80px 0;
}

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

.mt-medium {
    margin-top: 50px;
}

.mt-small {
    margin-top: 15px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.about-img {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    background: var(--bg-color);
    border-radius: 30px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--glass-border);
    transition: all 0.5s ease;
    animation: floating 3s ease-in-out infinite;
}

.about-img:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.about-img img {
    width: 60%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.1));
}

@keyframes floating {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--glass-border);
}

.project-card:hover {
    transform: translateY(-15px);
    box-shadow: var(--shadow-lg);
}

.card-img-wrapper {
    overflow: hidden;
    height: 250px;
}

.project-card img {
    width: 100%;
    height: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.project-status-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 12px;
    border-radius: 20px;
    color: white;
    font-size: 0.85rem;
    font-weight: 700;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

[dir="ltr"] .project-status-badge {
    right: auto;
    left: 15px;
}

.status-available {
    background: #0ca678;
}

.status-sold {
    background: #fa5252;
}

.status-selling {
    background: #fab005;
    color: #333;
}

.status-construction {
    background: #228be6;
}

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

.project-card h3 {
    padding: 20px 20px 5px;
    color: var(--primary-color);
    font-size: 1.4rem;
}

.project-card p {
    padding: 0 20px 15px;
    color: var(--text-light);
    opacity: 0.9;
}

.btn-link {
    color: var(--primary-color);
    background: none;
    border: none;
    font-size: 1rem;
    text-decoration: none;
    font-weight: 700;
    display: inline-block;
    padding: 0 20px 20px;
    cursor: pointer;
    font-family: inherit;
}

/* Contact */
.contact-form {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--glass-border);
}

.form-group {
    margin-bottom: 20px;
}

.contact-form input,
.contact-form select {
    width: 100%;
    padding: 15px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-family: inherit;
    background: var(--light-color);
    color: var(--text-color);
    transition: all 0.3s;
}

.contact-form input:focus,
.contact-form select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(203, 156, 87, 0.2);
}

.form-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    font-weight: 600;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
}

/* Footer */
footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 60px 0 40px;
    border-top: 1px solid var(--glass-border);
}

footer a {
    color: var(--footer-text);
    opacity: 0.8;
    transition: all 0.3s;
}

footer a:hover {
    color: var(--secondary-color);
    opacity: 1;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: var(--white);
    margin: 5% auto;
    padding: 30px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 15px;
    position: relative;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s;
}

.close-modal {
    color: #aaa;
    float: left;
    /* Arabic RTL */
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
}

.modal img {
    width: 100%;
    border-radius: 10px;
    margin: 15px 0;
    max-height: 300px;
    object-fit: cover;
}

.modal h2 {
    color: var(--primary-color);
}

.modal ul {
    margin: 15px 20px 15px 0;
    list-style-position: inside;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

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



/* Mobile Nav Overlay */
.mobile-nav {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: 0;
    background: var(--bg-color);
    z-index: 999;
    overflow: hidden;
    transition: height 0.4s ease;
    box-shadow: var(--shadow-md);
}

.mobile-nav.active {
    height: 350px;
}

.mobile-nav-content {
    padding: 20px;
}

.mobile-links {
    list-style: none;
    text-align: center;
}

.mobile-links li {
    padding: 15px 0;
    border-bottom: 1px solid var(--light-color);
}

.mobile-links a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 1.2rem;
    font-weight: 600;
}



/* Statistics Section */
.stats-section {
    position: relative;
    z-index: 1;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.stat-item {
    background: var(--card-bg);
    padding: 30px 20px;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s;
    border: 1px solid var(--glass-border);
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-item h3 {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 700;
}

.stat-item p {
    font-size: 1.1rem;
    color: var(--text-color);
    font-weight: 600;
}

/* Map */
.map-container {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 3px solid var(--card-bg);
}

/* Gallery Slider */
.gallery-container {
    position: relative;
    width: 100%;
    margin: 15px 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 */
    height: 0;
    overflow: hidden;
    margin-bottom: 25px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.gallery-slide {
    display: flex;
    transition: transform 0.4s ease-in-out;
}

.gallery-slide img {
    width: 100%;
    /* display: none; Removed, using JS to toggle active class or just hiding others */
    display: none;
    border-radius: 0;
    /* Reset border radius as container has it */
    margin: 0;
    max-height: 400px;
}

.gallery-slide img.active {
    display: block;
    animation: fadeIn 0.5s;
}

.prev,
.next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    transition: 0.6s ease;
    border-radius: 3px 0 0 3px;
    user-select: none;
    background-color: rgba(0, 0, 0, 0.3);
    border: none;
}

.next {
    left: 0;
    border-radius: 0 3px 3px 0;
}

.prev {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev:hover,
.next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Scroll Animations */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, visibility;
}

/* Base Animation Class */
.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: opacity, transform;
}

.fade-in-section.is-visible {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
}

/* Modifiers */
.fade-in-section.zoom-in {
    transform: scale(0.9);
}

.fade-in-section.slide-left {
    transform: translateX(-50px);
}

.fade-in-section.slide-right {
    transform: translateX(50px);
}

.fade-in-section.is-visible.zoom-in {
    transform: scale(1);
}

.fade-in-section.is-visible.slide-left,
.fade-in-section.is-visible.slide-right {
    transform: translateX(0);
}

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

.delay-400 {
    transition-delay: 0.4s;
}

.delay-600 {
    transition-delay: 0.6s;
}

/* Nav Controls */
.nav-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.icon-btn {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.3s;
    font-family: inherit;
    font-weight: bold;
}

.icon-btn:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

/* Floating WhatsApp */
.floating-whatsapp {
    position: fixed;
    bottom: 30px;
    right: 30px;
    /* LTR default, RTL handled by dir */
    background-color: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    text-align: center;
    font-size: 35px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
    animation: pulse 2s infinite;
}

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

.floating-whatsapp:hover {
    background-color: #128c7e;
    transform: scale(1.1);
    animation: none;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Rich Modal Content */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 15px;
}

.badge {
    background: #e6fcf5;
    color: #0ca678;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
}

.project-details-rich {
    margin-top: 20px;
    text-align: right;
}

[dir="ltr"] .project-details-rich {
    text-align: left;
}

.project-desc {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 25px;
    line-height: 1.8;
}

/* Quick Specs In Modal */
.price-tag {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 15px 0;
    display: inline-block;
    padding: 5px 15px;
    background: var(--light-color);
    border-radius: 10px;
}

.specs-grid-quick {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 25px;
    background: var(--bg-color);
    padding: 15px;
    border-radius: 15px;
    border: 1px solid var(--glass-border);
}

.spec-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-color);
}

.spec-item i {
    font-size: 1.2rem;
    color: var(--secondary-color);
}

.spec-item span {
    font-size: 0.9rem;
    font-weight: 600;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.feature-box {
    background: var(--light-color);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.feature-box i {
    font-size: 1.5rem;
    color: var(--secondary-color);
}

.specs-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 0;
    padding: 0;
}

.specs-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    color: var(--text-color);
}

.specs-list li i {
    color: #20c997;
    /* Checkmark color */
}

/* Dark theme specific adjustments */
.dark-theme .modal-content {
    border-color: #444;
}

.dark-theme .feature-box {
    background: #2a2a2a;
    border-color: #444;
}

.dark-theme .modal-header {
    border-bottom-color: #444;
}

.dark-theme .btn-link {
    color: var(--secondary-color);
}

/* Map enhancement */
iframe {
    filter: grayscale(0%);
    transition: filter 0.3s;
}

.dark-theme iframe {
    filter: invert(90%) hue-rotate(180deg);
}

/* New Sections Styling */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.testimonial-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    position: relative;
    border: 1px solid var(--glass-border);
}

.testimonial-card .stars {
    color: #f1c40f;
    margin-bottom: 20px;
}

.testimonial-card .quote {
    font-style: italic;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.testimonial-card .client-name {
    color: var(--primary-color);
    font-weight: 700;
}

.partners-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 50px;
    opacity: 0.7;
}

.partner-logo img {
    height: 40px;
    filter: grayscale(100%);
    transition: all 0.3s;
}

.partner-logo:hover img {
    filter: grayscale(0%);
    transform: scale(1.1);
}

/* Scroll Top Button */
.scroll-top-btn {
    position: fixed;
    bottom: 105px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 998;
}

[dir="rtl"] .scroll-top-btn {
    left: 30px;
    right: auto;
}

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

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

/* Responsive Rules (Moved to end for correct cascading) */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .stat-item h3 {
        font-size: 2rem;
    }

    .mobile-only {
        display: block !important;
    }

    .nav-links,
    .cta-button {
        display: none !important;
    }

    .grid-2 {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-item {
        padding: 15px 5px;
    }

    .stat-item h3 {
        font-size: 1.8rem;
        margin-bottom: 5px;
    }

    .stat-item p {
        font-size: 0.85rem;
        white-space: nowrap;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.8rem;
    }
}

/* --- Advanced Premium Effects --- */

/* 1. Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.preloader-content {
    text-align: center;
    position: relative;
}

.preloader-logo {
    width: 120px;
    margin-bottom: 20px;
    filter: brightness(0) invert(1);
    animation: pulseLogo 2s infinite;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--secondary-color);
    margin: 0 auto;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulseLogo {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 0.8;
    }
}

/* 2. Glass Navbar */
.header {
    transition: all 0.4s ease;
}

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

.dark-theme .header.scrolled {
    background: rgba(18, 18, 18, 0.85);
}

/* 3. Typewriter Cursor */
.cursor {
    display: inline-block;
    width: 3px;
    background-color: var(--secondary-color);
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* 4. 3D Tilt Project Cards */
.project-card {
    transition: transform 0.1s ease-out;
    /* Super fast for tilt */
    transform-style: preserve-3d;
    perspective: 1000px;
}

/* 5. Ripple Effect */
.btn {
    position: relative;
    overflow: hidden;
}

span.ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    animation: ripple 0.6s linear;
    background-color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* --- Social Media Icons --- */
.social-links {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.social-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

/* Footer Social Icons */
.footer-social {
    justify-content: center;
}

.footer-social .social-icon {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-social .social-icon:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-5px);
    border-color: var(--primary);
}

/* Contact Section Social Icons */
.contact-social {
    justify-content: flex-start;
    margin-top: 30px;
}

.contact-social .social-icon {
    background: #fff;
    color: var(--secondary);
    border: 1px solid #eee;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.contact-social .social-icon:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-5px);
    border-color: var(--primary);
}

/* --- Partners Slider --- */
/* --- Partners Slider --- */
.partners-slider {
    margin-top: 30px;
    height: 120px;
    margin: auto;
    overflow: hidden;
    position: relative;
    width: 100%;
    /* Gradient Mask for Center Focus */
    mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
}

.partners-slider::before,
.partners-slider::after {
    content: none;
}

.slide-track {
    display: flex;
    /* Force LTR so the track extends to the right, allowing leftward scroll */
    direction: ltr;
    /* 
       Updated Math for 24 slides (3 sets of 8)
       Logo width: 160px
       Total width: 160px * 24 = 3840px
    */
    width: calc(160px * 24);
    animation: scroll 30s linear infinite;
    /* Ensure no background interference */
    background: transparent;
}

.partner-logo {
    height: 100px;
    width: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    /* No background */
    background: transparent;
    /* Prevent shrinking which ruins the calculation */
    flex-shrink: 0;
}

.partner-logo img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.5;
    transition: all 0.5s ease;
    transform: scale(0.9);
}

/* Hover and Active State (Center Highlight) */
.partner-logo:hover img,
.partner-logo.active img {
    filter: grayscale(0);
    opacity: 1;
    transform: scale(1.15);
    /* Pop effect */
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        /* Move by width of 1 set (8 slides) 
           160px * 8 = 1280px
        */
        transform: translateX(calc(-160px * 8));
    }
}