/* ======================
   CSS Variables & Reset
   ====================== */
:root {
    --primary-color: #32793c;
    --secondary-color: #324340;
    --primary-light: #4a9d56;
    --primary-lighter: #5ab26a;
    --dark-text: #333333;
    --light-text: #ffffff;
    --light-bg: #f8f9fa;
    --gray-text: #666666;
    --gradient-primary: linear-gradient(135deg, #32793c, #324340);
    --gradient-overlay: linear-gradient(135deg, rgba(50, 121, 60, 0.85), rgba(50, 67, 64, 0.85));
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
    --border-radius: 8px;
    --font-ar: 'Cairo', sans-serif;
    --font-en: 'Poppins', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    width: 100%;
    overflow-x: hidden;
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
}

body {
    font-family: var(--font-ar);
    line-height: 1.7;
    color: var(--dark-text);
    background: var(--light-text);
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

@supports (overflow: clip) {
    html,
    body {
        overflow-x: clip;
    }
}

body[dir="ltr"] {
    font-family: var(--font-en);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
}

@media (max-width: 768px) {
    section {
        padding: 55px 0;
    }
}

@media (max-width: 480px) {
    section {
        padding: 45px 0;
    }
}

/* ======================
   Typography
   ====================== */
h1 {
    font-size: 2.2rem;
    font-weight: 900;
    line-height: 1.2;
}

h2 {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.3;
}

h3 {
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.3;
}

p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--gray-text);
}

@media (max-width: 768px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.6rem; }
    h3 { font-size: 1.05rem; }
}

@media (max-width: 480px) {
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.35rem; }
}

/* ======================
   Buttons
   ====================== */
.btn {
    display: inline-block;
    padding: 8px 45px;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--light-text);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: var(--primary-light);
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: transparent;
    color: var(--light-text);
    border-color: var(--light-text);
}

.btn-secondary:hover {
    background: var(--light-text);
    color: var(--primary-color);
}

.btn-white {
    background: var(--light-text);
    color: var(--primary-color);
    border-color: var(--light-text);
}

.btn-white:hover {
    background: transparent;
    color: var(--light-text);
    border-color: var(--light-text);
}

/* ======================
   Section Headers
   ====================== */
.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.title-underline {
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    margin: 0 auto 20px;
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--gray-text);
    max-width: 600px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .section-header {
        margin-bottom: 35px;
    }

    .section-subtitle {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .section-header {
        margin-bottom: 28px;
    }
}

/* ======================
   Header / Navigation
   ====================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
}

.logo img {
    height: 50px;
    width: auto;
}

@media (max-width: 480px) {
    .navbar {
        padding: 12px 0;
    }

    .logo img {
        height: 40px;
    }
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 35px;
}

.nav-link {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--dark-text);
    position: relative;
    padding: 8px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.lang-switch {
    padding: 8px 12px;
    background: var(--primary-color);
    color: var(--light-text);
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lang-switch:hover {
    background: var(--primary-light);
}

.translate-icon {
    width: 25px;
    height: 25px;
    filter: brightness(0) invert(1);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    width: 38px;
    height: 38px;
    position: relative;
}

.menu-toggle span {
    display: block;
    width: 28px;
    height: 3px;
    background: var(--dark-text);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center center;
    position: absolute;
}

.menu-toggle span:nth-child(1) { top: 10px; }
.menu-toggle span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.menu-toggle span:nth-child(3) { bottom: 10px; }

@media (max-width: 768px) {
    .container,
    section,
    .hero,
    .why-us,
    .services,
    .featured-projects,
    .contact,
    [data-aos] {
        max-width: 100%;
        overflow-x: clip;
    }

    .nav-menu {
        position: fixed;
        top: 64px;
        right: -100%;
        width: 100%;
        max-width: 300px;
        height: calc(100vh - 80px);
        background: var(--light-text);
        flex-direction: column;
        align-items: flex-start;
        padding: 30px;
        transition: var(--transition);
    }

    .nav-menu.active {
        right: 0;
    }

    body[dir="rtl"] .nav-menu {
        right: auto;
        left: -100%;
    }

    body[dir="rtl"] .nav-menu.active {
        left: 0;
    }

    .menu-toggle {
        display: flex;
    }

    .menu-toggle.active span:nth-child(1) {
        top: 50%;
        transform: translateY(-50%) rotate(45deg);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
        transform: translateY(-50%) scaleX(0);
    }

    .menu-toggle.active span:nth-child(3) {
        bottom: auto;
        top: 50%;
        transform: translateY(-50%) rotate(-45deg);
    }

    .translate-icon {
        width: 18px;
        height: 18px;
    }
}

/* ======================
   Hero Section
   ====================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: var(--gradient-primary);
    background-image: url('https://images.unsplash.com/photo-1541888946425-d81bb19240f5?q=80&w=2070');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--light-text);
    padding-top: 80px;
}

@supports (-webkit-touch-callout: none) {
    /* iOS Safari — fixed attachment causes blank screens */
    .hero {
        background-attachment: scroll;
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-overlay);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
}

