/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800&display=swap');

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a2332;
    --secondary-color: #f39c12;
    --accent-color: #3498db;
    --dark-color: #0f1419;
    --dark-bg: #141b26;
    --card-bg: #1e2837;
    --light-color: #1e2837;
    --text-color: #e4e6eb;
    --text-secondary: #b0b3b8;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.7);
    --gradient: linear-gradient(135deg, #1a2332 0%, #2c3e50 100%);
    --border-color: #2d3748;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
}

body {
    font-family: 'Tajawal', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
    background-color: var(--dark-bg);
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

/* ========== Responsive: تابلت وأجهزة متوسطة ========== */
@media (max-width: 1200px) {
    .container {
        padding: 0 24px;
    }
    .hero-title {
        font-size: 52px;
    }
    .section-title {
        font-size: 38px;
    }
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }
}

@media (max-width: 992px) {
    .container {
        padding: 0 20px;
    }
    section {
        padding: 70px 0;
    }
    .hero {
        height: 100vh;
        min-height: 500px;
        background-attachment: scroll;
    }
    .hero-title {
        font-size: 42px;
        line-height: 1.2;
    }
    .hero-subtitle {
        font-size: 18px;
    }
    .section-header {
        margin-bottom: 50px;
    }
    .section-title {
        font-size: 34px;
    }
    .section-subtitle {
        font-size: 16px;
    }
    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .about-img,
    .about-image .image-placeholder {
        height: 400px;
    }
    .about-text h3 {
        font-size: 28px;
    }
    .about-text > p {
        font-size: 16px;
    }
    .featured-project {
        padding: 70px 0;
    }
    .featured-description {
        font-size: 16px;
    }
    .featured-image-wrapper img {
        height: 450px;
    }
    .project-card {
        min-width: 0;
    }
}

section {
    padding: 100px 0;
    position: relative;
}

section:nth-child(even) {
    background: var(--card-bg);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(26, 35, 50, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--border-color);
}

.navbar.scrolled {
    padding: 10px 0;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.7);
    background: rgba(15, 20, 25, 0.98);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    color: var(--white);
}

.logo i {
    font-size: 32px;
    color: var(--secondary-color);
}

.logo-img {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 16px;
    position: relative;
    transition: color 0.3s ease;
}

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

.nav-link:hover,
.nav-link.active {
    color: var(--white);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--primary-color);
    cursor: pointer;
}

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(135deg, rgba(20, 30, 48, 0.85) 0%, rgba(36, 59, 85, 0.85) 100%),
                url('image/photo_2025-12-05_21-11-32.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    animation: zoomInBg 20s ease-in-out infinite alternate;
}

@keyframes zoomInBg {
    0% {
        background-size: 100%;
    }
    100% {
        background-size: 110%;
    }
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 50px,
            rgba(255,255,255,.03) 50px,
            rgba(255,255,255,.03) 100px
        );
}

.hero-content {
    text-align: center;
    color: var(--white);
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

.hero-title {
    font-size: 64px;
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 2px 2px 20px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 24px;
    margin-bottom: 40px;
    font-weight: 300;
    opacity: 0.95;
}

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

.btn {
    padding: 15px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--secondary-color);
    color: var(--white);
    box-shadow: 0 5px 20px rgba(230, 126, 34, 0.4);
}

.btn-primary:hover {
    background: #d35400;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(230, 126, 34, 0.5);
}

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

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

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--white);
    font-size: 30px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-20px);
    }
    60% {
        transform: translateX(-50%) translateY(-10px);
    }
}

/* Animations */
.animate-fade-in {
    animation: fadeIn 1s ease;
}

.animate-fade-in-delay {
    animation: fadeIn 1s ease 0.3s both;
}

.animate-fade-in-delay-2 {
    animation: fadeIn 1s ease 0.6s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stats Section */
.stats {
    background: var(--card-bg);
    padding: 80px 0;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.5);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}

