/* Tatweer theme – تطوير لإدارة الأصول */
:root {
    --tatweer-primary: #004E8A;
    --tatweer-secondary: #4CAF50;
    --tatweer-primary-dark: #003d6d;
    --tatweer-secondary-dark: #3d8c40;
    --tatweer-bg: #f0f4f8;
    --tatweer-card-bg: #ffffff;
    --tatweer-text: #1a2b3c;
    --tatweer-text-muted: #5a6c7d;
    --tatweer-radius: 12px;
    --tatweer-shadow: 0 4px 20px rgba(0, 78, 138, 0.08);
    --tatweer-shadow-hover: 0 12px 32px rgba(0, 78, 138, 0.12);
    --tatweer-transition: 0.3s ease;
}

/* Smooth global transitions */
body {
    background-color: var(--tatweer-bg) !important;
    color: var(--tatweer-text);
}
a, .btn, .menu-link, .footer-tatweer a {
    transition: color var(--tatweer-transition), background-color var(--tatweer-transition),
                border-color var(--tatweer-transition), transform var(--tatweer-transition),
                box-shadow var(--tatweer-transition), opacity var(--tatweer-transition);
}

/* Primary & secondary buttons and links */
.btn-primary,
.bg-primary,
.bg-primary:hover { background-color: var(--tatweer-primary) !important; border-color: var(--tatweer-primary) !important; color: #fff !important; }
.btn-primary:hover { background-color: var(--tatweer-primary-dark) !important; border-color: var(--tatweer-primary-dark) !important; color: #fff !important; }
.btn-secondary,
.bg-secondary { background-color: var(--tatweer-secondary) !important; border-color: var(--tatweer-secondary) !important; color: #fff !important; }
.btn-secondary:hover { background-color: var(--tatweer-secondary-dark) !important; border-color: var(--tatweer-secondary-dark) !important; color: #fff !important; }
.btn-outline-primary { color: var(--tatweer-primary) !important; border-color: var(--tatweer-primary) !important; }
.btn-outline-primary:hover { background-color: var(--tatweer-primary) !important; color: #fff !important; border-color: var(--tatweer-primary) !important; }
.text-primary { color: var(--tatweer-primary) !important; }
a.text-primary:hover { color: var(--tatweer-primary-dark) !important; }
.bg-primary { background-color: var(--tatweer-primary) !important; }

/* Header / Navbar */
.header,
.navbar { background: #fff !important; box-shadow: 0 1px 10px rgba(0,78,138,0.08); }
.navbar .menu-link { color: #1B1B1B !important; }
.navbar .menu-link:hover,
.navbar .menu-link.active { color: var(--tatweer-primary) !important; }
.navbar .btn-language { border-color: var(--tatweer-primary); color: var(--tatweer-primary); }
.navbar .btn-language:hover { background: rgba(0,78,138,0.08); color: var(--tatweer-primary); }
.header .brand img { max-height: 56px; height: auto; object-fit: contain; }

/* Footer */
footer .footer-content,
.footer-tatweer .footer-content { background: var(--tatweer-primary) !important; color: #fff; }
footer .footer-content h6,
.footer-tatweer .footer-heading { color: #fff !important; font-size: 1rem; font-weight: 600; }
footer .footer-content a,
.footer-tatweer .footer-content a { color: rgba(255,255,255,0.9) !important; }
footer .footer-content a:hover,
.footer-tatweer .footer-content a:hover { color: #fff !important; }
footer .footer-content p,
.footer-tatweer .footer-about { color: rgba(255,255,255,0.9); font-size: 0.95rem; line-height: 1.5; }
.footer-tatweer .footer-logo { max-height: 56px; width: auto; object-fit: contain; display: block; }
.footer-tatweer .footer-social-icon { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.2); color: #fff; display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
.footer-tatweer .footer-social-icon:hover { background: rgba(255,255,255,0.35); color: #fff; }
.footer-tatweer .footer-links,
.footer-tatweer .footer-contact { list-style: none; padding: 0; margin: 0; }
.footer-tatweer .footer-links li,
.footer-tatweer .footer-contact li { margin-bottom: 0.5rem; }
.footer-tatweer .footer-contact li i { opacity: 0.9; }
.footer-tatweer .footer-bottom { background: var(--tatweer-primary-dark); color: rgba(255,255,255,0.8); font-size: 0.875rem; }
.footer-tatweer .footer-copy { color: rgba(255,255,255,0.85); }
footer .absolute-bottom-footer { opacity: 0.4; }

/* Section titles */
.contact-us-title h4,
.why-choosen h3,
.package-section h4,
.clients-section h4 { color: var(--tatweer-primary) !important; }
.section-portfolio .text h3 { color: var(--tatweer-primary); }
.units-home-section .card-title.text-primary { color: var(--tatweer-primary) !important; }

/* Units section – كروت الوحدات في الهوم */
.units-section-header { text-align: center; margin-bottom: 2.5rem; }
.units-section-header .units-section-title { color: var(--tatweer-primary) !important; font-size: 1.85rem; font-weight: 700; margin: 0 0 0.5rem 0; }
.units-section-header .units-section-desc { color: #5a6c7d; font-size: 1rem; margin: 0 0 1.5rem 0; max-width: 480px; margin-left: auto; margin-right: auto; line-height: 1.5; }
.units-section-header .btn-view-units { padding: 0.6rem 1.5rem; border-radius: 8px; font-weight: 600; }
.units-section-empty { text-align: center; color: #6c757d; margin-top: 2rem; }

/* كارد الوحدات في الهوم – شكل جديد مع شريط جانبي */
.units-home-section .unit-card {
    position: relative;
    border: 1px solid rgba(0,78,138,0.1);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,78,138,0.06);
    padding: 1.5rem;
    padding-inline-start: 1.65rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease, transform 0.25s ease, border-color 0.25s ease;
    overflow: hidden;
}
.units-home-section .unit-card::before {
    content: '';
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--tatweer-primary), var(--tatweer-secondary));
    border-radius: 18px 0 0 18px;
}
html[dir="rtl"] .units-home-section .unit-card::before { border-radius: 0 18px 18px 0; }
.units-home-section .unit-card:hover {
    box-shadow: 0 14px 36px rgba(0,78,138,0.14);
    transform: translateY(-5px);
    border-color: rgba(0,78,138,0.18);
}
.units-home-section .unit-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--tatweer-secondary), var(--tatweer-secondary-dark));
    padding: 0.4rem 0.75rem;
    border-radius: 20px;
    margin-bottom: 0.85rem;
    width: fit-content;
    box-shadow: 0 2px 8px rgba(76,175,80,0.25);
}
.units-home-section .unit-card-title {
    color: var(--tatweer-primary) !important;
    font-size: 1.08rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    line-height: 1.4;
    min-height: 2.8em;
}
.units-home-section .unit-card-price {
    margin: 0 0 1.25rem 0;
    padding: 0.85rem 1rem;
    background: linear-gradient(135deg, rgba(0,78,138,0.06) 0%, rgba(76,175,80,0.05) 100%);
    border-radius: 12px;
    border: 1px solid rgba(0,78,138,0.08);
}
.units-home-section .unit-card-price-label { display: block; font-size: 0.75rem; color: #6c757d; margin-bottom: 0.25rem; }
.units-home-section .unit-card-price-value { font-size: 1.35rem; font-weight: 700; color: var(--tatweer-primary); }
.units-home-section .unit-card-price-value small { font-size: 0.8rem; font-weight: 500; color: #6c757d; }
.units-home-section .unit-card-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: auto; }
.units-home-section .unit-card-actions .btn { flex: 1; min-width: 0; justify-content: center; border-radius: 10px; font-weight: 600; }

/* Unit card modern – تصميم موحد (صفحة الوحدات + داخل القرى) */
.unit-card-modern {
    position: relative;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 22px rgba(0,78,138,0.08);
    border: 1px solid rgba(0,78,138,0.1);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease, transform 0.25s ease, border-color 0.25s ease;
}
.unit-card-modern:hover {
    box-shadow: 0 14px 40px rgba(0,78,138,0.14);
    transform: translateY(-5px);
    border-color: rgba(0,78,138,0.18);
}
.unit-card-accent {
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, var(--tatweer-primary), var(--tatweer-secondary));
    border-radius: 18px 0 0 18px;
}
html[dir="rtl"] .unit-card-accent { border-radius: 0 18px 18px 0; }
.unit-card-inner { padding: 1.5rem; padding-inline-start: 1.65rem; flex: 1; display: flex; flex-direction: column; }
.unit-card-type {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--tatweer-secondary), var(--tatweer-secondary-dark));
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    margin-bottom: 0.9rem;
    width: fit-content;
    box-shadow: 0 2px 8px rgba(76,175,80,0.25);
}
.unit-card-type .fa-building { font-size: 0.85em; opacity: 0.95; }
.unit-card-name { color: var(--tatweer-primary); font-size: 1.1rem; font-weight: 700; margin: 0 0 0.9rem 0; line-height: 1.4; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.unit-card-name-icon { color: var(--tatweer-primary); opacity: 0.85; font-size: 1rem; }
.unit-card-desc { color: #5a6c7d; font-size: 0.875rem; line-height: 1.55; margin: 0 0 0.9rem 0; }
.unit-card-price-block {
    margin-bottom: 1.25rem;
    padding: 0.9rem 1.1rem;
    background: linear-gradient(135deg, rgba(0,78,138,0.06) 0%, rgba(76,175,80,0.05) 100%);
    border-radius: 12px;
    border: 1px solid rgba(0,78,138,0.08);
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.25rem 0.4rem;
}
.unit-card-price-icon { color: var(--tatweer-primary); opacity: 0.75; font-size: 1rem; margin-inline-end: 0.35rem; }
.unit-card-price-num { font-size: 1.45rem; font-weight: 700; color: var(--tatweer-primary); }
.unit-card-price-currency { font-size: 0.85rem; color: #5a6c7d; margin: 0 0.2em 0 0.15em; }
.unit-card-price-period { font-size: 0.8rem; color: #6c757d; }
.unit-card-btns { display: flex; gap: 0.6rem; margin-top: auto; }
.unit-card-btns .btn { flex: 1; justify-content: center; display: inline-flex; align-items: center; gap: 0.45rem; border-radius: 10px; font-weight: 600; }
.unit-card-btns .btn i { font-size: 0.95em; }
.unit-card-btns .unit-card-btn { padding: 0.55rem 1rem; font-size: 0.95rem; min-height: 42px; }
.unit-card-inner { padding: 1.5rem; padding-inline-start: 1.65rem; flex: 1; display: flex; flex-direction: column; min-height: 200px; }

/* Villages section – كارت لكل قرية + وحدات بداخلها */
/* إزالة المساحة البيضاء فوق قرانا ورفع العنوان */
.villages-home-section.villages-section-spacing { padding-top: 0; padding-bottom: 3rem; }
.villages-home-section .villages-section-header { text-align: center; margin-bottom: 1.5rem; padding-top: 0.5rem; }
.villages-home-section .villages-section-title { color: var(--tatweer-primary) !important; font-size: 1.85rem; font-weight: 700; margin: 0 0 0.4rem 0; }
.villages-home-section .villages-section-desc { color: #5a6c7d; margin: 0 0 0.75rem 0; }
.villages-home-section .btn-view-units { padding: 0.65rem 1.75rem; font-size: 1rem; border-radius: 10px; font-weight: 600; }
.villages-home-section .villages-section-empty { text-align: center; color: #6c757d; margin-top: 1rem; }
.village-card { background: #fff; border-radius: 16px; border: 1px solid rgba(0,78,138,0.12); box-shadow: 0 4px 24px rgba(0,78,138,0.08); padding: 1.75rem; margin-bottom: 2rem; transition: box-shadow 0.25s, border-color 0.25s; }
.village-card:hover { box-shadow: 0 8px 32px rgba(0,78,138,0.12); border-color: rgba(0,78,138,0.18); }
.village-card:last-child { margin-bottom: 0; }
.village-card-header { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; }
.village-card-title { color: var(--tatweer-primary); font-size: 1.45rem; font-weight: 700; margin: 0; display: inline-flex; align-items: center; gap: 0.5rem; }
.village-card-title-icon { color: var(--tatweer-primary); opacity: 0.9; font-size: 1.25rem; }
.village-card-count { font-size: 0.85rem; color: var(--tatweer-secondary); font-weight: 600; background: rgba(76,175,80,0.12); padding: 0.35rem 0.75rem; border-radius: 20px; display: inline-flex; align-items: center; gap: 0.4rem; }
.village-card-count i { opacity: 0.9; }
.village-card-footer .btn { font-weight: 600; display: inline-flex; align-items: center; gap: 0.45rem; }
.village-card-desc { color: #5a6c7d; font-size: 0.95rem; margin: 0 0 1.25rem 0; line-height: 1.5; }
.village-card-units { margin-top: 0.5rem; }
.village-card-footer { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid rgba(0,78,138,0.08); }
.village-card-footer .btn { font-weight: 600; }

/* About – إخفاء أيقونات الجيم */
.why-choosen .gym-img,
.why-choosen img[alt="icon"] { display: none !important; }

/* Contact form – بلوك الصورة الجانبي (بدون صورة الجيم) */
.contact-side-block { min-height: 280px; background: linear-gradient(135deg, var(--tatweer-primary) 0%, var(--tatweer-primary-dark) 100%); }
.contact-side-placeholder { width: 100%; min-height: 260px; background: linear-gradient(135deg, var(--tatweer-primary) 0%, var(--tatweer-primary-dark) 100%); }

/* Cards & blocks */
.package-card .card-header { border-color: rgba(0,78,138,0.2); }
.package-card .btn-primary { background: var(--tatweer-primary) !important; border-color: var(--tatweer-primary) !important; }

/* Hide Join Us button globally (انضمي الينا) */
.join-us-btn { display: none !important; }

/* Back to top */
.back-to-top { background: var(--tatweer-primary) !important; }
.back-to-top:hover { background: var(--tatweer-primary-dark) !important; }

/* Hero slider already uses inline styles; ensure overlay */
.hero-slide-overlay { background: linear-gradient(to bottom, rgba(0,78,138,0.35), rgba(0,0,0,0.5)) !important; }
.btn-hero { background: var(--tatweer-primary) !important; border-color: var(--tatweer-primary) !important; color: #fff !important; }
.btn-hero:hover { background: var(--tatweer-primary-dark) !important; color: #fff !important; }

/* Pagination / bullets */
.hero-pagination .swiper-pagination-bullet-active { background: var(--tatweer-secondary) !important; }
.swiper-button-next, .swiper-button-prev { color: var(--tatweer-primary); }

/* Circle line decoration – subtle + gentle float */
.plus-left-img, .plus-right-img, .plus-bottom-img { opacity: 0.2; }
.circle-image img {
    animation: circleFloat 8s ease-in-out infinite;
}
@keyframes circleFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ========== Animations & UX ========== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Hero caption entrance – applied via JS per slide */
.hero-slide-caption .hero-slide-title { animation: fadeInUp 0.7s ease forwards; }
.hero-slide-caption .hero-slide-subtitle { animation: fadeInUp 0.7s 0.15s ease forwards; opacity: 0; }
.hero-slide-caption .btn-hero { animation: fadeInUp 0.6s 0.3s ease forwards; opacity: 0; }

/* Section spacing – إزالة المساحة البيضاء بين الهيرو وقسم قرانا */
.why-choosen, .section-portfolio { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.why-choosen { background: var(--tatweer-card-bg); border-radius: var(--tatweer-radius); box-shadow: var(--tatweer-shadow); margin: 0.5rem 0; padding: 1rem 1.5rem !important; }
.contact-us { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.why-choosen h3 { line-height: 1.4; }
.why-choosen p { line-height: 1.7; color: var(--tatweer-text-muted); }
.hero-slider-section { margin-bottom: 0; }
.contact-us .contact-us-title p { color: var(--tatweer-text-muted); max-width: 520px; margin-inline: auto; line-height: 1.6; }

/* Back to top – smooth show/hide */
.back-to-top {
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s, background 0.25s ease !important;
}
.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top:hover { transform: translateY(-2px) !important; }

/* Header on scroll – subtle shadow */
.header { transition: box-shadow 0.3s ease; }
.header.scrolled { box-shadow: 0 4px 20px rgba(0, 78, 138, 0.1) !important; }

/* Buttons – gentle scale on hover */
.btn-primary, .btn-secondary, .btn-outline-primary {
    transition: transform 0.2s ease, box-shadow 0.25s ease !important;
}
.btn-primary:hover, .btn-secondary:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0, 78, 138, 0.25); }
.btn-outline-primary:hover { transform: translateY(-1px); }

/* Card stagger (use .aos-delay-100 etc with AOS) */
.units-home-section .unit-card,
.villages-home-section .village-card,
.unit-card-modern { transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease; }

/* Form inputs – focus state */
.contact-us .form-control:focus {
    border-color: var(--tatweer-primary);
    box-shadow: 0 0 0 3px rgba(0, 78, 138, 0.12);
    outline: 0;
}
.contact-us .form-control { border-radius: 8px; transition: border-color 0.2s, box-shadow 0.2s; }

/* Footer social – subtle scale on hover */
.footer-tatweer .footer-social-icon:hover { transform: scale(1.08); }