.hero-text {
    text-align: right;
}

body[dir="ltr"] .hero-text {
    text-align: left;
}

body[dir="ltr"] .hero-text h1,
body[dir="ltr"] .hero-text .hero-subtitle,
body[dir="ltr"] .hero-text .hero-description,
body[dir="ltr"] .hero-text p {
    text-align: left;
}

.hero-title {
    margin-bottom: 35px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 35px;
    color: var(--light-text);
    opacity: 0.95;
}

.hero-description {
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 30px;
    color: var(--light-text);
    opacity: 0.9;
    max-width: 650px;
}

.hero-vision {
    margin: 25px 0;
}

.vision-logo {
    height: 60px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 35px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.hero-stats {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hero-stat-card {
    padding: 30px 0px;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
}

.hero-stat-card.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}

.hero-stat-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.15);
}

.hero-stat-icon {
    font-size: 2rem;
    color: var(--light-text);
    margin-bottom: 15px;
}

.hero-stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--light-text);
    margin-bottom: 8px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
}

.hero-stat-label {
    font-size: 1rem;
    color: var(--light-text);
    font-weight: 600;
    opacity: 0.95;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    font-size: 2rem;
    color: var(--light-text);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: 100svh;
        align-items: flex-start;
        padding: 110px 0 88px;
        background-attachment: scroll;
    }

    .hero-content {
        padding-top: 18px;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .hero-text {
        text-align: center;
    }

    body[dir="ltr"] .hero-text {
        text-align: left;
    }

    body[dir="ltr"] .hero-text h1,
    body[dir="ltr"] .hero-text .hero-subtitle,
    body[dir="ltr"] .hero-text .hero-description,
    body[dir="ltr"] .hero-text p {
        text-align: left;
    }

    .hero-title {
        font-size: 1.7rem;
        margin-bottom: 20px;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 18px;
    }

    .hero-description {
        font-size: 0.92rem;
        max-width: 100%;
        margin-bottom: 22px;
    }

    .vision-logo {
        height: 45px;
        margin: 0 auto;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    body[dir="ltr"] .hero-buttons {
        align-items: flex-start;
    }

    .btn {
        width: 100%;
        max-width: 280px;
    }

    .hero-stats {
        flex-direction: row;
        justify-content: center;
        gap: 15px;
        margin-top: 6px;
    }

    .hero-stat-card {
        flex: 1;
        min-width: 120px;
        padding: 20px 10px;
    }

    .hero-stat-number {
        font-size: 1.6rem;
    }

    .hero-stat-label {
        font-size: 0.8rem;
    }

    .scroll-indicator {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero {
        min-height: 100svh;
        padding: 104px 0 72px;
    }

    .hero-content {
        padding-top: 10px;
    }

    .hero-title {
        font-size: 1.4rem;
        line-height: 1.45;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .hero-description {
        font-size: 0.9rem;
        line-height: 1.75;
    }

    .hero-stats {
        flex-direction: column;
    }

    .hero-stat-card {
        min-width: 0;
        width: 100%;
    }

    .hero-stat-number {
        font-size: 1.4rem;
    }

    .hero-stat-icon {
        font-size: 1.4rem;
        margin-bottom: 8px;
    }
}

/* ======================
   About Section
   ====================== */
.about {
    background: var(--light-text);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}

.about-text {
    display: flex;
    flex-direction: column;
}

.about-img {
    width: 100%;
    margin-bottom: 25px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.about-img img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition);
}

.about-img img:hover {
    transform: scale(1.05);
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--gray-text);
    text-align: right;
}

body[dir="ltr"] .about-text p {
    text-align: left;
}

.about-cards {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.vision-mission-card {
    background: var(--light-bg);
    padding: 35px 30px;
    border-radius: var(--border-radius);
    transition: var(--transition);
    border-left: 4px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
}

body[dir="ltr"] .vision-mission-card {
    border-left: none;
    border-right: 4px solid var(--primary-color);
}

.vision-mission-card:hover {
    transform: translateX(-8px);
    box-shadow: var(--shadow-lg);
    background: var(--light-text);
}

body[dir="ltr"] .vision-mission-card:hover {
    transform: translateX(8px);
}

.vm-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 1.8rem;
    color: var(--light-text);
    box-shadow: 0 4px 15px rgba(50, 121, 60, 0.3);
}

.vm-title {
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-weight: 700;
}

.vm-text {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--gray-text);
    text-align: right;
}