.stat-item {
    text-align: center;
    padding: 30px;
    border-radius: 15px;
    transition: all 0.8s ease;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    opacity: 0;
    transform: translateX(-150px);
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.stat-item.animate {
    opacity: 1;
    transform: translateX(0);
}

.stat-item:nth-child(1).animate {
    transition-delay: 0.1s;
}

.stat-item:nth-child(2).animate {
    transition-delay: 0.3s;
}

.stat-item:nth-child(3).animate {
    transition-delay: 0.5s;
}

.stat-item:nth-child(4).animate {
    transition-delay: 0.7s;
}

.stat-item:hover {
    box-shadow: 0 20px 40px rgba(243, 156, 18, 0.3);
    background: rgba(243, 156, 18, 0.1);
    border-color: var(--secondary-color);
}

.stat-item i {
    font-size: 48px;
    color: var(--secondary-color);
    margin-bottom: 20px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.stat-number {
    font-size: 48px;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--white) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-item p {
    font-size: 18px;
    color: var(--text-secondary);
}

/* Section Styles */
section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
    padding: 0 20px;
}

.section-header.animate {
    opacity: 1;
    transform: translateY(0);
}

.section-title {
    font-size: 42px;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 4px;
    background: var(--secondary-color);
    border-radius: 2px;
    transition: width 0.8s ease 0.3s;
}

.section-header.animate .section-title::after {
    width: 80px;
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-top: 20px;
}

/* Featured Project Section */
.featured-project {
    background: linear-gradient(135deg, #1a2332 0%, #2c3e50 100%);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(243, 156, 18, 0.4);
}

.featured-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.featured-title {
    font-size: 48px;
    font-weight: 900;
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    line-height: 1.2;
}

.featured-subtitle {
    font-size: 22px;
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 20px;
}

.featured-description {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.featured-highlights {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 35px;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.highlight-item:hover {
    background: rgba(243, 156, 18, 0.1);
    border-color: var(--secondary-color);
    transform: translateY(-5px);
}

.highlight-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    flex-shrink: 0;
}

.highlight-info h4 {
    font-size: 28px;
    font-weight: 800;
    color: white;
    margin-bottom: 5px;
}

.highlight-info p {
    font-size: 14px;
    color: var(--text-secondary);
}

.featured-features {
    background: rgba(255, 255, 255, 0.03);
    padding: 25px;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.featured-features h4 {
    font-size: 18px;
    color: var(--secondary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.featured-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.featured-features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.featured-features li i {
    color: var(--secondary-color);
    margin-top: 5px;
    font-size: 8px;
}

.featured-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-featured-details,
.btn-featured-contact {
    padding: 15px 35px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Tajawal', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.btn-featured-details {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    border: none;
    box-shadow: 0 10px 30px rgba(243, 156, 18, 0.3);
}

.btn-featured-details:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(243, 156, 18, 0.5);
}

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

.btn-featured-contact:hover {
    background: var(--secondary-color);
    color: white;
    transform: translateY(-3px);
}

.featured-image-wrapper {
    position: relative;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 3px solid var(--secondary-color);
}

.featured-image-wrapper img {
    width: 100%;
    height: 600px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.featured-image-wrapper:hover img {
    transform: scale(1.1);
}

.featured-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.8) 100%);
    display: flex;
    align-items: flex-end;
    padding: 30px;
}

.featured-label {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    padding: 15px 30px;
    border-radius: 50px;
    color: white;
    font-weight: 700;
    font-size: 18px;
    box-shadow: 0 10px 30px rgba(243, 156, 18, 0.5);
}

.featured-label i {
    font-size: 22px;
}

.project-card.featured-card {
    grid-column: span 2;
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.1), rgba(230, 126, 34, 0.1));
    border: 2px solid var(--secondary-color);
    position: relative;
    box-shadow: 0 15px 50px rgba(243, 156, 18, 0.3);
}

.featured-ribbon {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 14px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 5px 20px rgba(243, 156, 18, 0.5);
}

.project-tag.featured {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

@media (max-width: 992px) {
    .featured-content {
        grid-template-columns: 1fr;
    }

    .featured-title {
        font-size: 36px;
    }

    .featured-highlights {
        grid-template-columns: 1fr;
    }

    .featured-features ul {
        grid-template-columns: 1fr;
    }

    .project-card.featured-card {
        grid-column: span 1;
    }

    .featured-image-wrapper img {
        height: 400px;
    }
}

/* About Section */
.about {
    background: var(--light-color);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-image {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s ease;
}

.about-image.animate {
    opacity: 1;
    transform: translateX(0);
}

.about-text {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s ease 0.2s;
}

.about-text.animate {
    opacity: 1;
    transform: translateX(0);
}

.about-image .image-placeholder {
    width: 100%;
    height: 500px;
    background: var(--gradient);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
}

.about-image i {
    font-size: 120px;
    color: rgba(255, 255, 255, 0.3);
}

.about-img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.about-img:hover {
    transform: scale(1.02);
}

.about-text h3 {
    font-size: 32px;
    color: var(--white);
    margin-bottom: 20px;
}

.about-text > p {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 30px;
    color: var(--text-secondary);
}

.features {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.feature {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.6s ease;
}

.feature.animate {
    opacity: 1;
    transform: translateX(0);
}

.feature:nth-child(1).animate {
    transition-delay: 0.3s;
}

.feature:nth-child(2).animate {
    transition-delay: 0.5s;
}

.feature:nth-child(3).animate {
    transition-delay: 0.7s;
}

.feature i {
    font-size: 24px;
    color: var(--secondary-color);
    margin-top: 5px;
}

.feature h4 {
    font-size: 20px;
    color: var(--white);
    margin-bottom: 8px;
}

.feature p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Projects Section */
.projects {
    background: var(--dark-bg);
}

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

.project-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--border-color);
    position: relative;
    opacity: 0;
    transform: translateY(50px);
}

.project-card.animate {
    opacity: 1;
    transform: translateY(0);
}

.project-card:nth-child(1).animate {
    transition: all 0.6s ease 0.1s;
}

.project-card:nth-child(2).animate {
    transition: all 0.6s ease 0.2s;
}

.project-card:nth-child(3).animate {
    transition: all 0.6s ease 0.3s;
}

.project-card:nth-child(4).animate {
    transition: all 0.6s ease 0.4s;
}

.project-card:nth-child(5).animate {
    transition: all 0.6s ease 0.5s;
}

.project-card:nth-child(6).animate {
    transition: all 0.6s ease 0.6s;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 1;
}

.project-card:hover::before {
    opacity: 1;
}

.project-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 25px 50px rgba(243, 156, 18, 0.4);
    border-color: var(--secondary-color);
}

.project-image {
    position: relative;
    overflow: hidden;
    height: 250px;
}

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

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

.project-image .image-placeholder {
    width: 100%;
    height: 100%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.project-image i {
    font-size: 80px;
    color: rgba(255, 255, 255, 0.3);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 62, 80, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.btn-view {
    padding: 12px 30px;
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-view:hover {
    background: #d35400;
    transform: scale(1.05);
}

.project-info {
    padding: 25px;
}

.project-tag {
    display: inline-block;
    padding: 5px 15px;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
}

.project-tag.commercial {
    background: #e3f2fd;
    color: #1565c0;
}

.project-info h3 {
    font-size: 24px;
    color: var(--white);
    margin-bottom: 12px;
}

.project-info > p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 15px;
}

.project-details {
    display: flex;
    gap: 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

.project-details span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Services Section */
.services {
    background: var(--light-color);
}

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

.service-card {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    opacity: 0;
    transform: scale(0.8);
}

.service-card.animate {
    opacity: 1;
    transform: scale(1);
}

.service-card:nth-child(1).animate {
    transition: all 0.5s ease 0.1s;
}

.service-card:nth-child(2).animate {
    transition: all 0.5s ease 0.2s;
}

.service-card:nth-child(3).animate {
    transition: all 0.5s ease 0.3s;
}

.service-card:nth-child(4).animate {
    transition: all 0.5s ease 0.4s;
}

.service-card:nth-child(5).animate {
    transition: all 0.5s ease 0.5s;
}

.service-card:nth-child(6).animate {
    transition: all 0.5s ease 0.6s;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-color: var(--secondary-color);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    transform: rotate(360deg);
}

.service-icon i {
    font-size: 36px;
    color: var(--white);
}

.service-card h3 {
    font-size: 22px;
    color: var(--white);
    margin-bottom: 15px;
}

.service-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Contact Section */
.contact {
    background: var(--card-bg);
    padding: 100px 0;
    position: relative;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 35, 50, 0.3) 0%, rgba(44, 62, 80, 0.3) 100%);
    z-index: 0;
}

.contact .container {
    position: relative;
    z-index: 1;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 40px;
}

.contact-left {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.contact-map-container {
    background: var(--dark-bg);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.contact-map-container:hover {
    box-shadow: 0 20px 50px rgba(243, 156, 18, 0.2);
    border-color: var(--secondary-color);
}

.contact-map-container h3 {
    font-size: 26px;
    color: var(--white);
    margin-bottom: 25px;
    text-align: center;
    font-weight: 700;
    position: relative;
    padding-bottom: 15px;
}

.contact-map-container h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--secondary-color);
    border-radius: 2px;
}

.branches-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    justify-content: center;
}

.branches-list .branch-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--white);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.branches-list .branch-chip:hover,
.branches-list .branch-chip.active {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
}

