:root {
    --primary-color: #ffffff;
    --accent-color: #ffffff;
    --font-heading: 'Outfit', sans-serif;
    --font-serif: 'Playfair Display', serif;
    --font-arabic: 'Readex Pro', sans-serif;
    --font-arabic-kufam: 'Kufam', sans-serif;
    --transition-speed: 0.3s;


}

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

body {
    background-color: #0d0d0d;
    color: var(--primary-color);
    font-family: var(--font-heading);
    overflow-x: hidden;
}

/* ===== Lenis Smooth Scroll ===== */
html.lenis,
html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

.lenis.lenis-scrolling iframe {
    pointer-events: none;
}

header.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 2.5rem 4rem;
    pointer-events: none;
    /* Fast smooth slide like Apple — 0.25s with GPU-accelerated transform */
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

header.header.header-hidden {
    transform: translate3d(0, -100%, 0);
}

.header-container {
    max-width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: auto;
    position: relative;
}

.logo {
    order: 2;
}

.logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    pointer-events: auto;
}

.logo-text {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.text-gold { color: #EFBF04; }
.text-white { color: #ffffff; }

.nav {
    display: flex;
    order: 1;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 0.5rem 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.nav ul {
    list-style: none;
    display: flex;
    gap: 2.5rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    font-family: var(--font-arabic-kufam);
    font-weight: 400;
    transition: color var(--transition-speed);
}

.nav a:hover {
    color: #ffffff;
}

.glass-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    padding: 1rem 2.5rem;
    color: white !important;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    font-family: var(--font-arabic);
}

.glass-button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    z-index: 1001;
    padding: 0.5rem;
    order: 1;
}

.hero-cta-btn {
    display: inline-block;
    margin-top: 3rem;
    padding: 1rem 3rem;
    font-size: 1.3rem;
    font-family: var(--font-arabic-kufam);
    color: #ffffff;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50px;
    transition: all var(--transition-speed);
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
}

.hero-cta-btn:hover {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

.hero-scroll-container {
    height: 100vh;
    position: relative;
    z-index: 1;
}

.hero-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

.canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.6); /* Slightly dim for text readability */
}

.hero-content {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 10;
    pointer-events: none;
}

.hero-title {
    display: block;
    text-align: center;
    white-space: nowrap;
    font-family: var(--font-arabic);
    font-weight: 200;
}

.page-content {
    position: relative;
    z-index: 20;
    background-color: #0d0d0d;
    padding-top: 2rem;
}

/* Projects & Team Layouts */
.page-header {
    padding: 8rem 4rem 3rem;
    text-align: left;
}

.page-title {
    font-size: 6rem;
    font-weight: 500;
    line-height: 1.1;
    margin-bottom: 2rem;
    text-align: right;
    font-family: var(--font-arabic-kufam);
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 2rem;
    padding: 0 4rem 5rem;
}

.card {
    position: relative;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, #1a1a1a 0%, #111 100%);
    overflow: hidden;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.card:hover {
    transform: scale(0.98);
}

/* Card Background Image */
.card-bg {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background-size: cover;
    background-position: center;
    background-image: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 70%); /* Fallback glow */
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 0;
}

.card:hover .card-bg {
    transform: scale(1.05);
}

/* Team Grid Modifications */
.team-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem 3rem;
}

.team-portrait {
    aspect-ratio: 3 / 4;
    margin-bottom: 0.75rem;
    max-width: 100%;
    overflow: hidden;
}

.team-card {
    text-align: center;
    margin-bottom: 1.5rem;
    max-width: 100%;
    min-width: 0;
}

@media (min-width: 640px) {
    .team-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
        padding: 0 2rem 4rem;
    }
}

@media (min-width: 1024px) {
    .team-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
        padding: 0 4rem 5rem;
    }
}

.team-name {
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 0.3rem;
}

.team-role {
    font-family: var(--font-serif);
    font-style: italic;
    opacity: 0.6;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .page-header {
        padding: 10rem 2rem 3rem;
    }

    .page-title {
        font-size: 3.5rem;
    }

    .grid-container {
        padding: 0 2rem 5rem;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* Contact Section Layout */
.contact-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 4rem 5rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.form-group label {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    font-family: var(--font-arabic-kufam);
}

.form-group input,
.form-group select,
.form-group textarea {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 1.1rem;
    padding: 1rem 0;
    font-family: var(--font-arabic);
    transition: border-color var(--transition-speed);
    resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-bottom-color: #ffffff;
}

.form-group select option {
    background-color: #111;
    color: #fff;
}

.submit-btn {
    align-self: flex-start;
    margin-top: 2rem;
    background: #ffffff;
    border: none;
    padding: 1.2rem 4rem;
    font-size: 1.2rem;
    font-family: var(--font-arabic-kufam);
    cursor: pointer;
    border-radius: 50px;
    transition: transform var(--transition-speed);
    text-decoration: none;
    color: #000000;
}

.submit-btn:hover {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .contact-container {
        padding: 0 2rem 5rem;
    }

    .submit-btn {
        align-self: stretch;
    }
}

/* Footer Section */
.footer {
    background-color: #050505;
    padding: 6rem 4rem 2rem;
    position: relative;
    z-index: 20;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

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

.footer-top {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 4rem;
    margin-bottom: 5rem;
}

/* (Removed display: none - footer brand section is part of the footer-top grid) */

.footer-brand p {
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.8;
    max-width: 350px;
    font-family: var(--font-arabic);
    font-weight: 300;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.links-column h4 {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    font-family: var(--font-arabic-kufam);
    font-weight: 500;
    color: #ffffff;
}

.links-column ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.links-column a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.6);
    font-family: var(--font-arabic);
    font-size: 0.95rem;
    transition: color var(--transition-speed);
}

.links-column a:hover {
    color: #ffffff;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
    font-family: var(--font-arabic);
}

.social-links {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.social-links-inline {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 2rem;
    justify-content: flex-start;
}

.btn-social {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1.4rem;
    border-radius: 50px;
    color: #fff;
    font-family: var(--font-arabic-kufam);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1;
}

.btn-social:hover {
    transform: translateY(-3px);
}

.btn-social svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    flex-shrink: 0;
}

.btn-social-whatsapp {
    background: #25D366;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.35);
}

.btn-social-whatsapp:hover {
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.5);
}

.btn-social-instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    box-shadow: 0 4px 16px rgba(225, 48, 108, 0.35);
}

