:root {
    --primary: #2E7D32;
    --primary-light: #4CAF50;
    --primary-dark: #1B5E20;
    --secondary: #F5F5F0;
    --accent: #81C784;
    --text-dark: #1a1a2e;
    --text-light: #6c757d;
    --white: #ffffff;
    --shadow: 0 2px 15px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 30px rgba(0,0,0,0.12);
    --radius: 12px;
    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Cairo', sans-serif;
    color: var(--text-dark);
    background: var(--white);
    line-height: 1.7;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; height: auto; }

/* ===== NAVBAR ===== */
.navbar {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    padding: 12px 0;
    transition: var(--transition);
    border-bottom: 1px solid transparent;
}
.navbar.scrolled {
    padding: 6px 0;
    box-shadow: var(--shadow);
    border-bottom: 1px solid #e8e8e8;
}
.nav-logo {
    height: 50px;
    width: auto;
    transition: var(--transition);
}
.navbar.scrolled .nav-logo { height: 40px; }
.brand-text {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--primary-dark);
    margin: 0 8px;
}
.navbar-nav .nav-link {
    font-weight: 600;
    color: var(--text-dark);
    padding: 8px 14px !important;
    position: relative;
    font-size: 0.95rem;
}
.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2.5px;
    background: var(--primary);
    border-radius: 2px;
    transition: var(--transition);
}
.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after { width: 60%; }
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active { color: var(--primary); }

.btn-lang {
    background: var(--primary);
    color: var(--white) !important;
    border: none;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition);
}
.btn-lang:hover { background: var(--primary-dark); color: var(--white) !important; }

/* ===== HERO ===== */
.hero {
    min-height: 92vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(27,94,32,0.88) 0%, rgba(46,125,50,0.82) 50%, rgba(76,175,80,0.75) 100%),
                url('../images/hero-bg.jpg') center/cover no-repeat;
    color: var(--white);
    text-align: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 70%, rgba(129,199,132,0.15) 0%, transparent 50%);
    animation: heroPulse 8s ease-in-out infinite;
}
@keyframes heroPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}
.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
    position: relative;
}
.hero p {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 30px;
    opacity: 0.9;
    position: relative;
}
.hero-logo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--white);
    padding: 10px;
    margin-bottom: 24px;
    box-shadow: 0 4px 30px rgba(0,0,0,0.2);
}

.btn-hero {
    padding: 12px 36px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1rem;
    transition: var(--transition);
    position: relative;
}
.btn-hero-primary {
    background: var(--white);
    color: var(--primary-dark);
}
.btn-hero-primary:hover { background: var(--secondary); transform: translateY(-2px); }
.btn-hero-outline {
    border: 2px solid var(--white);
    color: var(--white);
    background: transparent;
}
.btn-hero-outline:hover { background: var(--white); color: var(--primary-dark); transform: translateY(-2px); }

/* ===== SECTIONS ===== */
.section { padding: 80px 0; }
.section-alt { background: var(--secondary); }
.section-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 10px;
}
.section-subtitle {
    color: var(--text-light);
    font-size: 1.05rem;
    margin-bottom: 40px;
}
.section-divider {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px;
    margin: 0 auto 20px;
}

/* ===== CARDS ===== */
.card-custom {
    background: var(--white);
    border: 1px solid #eee;
    border-radius: var(--radius);
    padding: 30px 24px;
    text-align: center;
    transition: var(--transition);
    height: 100%;
}
.card-custom:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent);
}
.card-custom .card-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin: 0 auto 18px;
}
.card-custom h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 10px;
}
.card-custom p { color: var(--text-light); font-size: 0.93rem; }

/* ===== PRODUCT CARDS ===== */
.product-card {
    background: var(--white);
    border: 1px solid #eee;
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
}
.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}
.product-card .product-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: var(--transition);
}
.product-card:hover .product-img { transform: scale(1.05); }
.product-card .product-img-wrap { overflow: hidden; }
.product-card .product-body { padding: 20px; }
.product-card h3 { font-size: 1.05rem; font-weight: 700; color: var(--primary-dark); margin-bottom: 8px; }
.product-card p { font-size: 0.9rem; color: var(--text-light); }

/* ===== BRANCH CARDS ===== */
.branch-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
}
.branch-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.branch-card img { width: 100%; height: 220px; object-fit: cover; }
.branch-card .branch-body { padding: 20px; }
.branch-card h3 { font-size: 1.1rem; font-weight: 700; color: var(--primary-dark); }
.branch-card p { color: var(--text-light); font-size: 0.9rem; }

/* ===== GALLERY ===== */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.gallery-item {
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    cursor: pointer;
}
.gallery-item img { width: 100%; height: 250px; object-fit: cover; transition: var(--transition); }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item .gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(27,94,32,0.5);
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 2rem;
    transition: var(--transition);
}
.gallery-item:hover .gallery-overlay { opacity: 1; }

.gallery-filters { margin-bottom: 30px; }
.gallery-filters .btn {
    margin: 4px;
    border-radius: 20px;
    padding: 6px 20px;
    font-weight: 600;
    font-size: 0.9rem;
}
.gallery-filters .btn-filter { border: 2px solid var(--primary); color: var(--primary); background: transparent; }
.gallery-filters .btn-filter.active,
.gallery-filters .btn-filter:hover { background: var(--primary); color: var(--white); }