.branches-list .branch-chip i {
    color: var(--secondary-color);
}

.branches-list .branch-chip:hover i,
.branches-list .branch-chip.active i {
    color: white;
}

#map {
    border: 3px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

#map:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 15px 40px rgba(243, 156, 18, 0.3);
}

/* Leaflet Map Customization */
.leaflet-container {
    background: var(--dark-bg);
    font-family: 'Tajawal', sans-serif;
    border-radius: 16px;
}

.leaflet-popup-content-wrapper {
    background: var(--card-bg);
    color: var(--text-color);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 2px solid var(--border-color);
}

.leaflet-popup-content {
    color: var(--text-color);
    font-family: 'Tajawal', sans-serif;
    margin: 15px;
}

.leaflet-popup-tip {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
}

.leaflet-control-zoom a {
    background: var(--card-bg);
    color: var(--text-color);
    border: 2px solid var(--border-color);
    width: 35px;
    height: 35px;
    line-height: 35px;
    font-size: 18px;
    transition: all 0.3s ease;
}

.leaflet-control-zoom a:hover {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
    transform: scale(1.1);
}

.leaflet-control-attribution {
    background: rgba(0, 0, 0, 0.7);
    color: var(--text-secondary);
    font-size: 11px;
    padding: 5px;
    border-radius: 4px;
}

