/* Reset & Base Styles */
* {
    padding: 0;
    margin: 0;
    font-family: 'Alexandria', sans-serif;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: #051510;
    color: #e9ffec;
    overflow-x: hidden;
}

/* Header */
.head {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 10;
}

.main-logo img {
    width: 220px;
    height: auto;
    display: block;
}

.head nav ul {
    display: flex;
    gap: 25px;
    align-items: center;
    list-style-type: none;
}

.nav-link {
    color: #e9ffec; 
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #65ba9e; 
    cursor: pointer;
}

/* Video Background Section */
.video-container {
    position: relative;
    width: 100%;
    min-height: 100vh; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden; 
}

.bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; 
    z-index: -1;
    filter: brightness(0.6);
}

/* Hero Content */
.content {
    display: flex;
    width: 100%;
    padding: 120px 50px 40px 50px;
}

.l {
    flex: 4;
    color: #ffffff;
    max-width: 650px;
}

.l h1 {
    font-size: 3.2rem;
    color: #65ba9e;
    line-height: 1.2;
}

.l p {
    font-size: 1.3rem;
    margin-top: 15px;
    color: #e9ffec;
    line-height: 1.6;
}

.r {
    flex: 1;
}

/* Main Button */
.main-btn {
    background-color: #65ba9e;
    color: #081c15;
    padding: 14px 28px;
    border-radius: 30px;
    margin-top: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border: 2px solid #65ba9e;
    cursor: pointer;
    transition: all 0.3s ease;
}

.main-btn:hover {
    background-color: #081c15;
    color: #65ba9e;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(101, 186, 158, 0.3);
}

/* Scroll Brands */
.scr {
    width: 100%;
    overflow: hidden;
}

.sscont {
    display: flex;
    width: max-content;
    gap: 50px;
    animation: scroll 30s linear infinite;
    background-color: #081c15;
    border-bottom: 1px #65ba9e solid;
}

.card {
    flex: 0 0 auto;
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 10px;
}

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

/* Projects Section */
.backgorund-co1 {
    width: 100%;
    padding: 80px 20px; 
    background: linear-gradient(
        to bottom,
        #081c15 0%,   
        #020b08 40%,    
        #051510 100% 
    );
}

.main-h1f {
    text-align: center;
    color: #e9ffec;
    font-size: 2.8rem;
    margin-bottom: 40px;
}

.cards-con-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 30px;
    max-width: 1050px;
    margin: 0 auto;
}

.card-work {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 35px;
    overflow: hidden;
    border: 4px solid #65ba9e;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.img-w {
    width: 100%;      
    height: 100%;      
    object-fit: cover; 
    display: block;
}

.zoom:hover .card-work {
    transform: translateY(-8px) scale(1.02); 
    box-shadow: 0 15px 30px rgba(101, 186, 158, 0.25);
}

.img-2 {
    grid-column: span 2;
}

.img-2 .card-work {
    aspect-ratio: 2 / 1;
}

/* ============================================
   Service Icon Cards (بدل صور المشاريع)
   ============================================ */
.service-card {
    text-decoration: none;
}

.service-tile.card-work {
    aspect-ratio: 4 / 3;
}

.service-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6%;
    background-color: #081c15;
    color: #65ba9e;
    transition: transform 0.4s ease, box-shadow 0.4s ease, background-color 0.4s ease;
}

