/* ===== VARIABLES ===== */
:root {
    --primary: #1565C0;
    --primary-dark: #0D47A1;
    --primary-light: #42A5F5;
    --accent: #E65100;
    --dark: #0A1628;
    --dark2: #132042;
    --mid: #1E3A5F;
    --text: #1a2a4a;
    --text-light: #5a7a9a;
    --bg: #f5f8ff;
    --white: #ffffff;
    --border: #e0eaf5;
    --shadow: 0 4px 24px rgba(21,101,192,0.10);
    --shadow-strong: 0 8px 40px rgba(21,101,192,0.18);
    --radius: 14px;
    --radius-sm: 8px;
    --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
    --font: 'Vazirmatn', sans-serif;
    --header-h: 75px;
    --topbar-h: 36px;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--text); background: var(--bg); direction: rtl; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; outline: none; background: none; font-family: var(--font); }

.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* ===== TOPBAR ===== */
.topbar {
    background: var(--dark2);
    color: rgba(255,255,255,0.75);
    font-size: 13px;
    height: var(--topbar-h);
    display: flex;
    align-items: center;
}
.topbar-inner { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.topbar-right { display: flex; gap: 24px; }
.topbar-right span { display: flex; align-items: center; gap: 6px; }
.topbar-right i { color: var(--primary-light); }
.topbar-left { display: flex; gap: 12px; }
.topbar-left a { color: rgba(255,255,255,0.6); font-size: 14px; transition: var(--transition); }
.topbar-left a:hover { color: var(--white); }

/* ===== HEADER ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--white);
    height: var(--header-h);
    display: flex;
    align-items: center;
    box-shadow: 0 2px 16px rgba(21,101,192,0.08);
    transition: var(--transition);
}
.header.scrolled {
    box-shadow: 0 4px 30px rgba(21,101,192,0.15);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 32px;
    width: 100%;
}
.logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.logo-icon svg { width: 44px; height: 44px; }
.logo-text { display: flex; flex-direction: column; }
.logo-main { font-size: 17px; font-weight: 800; color: var(--dark); letter-spacing: -0.3px; }
.logo-sub { font-size: 11px; color: var(--text-light); font-weight: 400; }

.nav { flex: 1; }
.nav ul { display: flex; gap: 4px; list-style: none; justify-content: center; }
.nav ul li { position: relative; }
.nav ul li a {
    display: flex; align-items: center; gap: 5px;
    padding: 8px 14px; border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 600; color: var(--text);
    transition: var(--transition);
}
.nav ul li a.active,
.nav ul li a:hover { color: var(--primary); background: #EBF3FF; }
.nav ul li a i { font-size: 10px; }

/* Dropdown */
.nav .dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-strong);
    min-width: 200px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: var(--transition);
    z-index: 100;
    border: 1px solid var(--border);
}
.nav .has-dropdown:hover .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.nav .dropdown li a { padding: 10px 14px; font-size: 13px; font-weight: 500; border-radius: var(--radius-sm); }
.nav .dropdown li a:hover { background: var(--bg); color: var(--primary); }

.btn-primary {
    background: var(--primary);
    color: var(--white) !important;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    display: flex; align-items: center; gap: 8px;
    transition: var(--transition);
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(21,101,192,0.3);
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(21,101,192,0.4); }

