:root {
    --primary-color: #FFA700;
    --primary-color-rgb: 255, 167, 0;
    --primary-gradient: linear-gradient(135deg, #FFA700, #FFD580);
    --bg-color: #FFFFFF;
    --bg-color-rgb: 255, 255, 255;
    --text-color: #171717;
    --glass-bg: rgba(0, 0, 0, 0.04);
    --glass-border: rgba(0, 0, 0, 0.06);
}

/* Manual Dark Class */
body.dark {
    --bg-color: #121212;
    --bg-color-rgb: 18, 18, 18;
    --text-color: #f5f5f5;
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.06);
}

@media (prefers-color-scheme: dark) {
    :root:not(.light-theme) body:not(.light-theme) {
        --bg-color: #121212;
        --bg-color-rgb: 18, 18, 18;
        --text-color: #f5f5f5;
        --glass-bg: rgba(255, 255, 255, 0.04);
        --glass-border: rgba(255, 255, 255, 0.06);
    }
}

/* ----- reset & base ----- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Vazir', sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
}
a { text-decoration: none; color: inherit; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }

/* ----- scrollbar ----- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-color); }
::-webkit-scrollbar-thumb { background: var(--primary-color); border-radius: 20px; }

/* ----- background animations ----- */
.bg-blobs {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: -2; overflow: hidden; pointer-events: none;
}
.blob {
    position: absolute; width: 600px; height: 600px;
    background: var(--primary-color); filter: blur(120px);
    opacity: 0.12; border-radius: 50%;
    transition: transform 0.2s ease-out;
}
.blob-1 { top: -200px; right: -200px; }
.blob-2 { bottom: -200px; left: -200px; }
.blob-3 { top: 30%; left: 20%; width: 400px; height: 400px; }

/* Moving Lines Background */
.bg-lines {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1; overflow: hidden; pointer-events: none;
}
.line {
    position: absolute;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    height: 1px;
    width: 200px;
    opacity: 0.1;
    animation: moveLine linear infinite;
}
@keyframes moveLine {
    0% { transform: translate(-200px, -200px) rotate(45deg); opacity: 0; }
    50% { opacity: 0.2; }
    100% { transform: translate(calc(100vw + 200px), calc(100vh + 200px)) rotate(45deg); opacity: 0; }
}
.line:nth-child(1) { top: 10%; left: -10%; animation-duration: 8s; animation-delay: 0s; }
.line:nth-child(2) { top: 30%; left: -15%; animation-duration: 12s; animation-delay: 2s; }
.line:nth-child(3) { top: 50%; left: -5%; animation-duration: 10s; animation-delay: 4s; }
.line:nth-child(4) { top: 70%; left: -20%; animation-duration: 15s; animation-delay: 1s; }
.line:nth-child(5) { top: 90%; left: -10%; animation-duration: 9s; animation-delay: 5s; }

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(2deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

.floating-element {
    animation: float 6s ease-in-out infinite;
}

/* ----- components ----- */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--glass-border);
    border-radius: 2.5rem;
    transition: 0.3s;
}
.glass:hover {
    border-color: var(--primary-color);
}

/* Tab Styles */
.tabs-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    background: var(--glass-bg);
    padding: 0.5rem;
    border-radius: 15px;
    border: 1px solid var(--glass-border);
}
.tab-btn {
    flex: 1;
    padding: 1rem;
    border: none;
    background: transparent;
    color: var(--text-color);
    font-weight: 700;
    cursor: pointer;
    border-radius: 12px;
    transition: 0.3s;
}
.tab-btn.active {
    background: var(--primary-color);
    color: #fff;
}

.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 600; font-size: 0.95rem; opacity: 0.9; }
.form-control {
    width: 100%; padding: 1rem 1.2rem; border-radius: 15px;
    border: 1px solid var(--glass-border); background: var(--glass-bg);
    color: var(--text-color); font-family: inherit; font-size: 1rem;
    transition: 0.3s;
}
.form-control:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 4px rgba(var(--primary-color-rgb), 0.1); }

.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; margin-top: 3rem; }
.contact-info-card { padding: 2rem; text-align: center; }
.contact-info-card i { font-size: 2rem; color: var(--primary-color); margin-bottom: 1rem; }