/* ===== LIGHTBOX ===== */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.lightbox.active { display: flex; }
.lightbox img { max-width: 90%; max-height: 85vh; border-radius: 8px; }
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: var(--white);
    font-size: 2.5rem;
    cursor: pointer;
    background: none;
    border: none;
    z-index: 10000;
}

/* ===== CTA ===== */
.cta-section {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: var(--white);
    text-align: center;
    padding: 60px 0;
}
.cta-section h2 { font-weight: 800; margin-bottom: 16px; }
.cta-section p { opacity: 0.9; margin-bottom: 24px; }
.btn-cta {
    background: var(--white);
    color: var(--primary-dark);
    padding: 12px 36px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1rem;
    transition: var(--transition);
}
.btn-cta:hover { background: var(--accent); color: var(--white); transform: translateY(-2px); }

/* ===== ABOUT ===== */
.timeline-item {
    position: relative;
    padding: 20px 0 20px 40px;
    border-left: 3px solid var(--primary);
}
.rtl .timeline-item {
    padding: 20px 40px 20px 0;
    border-left: none;
    border-right: 3px solid var(--primary);
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 24px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid var(--white);
}
.rtl .timeline-item::before { left: auto; right: -8px; }
.timeline-item h4 { color: var(--primary); font-weight: 700; }

.vision-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    border-radius: var(--radius);
    padding: 40px 30px;
    text-align: center;
    height: 100%;
}
.vision-card i { font-size: 2.5rem; margin-bottom: 16px; }
.vision-card h4 { font-weight: 700; margin-bottom: 12px; }

/* ===== CONTACT ===== */
.contact-info-card {
    background: var(--secondary);
    border-radius: var(--radius);
    padding: 30px;
    height: 100%;
}
.contact-info-card i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 12px;
}
.contact-form .form-control {
    border-radius: 8px;
    border: 1px solid #ddd;
    padding: 12px 16px;
    font-family: 'Cairo', sans-serif;
    transition: var(--transition);
}
.contact-form .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(46,125,50,0.15);
}

/* Phone number LTR fix for RTL pages */
.phone-number {
    direction: ltr;
    unicode-bidi: embed;
    display: inline-block;
}
.btn-submit {
    background: var(--primary);
    color: var(--white);
    padding: 12px 40px;
    border: none;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1rem;
    transition: var(--transition);
}
.btn-submit:hover { background: var(--primary-dark); color: var(--white); transform: translateY(-2px); }

/* ===== PAGE HEADER ===== */
.page-header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: var(--white);
    padding: 120px 0 60px;
    text-align: center;
}
.page-header h1 { font-size: 2.2rem; font-weight: 800; }
.page-header p { opacity: 0.85; }

/* ===== FOOTER ===== */
.site-footer {
    background: #1a2e1a;
    color: #ccc;
    padding: 60px 0 0;
}
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.footer-logo { width: 50px; height: 50px; border-radius: 50%; }
.footer-brand h5 { color: var(--white); margin: 0; font-weight: 700; }
.footer-about { font-size: 0.9rem; line-height: 1.8; }
.footer-title { color: var(--white); font-weight: 700; margin-bottom: 16px; }
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: #ccc; font-size: 0.9rem; }
.footer-links a:hover { color: var(--accent); padding-inline-start: 4px; }
.footer-contact { list-style: none; padding: 0; }
.footer-contact li { margin-bottom: 10px; font-size: 0.9rem; display: flex; align-items: center; gap: 8px; }
.footer-contact a { color: #ccc; }
.footer-contact a:hover { color: var(--accent); }
.footer-divider { border-color: rgba(255,255,255,0.1); margin: 30px 0 0; }
.footer-bottom { text-align: center; padding: 20px 0; font-size: 0.85rem; }

/* ===== WHATSAPP FLOAT ===== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 4px 20px rgba(37,211,102,0.4);
    z-index: 1000;
    transition: var(--transition);
    animation: waPulse 2s ease-in-out infinite;
}
.rtl .whatsapp-float { right: auto; left: 30px; }
.whatsapp-float:hover { transform: scale(1.1); color: var(--white); }
@keyframes waPulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(37,211,102,0.4); }
    50% { box-shadow: 0 4px 30px rgba(37,211,102,0.6); }
}

/* ===== SCROLL TOP ===== */
.scroll-top-btn {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}
.rtl .scroll-top-btn { right: auto; left: 30px; }
.scroll-top-btn.visible { opacity: 1; visibility: visible; }
.scroll-top-btn:hover { background: var(--primary-dark); transform: translateY(-3px); }

/* ===== PLACEHOLDER IMAGE ===== */
.placeholder-img {
    background: linear-gradient(135deg, var(--secondary), #e8f5e9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 2.5rem;
}

/* ===== ALERT ===== */
.alert-success-custom {
    background: #e8f5e9;
    color: var(--primary-dark);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    padding: 16px 20px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 991px) {
    .navbar-collapse {
        background: var(--white);
        padding: 16px;
        border-radius: var(--radius);
        margin-top: 10px;
        box-shadow: var(--shadow);
    }
    .btn-lang { margin-top: 10px; display: inline-block; }
}
@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    .hero p { font-size: 1rem; }
    .hero { min-height: 80vh; }
    .section { padding: 50px 0; }
    .section-title { font-size: 1.6rem; }
    .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
    .gallery-item img { height: 180px; }
}
@media (max-width: 576px) {
    .hero h1 { font-size: 1.7rem; }
    .hero-logo { width: 90px; height: 90px; }
    .btn-hero { padding: 10px 24px; font-size: 0.9rem; }
}