.mobile-menu-btn { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.mobile-menu-btn span { display: block; width: 24px; height: 2.5px; background: var(--dark); border-radius: 2px; transition: var(--transition); }

/* ===== HERO SLIDER ===== */
.hero-slider {
    position: relative;
    height: calc(100vh - var(--header-h) - var(--topbar-h));
    min-height: 520px;
    max-height: 720px;
    overflow: hidden;
}
.slides-wrapper { width: 100%; height: 100%; position: relative; }
.slide {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    opacity: 0;
    transition: opacity 0.8s ease;
    display: flex; align-items: center;
}
.slide.active { opacity: 1; z-index: 1; }
.slide-overlay { position: absolute; inset: 0; }
.slide-content { position: relative; z-index: 2; width: 100%; padding: 40px 0; }
.slide-container { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.slide-text { flex: 1; }
.slide-text h1 {
    font-size: clamp(28px, 4vw, 52px);
    font-weight: 900;
    color: var(--white);
    line-height: 1.3;
    margin-bottom: 18px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.slide-text h1 span { color: var(--primary-light); }
.slide-text p {
    font-size: clamp(14px, 1.6vw, 17px);
    color: rgba(255,255,255,0.88);
    line-height: 1.9;
    max-width: 520px;
    margin-bottom: 32px;
}
.btn-hero {
    display: inline-flex; align-items: center; gap: 10px;
    background: var(--white);
    color: var(--primary) !important;
    padding: 14px 32px;
    border-radius: 40px;
    font-size: 15px;
    font-weight: 800;
    transition: var(--transition);
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}
.btn-hero:hover { background: var(--primary); color: var(--white) !important; transform: translateY(-2px); }

.slide-badges {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
    flex-shrink: 0;
}
.badge-item {
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: var(--radius);
    padding: 16px 20px;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    text-align: center;
}
.badge-item i { font-size: 26px; color: var(--white); }
.badge-item span { font-size: 13px; color: rgba(255,255,255,0.9); font-weight: 600; }

.slider-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    z-index: 10; background: rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    border: 1.5px solid rgba(255,255,255,0.3);
    color: var(--white);
    width: 48px; height: 48px;
    border-radius: 50%;
    font-size: 16px;
    transition: var(--transition);
    display: flex; align-items: center; justify-content: center;
}
.slider-btn:hover { background: var(--white); color: var(--primary); }
.slider-prev { right: 20px; }
.slider-next { left: 20px; }
.slider-dots {
    position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 8px; z-index: 10;
}
.dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: rgba(255,255,255,0.4); cursor: pointer;
    transition: var(--transition);
}
.dot.active { background: var(--white); width: 28px; border-radius: 5px; }

/* ===== SECTION BASE ===== */
.section { padding: 72px 0; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 36px; }
.section-title { font-size: 24px; font-weight: 800; color: var(--dark); position: relative; padding-right: 16px; }
.section-title::before {
    content: '';
    position: absolute;
    right: 0; top: 50%; transform: translateY(-50%);
    width: 5px; height: 100%;
    background: var(--primary);
    border-radius: 3px;
}
.section-link { font-size: 13px; color: var(--primary); font-weight: 700; display: flex; align-items: center; gap: 6px; transition: var(--transition); }
.section-link:hover { gap: 10px; }

/* ===== SERVICES ===== */
.services-section { background: var(--white); }
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}
.service-card {
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 20px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}
.service-card:hover { border-color: var(--primary); transform: translateY(-4px); box-shadow: var(--shadow-strong); }
.service-icon {
    width: 60px; height: 60px;
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 26px;
    margin: 0 auto 16px;
}
.service-card h3 { font-size: 15px; font-weight: 800; margin-bottom: 10px; color: var(--dark); }
.service-card p { font-size: 12.5px; color: var(--text-light); line-height: 1.8; margin-bottom: 14px; }
.card-link { font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }

/* ===== PRODUCTS ===== */
.products-section { background: var(--bg); }
.products-slider-wrapper { position: relative; display: flex; align-items: center; gap: 12px; }
.prod-btn {
    width: 40px; height: 40px; border-radius: 50%;
    border: 1.5px solid var(--border);
    background: var(--white);
    color: var(--text);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: var(--transition);
    font-size: 14px;
}
.prod-btn:hover { background: var(--primary); color: var(--white); border-color: var(--primary); }
.products-track {
    display: flex; gap: 16px;
    overflow: hidden;
    flex: 1;
}
.product-card {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 16px;
    text-align: center;
    min-width: 180px;
    flex: 1;
    transition: var(--transition);
}
.product-card:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-3px); }
.product-img { height: 120px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.product-placeholder {
    width: 80px; height: 80px;
    background: var(--bg);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 32px;
    color: var(--primary-light);
}
.product-card p { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.5; }

/* ===== DUAL SECTION ===== */
.dual-section { background: var(--white); padding: 72px 0; }
.dual-container { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.dual-block {}

/* Projects */
.projects-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.project-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    height: 170px;
    background-size: cover; background-position: center;
    cursor: pointer;
    transition: var(--transition);
}
.project-card:hover { transform: scale(1.02); box-shadow: var(--shadow-strong); }
.proj-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(10,22,40,0.85) 0%, rgba(10,22,40,0.2) 60%, transparent 100%);
}
.proj-tag {
    position: absolute; top: 12px; right: 12px;
    padding: 4px 12px; border-radius: 20px;
    font-size: 11px; font-weight: 700; color: var(--white);
    z-index: 2;
}
.proj-info {
    position: absolute; bottom: 0; right: 0; left: 0;
    padding: 12px 16px;
    z-index: 2;
}
.proj-info h4 { font-size: 13px; font-weight: 800; color: var(--white); margin-bottom: 4px; }
.proj-info span { font-size: 11px; color: rgba(255,255,255,0.75); display: flex; align-items: center; gap: 4px; }

/* Process */
.process-steps { display: flex; flex-direction: column; gap: 0; }
.process-step {
    display: flex; align-items: flex-start; gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    position: relative;
}
.process-step:last-child { border-bottom: none; }
.step-num {
    font-size: 28px; font-weight: 900;
    color: var(--border);
    min-width: 48px;
    line-height: 1;
}
.step-icon {
    width: 42px; height: 42px;
    background: #EBF3FF;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: var(--primary);
    font-size: 17px;
    flex-shrink: 0;
}
.step-body {}
.step-body h4 { font-size: 14px; font-weight: 800; color: var(--dark); margin-bottom: 4px; }
.step-body p { font-size: 12.5px; color: var(--text-light); line-height: 1.7; }

/* ===== STATS ===== */
.stats-section {
    background: linear-gradient(135deg, var(--dark) 0%, var(--mid) 100%);
    padding: 56px 0;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
}
.stat-item {
    text-align: center;
    padding: 24px;
    border-left: 1px solid rgba(255,255,255,0.1);
}
.stat-item:last-child { border-left: none; }
.stat-num {
    font-size: clamp(28px, 3.5vw, 42px);
    font-weight: 900;
    color: var(--white);
    margin-bottom: 8px;
}
.stat-label { font-size: 13px; color: rgba(255,255,255,0.65); font-weight: 500; }