body[dir="ltr"] .vm-text {
    text-align: left;
}

@media (max-width: 768px) {
    .about {
        padding: 60px 0;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-img {
        margin-bottom: 20px;
    }

    .about-cards {
        gap: 20px;
    }

    .vision-mission-card {
        padding: 25px 20px;
    }

    .vision-mission-card:hover {
        transform: translateY(-5px);
    }

    body[dir="ltr"] .vision-mission-card:hover {
        transform: translateY(-5px);
    }

    .vm-icon {
        width: 60px;
        height: 60px;
        font-size: 1.4rem;
    }

    .vm-title {
        font-size: 1.05rem;
    }

    .vm-text {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .vision-mission-card {
        padding: 20px 15px;
    }

    .vm-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .about-text p {
        font-size: 0.95rem;
    }
}

/* ======================
   Services Section
   ====================== */
.services {
    background: var(--light-text);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 35px;
}

.service-card {
    background: var(--light-bg);
    padding: 35px;
    border-radius: var(--border-radius);
    border-color: var(--primary-color);
    transition: var(--transition);
    border: 2px solid;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    background: var(--light-text);
}

.service-card:hover .service-image img {
    transform: scale(1.1);
}

.service-image {
    width: 100%;
    height: 220px;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.service-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(50, 121, 60, 0.1) 100%);
    transition: var(--transition);
}

.service-card:hover .service-image::after {
    background: linear-gradient(to bottom, transparent 0%, rgba(50, 121, 60, 0.2) 100%);
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.service-title {
    font-size: 1.3rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.service-desc {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.service-features {
    list-style: none;
    padding: 0;
}

.service-features li {
    padding: 8px 0;
    color: var(--dark-text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.service-features i {
    color: var(--primary-color);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .services {
        padding: 60px 0;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .service-card {
        padding: 25px 20px;
    }

    .service-image {
        height: 180px;
    }

    .service-title {
        font-size: 1.1rem;
    }

    .service-desc {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .service-card {
        padding: 20px 15px;
    }

    .service-image {
        height: 160px;
    }

    .service-features li {
        font-size: 0.9rem;
    }
}

/* ======================
   Why Choose Us Section
   ====================== */
.why-us {
    background: var(--light-bg);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.feature-card {
    background: var(--light-text);
    padding: 30px 20px;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--light-text);
    margin: 0 auto 20px;
}

.feature-title {
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin-bottom: 12px;
}

.feature-text {
    font-size: 0.95rem;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .why-us {
        padding: 60px 0;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .feature-card {
        padding: 20px 15px;
    }

    .feature-icon {
        width: 55px;
        height: 55px;
        font-size: 1.3rem;
    }

    .feature-title {
        font-size: 0.95rem;
    }

    .feature-text {
        font-size: 0.85rem;
    }
}

@media (max-width: 400px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* ======================
   CTA Section
   ====================== */
.cta {
    background: var(--gradient-primary);
    color: var(--light-text);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><rect width="100" height="100" fill="none"/><circle cx="50" cy="50" r="40" fill="rgba(255,255,255,0.03)"/></svg>');
    opacity: 0.3;
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-title {
    color: var(--light-text);
    margin-bottom: 20px;
    font-size: 2rem;
}

.cta-text {
    font-size: 1.1rem;
    color: var(--light-text);
    margin-bottom: 35px;
    opacity: 0.95;
}

@media (max-width: 768px) {
    .cta {
        padding: 60px 0;
    }

    .cta-title {
        font-size: 1.6rem;
    }

    .cta-text {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .cta-title {
        font-size: 1.3rem;
    }

    .cta-text {
        font-size: 0.95rem;
    }
}

/* ======================
   Contact Section
   ====================== */
.contact {
    background: var(--light-text);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--light-text);
    flex-shrink: 0;
}

.contact-details h3 {
    font-size: 1.15rem;
    color: var(--secondary-color);
    margin-bottom: 8px;
}

.contact-details p,
.contact-details a {
    font-size: 1rem;
    color: var(--gray-text);
    line-height: 1.6;
}

.contact-details a:hover {
    color: var(--primary-color);
}

.contact-form-wrapper {
    background: var(--light-bg);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.form-group {
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    background: var(--light-text);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(50, 121, 60, 0.1);
}

/* Force tel inputs to respect RTL direction so placeholder aligns right in Arabic */
[dir="rtl"] input[type="tel"] {
    direction: rtl;
    text-align: right;
}

[dir="ltr"] input[type="tel"] {
    direction: ltr;
    text-align: left;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.contact-form .btn {
    width: 100%;
    margin-top: 10px;
}

@media (max-width: 768px) {
    .contact {
        padding: 60px 0;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contact-form-wrapper {
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .contact-icon {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }

    .contact-details h3 {
        font-size: 1rem;
    }

    .contact-details p,
    .contact-details a {
        font-size: 0.9rem;
    }

    .contact-form-wrapper {
        padding: 25px 15px;
    }

    .form-control {
        padding: 12px 14px;
        font-size: 0.95rem;
    }
}

/* ======================
   Footer
   ====================== */
.footer {
    background: var(--secondary-color);
    color: var(--light-text);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col {
    display: flex;
    flex-direction: column;
}

.footer-logo img {
    height: 50px;
    width: auto;
    margin-bottom: 20px;
    filter: brightness(0) invert(1);
}

.footer-desc {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--light-text);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-right: 5px;
}

body[dir="ltr"] .footer-links a:hover {
    padding-right: 0;
    padding-left: 5px;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

.footer-contact i {
    color: var(--primary-color);
    margin-top: 3px;
}

.footer-contact a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.footer-contact a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 25px;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .footer {
        padding: 50px 0 20px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .footer-col {
        text-align: center;
    }

    body[dir="ltr"] .footer-col {
        text-align: left;
    }

    .footer-logo img {
        margin: 0 auto 20px;
    }

    body[dir="ltr"] .footer-logo img {
        margin: 0 0 20px 0;
    }

    .social-links {
        justify-content: center;
    }

    body[dir="ltr"] .social-links {
        justify-content: flex-start;
    }

    .footer-contact li {
        justify-content: center;
    }

    body[dir="ltr"] .footer-contact li {
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .footer {
        padding: 40px 0 15px;
    }

    .footer-title {
        font-size: 1.1rem;
    }

    .footer-desc,
    .footer-links a,
    .footer-contact li {
        font-size: 0.88rem;
    }

    .footer-bottom p {
        font-size: 0.8rem;
    }
}

/* ======================
   Scroll to Top Button
   ====================== */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--light-text);
    border: none;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    z-index: 999;
}

.scroll-top.show {
    display: flex;
}

.scroll-top:hover {
    background: var(--primary-light);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

body[dir="rtl"] .scroll-top {
    right: auto;
    left: 30px;
}

@media (max-width: 768px) {
    .scroll-top {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
        bottom: 20px;
        right: 20px;
    }

    body[dir="rtl"] .scroll-top {
        right: auto;
        left: 20px;
    }
}

/* ======================
   Animations & Utilities
   ====================== */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading Spinner */
.spinner {
    border: 3px solid rgba(50, 121, 60, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ======================
   Clients Carousel Section
   ====================== */
.clients {
    background: var(--light-bg);
    overflow: hidden;
}

.clients-swiper {
    padding: 20px 10px 60px;
    position: relative;
}

/* Client Card */
.client-card {
    background: var(--light-text);
    border-radius: var(--border-radius);
    padding: 30px 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 2px solid transparent;
    height: 140px;
}

.client-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-6px);
}

.client-img-wrap {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.client-img-wrap img {
    max-width: 100%;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(60%);
    opacity: 0.75;
    transition: var(--transition);
}

.client-card:hover .client-img-wrap img {
    filter: grayscale(0%);
    opacity: 1;
}

/* Swiper Navigation Arrows */
.clients-swiper .swiper-button-prev,
.clients-swiper .swiper-button-next {
    width: 44px;
    height: 44px;
    background: var(--light-text);
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    color: var(--primary-color);
    transition: var(--transition);
    top: 45%;
}

.clients-swiper .swiper-button-prev::after,
.clients-swiper .swiper-button-next::after {
    font-size: 1rem;
    font-weight: 900;
}

.clients-swiper .swiper-button-prev:hover,
.clients-swiper .swiper-button-next:hover {
    background: var(--primary-color);
    color: var(--light-text);
}

/* RTL arrow swap */
[dir="rtl"] .clients-swiper .swiper-button-prev {
    right: 0;
    left: auto;
}

[dir="rtl"] .clients-swiper .swiper-button-next {
    left: 0;
    right: auto;
}

/* Swiper Pagination Dots */
.clients-swiper .swiper-pagination {
    bottom: 10px;
}

.clients-swiper .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    opacity: 0.3;
    transition: var(--transition);
}

.clients-swiper .swiper-pagination-bullet-active {
    opacity: 1;
    width: 28px;
    border-radius: 5px;
}

@media (max-width: 768px) {
    .clients {
        padding: 60px 0;
    }

    .client-card {
        height: 110px;
        padding: 20px 15px;
    }

    .client-img-wrap img {
        max-height: 60px;
    }

    .clients-swiper .swiper-button-prev,
    .clients-swiper .swiper-button-next {
        width: 36px;
        height: 36px;
    }

    .clients-swiper .swiper-button-prev::after,
    .clients-swiper .swiper-button-next::after {
        font-size: 0.8rem;
    }
}

/* ======================
   Page Hero (Inner Pages)
   ====================== */
.page-hero {
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: var(--gradient-primary);
    background-image: url('https://images.unsplash.com/photo-1541888946425-d81bb19240f5?q=80&w=2070');
    background-size: cover;
    background-position: center;
    color: var(--light-text);
    padding-top: 80px;
    text-align: center;
}

.page-hero-overlay {
    position: absolute;
    inset: 0;
    background: var(--gradient-overlay);
    z-index: 1;
}

.page-hero-content {
    position: relative;
    z-index: 2;
}

.page-hero-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--light-text);
    margin-bottom: 15px;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.3);
}

.page-hero-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: rgba(255,255,255,0.85);
    font-size: 0.95rem;
}

.page-hero-breadcrumb a {
    color: rgba(255,255,255,0.85);
}

.page-hero-breadcrumb a:hover {
    color: var(--light-text);
}

.page-hero-breadcrumb i {
    font-size: 0.7rem;
}

@media (max-width: 768px) {
    .page-hero {
        min-height: 260px;
    }
    .page-hero-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .page-hero-title {
        font-size: 1.5rem;
    }
}

/* ======================
   About Page — Objectives
   ====================== */
.objectives {
    background: var(--light-bg);
}

.objectives-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.objective-card {
    background: var(--light-text);
    padding: 30px 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border-top: 4px solid var(--primary-color);
}

.objective-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.objective-icon {
    width: 55px;
    height: 55px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--light-text);
    margin-bottom: 18px;
}

.objective-title {
    font-size: 1rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
    font-weight: 700;
}

.objective-text {
    font-size: 0.92rem;
    line-height: 1.7;
    color: var(--gray-text);
}

@media (max-width: 992px) {
    .objectives-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .objectives-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
}

/* ======================
   Services Page — Detail
   ====================== */
.services-detail .services-grid {
    grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 768px) {
    .services-detail .services-grid {
        grid-template-columns: 1fr;
    }
}

.service-detail-list {
    list-style: none;
    padding: 0;
    margin-top: 15px;
}

.service-detail-list li {
    padding: 7px 0;
    color: var(--dark-text);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.95rem;
    border-bottom: 1px solid #f0f0f0;
}

.service-detail-list li:last-child {
    border-bottom: none;
}

.service-detail-list i {
    color: var(--primary-color);
    margin-top: 4px;
    flex-shrink: 0;
}

/* ======================
   Projects Page
   ====================== */
.projects-section {
    background: var(--light-text);
}

.projects-filter {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 45px;
}

.filter-btn {
    padding: 9px 24px;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: var(--light-text);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.project-card {
    background: var(--light-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 2px solid transparent;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.project-card[data-category] {
    display: block;
}

.project-card.hidden {
    display: none;
}

.project-body {
    padding: 22px 20px;
}

.project-tag {
    display: inline-block;
    padding: 4px 14px;
    background: rgba(50, 121, 60, 0.12);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.project-title {
    font-size: 1.05rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
    font-weight: 700;
    line-height: 1.4;
}

.project-desc {
    font-size: 0.9rem;
    line-height: 1.65;
    color: var(--gray-text);
    margin-bottom: 12px;
}

.project-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--gray-text);
}

.project-meta i {
    color: var(--primary-color);
}

@media (max-width: 992px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
    .projects-filter {
        gap: 8px;
    }
    .filter-btn {
        padding: 7px 18px;
        font-size: 0.88rem;
    }
}

/* ======================
   Contact Page
   ====================== */
.contact-page .contact-grid {
    grid-template-columns: 1fr 1.2fr;
}

.contact-map {
    margin-top: 60px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    height: 380px;
    background: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed rgba(50,121,60,0.2);
}

.contact-map p {
    color: var(--gray-text);
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .contact-page .contact-grid {
        grid-template-columns: 1fr;
    }
    .contact-map {
        height: 280px;
        margin-top: 40px;
    }
}

/* ======================
   Projects Cards — Image Cover Style
   ====================== */

/* ── Home page featured projects section ── */
.featured-projects {
    background: var(--light-bg);
}

.featured-projects .section-header {
    margin-bottom: 40px;
}

.featured-projects-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 45px;
    flex-wrap: wrap;
    gap: 20px;
}

.featured-projects-header .section-header {
    margin-bottom: 0;
    text-align: right;
}

body[dir="ltr"] .featured-projects-header .section-header {
    text-align: left;
}

.featured-projects-header .title-underline {
    margin: 0 0 0 auto;
}

body[dir="ltr"] .featured-projects-header .title-underline {
    margin: 0 auto 0 0;
}

.view-all-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.95rem;
    border: 2px solid var(--primary-color);
    padding: 9px 22px;
    border-radius: 30px;
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.view-all-link:hover {
    background: var(--primary-color);
    color: var(--light-text);
    transform: translateY(-2px);
}

.view-all-link i {
    font-size: 0.8rem;
    transition: var(--transition);
}

body[dir="rtl"] .view-all-link i {
    transform: rotate(180deg);
}

.view-all-link:hover i {
    transform: translateX(3px);
}

body[dir="rtl"] .view-all-link:hover i {
    transform: rotate(180deg) translateX(3px);
}

/* ── Shared project card (image cover style) ── */
.proj-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    background: #111;
    cursor: pointer;
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.proj-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.proj-card-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease, filter 0.5s ease;
    filter: brightness(0.88);
}

.proj-card:hover .proj-card-img {
    transform: scale(1.06);
    filter: brightness(0.7);
}

.proj-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(20,40,20,0.92) 0%, rgba(20,40,20,0.35) 50%, transparent 100%);
    transition: var(--transition);
}

.proj-card:hover .proj-card-overlay {
    background: linear-gradient(to top, rgba(20,40,20,0.96) 0%, rgba(20,40,20,0.55) 60%, rgba(20,40,20,0.1) 100%);
}

.proj-card-body {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 22px 20px;
    z-index: 2;
    transform: translateY(0);
    transition: var(--transition);
}

.proj-card-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 13px;
    background: rgba(50, 121, 60, 0.85);
    color: #fff;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 9px;
    backdrop-filter: blur(4px);
}

.proj-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.45;
    margin-bottom: 8px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.proj-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 12px;
}

.proj-card-meta i {
    color: var(--primary-light);
    font-size: 0.78rem;
}

.proj-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    background: var(--primary-color);
    padding: 7px 16px;
    border-radius: 6px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease;
}

.proj-card:hover .proj-card-cta {
    opacity: 1;
    transform: translateY(0);
}

.proj-card-cta:hover {
    background: var(--primary-light);
}

/* ── Image count badge (top corner) ── */
.proj-card-count {
    position: absolute;
    top: 14px;
    left: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 11px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
    z-index: 3;
}

body[dir="ltr"] .proj-card-count {
    left: auto;
    right: 14px;
}

.proj-card-count i {
    font-size: 0.72rem;
}

/* ── Home featured grid (2+2 layout) ── */
.featured-projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

@media (max-width: 768px) {
    .featured-projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .featured-projects-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        margin-bottom: 30px;
    }

    .featured-projects-header .section-header {
        width: 100%;
    }

    .featured-projects-header .title-underline {
        margin: 0;
    }
}

/* ── Projects page grid (3 columns) ── */
.projects-grid-v2 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

@media (max-width: 992px) {
    .projects-grid-v2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .projects-grid-v2 {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ======================
   Project Detail Page
   ====================== */
.project-detail-hero {
    min-height: 420px;
    display: flex;
    align-items: flex-end;
    position: relative;
    padding-top: 80px;
    overflow: hidden;
}

.project-detail-hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    transition: transform 8s ease;
}

.project-detail-hero:hover .project-detail-hero-bg {
    transform: scale(1.04);
}

.project-detail-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(20,40,20,0.95) 0%, rgba(20,40,20,0.5) 50%, rgba(20,40,20,0.2) 100%);
    z-index: 1;
}

.project-detail-hero-content {
    position: relative;
    z-index: 2;
    padding: 50px 0 40px;
    width: 100%;
}

.project-detail-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.75);
    font-size: 0.88rem;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.project-detail-breadcrumb a {
    color: rgba(255,255,255,0.75);
    transition: var(--transition);
}

.project-detail-breadcrumb a:hover {
    color: #fff;
}

.project-detail-breadcrumb i {
    font-size: 0.65rem;
}

body[dir="rtl"] .project-detail-breadcrumb i.fa-chevron-left {
    transform: rotate(180deg);
}

.project-detail-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 16px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.project-detail-title {
    font-size: 2rem;
    font-weight: 900;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.4);
    max-width: 750px;
}

.project-detail-meta-row {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.project-detail-meta-item {
    display: flex;
    align-items: center;
    gap: 7px;
    color: rgba(255,255,255,0.85);
    font-size: 0.9rem;
}

.project-detail-meta-item i {
    color: var(--primary-light);
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .project-detail-hero {
        min-height: 340px;
    }

    .project-detail-title {
        font-size: 1.5rem;
    }

    .project-detail-meta-row {
        gap: 14px;
    }
}

@media (max-width: 480px) {
    .project-detail-hero {
        min-height: 300px;
    }

    .project-detail-title {
        font-size: 1.25rem;
    }
}

/* ── Project Info Bar ── */
.project-info-bar {
    background: var(--secondary-color);
    padding: 28px 0;
}

.project-info-bar-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    text-align: center;
}

.project-info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 10px;
    border-left: 1px solid rgba(255,255,255,0.1);
}

.project-info-item:last-child {
    border-left: none;
}

body[dir="ltr"] .project-info-item {
    border-left: none;
    border-right: 1px solid rgba(255,255,255,0.1);
}

body[dir="ltr"] .project-info-item:last-child {
    border-right: none;
}

.project-info-icon {
    width: 42px;
    height: 42px;
    background: rgba(50,121,60,0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--primary-light);
}

.project-info-label {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.6);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-info-value {
    font-size: 0.95rem;
    color: #fff;
    font-weight: 600;
    text-align: center;
}

@media (max-width: 768px) {
    .project-info-bar-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .project-info-item {
        border-left: none;
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }

    .project-info-item:nth-child(3),
    .project-info-item:nth-child(4) {
        border-bottom: none;
    }
}

@media (max-width: 480px) {
    .project-info-bar-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
}

/* ── Gallery Section ── */
.project-gallery-section {
    background: var(--light-text);
}

.gallery-intro {
    max-width: 700px;
    margin: 0 auto 45px;
    text-align: center;
}

.gallery-intro p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--gray-text);
}