.social-links { display: flex; justify-content: center; gap: 1.5rem; margin-top: 2rem; }
.social-link {
    width: 50px; height: 50px; border-radius: 50%;
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; transition: 0.3s;
}
.social-link:hover { background: var(--primary-color); color: #fff; transform: translateY(-5px); }

.map-container {
    width: 100%; height: 350px; border-radius: 2.5rem; overflow: hidden;
    border: 1px solid var(--glass-border); margin-top: 2rem;
}

.btn-primary {
    display: inline-flex; align-items: center; gap: 0.6rem;
    background: var(--primary-gradient); color: #fff;
    padding: 0.9rem 2.2rem; border-radius: 60px; font-weight: 700;
    border: none; cursor: pointer; transition: 0.4s;
    box-shadow: 0 8px 28px rgba(255, 167, 0, 0.3);
}
.btn-primary:hover { transform: translateY(-4px) scale(1.02); box-shadow: 0 14px 40px rgba(255, 167, 0, 0.5); }

.btn-outline {
    display: inline-flex; align-items: center; gap: 0.6rem;
    background: transparent; color: var(--text-color);
    padding: 0.9rem 2.2rem; border-radius: 60px; font-weight: 700;
    border: 2px solid var(--primary-color); cursor: pointer; transition: 0.4s;
}
.btn-outline:hover { background: var(--primary-color); color: #fff; transform: translateY(-4px); }

/* ----- header ----- */
header { position: fixed; top: 0; left: 0; right: 0; z-index: 999; padding: 1.2rem 0; transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
header.scrolled {
    background: rgba(var(--bg-color-rgb), 0.7);
    backdrop-filter: blur(20px); border-bottom: 1px solid var(--glass-border);
    padding: 0.8rem 0;
}

.nav-links { display: flex; align-items: center; gap: 2.5rem; list-style: none; }
.nav-links a { font-weight: 600; opacity: 0.7; transition: 0.3s; position: relative; }
.nav-links a::after {
    content: ''; position: absolute; bottom: -5px; left: 0; width: 0; height: 2px;
    background: var(--primary-gradient); transition: 0.3s;
}
.nav-links a:hover { opacity: 1; color: var(--primary-color); }
.nav-links a:hover::after { width: 100%; }

.theme-toggle {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: 0.3s; color: var(--text-color);
}
.theme-toggle:hover { transform: rotate(15deg) scale(1.1); background: var(--primary-color); color: #fff; }

/* ----- hero ----- */
.hero { min-height: 100vh; display: flex; align-items: center; padding-top: 80px; position: relative; }
.hero-text h1 { font-size: 4rem; font-weight: 900; line-height: 1.1; margin-bottom: 1.5rem; }
.hero-text h1 span { background: var(--primary-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-text p { font-size: 1.3rem; opacity: 0.8; margin-bottom: 3rem; max-width: 600px; }

/* ----- stats ----- */
.stats-section { padding: 4rem 0; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; }
.stat-item { text-align: center; padding: 2.5rem; transition: 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.stat-item:hover { transform: translateY(-15px) scale(1.05); box-shadow: 0 20px 40px rgba(0,0,0,0.1); }
.stat-number { font-size: 3rem; font-weight: 900; color: var(--primary-color); margin-bottom: 0.5rem; }
.stat-label { font-size: 1.1rem; opacity: 0.7; font-weight: 600; }

/* ----- features ----- */
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; padding: 6rem 0; }
.feature-row.reverse { direction: ltr; }
.feature-row.reverse .feature-text { direction: rtl; }
.feature-text h2 { font-size: 2.5rem; font-weight: 800; margin-bottom: 1.5rem; }
.feature-text p { font-size: 1.15rem; opacity: 0.75; }
.feature-image img { width: 100%; max-width: 450px; filter: drop-shadow(0 20px 40px rgba(0,0,0,0.1)); }

/* ----- reviews ----- */
.reviews-section { padding: 8rem 0; background: rgba(var(--primary-color-rgb), 0.03); overflow: hidden; }
.reviews-wrapper {
    display: flex; gap: 2.5rem; margin-top: 4rem;
    overflow-x: auto; padding: 2rem 1rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Firefox */
}
.reviews-wrapper::-webkit-scrollbar { display: none; } /* Chrome/Safari */

.review-card {
    min-width: 350px; flex: 0 0 auto;
    padding: 2.5rem; position: relative;
    scroll-snap-align: center;
}
.review-text { font-style: italic; margin-bottom: 1.5rem; font-size: 1.1rem; }
.review-user { display: flex; align-items: center; gap: 1rem; }
.user-avatar { width: 50px; height: 50px; border-radius: 50%; background: var(--primary-gradient); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: bold; }
.user-info h4 { font-weight: 700; }
.user-info span { font-size: 0.9rem; opacity: 0.6; }

/* ----- faq ----- */
.faq-section { padding: 8rem 0; }
.faq-list { max-width: 800px; margin: 4rem auto 0; }
.faq-item { margin-bottom: 1.5rem; overflow: hidden; }
.faq-question {
    padding: 1.5rem 2rem; display: flex; justify-content: space-between; align-items: center;
    cursor: pointer; font-weight: 700; transition: 0.3s;
}
.faq-question:hover { background: rgba(255, 167, 0, 0.05); }
.faq-answer { padding: 0 2rem; max-height: 0; opacity: 0; transition: 0.4s ease; overflow: hidden; }
.faq-item.active .faq-answer { padding: 1rem 2rem 2rem; max-height: 200px; opacity: 1; }
.faq-item.active .fa-chevron-down { transform: rotate(180deg); }

/* ----- footer ----- */
footer { padding: 5rem 0 2rem; border-top: 1px solid var(--glass-border); margin-top: 4rem; }

/* ----- utility ----- */
.section-title { font-size: 3rem; font-weight: 800; text-align: center; margin-bottom: 1rem; }
.section-subtitle { text-align: center; opacity: 0.6; font-size: 1.2rem; margin-bottom: 4rem; }
.text-gradient { background: var(--primary-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

@media (max-width: 968px) {
    .hero-text h1 { font-size: 3rem; }
    .feature-row { grid-template-columns: 1fr; text-align: center; gap: 2rem; }
    .feature-row.reverse { direction: rtl; }
    .hero { text-align: center; }
    .hero-text p { margin: 0 auto 3rem; }
    .nav-links { display: none; }
}

/* Hide Header & Footer in PWA Standalone Mode */
@media (display-mode: standalone) {
    header, footer {
        display: none !important;
    }
    body {
        padding-top: 0 !important;
    }
    .hero, .content-section {
        padding-top: 2rem !important;
    }
}