.btn-social-instagram:hover {
    box-shadow: 0 8px 24px rgba(225, 48, 108, 0.5);
}

.btn-social-maps {
    background: #4285F4;
    box-shadow: 0 4px 16px rgba(66, 133, 244, 0.35);
}

.btn-social-maps:hover {
    box-shadow: 0 8px 24px rgba(66, 133, 244, 0.5);
}

@media (max-width: 900px) {
    .footer-top {
        grid-template-columns: 1fr;
    }

    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    /* Header & Nav */
    header.header {
        padding: 1.5rem 2rem;
    }

    .header-container {
        flex-direction: row;
        justify-content: space-between;
        gap: 0;
    }

    .mobile-menu-btn {
        display: block;
    }

    .nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        margin-top: 1rem;
        background: rgba(20, 20, 20, 0.7);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 20px;
        padding: 2rem;
        box-shadow: 0 10px 30px rgba(0,0,0,0.5);
        flex-direction: column;
        align-items: center;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: all 0.3s ease;
    }

    .nav.mobile-active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav ul {
        flex-direction: column;
        gap: 2rem;
        width: 100%;
        text-align: center;
    }

    .theme-toggle-wrapper {
        display: none;
    }

    .hero-cta-btn {
        margin-top: 1.5rem;
        padding: 0.8rem 2.5rem;
        font-size: 1.1rem;
    }

}

@media (max-width: 600px) {
    .footer {
        padding: 4rem 2rem 2rem;
    }

    .footer-links {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
}

/* Theme Toggle Switch */
.theme-toggle-wrapper {
    position: relative;
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 0.3rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    margin-right: 1rem;
}

.theme-toggle-btn {
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    color: rgba(255, 255, 255, 0.7);
    font-family: var(--font-arabic-kufam);
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-toggle-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.theme-toggle-btn.active {
    background: #ffffff;
    color: #000000;
    font-weight: 600;
}

.theme-toggle-btn svg {
    width: 18px;
    height: 18px;
    transition: fill 0.3s;
}

.theme-toggle-btn:not(.active) svg {
    fill: currentColor;
}
.theme-toggle-btn.active svg {
    fill: #000;
}

.theme-toggle-btn img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    /* يناسب الثيم الشفاف: أبيض شفاف مثل الأيقونات الأصلية (fill: currentColor) */
    filter: brightness(0) invert(0.7);
    transition: filter 0.3s;
}

.theme-toggle-btn:hover img {
    filter: brightness(0) invert(1);
}

.theme-toggle-btn.active img {
    filter: brightness(0);
}

/* ====== Page Description ====== */
.page-desc {
    color: rgba(255, 255, 255, 0.6);
    max-width: 600px;
    font-family: var(--font-arabic);
    margin-top: -1rem;
    font-size: 1.2rem;
    line-height: 1.8;
    text-align: right;
}

/* ====== Property Filters ====== */
.property-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: flex-end;
    justify-content: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 4rem 3rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 200px;
    flex: 0 0 auto;
}