/* Masonry-style gallery grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: #111;
    aspect-ratio: 4 / 3;
}

.gallery-item.wide {
    grid-column: span 2;
}

.gallery-item.tall {
    grid-row: span 2;
    aspect-ratio: auto;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease, filter 0.4s ease;
    filter: brightness(0.9);
}

.gallery-item:hover img {
    transform: scale(1.07);
    filter: brightness(0.7);
}

.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: rgba(20,40,20,0.0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.35s ease;
}

.gallery-item:hover .gallery-item-overlay {
    background: rgba(20,40,20,0.45);
}

.gallery-zoom-icon {
    width: 52px;
    height: 52px;
    background: rgba(255,255,255,0.92);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--primary-color);
    opacity: 0;
    transform: scale(0.75);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.gallery-item:hover .gallery-zoom-icon {
    opacity: 1;
    transform: scale(1);
}

.gallery-item-num {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 12px;
    backdrop-filter: blur(3px);
}

body[dir="ltr"] .gallery-item-num {
    right: auto;
    left: 10px;
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .gallery-item.wide {
        grid-column: span 2;
    }

    .gallery-item.tall {
        grid-row: span 1;
        aspect-ratio: 4 / 3;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    .gallery-item.wide {
        grid-column: span 2;
    }
}

/* ======================
   Lightbox
   ====================== */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.96);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.lightbox.open {
    opacity: 1;
    pointer-events: all;
}