.custom-marker {
    background: transparent !important;
    border: none !important;
}

.contact-info {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s ease;
    background: var(--dark-bg);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.contact-info.animate {
    opacity: 1;
    transform: translateX(0);
}

.contact-info h3 {
    font-size: 28px;
    color: var(--white);
    margin-bottom: 30px;
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.info-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.6s ease;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.info-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--secondary-color);
    transform: translateX(0) translateY(-5px);
}

.info-item.animate {
    opacity: 1;
    transform: translateX(0);
}

.info-item:nth-child(1).animate {
    transition-delay: 0.2s;
}

.info-item:nth-child(2).animate {
    transition-delay: 0.4s;
}

.info-item:nth-child(3).animate {
    transition-delay: 0.6s;
}

.info-item i {
    font-size: 24px;
    color: var(--secondary-color);
    width: 50px;
    height: 50px;
    background: rgba(230, 126, 34, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.info-item:hover i {
    background: rgba(230, 126, 34, 0.2);
    transform: scale(1.1);
}

.info-item h4 {
    font-size: 18px;
    color: var(--white);
    margin-bottom: 8px;
}

.info-item p {
    color: var(--text-secondary);
}

.contact-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    align-items: center;
}
.contact-list a {
    color: var(--text-primary);
    text-decoration: none;
}
.contact-list .no-contact {
    color: var(--text-secondary);
    font-style: italic;
}

.whatsapp-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    text-decoration: none;
    padding: 10px 20px;
    background: linear-gradient(135deg, #25d366, #128c7e);
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
}

.whatsapp-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.5);
}