.service-icon {
    width: 42%;
    height: auto;
    overflow: visible;
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.service-icon .draw {
    fill: none;
    stroke: currentColor;
    stroke-width: 52;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    transition: stroke-dashoffset 1.3s cubic-bezier(0.65, 0, 0.35, 1) 0.25s;
}

.service-icon .draw.thin {
    stroke-width: 40;
    transition-delay: 0.7s;
}

.service-icon .pop {
    fill: currentColor;
    stroke: currentColor;
    stroke-width: 40;
    stroke-linejoin: round;
    opacity: 0;
    transform: scale(0.3);
    transform-box: fill-box;
    transform-origin: center;
    transition: opacity 0.5s ease 0.95s,
                transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.95s;
}

/* لمن الكارت يطلع بالشاشة: الأيقونة تنرسم */
.service-card.active .service-icon .draw {
    stroke-dashoffset: 0;
}

.service-card.active .service-icon .pop {
    opacity: 1;
    transform: scale(1);
}

.service-label {
    font-size: clamp(1rem, 2.1vw, 1.55rem);
    font-weight: 700;
    text-align: center;
    line-height: 1.3;
    padding: 0 14px;
}

/* Hover */
.zoom:hover .service-tile {
    background-color: #0c2a20;
}

.zoom:hover .service-icon {
    transform: translateY(-6px) scale(1.04);
}

.service-card.active:hover .service-icon .pop {
    transform: scale(1.18);
    transition-delay: 0s;
}

.service-card.active:hover .service-icon .spin {
    stroke-dasharray: 0.62 0.38;
    animation: iconSpin 1.6s linear infinite;
}

@keyframes iconSpin {
    to { stroke-dashoffset: -1; }
}

@media (prefers-reduced-motion: reduce) {
    .service-icon .draw { stroke-dashoffset: 0; transition: none; }
    .service-icon .pop { opacity: 1; transform: none; transition: none; }
    .service-card.active:hover .service-icon .spin { animation: none; stroke-dasharray: 1; }
}

/* Terms Section */
.terms h1, .contact-section h1 {
    padding-top: 80px;
    color: #65ba9e;
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 25px;
}

.terms-con {
    max-width: 850px;
    padding: 40px;
    background-color: #081c15;
    border: 2px solid #65ba9e; 
    border-radius: 24px;
    margin: 0 auto;
}

.terms p {
    color: #e9ffec;
    font-size: 1.2rem;
    line-height: 1.9;
    margin-bottom: 12px;
}

.terms p:last-child {
    margin-bottom: 0;
}

/* Integrated Contact Form Styles */
.contact-section {
    padding-top: 20px;
}

.dark-contact-card {
    background-color: #081c15;
    border: 2px solid #65ba9e;
    border-radius: 24px;       
    max-width: 850px;
    width: 100%; 
    margin: 0 auto; 
    padding: 40px;
    display: block;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.form-col {
    flex: 1;
    min-width: 250px;
    display: flex;
    flex-direction: column;
}

.form-group-full {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
    width: 100%;
}

label {
    color: #65ba9e; 
    font-size: 0.8rem;
    font-weight: bold;
    letter-spacing: 1px;
    margin-bottom: 8px;
    display: block;
}

.required {
    color: #ff3b30; 
}

.dark-input {
    background-color: #65ba9e; 
    border: 1px solid #e9ffec;  
    border-radius: 8px;
    padding: 14px 16px;
    color: #081c15;
    font-size: 0.95rem;
    outline: none;
    width: 100% !important;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.dark-input:focus {
    border-color: #ffffff; 
}

.dark-input::placeholder {
    color: #081c15;
}

.select-input {
    cursor: pointer;
    appearance: none; 
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23081c15' viewBox='0 0 16 16'><path d='M7.247 11.14 2.451 5.658C2.185 5.355 2.4 5 2.8 5h9.4a.4.4 0 0 1 .3.7l-4.796 5.48a.4.4 0 0 1-.601 0z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

.textarea-input {
    resize: none;
}

/* Fix intlTelInput Library Layout Breakage */
.phone-wrapper,
.iti { 
    width: 100% !important; 
    display: block !important;
}

.iti__country-list { 
    background-color: #081c15; 
    color: #e9ffec; 
    border: 1px solid #65ba9e; 
}

.iti__country:hover { 
    background-color: #65ba9e; 
    color: #081c15;
}

.dark-submit-btn {
    background-color: #65ba9e; 
    color: #081c15;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 24px;      
    padding: 14px 28px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.dark-submit-btn:hover {
    background-color: #103834; 
    color: #65ba9e;
}

/* Status Notifications */
.form-status {
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.95rem;
    display: none;
}

.form-status.success {
    background-color: rgba(101, 186, 158, 0.2);
    border: 1px solid #65ba9e;
    color: #65ba9e;
}

.form-status.error {
    background-color: rgba(255, 59, 48, 0.2);
    border: 1px solid #ff3b30;
    color: #ff3b30;
}

/* Animations (Load & Scroll Reveal) */
.fade-down {
    animation: fadeInDown 1s ease forwards;
}

.fade-up {
    animation: fadeInUp 1.2s ease forwards;
}

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

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

.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

/* ============================================
   Footer Reveal (المحتوى يصعد ويكشف الفوتر)
   ============================================ */
:root {
    --footer-h: 0px; /* يتحدد تلقائياً بالجافاسكربت */
}

/* المحتوى كله فوق الفوتر وله خلفية حتى يغطيه */
.page-content {
    position: relative;
    z-index: 1;
    background-color: #051510;
    margin-bottom: var(--footer-h);
    border-radius: 0 0 40px 40px;
    overflow: clip;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
}

/* الفوتر ثابت بأسفل الشاشة خلف المحتوى */
.site-footer {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    z-index: 0;
    background-color: #65ba9e;
    color: #081c15;
    overflow: hidden;
}

/* لو الفوتر أطول من الشاشة يرجع عادي */
.site-footer.is-static {
    position: relative;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 70px 50px 28px;
    transform-origin: 50% 100%;
    will-change: transform, filter, opacity;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    gap: 50px;
    flex-wrap: wrap;
}

.footer-eyebrow {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0.7;
    margin-bottom: 14px;
}

.footer-cta {
    font-size: clamp(1.8rem, 3.6vw, 3rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.footer-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 26px;
    padding: 14px 28px;
    border-radius: 30px;
    background-color: #081c15;
    color: #65ba9e;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid #081c15;
    transition: all 0.3s ease;
}

.footer-btn:hover {
    background-color: transparent;
    color: #081c15;
    transform: translateY(-3px);
}

.footer-cols {
    display: flex;
    gap: 60px;
    flex-wrap: wrap;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 120px;
}

.footer-col h4 {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.6;
    margin-bottom: 6px;
}

.footer-col a {
    color: #081c15;
    text-decoration: none;
    font-size: 1rem;
    width: fit-content;
    background-image: linear-gradient(#081c15, #081c15);
    background-size: 0% 2px;
    background-repeat: no-repeat;
    background-position: 0 100%;
    transition: background-size 0.3s ease;
}

.footer-col a:hover {
    background-size: 100% 2px;
}

/* الاسم الكبير */
.footer-giant {
    display: block;
    width: 100%;
    height: auto;
    margin-top: 60px;
}

.footer-giant text {
    font-family: 'Alexandria', sans-serif;
    font-size: 110px;
    font-weight: 800;
    fill: #081c15;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid rgba(8, 28, 21, 0.25);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    opacity: 0.75;
}

@media (prefers-reduced-motion: reduce) {
    .footer-inner {
        transform: none !important;
        filter: none !important;
        opacity: 1 !important;
    }
}

/* ============================================
   Language Toggle (EN | ع)
   ============================================ */
.lang-toggle {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    width: 84px;
    height: 36px;
    padding: 3px;
    border: 1px solid rgba(101, 186, 158, 0.6);
    border-radius: 30px;
    background-color: rgba(8, 28, 21, 0.55);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    cursor: pointer;
    direction: ltr; /* EN دايماً يسار و ع يمين */
    transition: border-color 0.3s ease;
}

.lang-toggle:hover {
    border-color: #65ba9e;
}

.lang-toggle:focus-visible {
    outline: 2px solid #e9ffec;
    outline-offset: 3px;
}

/* الدائرة الخضراء اللي تتحرك */
.lang-toggle::before {
    content: "";
    position: absolute;
    top: 3px;
    bottom: 3px;
    left: 3px;
    width: calc(50% - 3px);
    border-radius: 30px;
    background-color: #65ba9e;
    transition: transform 0.45s cubic-bezier(0.76, 0, 0.24, 1);
}

html[lang="ar"] .lang-toggle::before {
    transform: translateX(100%);
}

.lang-opt {
    position: relative;
    z-index: 1;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
    color: #e9ffec;
    transition: color 0.35s ease;
}

.lang-ar {
    font-size: 0.95rem;
}

html:not([lang="ar"]) .lang-en,
html[lang="ar"] .lang-ar {
    color: #081c15;
}

/* ============================================
   Arabic / RTL fixes
   ============================================ */
/* الـ letter-spacing يكسر ربط الحروف العربية */
html[lang="ar"] body * {
    letter-spacing: 0 !important;
}

html[lang="ar"] .l h1 { line-height: 1.45; }
html[lang="ar"] .footer-cta { line-height: 1.45; }
html[lang="ar"] label { font-size: 0.85rem; }
html[lang="ar"] .terms p { line-height: 2; }
html[lang="ar"] .footer-eyebrow,
html[lang="ar"] .footer-col h4 { font-size: 0.9rem; }

/* أشياء لازم تبقى يسار ← يمين */
.scr,
.footer-giant,
.phone-wrapper {
    direction: ltr;
}

html[dir="rtl"] #email {
    direction: ltr;
    text-align: right;
}

html[dir="rtl"] .phone-wrapper input {
    text-align: right;
}

html[dir="rtl"] .select-input {
    background-position: left 16px center;
}

html[dir="rtl"] .btn-arrow {
    display: inline-block;
    transform: scaleX(-1);
}

html[dir="rtl"] .footer-col a {
    background-position: 100% 100%;
}

/* Media Queries (Responsive Design) */
@media screen and (max-width: 900px) {
    .content {
        padding: 120px 30px 40px 30px;
    }

    .l h1 {
        font-size: 2.5rem;
    }

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

    .img-2 {
        grid-column: span 1;
    }

    .img-2 .card-work {
        aspect-ratio: 1 / 1;
    }

    .footer-inner {
        padding: 56px 30px 24px;
    }

    .footer-cols {
        gap: 40px;
    }
}

@media screen and (max-width: 600px) {
    .head {
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
    }

    .main-logo img {
        width: 170px;
    }

    .head nav ul {
        gap: 15px;
    }

    .content {
        padding: 160px 20px 40px 20px;
    }

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

    .l p {
        font-size: 1rem;
    }

    .terms-con, .dark-contact-card {
        padding: 25px 18px;
    }

    .form-row {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 15px;
    }

    .dark-submit-btn {
        width: 100%;
        justify-content: center;
    }

    .terms p {
        font-size: 1rem;
    }

    .page-content {
        border-radius: 0 0 28px 28px;
    }

    .footer-inner {
        padding: 44px 20px 20px;
    }

    .footer-top {
        gap: 32px;
    }

    .footer-cols {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 24px 20px;
        width: 100%;
    }

    .footer-col {
        min-width: 0;
        gap: 8px;
    }

    .footer-col a {
        font-size: 0.9rem;
    }

    .footer-giant {
        margin-top: 36px;
    }

    .footer-bottom {
        flex-direction: column;
        font-size: 0.65rem;
    }

    .lang-toggle {
        width: 76px;
        height: 32px;
    }

    .cards-con-grid {
        gap: 14px;
    }

    .service-tile.card-work {
        border-width: 3px;
        border-radius: 24px;
    }

    .service-label {
        font-size: 0.85rem;
        padding: 0 8px;
    }

    .service-tile.card-work {
        aspect-ratio: 1 / 1;
    }

    .service-icon {
        width: 52%;
    }
}