/* ===== FOOTER ===== */
.footer {}
.footer-top {
    background: var(--dark);
    padding: 64px 0 40px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr 1.5fr;
    gap: 40px;
}
.footer-brand {}
.footer-logo {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 18px;
}
.footer-logo svg { width: 40px; height: 40px; }
.footer-brand-name { display: block; font-size: 16px; font-weight: 800; color: var(--white); }
.footer-brand-sub { display: block; font-size: 11px; color: rgba(255,255,255,0.5); margin-top: 2px; }
.footer-about { font-size: 13px; color: rgba(255,255,255,0.6); line-height: 1.9; margin-bottom: 20px; }
.btn-footer-cta {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--primary);
    color: var(--white);
    padding: 11px 22px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    transition: var(--transition);
}
.btn-footer-cta:hover { background: var(--primary-dark); transform: translateY(-1px); }
.footer-col h4 { font-size: 15px; font-weight: 800; color: var(--white); margin-bottom: 18px; padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { font-size: 13px; color: rgba(255,255,255,0.6); transition: var(--transition); display: flex; align-items: center; gap: 6px; }
.footer-col ul li a::before { content: '›'; font-size: 16px; color: var(--primary-light); }
.footer-col ul li a:hover { color: var(--white); padding-right: 4px; }
.contact-list li { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; font-size: 13px; color: rgba(255,255,255,0.65); line-height: 1.6; }
.contact-list li::before { display: none; }
.contact-list li i { color: var(--primary-light); font-size: 15px; margin-top: 2px; flex-shrink: 0; }

/* ENAMAD / Trust Badges */
.trust-badges { margin-top: 20px; }
.trust-badges h5 { font-size: 13px; font-weight: 700; color: rgba(255,255,255,0.7); margin-bottom: 12px; }
.enamad-badges { display: flex; gap: 12px; }
.enamad-badge {
    display: flex;
    text-decoration: none;
    transition: var(--transition);
}
.enamad-badge:hover { transform: scale(1.05); }
.enamad-inner {
    background: var(--white);
    border-radius: 10px;
    padding: 10px 12px;
    text-align: center;
    min-width: 80px;
    display: flex; flex-direction: column; align-items: center; gap: 5px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.enamad-star-row { color: #F9A825; font-size: 9px; display: flex; gap: 2px; }
.enamad-logo-placeholder {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.enamad-logo-placeholder i { font-size: 22px; color: var(--primary); }
.enamad-logo-placeholder span { font-size: 10px; font-weight: 800; color: var(--dark); line-height: 1.2; }
.enamad-inner small { font-size: 9px; color: var(--text-light); }
.samandehi .enamad-logo-placeholder i { color: #2E7D32; }

/* Newsletter */
.footer-newsletter p { font-size: 13px; color: rgba(255,255,255,0.6); line-height: 1.8; margin-bottom: 16px; }
.newsletter-form { display: flex; gap: 0; border-radius: 30px; overflow: hidden; border: 1.5px solid rgba(255,255,255,0.15); }
.newsletter-input {
    flex: 1; padding: 11px 16px;
    background: rgba(255,255,255,0.07);
    border: none; outline: none;
    font-family: var(--font); font-size: 13px;
    color: var(--white);
    direction: rtl;
}
.newsletter-input::placeholder { color: rgba(255,255,255,0.35); }
.newsletter-btn {
    background: var(--primary); color: var(--white);
    padding: 11px 20px;
    font-family: var(--font); font-size: 13px; font-weight: 700;
    transition: var(--transition);
}
.newsletter-btn:hover { background: var(--primary-dark); }
.social-links { display: flex; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.social-link {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.65);
    display: flex; align-items: center; justify-content: center;
    font-size: 15px;
    transition: var(--transition);
}
.social-link:hover { background: var(--primary); border-color: var(--primary); color: var(--white); transform: translateY(-2px); }

/* Footer Bottom */
.footer-bottom {
    background: var(--dark2);
    padding: 16px 0;
}
.footer-bottom-inner {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 12.5px;
    color: rgba(255,255,255,0.45);
}
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { color: rgba(255,255,255,0.45); transition: var(--transition); }
.footer-bottom-links a:hover { color: var(--white); }

/* ===== BACK TO TOP ===== */
.back-to-top {
    position: fixed; bottom: 28px; left: 28px;
    width: 46px; height: 46px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 16px rgba(21,101,192,0.4);
    z-index: 999;
    opacity: 0; pointer-events: none;
    transform: translateY(10px);
    transition: var(--transition);
}
.back-to-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top:hover { background: var(--primary-dark); transform: translateY(-2px); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
    .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
    .footer-brand { grid-column: span 3; }
    .stats-grid { grid-template-columns: repeat(3, 1fr); }
    .stat-item:nth-child(3) { border-left: none; }
    .dual-container { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    .nav { display: none; }
    .mobile-menu-btn { display: flex; margin-right: auto; }
    .header-cta { display: none; }
    .slide-badges { display: none; }
    .slide-text h1 { font-size: 26px; }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: span 2; }
}
@media (max-width: 600px) {
    .topbar-right span:last-child { display: none; }
    .services-grid { grid-template-columns: 1fr; }
    .projects-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-brand { grid-column: span 1; }
    .footer-bottom-inner { flex-direction: column; gap: 8px; text-align: center; }
    .enamad-badges { justify-content: center; }
}

/* Mobile Nav */
.nav.open { display: flex; flex-direction: column; position: absolute; top: var(--header-h); right: 0; left: 0; background: var(--white); padding: 16px; box-shadow: var(--shadow-strong); z-index: 999; }
.nav.open ul { flex-direction: column; gap: 4px; }
.nav.open ul li a { padding: 12px 16px; font-size: 15px; }