.filter-group label {
    color: #EFBF04;
    font-family: var(--font-arabic-kufam);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.filter-select {
    background-color: rgba(255, 255, 255, 0.05);
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3e%3cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23EFBF04' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left 1.2rem center;
    background-size: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-family: var(--font-arabic);
    font-size: 1rem;
    padding: 0.8rem 1.2rem 0.8rem 2.8rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.filter-select:hover {
    border-color: rgba(239, 191, 4, 0.5);
    background-color: rgba(255, 255, 255, 0.08);
}

.filter-select:focus {
    outline: none;
    border-color: #EFBF04;
    background-color: rgba(255, 255, 255, 0.08);
}

.filter-select option {
    background: #0a0a0a;
    color: #ffffff;
    font-family: var(--font-arabic);
}

.filter-reset-btn {
    background: transparent;
    border: 1px solid rgba(239, 191, 4, 0.4);
    color: #EFBF04;
    font-family: var(--font-arabic-kufam);
    font-size: 0.9rem;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    align-self: flex-end;
    white-space: nowrap;
}

.filter-reset-btn:hover {
    background: #EFBF04;
    color: #000;
    border-color: #EFBF04;
}

.filter-reset-btn svg {
    width: 14px;
    height: 14px;
}

/* ====== Property Cards (Uniform Grid) ====== */
.property-card {
    position: relative;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    border-radius: 1rem;
    cursor: pointer;
    display: block;
    text-decoration: none;
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s ease;
    min-height: 240px;
}

.property-card:hover {
    transform: scale(0.97);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.property-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.property-card:hover img {
    transform: scale(1.08);
}

.property-card.hidden {
    display: none;
}

@media (max-width: 640px) {
    .property-card {
        min-height: 200px;
    }
}

/* ====== Currency Logo (Omani Rial) ====== */
.currency-logo {
    width: 26px !important;
    height: 20px !important;
    vertical-align: middle;
    display: inline-block;
    margin-inline: 1px;
    /* Exact #EFBF04 color fill using mask technique */
    background-color: #EFBF04;
    -webkit-mask-image: url('images/Bold.png');
    mask-image: url('images/Bold.png');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    transition: none !important;
    transform: none !important;
    border: none;
}

.property-card:hover .currency-logo {
    transform: none !important;
}

/* Property cards (real-estate.html) only - larger logo for cards */
.property-card .currency-logo {
    width: 30px !important;
    height: 24px !important;
    margin-inline: 2px !important;
}

/* ====== Pagination ====== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 3rem auto 0;
    flex-wrap: wrap;
    max-width: 1400px;
}

.pagination-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    font-family: var(--font-arabic-kufam);
    font-size: 0.95rem;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 42px;
}

.pagination-btn:hover:not(:disabled) {
    color: #ffffff;
    border-color: #EFBF04;
}

.pagination-btn.active {
    background: #EFBF04;
    color: #000000;
    border-color: #EFBF04;
    font-weight: 600;
}

.pagination-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ====== Empty State ====== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: rgba(255, 255, 255, 0.5);
    font-family: var(--font-arabic);
}

.empty-state.hidden {
    display: none;
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    opacity: 0.4;
    display: block;
}

.empty-state p {
    font-size: 1.1rem;
    margin: 0;
}

/* ====== Project Grid ====== */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 4rem 5rem;
}

.project-card {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 1rem;
    cursor: pointer;
    display: block;
    text-decoration: none;
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s ease;
}

.project-card:hover {
    transform: scale(0.97);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.project-card .card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
    opacity: 0.7;
    transition: opacity 0.5s ease;
}

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

.project-card .card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 2rem;
    z-index: 4;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 70%, transparent 100%);
    opacity: 1;
}

.project-card .card-subtitle {
    display: inline-block;
    color: #EFBF04;
    font-family: var(--font-arabic-kufam);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    font-weight: 500;
    opacity: 1;
    transform: none;
}

.project-card .card-title {
    color: #ffffff;
    font-family: var(--font-arabic-kufam);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    transition: transform 0.5s ease;
}

.project-card:hover .card-title {
    transform: translateY(-3px);
}

/* Hide cards on filter */
.project-card.hidden {
    display: none;
}

/* ====== Lightbox ====== */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 0.5rem;
}

.lightbox-counter {
    margin-top: 1rem;
    color: rgba(255, 255, 255, 0.6);
    font-family: var(--font-heading);
    font-size: 0.9rem;
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 3rem;
    cursor: pointer;
    z-index: 10000;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10000;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
    left: 1.5rem;
}

.lightbox-next {
    right: 1.5rem;
}

@media (max-width: 768px) {
    .lightbox-nav {
        width: 40px;
        height: 40px;
    }

    .lightbox-prev {
        left: 0.5rem;
    }

    .lightbox-next {
        right: 0.5rem;
    }

    .lightbox-close {
        top: 1rem;
        right: 1rem;
        font-size: 2.5rem;
    }
}

/* ====== Project Detail Page ====== */
.detail-hero {
    position: relative;
    width: 100%;
    height: 60vh;
    min-height: 400px;
    overflow: hidden;
}

.detail-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #0d0d0d 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
}

.detail-hero-content {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    width: 100%;
    max-width: 1400px;
    padding: 0 4rem;
}

.detail-hero-content .detail-category {
    color: #EFBF04;
    font-family: var(--font-arabic-kufam);
    font-size: 1rem;
    letter-spacing: 0.1em;
    margin-bottom: 0.8rem;
    display: block;
}

.detail-hero-content h1 {
    font-family: var(--font-arabic-kufam);
    font-size: 3.5rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.detail-body {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 4rem;
}

.detail-description {
    font-family: var(--font-arabic);
    font-size: 1.2rem;
    line-height: 2;
    color: rgba(255, 255, 255, 0.8);
    max-width: 800px;
    margin: 0 auto 4rem;
    text-align: center;
}

.detail-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto 5rem;
    text-align: center;
}

.detail-info-item label {
    display: block;
    color: rgba(255, 255, 255, 0.4);
    font-family: var(--font-arabic);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.detail-info-item span {
    display: block;
    color: #ffffff;
    font-family: var(--font-arabic-kufam);
    font-size: 1.2rem;
    font-weight: 600;
}

.detail-gallery-title {
    font-family: var(--font-arabic-kufam);
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 2rem;
    color: #ffffff;
}

.detail-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.detail-gallery img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 0.75rem;
    transition: transform 0.5s ease;
    cursor: pointer;
}

.detail-gallery img:hover {
    transform: scale(1.03);
}

.detail-video-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}