.lightbox-inner {
    position: relative;
    max-width: 1100px;
    width: calc(100% - 40px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.lightbox-img-wrap {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 80vh;
}

.lightbox-img {
    max-width: 100%;
    max-height: 78vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.7);
    display: block;
    transition: opacity 0.25s ease;
}

.lightbox-img.fading {
    opacity: 0;
}

.lightbox-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 46px;
    height: 46px;
    background: rgba(255,255,255,0.12);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s ease, transform 0.25s ease;
    z-index: 10001;
}

body[dir="rtl"] .lightbox-close {
    right: auto;
    left: 20px;
}

.lightbox-close:hover {
    background: rgba(255,255,255,0.25);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    font-size: 1.3rem;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s ease, transform 0.25s ease;
    z-index: 10001;
}

.lightbox-nav:hover {
    background: var(--primary-color);
}

.lightbox-prev {
    right: 20px;
}

.lightbox-next {
    left: 20px;
}

body[dir="ltr"] .lightbox-prev {
    right: auto;
    left: 20px;
}

body[dir="ltr"] .lightbox-next {
    left: auto;
    right: 20px;
}

.lightbox-counter {
    color: rgba(255,255,255,0.75);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.lightbox-caption {
    color: rgba(255,255,255,0.75);
    font-size: 0.88rem;
    text-align: center;
    max-width: 600px;
}

/* Thumbnail strip */
.lightbox-thumbs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    max-width: 100%;
    padding: 4px 0 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) rgba(255,255,255,0.1);
}

