@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800&family=Lalezar&display=swap');

:root {
    --cream: #F0FAF1;
    --cream-soft: #E1F5E3;
    --forest: #1F8B2E;
    --forest-dark: #17301D;
    --sage: #7FC98C;
    --sage-light: #CFEED5;
    --honey: #5CFF5F;
    --honey-dark: #2FAE3A;
    --charcoal: #47494A;
    --ink: #26302A;
    --ink-soft: #5A6B5E;
    --white: #FFFFFF;
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 10px;
    --shadow: 0 10px 30px rgba(31, 139, 46, 0.10);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: 'Vazirmatn', sans-serif;
    background: var(--cream);
    color: var(--ink);
    line-height: 1.9;
    direction: rtl;
}

h1, h2, h3, h4 { font-family: 'Vazirmatn', sans-serif; font-weight: 700; color: var(--forest-dark); margin: 0 0 .5em; }

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { padding: 0; margin: 0; list-style: none; }

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

/* ---------- Header ---------- */
.site-header {
    background: var(--white);
    position: sticky; top: 0; z-index: 50;
    box-shadow: 0 2px 14px rgba(63,93,78,0.06);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: 'Lalezar', 'Vazirmatn', sans-serif; font-size: 26px; color: var(--forest); }
.brand span.dot { width: 10px; height: 10px; background: var(--honey); border-radius: 50%; display: inline-block; }
.brand img.logo { height: 42px; width: auto; border-radius: 10px; }

.main-nav ul { display: flex; gap: 6px; }
.main-nav a {
    padding: 10px 16px; border-radius: 999px; font-weight: 500; color: var(--forest-dark);
    transition: background .2s, color .2s;
}
.main-nav a:hover, .main-nav a.active { background: var(--sage-light); color: var(--forest-dark); }