.detail-video-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: rgba(239, 191, 4, 0.1);
    border: 1px solid rgba(239, 191, 4, 0.4);
    color: #EFBF04;
    font-family: var(--font-arabic-kufam);
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: 999px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.detail-video-btn:hover {
    background: rgba(239, 191, 4, 0.2);
    border-color: #EFBF04;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 191, 4, 0.15);
}

.detail-video-btn svg {
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .property-filters {
        padding: 0 2rem 2rem;
        gap: 1rem;
    }

    .filter-group {
        min-width: 100%;
    }

    .filter-reset-btn {
        width: 100%;
        justify-content: center;
        align-self: stretch;
    }

    .project-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        padding: 0 2rem 5rem;
        gap: 1rem;
    }

    .project-card .card-title {
        font-size: 1.2rem;
    }

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

    .detail-hero-content {
        padding: 0 2rem;
    }

    .detail-body {
        padding: 3rem 2rem;
    }

    .detail-info-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .detail-gallery {
        grid-template-columns: 1fr;
    }
}

/* ====== Landing Page (landing.html) ====== */
.landing-page {
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr auto;
    background: #0a0a0a;
    margin: 0;
}

.landing-header {
    padding: 1.5rem 3rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    border-bottom: 1px solid rgba(239, 191, 4, 0.15);
}

.landing-header .lang-toggle {
    margin-right: auto;
    margin-left: 2rem;
}
html[dir="ltr"] .landing-header .lang-toggle {
    margin-right: 2rem;
    margin-left: auto;
}

.landing-header .logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    font-family: var(--font-arabic-kufam);
    font-size: 1.2rem;
    font-weight: 700;
}

.logo-img {
    height: 36px;
    width: auto;
    margin-inline-end: 0.6rem;
    display: inline-block;
    flex-shrink: 0;
}

.landing-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    gap: 2rem;
}

.landing-intro {
    text-align: center;
    max-width: 800px;
    padding: 1rem 1rem 0;
}

.landing-eyebrow {
    display: inline-block;
    color: #EFBF04;
    font-family: var(--font-arabic-kufam);
    font-size: 0.9rem;
    letter-spacing: 0.15em;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.landing-title {
    font-family: var(--font-arabic-kufam);
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 1rem;
    line-height: 1.2;
}

.landing-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-family: var(--font-arabic);
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    margin: 0;
    line-height: 1.6;
}

.landing-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    width: 100%;
    max-width: 1300px;
    padding: 1rem;
}

.landing-card {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 1.5rem;
    cursor: pointer;
    background: #111;
    border: 2px solid transparent;
    text-decoration: none;
    display: block;
    transition: border-color 0.5s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.landing-card:hover {
    border-color: #EFBF04;
    transform: scale(1.015);
}

.landing-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    display: block;
}

.landing-card:hover img {
    transform: scale(1.08);
}

.landing-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0.1) 100%);
    opacity: 0.85;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

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

.landing-card-content {
    position: absolute;
    inset: 0;
    padding: 2rem 2.2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: white;
    z-index: 2;
}

.landing-card-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(239, 191, 4, 0.15);
    border: 1px solid rgba(239, 191, 4, 0.4);
    margin-bottom: 1rem;
    backdrop-filter: blur(6px);
    transition: all 0.4s ease;
}

.landing-card:hover .landing-card-icon {
    background: #EFBF04;
    border-color: #EFBF04;
}

.landing-card-icon-img,
.landing-card-icon img {
    width: 26px;
    height: 26px;
    object-fit: contain;
    transition: filter 0.4s ease;
}

.landing-card:hover .landing-card-icon img {
    filter: brightness(0);
}

.landing-card-title {
    font-family: var(--font-arabic-kufam);
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 700;
    margin: 0 0 0.5rem;
    line-height: 1.2;
}

.landing-card-desc {
    font-family: var(--font-arabic);
    font-size: clamp(0.9rem, 1.2vw, 1rem);
    color: rgba(255, 255, 255, 0.75);
    margin: 0 0 1.5rem;
    line-height: 1.5;
    max-width: 90%;
}

.landing-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(239, 191, 4, 0.1);
    border: 1px solid #EFBF04;
    color: #EFBF04;
    font-family: var(--font-arabic-kufam);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.7rem 1.4rem;
    border-radius: 50px;
    width: fit-content;
    transition: all 0.3s ease;
}

.landing-card:hover .landing-card-btn {
    background: #EFBF04;
    color: #0a0a0a;
}

.landing-card-btn svg {
    transition: transform 0.3s ease;
}

.landing-card:hover .landing-card-btn svg {
    transform: translateX(-4px);
}

.landing-footer {
    text-align: center;
    padding: 1.5rem;
    color: rgba(255, 255, 255, 0.4);
    font-family: var(--font-arabic);
    font-size: 0.85rem;
    border-top: 1px solid rgba(239, 191, 4, 0.1);
}

.landing-footer p {
    margin: 0;
}