.lightbox-thumbs::-webkit-scrollbar {
    height: 4px;
}

.lightbox-thumbs::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
}

.lightbox-thumbs::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 2px;
}

.lightbox-thumb {
    width: 64px;
    height: 48px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.55;
    transition: opacity 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
    border: 2px solid transparent;
}

.lightbox-thumb:hover {
    opacity: 0.85;
}

.lightbox-thumb.active {
    opacity: 1;
    border-color: var(--primary-color);
    transform: scale(1.08);
}

@media (max-width: 768px) {
    .lightbox-nav {
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }

    .lightbox-prev { right: 8px; }
    .lightbox-next { left: 8px; }

    body[dir="ltr"] .lightbox-prev { left: 8px; right: auto; }
    body[dir="ltr"] .lightbox-next { right: 8px; left: auto; }

    .lightbox-thumb {
        width: 50px;
        height: 38px;
    }

    .lightbox-close {
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
    }

    body[dir="rtl"] .lightbox-close {
        right: auto;
        left: 12px;
    }
}

/* ======================
   Back to Projects button
   ====================== */
.back-to-projects {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 40px;
    transition: var(--transition);
}

.back-to-projects i {
    transition: transform 0.25s ease;
}

.back-to-projects:hover {
    color: var(--primary-light);
}

.back-to-projects:hover i {
    transform: translateX(-4px);
}

body[dir="ltr"] .back-to-projects:hover i {
    transform: translateX(4px);
}

/* ======================
   Related / Other Projects
   ====================== */
.other-projects {
    background: var(--light-bg);
}

/* ── View All card (home page 4th slot) ── */
.proj-card-more {
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    text-decoration: none;
}

.proj-card-more-inner {
    text-align: center;
    padding: 30px;
    z-index: 2;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.proj-card-more-icon {
    width: 72px;
    height: 72px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 8px;
    transition: background 0.3s ease, transform 0.3s ease;
}

.proj-card-more:hover .proj-card-more-icon {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

.proj-card-more-title {
    color: #fff;
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
}

.proj-card-more-sub {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.88rem;
    margin: 0;
    max-width: 200px;
}

.proj-card-more-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    color: #fff;
    font-size: 0.9rem;
    margin-top: 6px;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.proj-card-more:hover .proj-card-more-arrow {
    background: rgba(255, 255, 255, 0.2);
    border-color: #fff;
}

body[dir="rtl"] .proj-card-more-arrow i {
    transform: rotate(0deg);
}