.header-actions { display: flex; gap: 10px; align-items: center; }
.btn {
    display: inline-block; padding: 12px 24px; border-radius: 999px; font-weight: 600;
    border: none; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; font-family: inherit; font-size: 15px;
}
.btn-primary { background: var(--honey); color: var(--forest-dark); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(92,255,95,.4); }
.btn-outline { background: transparent; border: 2px solid var(--forest); color: var(--forest); }
.btn-outline:hover { background: var(--forest); color: var(--white); }
.btn-block { width: 100%; text-align: center; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-danger { background: #C0553F; color: #fff; }

.mobile-toggle { display: none; background: none; border: none; font-size: 26px; color: var(--forest); cursor: pointer; }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    background: linear-gradient(160deg, var(--sage-light) 0%, var(--cream) 55%);
    padding: 90px 0 130px;
    overflow: hidden;
}
.hero .container { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero .eyebrow { display: inline-block; background: var(--white); color: var(--forest); padding: 6px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; margin-bottom: 18px; }
.hero h1 { font-family: 'Lalezar', 'Vazirmatn', sans-serif; font-size: 52px; line-height: 1.35; font-weight: 400; color: var(--forest-dark); }
.hero p.lead { font-size: 18px; color: var(--ink-soft); max-width: 480px; margin: 18px 0 30px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-art { position: relative; }
.hero-art svg { width: 100%; height: auto; }

.wave-divider { display: block; width: 100%; margin-top: -6px; line-height: 0; }
.wave-divider svg { width: 100%; height: 70px; display: block; }

/* ---------- Sections ---------- */
.section { padding: 80px 0; }
.section-cream { background: var(--cream-soft); }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 50px; }
.section-head .eyebrow { color: var(--honey-dark); font-weight: 700; letter-spacing: .5px; font-size: 14px; }
.section-head h2 { font-size: 34px; margin-top: 8px; }
.section-head p { color: var(--ink-soft); }

/* ---------- Cards / Grid ---------- */
.grid { display: grid; gap: 28px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
    background: var(--white); border-radius: var(--radius-md); overflow: hidden;
    box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 18px 34px rgba(63,93,78,.16); }
.card .card-img { height: 190px; background: var(--sage-light) center/cover no-repeat; display: flex; align-items: center; justify-content: center; color: var(--forest); font-size: 40px; }
.card .card-body { padding: 22px; }
.card .card-body h3 { font-size: 19px; }
.card .price-tag { display: inline-block; margin-top: 10px; background: var(--cream-soft); color: var(--forest-dark); padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.card .card-body .desc { color: var(--ink-soft); font-size: 14.5px; margin: 10px 0 16px; }

.feature-row { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 26px; }
.feature-icon { flex: none; width: 54px; height: 54px; border-radius: 16px; background: var(--sage-light); display: flex; align-items: center; justify-content: center; font-size: 24px; }

.testimonial { background: var(--white); border-radius: var(--radius-md); padding: 26px; box-shadow: var(--shadow); }
.testimonial .stars { color: var(--honey); margin-bottom: 10px; letter-spacing: 2px; }
.testimonial .who { margin-top: 14px; font-weight: 700; color: var(--forest-dark); }

/* ---------- Forms ---------- */
.form-box {
    background: var(--white); border-radius: var(--radius-lg); padding: 40px; box-shadow: var(--shadow);
    max-width: 560px; margin: 0 auto;
}
.form-box.wide { max-width: 100%; }
label { display: block; font-weight: 600; margin-bottom: 8px; color: var(--forest-dark); font-size: 14.5px; }
input, select, textarea {
    width: 100%; padding: 13px 16px; border-radius: var(--radius-sm); border: 1.5px solid var(--sage-light);
    background: var(--cream-soft); font-family: inherit; font-size: 15px; color: var(--ink); margin-bottom: 20px;
    transition: border-color .2s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--sage); background: var(--white); }
textarea { min-height: 120px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.alert { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 22px; font-size: 14.5px; }
.alert-success { background: #E4F1E6; color: #2C6B39; border: 1px solid #B9DDBE; }
.alert-error { background: #FBE7E2; color: #B23B23; border: 1px solid #F1C3B7; }

/* ---------- Footer ---------- */
.site-footer { background: var(--forest-dark); color: var(--sage-light); padding: 60px 0 24px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.site-footer h4 { color: var(--white); font-size: 17px; }
.site-footer a { color: var(--sage-light); }
.site-footer a:hover { color: var(--honey); }
.site-footer .brand { color: var(--white); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 20px; text-align: center; font-size: 13.5px; color: var(--sage-light); }

/* ---------- Dashboard / Panel ---------- */
.dash-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 70vh; gap: 0; }
.dash-sidebar { background: var(--forest-dark); color: var(--sage-light); padding: 30px 20px; border-radius: var(--radius-md) 0 0 var(--radius-md); }
.dash-sidebar h3 { color: var(--white); font-size: 16px; margin-bottom: 22px; }
.dash-sidebar a { display: block; padding: 11px 14px; border-radius: var(--radius-sm); margin-bottom: 6px; color: var(--sage-light); font-size: 14.5px; }
.dash-sidebar a:hover, .dash-sidebar a.active { background: rgba(255,255,255,.1); color: var(--white); }
.dash-main { background: var(--white); padding: 34px; border-radius: 0 var(--radius-md) var(--radius-md) 0; box-shadow: var(--shadow); }

.stat-cards { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; margin-bottom: 32px; }
.stat-card { background: var(--cream-soft); border-radius: var(--radius-md); padding: 22px; }
.stat-card .num { font-size: 30px; font-weight: 700; color: var(--forest-dark); }
.stat-card .lbl { color: var(--ink-soft); font-size: 13.5px; }

table { width: 100%; border-collapse: collapse; }
table th, table td { padding: 13px 12px; text-align: right; border-bottom: 1px solid var(--cream-soft); font-size: 14.5px; }
table th { color: var(--forest-dark); font-weight: 700; background: var(--cream-soft); }
table tr:hover td { background: #FAFAF5; }

.badge { padding: 4px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.badge-pending { background: #E1F5E3; color: var(--honey-dark); }
.badge-confirmed { background: #DDEEDF; color: #2C6B39; }
.badge-cancelled { background: #FBE0DA; color: #B23B23; }
.badge-done { background: #DDE6F2; color: #2E5A8F; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--ink-soft); }
.empty-state .icon { font-size: 44px; margin-bottom: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .hero .container { grid-template-columns: 1fr; }
    .hero-art { order: -1; max-width: 280px; margin: 0 auto; }
    .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .main-nav { display: none; }
    .mobile-toggle { display: block; }
    .dash-shell { grid-template-columns: 1fr; }
    .dash-sidebar { border-radius: var(--radius-md) var(--radius-md) 0 0; display: flex; flex-wrap: wrap; gap: 8px; padding: 18px; }
    .dash-sidebar h3 { width: 100%; }
    .dash-main { border-radius: 0 0 var(--radius-md) var(--radius-md); }
    .stat-cards { grid-template-columns: 1fr 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .hero h1 { font-size: 36px; }
}

.main-nav.open ul {
    display: flex; flex-direction: column; position: absolute; top: 70px; right: 0; left: 0;
    background: var(--white); padding: 16px 24px; box-shadow: 0 12px 20px rgba(0,0,0,.08);
}
@media (max-width: 900px) {
    .main-nav.open { display: block; }
}

/* ---------- Mobile Carousel (خدمات / نظرات در موبایل) ---------- */
.carousel-wrap { position: relative; }
.carousel-nav { display: none; }

/* حالت کاروسل همیشگی (هم دسکتاپ هم موبایل) - برای صفحه خدمات */
.carousel-wrap.force .grid-3 {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 22px;
    padding: 4px 6px 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.carousel-wrap.force .grid-3::-webkit-scrollbar { display: none; }
.carousel-wrap.force .grid-3 > * {
    flex: 0 0 280px;
    scroll-snap-align: start;
}
.carousel-wrap.force .carousel-nav {
    display: flex;
    justify-content: space-between;
    position: absolute;
    top: 40%;
    left: -6px;
    right: -6px;
    pointer-events: none;
    z-index: 5;
}
.carousel-wrap.force .carousel-nav button {
    pointer-events: auto;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--white);
    box-shadow: var(--shadow);
    border: none;
    font-size: 18px;
    color: var(--forest-dark);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
}

@media (max-width: 700px) {
    .carousel-wrap .grid-3 {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 18px;
        padding: 4px 6px 14px;
        margin: 0 -6px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .carousel-wrap .grid-3::-webkit-scrollbar { display: none; }
    .carousel-wrap .grid-3 > * {
        flex: 0 0 82%;
        scroll-snap-align: center;
    }
    .carousel-nav {
        display: flex;
        justify-content: space-between;
        position: absolute;
        top: 40%;
        left: -4px;
        right: -4px;
        pointer-events: none;
        z-index: 5;
    }
    .carousel-nav button {
        pointer-events: auto;
        width: 38px; height: 38px;
        border-radius: 50%;
        background: var(--white);
        box-shadow: var(--shadow);
        border: none;
        font-size: 18px;
        color: var(--forest-dark);
        display: flex; align-items: center; justify-content: center;
        cursor: pointer;
    }
}

/* ---------- Auto Carousel (حرکت خودکار راست‌به‌چپ - بدون دکمه/اسکرول دستی) ---------- */
.auto-carousel {
    overflow: hidden;
}
.auto-carousel-track {
    display: flex;
    width: max-content;
    gap: 22px;
    will-change: transform;
}
.auto-carousel-track > * {
    flex: 0 0 260px;
}
@media (max-width: 700px) {
    .auto-carousel-track > * { flex: 0 0 200px; }
}