@media (max-width: 768px) {
    .landing-header {
        padding: 1rem 1.5rem;
    }

    .landing-split {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0.5rem;
    }

    /* Keep original compact card shape (wide & short) */
    .landing-card {
        aspect-ratio: 16 / 10;
    }

    .landing-card-content {
        padding: 0.85rem;
    }

    .landing-card-desc {
        max-width: 100%;
    }

    /* Compact elements to fit inside the short card */
    .landing-card-icon {
        width: 34px;
        height: 34px;
        margin-bottom: 0.35rem;
    }

    .landing-card-icon-img,
    .landing-card-icon img {
        width: 17px;
        height: 17px;
    }

    .landing-card-title {
        font-size: 1.05rem;
        margin-bottom: 0.3rem;
        line-height: 1.25;
    }

    .landing-card-desc {
        font-size: 0.72rem;
        margin-bottom: 0.4rem;
        line-height: 1.35;
    }

    .landing-card-btn {
        font-size: 0.72rem;
        padding: 0.45rem 1rem;
        letter-spacing: 0;
        text-align: center;
        gap: 0.4rem;
    }

    .landing-card-btn svg {
        width: 14px;
        height: 14px;
    }

    /* Prevent text clipping in all card content */
    .landing-card h2,
    .landing-card p,
    .landing-card .landing-card-btn {
        word-wrap: break-word;
        overflow-wrap: break-word;
        white-space: normal;
    }
}

/* Language Toggle Button */
.lang-toggle {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    font-family: var(--font-arabic-kufam);
    font-weight: 400;
    cursor: pointer;
    transition: color var(--transition-speed);
    padding: 0;
}

.lang-toggle:hover {
    color: #ffffff;
}

.nav ul li .lang-toggle {
    text-decoration: none;
}

/* ============================================
   Filter Buttons (all-projects.html)
   ============================================ */
.filter-btn {
    padding: 0.5rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    border-radius: 999px;
    font-family: 'Readex Pro', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.filter-btn.active {
    background: #EFBF04;
    color: #000;
    border-color: #EFBF04;
}

/* ============================================
   View Mode Toggle (large cards / compact grid — mobile feature)
   ============================================ */
.view-toggle {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
}

.view-btn {
    padding: 0.5rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    border-radius: 999px;
    font-family: 'Readex Pro', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.view-btn.active {
    background: #EFBF04;
    color: #000;
    border-color: #EFBF04;
}

/* Compact 2-per-row mobile view (phone only; desktop keeps its 3 columns either way) */
@media (max-width: 767px) {
    #property-grid.compact,
    #project-grid.compact {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem;
    }

    #property-grid.compact .property-card {
        min-height: 0;
        aspect-ratio: 3 / 2;
    }
    #property-grid.compact .card-body { padding: 0.5rem; }
    #property-grid.compact .card-status { padding: 0 0.35rem; font-size: 0.6rem; margin-bottom: 0.3rem; }
    #property-grid.compact .card-location { display: none; }
    #property-grid.compact .card-title { font-size: 0.75rem; line-height: 1.3; }
    #property-grid.compact .card-price { font-size: 0.75rem; margin-top: 0.2rem; line-height: 1.2; }
    #property-grid.compact .card-price .currency-logo { width: 10px !important; height: 8px !important; }

    #project-grid.compact .project-card { aspect-ratio: 4 / 3; }
    #project-grid.compact .card-info { padding: 0.6rem; }
    #project-grid.compact .card-subtitle { font-size: 0.6rem; margin-bottom: 0.2rem; }
    #project-grid.compact .card-title { font-size: 0.8rem; }
    #project-grid.compact .card-info p { display: none; }
}

/* View toggle is a mobile feature — hidden on desktop (md+) */
@media (min-width: 768px) {
    .view-toggle { display: none; }
}

/* Mobile-only project filters (styled like real-estate property filters) */
.project-mobile-filters {
    display: none;
}
@media (max-width: 767px) {
    .project-filter-bar { display: none; }
    .project-mobile-filters { display: flex; }
}

/* ============================================
   WhatsApp Button (realestate-detail.html)
   ============================================ */
.whatsapp-btn {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    z-index: 1000;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: #25D366;
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-family: var(--font-arabic-kufam);
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

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

.whatsapp-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* ============================================
   Info Card (realestate-detail.html)
   ============================================ */
.info-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.5rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.info-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.info-card-price {
    font-family: var(--font-arabic-kufam);
    font-size: 1.8rem;
    font-weight: 700;
    color: #EFBF04;
}

.info-grid-v1 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.info-item-v1 {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.info-item-v1:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(239, 191, 4, 0.2);
}

.info-item-v1 label {
    color: rgba(255, 255, 255, 0.5);
    font-family: var(--font-arabic);
    font-size: 0.85rem;
}

.info-item-v1 span {
    color: #fff;
    font-family: var(--font-arabic-kufam);
    font-size: 1.1rem;
    font-weight: 600;
}

.status-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--font-arabic-kufam);
}