.whatsapp-link i {
    font-size: 20px;
}

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

.social-links a {
    width: 45px;
    height: 45px;
    background: var(--gradient);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.social-links a.whatsapp {
    background: linear-gradient(135deg, #25d366, #128c7e);
}

.social-links a.whatsapp:hover {
    background: linear-gradient(135deg, #128c7e, #075e54);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.5);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
    background: var(--dark-bg);
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.contact-form.animate {
    opacity: 1;
    transform: translateY(0);
}

.contact-form h3 {
    font-size: 24px;
    color: var(--white);
    margin-bottom: 20px;
}

.form-group {
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 16px;
    font-family: 'Tajawal', sans-serif;
    transition: all 0.3s ease;
    background: var(--dark-bg);
    color: var(--text-color);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 4px rgba(243, 156, 18, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.footer-section p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 15px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--white);
}

.newsletter-form {
    display: flex;
    gap: 10px;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    font-family: 'Tajawal', sans-serif;
    background: var(--dark-bg);
    color: var(--text-color);
}

.newsletter-form button {
    width: 50px;
    height: 50px;
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.newsletter-form button:hover {
    background: #d35400;
    transform: scale(1.1);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

/* ========== Responsive: هاتف وعرض صغير ========== */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        color: var(--white);
        font-size: 22px;
    }

    .nav-content {
        padding: 12px 0;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        flex-direction: column;
        background: var(--card-bg);
        width: 85%;
        max-width: 320px;
        height: 100vh;
        padding: 80px 24px 30px;
        box-shadow: -5px 0 25px rgba(0, 0, 0, 0.6);
        transition: right 0.3s ease;
        gap: 8px;
        border-left: 1px solid var(--border-color);
        z-index: 999;
        overflow-y: auto;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-link {
        padding: 14px 16px;
        font-size: 17px;
        border-radius: 12px;
    }

    .nav-link:hover {
        background: rgba(255, 255, 255, 0.05);
    }

    .container {
        padding: 0 16px;
    }

    section {
        padding: 50px 0;
    }

    .section-header {
        margin-bottom: 40px;
    }

    .section-title {
        font-size: 28px;
    }

    .section-subtitle {
        font-size: 15px;
    }

    .hero {
        min-height: 100vh;
        min-height: 100dvh;
    }

    .hero-content {
        padding: 0 16px;
    }

    .hero-title {
        font-size: 28px;
        line-height: 1.25;
    }

    .hero-subtitle {
        font-size: 16px;
        margin-top: 16px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin-top: 24px;
    }

    .hero-buttons .btn {
        padding: 14px 24px;
        font-size: 16px;
        text-align: center;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .stat-item {
        padding: 24px 16px;
    }

    .stat-number {
        font-size: 32px;
    }

    .stat-item p {
        font-size: 14px;
    }

    .featured-project .container {
        padding: 0 16px;
    }

    .featured-badge {
        padding: 10px 20px;
        font-size: 14px;
    }

    .featured-title {
        font-size: 26px;
    }

    .featured-subtitle {
        font-size: 16px;
    }

    .featured-description {
        font-size: 15px;
    }

    .featured-highlights {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .highlight-item {
        padding: 14px;
    }

    .highlight-icon {
        width: 48px;
        height: 48px;
        font-size: 22px;
    }

    .highlight-info h4 {
        font-size: 22px;
    }

    .featured-actions {
        flex-direction: column;
    }

    .btn-featured-details,
    .btn-featured-contact {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
    }

    .featured-image-wrapper img {
        height: 280px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .project-card {
        overflow: hidden;
    }

    .project-card .project-image img {
        height: 220px;
        object-fit: cover;
    }

    .project-info {
        padding: 20px;
    }

    .project-info h3 {
        font-size: 18px;
    }

    .project-info p {
        font-size: 14px;
    }

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

    .service-card {
        padding: 28px 20px;
    }

    .service-card h3 {
        font-size: 20px;
    }

    .service-card p {
        font-size: 14px;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .about-img,
    .about-image .image-placeholder {
        height: 300px;
    }

    .contact-content {
        gap: 24px;
    }

    .contact-map-container {
        order: -1;
    }

    #map {
        height: 320px;
        border-radius: 12px;
    }

    .contact-left {
        gap: 24px;
    }

    .contact-info,
    .contact-form {
        padding: 20px;
    }

    .contact-form .btn {
        padding: 14px 24px;
        width: 100%;
    }

    .contact-list {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .footer-section {
        padding: 0;
    }

    .footer-bottom {
        padding-top: 24px;
        font-size: 14px;
    }

    .branches-list {
        gap: 8px;
        justify-content: flex-start;
    }

    .branches-list .branch-chip {
        padding: 10px 14px;
        font-size: 13px;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-form input {
        width: 100%;
    }

    .newsletter-form button {
        width: 100%;
        border-radius: 12px;
        padding: 12px;
    }
}

/* ========== Responsive: هاتف صغير ========== */
@media (max-width: 480px) {
    .container {
        padding: 0 14px;
    }

    section {
        padding: 40px 0;
    }

    .hero-title {
        font-size: 22px;
        line-height: 1.3;
    }

    .hero-subtitle {
        font-size: 14px;
    }

    .nav-content {
        padding: 10px 0;
    }

    .logo {
        font-size: 18px;
        gap: 8px;
    }

    .logo-img {
        height: 40px;
    }

    .section-title {
        font-size: 24px;
    }

    .section-subtitle {
        font-size: 14px;
    }

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

    .stat-item {
        padding: 20px 16px;
    }

    .stat-number {
        font-size: 28px;
    }

    .stat-item p {
        font-size: 13px;
    }

    .featured-title {
        font-size: 22px;
    }

    .featured-description {
        font-size: 14px;
    }

    .featured-image-wrapper img {
        height: 240px;
    }

    .project-card .project-image img {
        height: 200px;
    }

    .project-info h3 {
        font-size: 16px;
    }

    .service-card {
        padding: 22px 18px;
    }

    .service-card h3 {
        font-size: 18px;
    }

    .about-img,
    .about-image .image-placeholder {
        height: 260px;
    }

    #map {
        height: 280px;
    }

    .whatsapp-float {
        width: 52px;
        height: 52px;
        font-size: 26px;
        bottom: 16px;
        left: 16px;
    }
}

/* ========== Responsive: شاشات صغيرة جداً ========== */
@media (max-width: 360px) {
    .hero-title {
        font-size: 20px;
    }

    .nav-links {
        width: 92%;
    }

    .section-title {
        font-size: 22px;
    }

    .stat-number {
        font-size: 24px;
    }
}

/* ========== دعم الهواتف ذات النتوء (Notch) ========== */
@supports (padding: max(0px)) {
    .navbar {
        padding-right: max(0px, env(safe-area-inset-right));
        padding-left: max(0px, env(safe-area-inset-left));
    }

    .whatsapp-float {
        left: max(16px, env(safe-area-inset-left));
        bottom: max(20px, env(safe-area-inset-bottom));
    }

    @media (max-width: 768px) {
        .whatsapp-float {
            left: max(18px, env(safe-area-inset-left));
            bottom: max(18px, env(safe-area-inset-bottom));
        }
    }

    @media (max-width: 480px) {
        .whatsapp-float {
            left: max(16px, env(safe-area-inset-left));
            bottom: max(16px, env(safe-area-inset-bottom));
        }
    }
}

/* ========== ارتفاع شاشة صغير (وضع أفقي للهاتف) ========== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 80px 0 60px;
    }

    .hero-content {
        padding: 20px 0;
    }

    .scroll-indicator {
        display: none;
    }
}

/* Project Modal Styles */
.project-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-modal.active {
    display: flex;
    opacity: 1;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.modal-content {
    position: relative;
    background: var(--card-bg);
    border-radius: 20px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 10001;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.4s ease;
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.9) translateY(50px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: var(--dark-bg);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 10px;
}

.modal-close {
    position: absolute;
    top: 20px;
    inset-inline-start: 20px;
    width: 45px;
    height: 45px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    color: var(--white);
    font-size: 20px;
    cursor: pointer;
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--danger);
    border-color: var(--danger);
    transform: rotate(90deg);
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.modal-image {
    position: relative;
    height: 100%;
    min-height: 400px;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px 0 0 20px;
}

.modal-thumbnails {
    display: none;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    padding: 4px 0 0;
    align-items: center;
}

.modal-thumb {
    padding: 0;
    border: 2px solid transparent;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.25);
    width: 72px;
    height: 72px;
    flex-shrink: 0;
}

.modal-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.modal-thumb.active {
    border-color: var(--secondary-color, #e67e22);
    box-shadow: 0 0 0 1px var(--secondary-color, #e67e22);
}

.modal-info {
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.modal-tag {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(135deg, var(--secondary-color), #e67e22);
    color: var(--white);
    font-size: 13px;
    font-weight: 600;
    border-radius: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
    align-self: flex-start;
}

.modal-tag.commercial {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.modal-info h2 {
    font-size: 28px;
    font-weight: 800;
    color: var(--white);
    line-height: 1.3;
    margin: 0;
}

.modal-info > p {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.modal-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 25px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.detail-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.detail-item i {
    font-size: 24px;
    color: var(--secondary-color);
    margin-top: 5px;
}

.detail-item h4 {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 5px;
    font-weight: 600;
}

.detail-item p {
    font-size: 16px;
    color: var(--white);
    font-weight: 600;
}

.modal-features h3 {
    font-size: 20px;
    color: var(--white);
    margin-bottom: 15px;
    font-weight: 700;
}

.modal-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: var(--text-secondary);
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.modal-features li:hover {
    background: rgba(243, 156, 18, 0.1);
    border-color: var(--secondary-color);
    transform: translateX(-5px);
}

.modal-features li i {
    color: var(--secondary-color);
    font-size: 16px;
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 5px 20px rgba(37, 211, 102, 0.5);
    z-index: 9999;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.7);
}

.whatsapp-float i {
    animation: shake 1s infinite;
}

@keyframes shake {
    0%, 100% { transform: rotate(0deg); }
    10%, 30%, 50%, 70%, 90% { transform: rotate(-10deg); }
    20%, 40%, 60%, 80% { transform: rotate(10deg); }
}

@media (max-width: 768px) {
    .whatsapp-float {
        width: 52px;
        height: 52px;
        font-size: 26px;
        bottom: 18px;
        left: 18px;
    }
}

/* ========== Modal: responsive (موبايل — تخطيط أوضح وأجمل) ========== */
@media (max-width: 768px) {
    .project-modal.active {
        align-items: flex-end;
        justify-content: center;
        padding: 0;
    }

    .modal-content {
        width: 100%;
        max-width: none;
        max-height: min(92vh, 920px);
        max-height: min(92dvh, 920px);
        margin: 0;
        border-radius: 22px 22px 0 0;
        animation: modalSheetIn 0.38s cubic-bezier(0.22, 1, 0.36, 1) forwards;
        display: flex;
        flex-direction: column;
        padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
        box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45);
    }

    .modal-content::before {
        content: '';
        display: block;
        width: 36px;
        height: 4px;
        margin: 10px auto 6px;
        background: rgba(255, 255, 255, 0.22);
        border-radius: 100px;
        flex-shrink: 0;
    }

    .modal-body {
        grid-template-columns: 1fr;
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .modal-image {
        position: relative;
        min-height: unset;
        aspect-ratio: 5 / 3;
        max-height: 42vh;
    }

    .modal-image::after {
        content: '';
        position: absolute;
        inset: 0;
        top: 55%;
        background: linear-gradient(to top, rgba(15, 23, 42, 0.85), transparent);
        pointer-events: none;
        border-radius: 0;
    }

    .modal-image img {
        border-radius: 0;
        min-height: 100%;
    }

    .modal-thumbnails {
        position: relative;
        z-index: 1;
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 10px;
        margin-top: -48px;
        margin-bottom: 8px;
        padding: 8px 16px 12px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: var(--secondary-color) transparent;
        mask-image: linear-gradient(to left, transparent 0%, #000 24px, #000 calc(100% - 24px), transparent 100%);
        -webkit-mask-image: linear-gradient(to left, transparent 0%, #000 24px, #000 calc(100% - 24px), transparent 100%);
    }

    .modal-thumbnails::-webkit-scrollbar {
        height: 4px;
    }

    .modal-thumbnails::-webkit-scrollbar-thumb {
        background: var(--secondary-color);
        border-radius: 4px;
    }

    .modal-thumb {
        width: 56px;
        height: 56px;
        border-radius: 12px;
        scroll-snap-align: start;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    }

    .modal-thumb img {
        border-radius: 10px;
    }

    .modal-has-gallery .modal-image::after {
        top: 40%;
    }

    .modal-info {
        padding: 8px 20px 20px;
        gap: 18px;
    }

    .modal-tag {
        padding: 6px 14px;
        font-size: 11px;
        letter-spacing: 0.5px;
    }

    .modal-info h2 {
        font-size: 1.35rem;
        font-weight: 800;
        line-height: 1.35;
    }

    .modal-info > p {
        font-size: 15px;
        line-height: 1.75;
        color: var(--text-secondary);
    }

    .modal-details {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        padding: 18px 0;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .detail-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 14px 12px;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 14px;
    }

    .detail-item i {
        font-size: 20px;
        margin-top: 0;
        opacity: 0.95;
    }

    .detail-item h4 {
        font-size: 11px;
        text-transform: none;
        letter-spacing: 0;
        opacity: 0.85;
        margin-bottom: 2px;
    }

    .detail-item p {
        font-size: 14px;
        line-height: 1.4;
        word-break: break-word;
    }

    .modal-features h3 {
        font-size: 17px;
        margin-bottom: 10px;
    }

    .modal-features li {
        padding: 14px 14px;
        font-size: 14px;
        border-radius: 12px;
    }

    .modal-features li:hover {
        transform: none;
    }

    .modal-close {
        top: max(14px, env(safe-area-inset-top, 14px));
        left: max(14px, env(safe-area-inset-left, 14px));
        width: 46px;
        height: 46px;
        font-size: 18px;
        background: rgba(0, 0, 0, 0.55);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border: 1px solid rgba(255, 255, 255, 0.15);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    }

    .modal-overlay {
        background: rgba(0, 0, 0, 0.65);
    }
}

@keyframes modalSheetIn {
    from {
        transform: translateY(100%);
        opacity: 0.96;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 480px) {
    .modal-content {
        max-height: min(94vh, 900px);
        max-height: min(94dvh, 900px);
        border-radius: 20px 20px 0 0;
    }

    .modal-image {
        aspect-ratio: 4 / 3;
        max-height: 38vh;
    }

    .modal-details {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .detail-item {
        flex-direction: row;
        align-items: center;
        gap: 12px;
        padding: 12px 14px;
    }

    .detail-item i {
        font-size: 22px;
    }

    .modal-info {
        padding: 6px 16px 18px;
    }

    .modal-info h2 {
        font-size: 1.2rem;
    }

    .modal-thumb {
        width: 52px;
        height: 52px;
    }
}