.status-for_sale { background: rgba(239, 191, 4, 0.2); color: #EFBF04; border: 1px solid rgba(239, 191, 4, 0.3); }
.status-for_rent { background: rgba(59, 130, 246, 0.2); color: #60A5FA; border: 1px solid rgba(59, 130, 246, 0.3); }
.status-sold { background: rgba(239, 68, 68, 0.2); color: #F87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.status-rented { background: rgba(239, 68, 68, 0.2); color: #F87171; border: 1px solid rgba(239, 68, 68, 0.3); }

/* Property card badges — solid colors (same semantics as detail page badges) */
.card-status-badge.status-for_sale { background: #EFBF04; color: #000; border-color: #EFBF04; }
.card-status-badge.status-for_rent { background: #3B82F6; color: #fff; border-color: #3B82F6; }
.card-status-badge.status-sold { background: #EF4444; color: #fff; border-color: #EF4444; }
.card-status-badge.status-rented { background: #EF4444; color: #fff; border-color: #EF4444; }

@media (max-width: 768px) {
    .info-grid-v1 {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    .info-card {
        padding: 1.5rem;
    }
    .info-card-price {
        font-size: 1.4rem;
    }
    .whatsapp-btn {
        bottom: 1rem;
        left: 1rem;
        right: 1rem;
        justify-content: center;
    }
}

/* ============================================
   LTR (English) Language Overrides
   ============================================ */
html[dir="ltr"] body {
    text-align: left;
}

/* When LTR, keep header layout matching RTL order:
   theme-toggles (right) | nav | logo (left) */
html[dir="ltr"] .header-container {
    flex-direction: row-reverse;
}

html[dir="ltr"] .theme-toggle-wrapper {
    flex-direction: row-reverse;
}

html[dir="ltr"] .nav ul {
    flex-direction: row;
}

html[dir="ltr"] .footer-container {
    flex-direction: row-reverse;
}

html[dir="ltr"] .footer-links {
    flex-direction: row-reverse;
}

html[dir="ltr"] .info-card-header {
    flex-direction: row-reverse;
}

html[dir="ltr"] .info-grid-v1 {
    direction: ltr;
}

html[dir="ltr"] .info-item-v1 {
    text-align: left;
}

/* Body copy paragraphs should follow text direction (LTR = left, RTL = right) */
html[dir="ltr"] p {
    text-align: left;
}

/* Property description stays centered in both languages (overrides html[dir="ltr"] p) */
html[dir="ltr"] .detail-description {
    text-align: center;
}

html[dir="ltr"] .page-desc,
html[dir="ltr"] .contact-form,
html[dir="ltr"] .card-info {
    text-align: left;
}

/* Page section titles should align to the start (left in LTR) */
html[dir="ltr"] .page-title,
html[dir="ltr"] .page-header,
html[dir="ltr"] .page-header h1,
html[dir="ltr"] .page-header h2 {
    text-align: left;
}

/* Theme toggle buttons - keep same visual order */
html[dir="ltr"] .theme-toggle-wrapper {
    direction: ltr;
}

/* LTR Services Section: Reverse the card order so it reads naturally left to right */
html[dir="ltr"] .grid.grid-cols-1.md\:grid-cols-4 {
    direction: ltr;
}

/* LTR: Glass buttons (e.g. "All Projects") - put arrow on the right */
html[dir="ltr"] .glass-button {
    flex-direction: row;
}
html[dir="ltr"] .glass-button svg,
html[dir="ltr"] .filter-reset-btn svg {
    /* Keep the arrow pointing right (natural reading direction) */
    transform: rotate(0deg);
}

/* LTR: Make sure all icons in links flip if needed */
html[dir="ltr"] a svg {
    transition: transform 0.3s ease;
}

/* LTR Form labels and inputs: align to left (natural reading direction) */
html[dir="ltr"] .form-group label,
html[dir="ltr"] .form-group input,
html[dir="ltr"] .form-group select,
html[dir="ltr"] .form-group textarea,
html[dir="ltr"] .contact-form {
    text-align: left;
}

html[dir="ltr"] .form-group input::placeholder,
html[dir="ltr"] .form-group textarea::placeholder {
    text-align: left;
    direction: ltr;
}

/* RTL (Arabic) Form inputs: force right alignment */
html[dir="rtl"] .form-group input,
html[dir="rtl"] .form-group select,
html[dir="rtl"] .form-group textarea {
    text-align: right;
    direction: rtl;
}

html[dir="rtl"] .form-group input::placeholder,
html[dir="rtl"] .form-group textarea::placeholder {
    text-align: right;
    direction: rtl;
}

/* LTR team cards: keep name and role centered (same as RTL) */
html[dir="ltr"] .team-card,
html[dir="ltr"] .team-name,
html[dir="ltr"] .team-role {
    text-align: center;
}

/* ============================================
   Mobile/Tablet LTR (English) Overrides
   Ensure the header dropdown menu works
   identically in both Arabic (RTL) and
   English (LTR) on small screens.
   ============================================ */
@media (max-width: 768px) {

    /* Keep header layout identical between RTL and LTR:
       the LTR rule above uses row-reverse, which keeps the
       hamburger button on the same side (right) as in Arabic. */

    /* Keep dropdown menu vertical in English (LTR) on mobile/tablet */
    html[dir="ltr"] .nav ul {
        flex-direction: column;
        gap: 2rem;
        width: 100%;
        text-align: center;
    }

    /* Ensure the dropdown menu is full-width in both directions */
    .nav {
        inset-inline: 0;
    }
}

/* ============================================
   ============================================
   MOBILE RESPONSIVE FIXES
   ============================================
   ============================================ */

/* ===== Global Overflow Protection (Mobile only) ===== */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
    }
}

/* ===== Hero - Mobile only (16:9 banner: full video, text at bottom, no button) ===== */
@media (max-width: 768px) {
    .hero-scroll-container {
        height: auto;
    }

    .hero-sticky {
        position: relative;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .hero-content {
        inset: 0;
        transform: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-end;
        padding: 0 1rem 1.2rem;
    }

    .hero-title {
        font-size: clamp(0.9rem, 3.5vw, 1.1rem);
        max-width: 92vw;
        margin: 0 auto;
        text-align: center;
        line-height: 1.5;
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .hero-cta-btn {
        display: none;
    }
}

/* ===== Page Title - Mobile only (Desktop keeps 6rem) ===== */
@media (max-width: 768px) {
    .page-title {
        font-size: clamp(2rem, 10vw, 3.5rem);
        line-height: 1.15;
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 2rem;
    }
}

/* ===== Header - Mobile fixes ===== */
@media (max-width: 768px) {
    header.header {
        padding: 1rem 1.25rem;
    }

    .logo-img {
        height: 28px;
    }

    .logo-text {
        font-size: 1.1rem;
        letter-spacing: 0.02em;
    }

    .header-container {
        gap: 0.5rem;
    }

    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
    }

    .theme-toggle-wrapper {
        display: none !important;
    }
}

@media (max-width: 480px) {
    header.header {
        padding: 0.75rem 1rem;
    }

    .logo-text {
        font-size: 1rem;
    }
}

/* Override the inline Tailwind min-h on mobile */
@media (max-width: 768px) {
    .min-h-\[400px\],
    .min-h-\[300px\] {
        min-height: 280px !important;
    }
}

@media (max-width: 480px) {
    .min-h-\[400px\],
    .min-h-\[300px\] {
        min-height: 240px !important;
    }
}

/* Tailwind text size responsive in services */
@media (max-width: 768px) {
    .text-3xl.md\:text-5xl,
    .text-2xl.md\:text-3xl,
    .text-3xl {
        font-size: 1.25rem !important;
        line-height: 1.3;
    }
    .text-2xl {
        font-size: 1.1rem !important;
        line-height: 1.3;
    }
    .text-xl {
        font-size: 1rem !important;
        line-height: 1.3;
    }
    .p-8, .p-6 {
        padding: 1rem !important;
    }
    .p-10, .md\:p-10, .md\:p-8 {
        padding: 1rem !important;
    }
}

/* ===== Projects Grid - responsive ===== */
@media (max-width: 768px) {
    .grid-cols-1.md\:grid-cols-3,
    .grid-cols-1.md\:grid-cols-4 {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto !important;
    }
}

/* ===== Process Steps - Mobile Stack ===== */
@media (max-width: 768px) {
    .flex.flex-col.md\:flex-row {
        flex-direction: column !important;
        height: auto !important;
        min-height: auto !important;
    }

    .flex.flex-col.md\:flex-row > div {
        width: 100% !important;
        flex: 1 1 auto !important;
        min-height: 200px !important;
    }

    .flex.flex-col.md\:flex-row h3,
    .flex.flex-col.md\:flex-row p {
        white-space: normal !important;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}

/* ===== Footer - Better Layout (Mobile Only) ===== */
@media (max-width: 768px) {
    .footer {
        padding: 3rem 1.25rem 2rem;
        overflow: hidden;
    }

    .footer-top {
        display: block;
        grid-template-columns: none;
        gap: 0;
        margin-bottom: 2rem;
    }

    .footer-brand {
        text-align: center;
        margin-bottom: 2rem;
    }

    .footer-brand .logo {
        display: flex;
        justify-content: center;
        margin-bottom: 1rem;
    }

    .footer-brand p {
        max-width: 100%;
        text-align: center;
        font-size: 0.95rem;
    }

    /* Stack links vertically on mobile (not 2 columns) */
    .footer-links {
        display: block;
        grid-template-columns: none;
        gap: 0;
        text-align: center;
    }

    .links-column {
        margin-bottom: 1.75rem;
    }

    .links-column:last-of-type {
        margin-bottom: 1.5rem;
    }

    .links-column h4 {
        margin-bottom: 0.85rem;
        font-size: 1rem;
    }

    .links-column ul {
        gap: 0.6rem;
    }

    .links-column a {
        font-size: 0.9rem;
    }

    /* Social buttons: 2 columns, but maps (3rd) spans full width */
    .social-links-inline {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
        margin-top: 0.5rem;
        justify-content: stretch;
        justify-items: stretch;
    }

    /* Make the 3rd social button (Google Maps) span both columns */
    .social-links-inline > .btn-social:nth-child(3) {
        grid-column: 1 / -1;
        width: 100%;
    }

    .btn-social {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
        justify-content: center;
        width: 100%;
    }

    .btn-social svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .footer {
        padding: 2.5rem 1rem 1.5rem;
    }

    .footer-links {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .social-links-inline {
        grid-template-columns: 1fr 1fr;
    }

    .footer-bottom {
        font-size: 0.8rem;
    }
}

/* ===== Footer Brand - logo center on mobile ===== */
@media (max-width: 768px) {
    .footer-brand .logo {
        display: flex;
        justify-content: center;
        margin-bottom: 1.5rem;
    }
}

/* ===== Page Description - responsive ===== */
@media (max-width: 768px) {
    .page-desc {
        font-size: 1rem;
        line-height: 1.7;
        max-width: 100%;
        text-align: center;
        padding: 0 1rem;
    }
}

/* ===== Page Header - mobile padding ===== */
@media (max-width: 768px) {
    .page-header {
        padding: 7rem 1.25rem 2rem;
        text-align: center;
    }

    .page-title {
        text-align: center;
        margin-bottom: 1.5rem;
    }
}

/* ===== Contact Container - mobile ===== */
@media (max-width: 768px) {
    .contact-container {
        padding: 0 1.25rem 3rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 1rem;
    }
}

/* ===== Card Text Alignment RTL on Mobile ===== */
@media (max-width: 768px) {
    [dir="rtl"] .absolute.inset-0 p,
    [dir="rtl"] .absolute.inset-0 h3,
    [dir="rtl"] .absolute.inset-0 span {
        text-align: right;
    }
}

/* ===== LTR Mobile Tweaks ===== */
@media (max-width: 768px) {
    [dir="ltr"] .page-header,
    [dir="ltr"] .page-title {
        text-align: center;
    }
}

/* ===== Submit button - mobile ===== */
@media (max-width: 480px) {
    .submit-btn {
        padding: 1rem 2rem;
        font-size: 1.05rem;
    }
}

/* ===== Image protection - no overflow ===== */
img {
    max-width: 100%;
    height: auto;
}

picture {
    display: block;
    width: 100%;
    height: 100%;
}

picture img {
    display: block;
}

/* ===== Make sure sections don't overflow ===== */
section,
.page-content,
footer,
main {
    max-width: 100vw;
}

/* ============================================
   MOBILE-ONLY: Centered Project Title (Mobile)
   ============================================ */
@media (max-width: 768px) {
    .page-content#projects .page-header {
        text-align: center;
    }

    .page-content#projects .page-title {
        text-align: center;
        white-space: nowrap;
    }

    /* Stack the projects header (title + button) vertically on mobile */
    .page-content#projects .page-header > div {
        flex-direction: column !important;
        align-items: center !important;
        gap: 1.5rem !important;
    }

    .page-content#projects .glass-button {
        align-self: center;
        font-size: 1rem;
    }
}

/* ============================================
   Detail Pages – Mobile Responsive Fixes
   (project-detail.html & realestate-detail.html)
   ============================================ */
@media (max-width: 768px) {
    .detail-hero {
        height: 45vh;
        min-height: 300px;
    }

    .detail-hero-content {
        bottom: 1.5rem;
        padding: 0 1.25rem;
    }

    .detail-hero-content h1 {
        font-size: 1.6rem;
        line-height: 1.3;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .detail-hero-content .detail-category {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }

    .detail-body {
        padding: 2.5rem 1.25rem;
    }

    .detail-description {
        font-size: 1.05rem;
        line-height: 1.8;
        margin-bottom: 2.5rem;
    }

    .detail-info-grid {
        gap: 1.25rem;
        margin-bottom: 3rem;
    }

    .detail-info-item span {
        font-size: 1rem;
    }

    .detail-gallery-title {
        font-size: 1.5rem;
        margin-bottom: 1.25rem;
    }

    /* Gallery: 3 thumbnails per row on mobile */
    .detail-gallery {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
        margin-bottom: 2.5rem;
    }

    .detail-gallery img {
        aspect-ratio: 1 / 1;
        border-radius: 0.5rem;
    }

    /* Info card header: allow wrapping so price/status never overflow */
    .info-card-header {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .info-card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .detail-hero {
        height: 40vh;
        min-height: 260px;
    }

    .detail-hero-content h1 {
        font-size: 1.3rem;
    }

    .detail-gallery {
        gap: 0.4rem;
    }
}

/* ============================================
   Mobile Bottom Navigation Bar (Example 2)
   Fixed bottom nav on phones only
   ============================================ */
.mobile-bottom-nav {
    display: none;
}

.mb-nav-btn {
    text-decoration: none;
}

@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 2000;
        /* Glassy transparent background inspired by the burger menu (.nav) */
        background: rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding: 0.55rem 0.75rem calc(0.55rem + env(safe-area-inset-bottom, 0px));
        display: flex;
        gap: 0.6rem;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    }

    .mb-nav-btn {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.25rem;
        padding: 0.6rem 0.4rem;
        border-radius: 50px;
        color: rgba(255, 255, 255, 0.8);
        font-family: var(--font-arabic);
        font-size: 0.72rem;
        line-height: 1.2;
        text-align: center;
        /* Transparent capsule inspired by the "سولف معنا" (hero-cta-btn) button */
        background: rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border: 1px solid rgba(255, 255, 255, 0.4);
        transition: all 0.3s ease;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mb-nav-btn svg {
        width: 22px;
        height: 22px;
        fill: currentColor;
        flex-shrink: 0;
    }

    .mb-nav-btn img {
        width: 22px;
        height: 22px;
        object-fit: contain;
        flex-shrink: 0;
        /* يناسب الثيم الشفاف: أبيض شفاف مثل الأيقونات الأصلية (fill: currentColor) */
        filter: brightness(0) invert(0.8);
    }

    .mb-nav-btn.active img {
        filter: brightness(0);
    }

    .mb-nav-btn:active {
        transform: scale(0.96);
    }

    /* Active state inspired by the hover of "سولف معنا": solid white with black text */
    .mb-nav-btn.active {
        background: #ffffff;
        border-color: #ffffff;
        color: #000000;
        font-weight: 600;
        box-shadow: 0 4px 16px rgba(255, 255, 255, 0.25);
    }

    /* Add bottom padding to body so the fixed nav doesn't cover footer content */
    body {
        padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    }
}

/* LTR English: keep bottom nav buttons in natural reading order */
@media (max-width: 768px) {
    html[dir="ltr"] .mobile-bottom-nav {
        flex-direction: row;
    }
}
