/* ==========================================================
   فایل استایل نهایی - بهبودیافته و حرفه‌ای
   ========================================================== */

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

:root {
    --primary-color: #1B4D2E;
    --secondary-color: #C9A96E;
    --accent-color: #8B1A1A;
    
    --bg-primary: #f5f0e8;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.88);
    --text-primary: #2c1810;
    --text-secondary: #6b5a4a;
    --border-color: rgba(166, 123, 91, 0.12);
    --shadow-color: rgba(0, 0, 0, 0.06);
    --glass-bg: rgba(255, 255, 255, 0.95);
    
    --particle-color: rgba(201, 169, 110, 0.12);
    --pattern-opacity: 0.08;
    --body-opacity: 0.04;
    --flower-opacity: 0.04;
    
    --transition: 0.3s ease;
    --border-radius: 18px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', 'IranSans', Tahoma, Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
    margin: 0;
    position: relative;
    overflow-x: hidden;
}

/* ===== پس‌زمینه‌ها ===== */
.background-body {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: url('../images/backbody.png');
    background-repeat: repeat;
    background-size: 120px 120px;
    opacity: var(--body-opacity);
}

.background-pattern {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background-image: url('../images/bac.png');
    background-repeat: repeat-x;
    background-position: top center;
    background-size: 120px auto;
    opacity: var(--pattern-opacity);
    mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
}

/* ===== ذرات ===== */
.particles-container {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--particle-color);
    border-radius: 50%;
    animation: floatParticle 15s linear infinite alternate;
}

@keyframes floatParticle {
    0% { transform: translate(0, 0); opacity: 0.05; }
    100% { transform: translate(var(--tx, 40px), var(--ty, -20px)); opacity: 0.4; }
}

/* ===== تزئینات ===== */
.decoration-flower {
    position: fixed;
    z-index: 1;
    pointer-events: none;
    background-image: url('../images/flower-swirl10.png');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: var(--flower-opacity);
}

.flower-1 {
    bottom: 10px;
    right: 10px;
    width: 80px;
    height: 80px;
}

.flower-2 {
    top: 25px;
    left: 18px;
    width: 55px;
    height: 55px;
}

/* ===== کانتینر اصلی ===== */
.hero-overlay {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 950px;
}

/* ===== کانتینر اصلی با طرح اصیل ایرانی-اسلامی ===== */
.container {
    background: var(--glass-bg);
    border-radius: var(--border-radius);
    padding: 28px 28px 20px;
    
    /* لایه‌های تزئینی */
    border: 2px solid var(--secondary-color);
    border-top: 4px solid var(--accent-color);
    border-bottom: 4px solid var(--primary-color);
    
    /* سایه‌های برجسته و عمق‌دار */
    box-shadow: 
        0 15px 45px var(--shadow-color),
        inset 0 0 60px rgba(201, 169, 110, 0.04),
        inset 0 -2px 0 var(--secondary-color);
    
    text-align: center;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    
    /* ایجاد حس کهنگی و اصالت با افکت‌های ظریف */
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(201, 169, 110, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(27, 77, 46, 0.02) 0%, transparent 50%),
        repeating-linear-gradient(45deg, 
            transparent 0px, 
            transparent 2px, 
            rgba(166, 123, 91, 0.01) 2px, 
            rgba(166, 123, 91, 0.01) 4px
        );
}

/* ===== کتیبه بالایی (نوار تزئینی بالای باکس) ===== */
.container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 20%;
    right: 20%;
    height: 4px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--secondary-color) 20%, 
        var(--accent-color) 50%, 
        var(--secondary-color) 80%, 
        transparent
    );
    border-radius: 2px;
    opacity: 0.5;
    z-index: 1;
}

/* ===== کتیبه پایینی (نوار تزئینی پایین باکس) ===== */
.container::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 20%;
    right: 20%;
    height: 4px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--primary-color) 20%, 
        var(--secondary-color) 50%, 
        var(--primary-color) 80%, 
        transparent
    );
    border-radius: 2px;
    opacity: 0.4;
    z-index: 1;
}

/* ===== گوشه‌های تزئینی (شبیه به کتیبه‌های مساجد) ===== */
.container .corner-decoration {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 2px solid var(--secondary-color);
    opacity: 0.15;
    z-index: 1;
    pointer-events: none;
}

.container .corner-decoration.corner-tl {
    top: 8px;
    left: 8px;
    border-right: none;
    border-bottom: none;
    border-radius: 4px 0 0 0;
}

.container .corner-decoration.corner-tr {
    top: 8px;
    right: 8px;
    border-left: none;
    border-bottom: none;
    border-radius: 0 4px 0 0;
}

.container .corner-decoration.corner-bl {
    bottom: 8px;
    left: 8px;
    border-right: none;
    border-top: none;
    border-radius: 0 0 0 4px;
}

.container .corner-decoration.corner-br {
    bottom: 8px;
    right: 8px;
    border-left: none;
    border-top: none;
    border-radius: 0 0 4px 0;
}

/* ===== افکت نورانی ملایم در مرکز باکس ===== */
.container .glow-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    background: radial-gradient(ellipse at center, 
        rgba(201, 169, 110, 0.04) 0%, 
        transparent 70%
    );
    pointer-events: none;
    z-index: 0;
    border-radius: 50%;
    animation: glowPulse 6s ease-in-out infinite alternate;
}

@keyframes glowPulse {
    0% { opacity: 0.3; transform: translate(-50%, -50%) scale(0.8); }
    100% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.1); }
}

/* ===== اطمینان از قرارگیری محتوا روی همه لایه‌ها ===== */
.container > * {
    position: relative;
    z-index: 2;
}
/* ===== لوگو ===== */
.logo {
    margin-bottom: 4px;
    position: relative;
    z-index: 1;
}

.logo-img {
    max-height: 90px;
    width: auto;
    margin-bottom: 4px;
    filter: drop-shadow(0 0 25px rgba(201, 169, 110, 0.20));
    animation: logoGlow 3.5s ease-in-out infinite alternate;
    transition: filter 0.4s ease;
}

.logo-img:hover {
    filter: drop-shadow(0 0 45px rgba(201, 169, 110, 0.40));
}

@keyframes logoGlow {
    0% {
        filter: drop-shadow(0 0 15px rgba(201, 169, 110, 0.10));
        transform: scale(1);
    }
    100% {
        filter: drop-shadow(0 0 40px rgba(201, 169, 110, 0.30));
        transform: scale(1.02);
    }
}

.logo h1 {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: 2px;
    color: var(--primary-color);
    margin: 0;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(27, 77, 46, 0.06);
}

.logo .sub {
    font-size: 11px;
    color: var(--text-secondary);
    letter-spacing: 2px;
    font-weight: 300;
    display: inline-block;
    padding-top: 4px;
    border-top: 1.5px solid var(--border-color);
    margin-top: 2px;
}

/* ===== خطوط ===== */
.combined-line {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin: 8px auto 10px;
}

.combined-line .line-primary {
    width: 18px;
    height: 2px;
    background: var(--primary-color);
    border-radius: 2px;
}

.combined-line .line-secondary {
    width: 28px;
    height: 2px;
    background: var(--secondary-color);
    border-radius: 2px;
}

.combined-line .line-accent {
    width: 18px;
    height: 2px;
    background: var(--accent-color);
    border-radius: 2px;
}

/* ===== شعار ===== */
.slogan {
    font-size: 17px;
    font-weight: 300;
    color: var(--text-primary);
    line-height: 2;
    max-width: 580px;
    margin: 0 auto 6px;
    padding: 0 10px;
    background: rgba(255, 255, 255, 0.30);
    border-radius: 12px;
    padding: 6px 16px;
    backdrop-filter: blur(4px);
}

.slogan strong { color: var(--primary-color); font-weight: 800; }
.slogan .highlight-accent { color: var(--accent-color); font-weight: 700; }
.slogan .highlight-secondary { color: var(--secondary-color); font-weight: 700; }

/* ===== عنوان بخش ===== */
.section-title {
    font-size: 12px;
    font-weight: 300;
    color: var(--text-secondary);
    letter-spacing: 2.5px;
    margin: 14px 0 12px;
}

.section-title span {
    background: var(--glass-bg);
    padding: 0 14px;
}

/* ===== کارت‌ها ===== */
.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 4px 0 8px;
}

.card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 14px 10px 10px;
    border: 1px solid var(--border-color);
    border-bottom: 2px solid var(--secondary-color);
    transition: all var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--secondary-color);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.card:hover::after {
    opacity: 1;
}

.card:hover {
    transform: translateY(-3px);
    border-bottom-color: var(--accent-color);
    box-shadow: 0 8px 25px var(--shadow-color);
    background: var(--bg-secondary);
}

/* کارت ویژه (خدمات) */
.card-featured {
    background: linear-gradient(135deg, rgba(27, 77, 46, 0.04), rgba(201, 169, 110, 0.04));
    border-bottom-color: var(--primary-color);
}

.card-featured::before {
    content: '★';
    position: absolute;
    top: 4px;
    right: 8px;
    font-size: 10px;
    color: var(--secondary-color);
    opacity: 0.4;
}

.card .icon-wrapper {
    display: inline-block;
    width: 38px;
    height: 38px;
    margin-bottom: 5px;
}

.card .icon-wrapper svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 1.8;
    transition: stroke var(--transition), transform 0.3s ease;
}

.card:hover .icon-wrapper svg {
    stroke: var(--accent-color);
    transform: scale(1.06);
}

.card .icon-wrapper .bg-circle {
    fill: rgba(27, 77, 46, 0.03);
    stroke: var(--border-color);
    transition: fill var(--transition), stroke var(--transition);
}

.card:hover .icon-wrapper .bg-circle {
    fill: rgba(139, 26, 26, 0.04);
    stroke: var(--accent-color);
}

.card h3 {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 800;
    margin-bottom: 2px;
    letter-spacing: 0.3px;
}

.card p {
    font-size: 10px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 6px;
}

.card .card-link {
    font-size: 11px;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1.5px solid transparent;
    padding-bottom: 1px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.card .card-link:hover {
    border-bottom-color: var(--accent-color);
    color: var(--primary-color);
}

/* ===== CTA دکمه اصلی ===== */
.cta-section {
    margin: 12px 0 8px;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light, #2E7A4A));
    color: #fff;
    padding: 10px 32px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(27, 77, 46, 0.25);
    letter-spacing: 0.5px;
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 35px rgba(27, 77, 46, 0.35);
    background: linear-gradient(135deg, var(--primary-light, #2E7A4A), var(--primary-color));
}

.cta-button i {
    font-size: 18px;
}

/* ===== بخش آینده ===== */
.future-section {
    margin: 10px 0 6px;
    padding: 10px 14px;
    border: 1.5px dashed var(--border-color);
    border-radius: 12px;
    background: var(--bg-card);
}

.future-section .future-title {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 300;
    letter-spacing: 1.5px;
}

.future-section .future-title strong {
    color: var(--secondary-color);
    font-weight: 700;
}

.future-dots {
    display: flex;
    justify-content: center;
    gap: 7px;
    margin-top: 5px;
}

.future-dots span {
    width: 6px;
    height: 6px;
    background: var(--border-color);
    border-radius: 50%;
    animation: dotPulse 2s ease-in-out infinite;
}

.future-dots span:nth-child(2) { animation-delay: 0.3s; }
.future-dots span:nth-child(3) { animation-delay: 0.6s; }
.future-dots span:nth-child(4) { animation-delay: 0.9s; }
.future-dots span:nth-child(5) { animation-delay: 1.2s; }

@keyframes dotPulse {
    0%, 100% { opacity: 0.2; transform: scale(0.8); }
    50% { opacity: 0.8; transform: scale(1.2); }
}

/* ===== فوتر ===== */
.footer {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 10px;
    color: var(--text-secondary);
}

.footer-right {
    display: flex;
    align-items: center;
}

.footer-center {
    display: flex;
    gap: 14px;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 10px;
    transition: all 0.3s ease;
}

.footer-link:hover {
    color: var(--primary-color);
}

.social-icons {
    display: flex;
    gap: 8px;
}

.social-icons a {
    color: var(--text-secondary);
    font-size: 14px;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    color: var(--secondary-color);
    transform: translateY(-2px);
}

/* ==========================================================
   واکنش‌گرایی
   ========================================================== */

@media (max-width: 900px) {
    body { padding: 12px; }
    .hero-overlay { max-width: 98%; }
    .container { padding: 18px 16px 12px; border-radius: 14px; }
    .logo-img { max-height: 75px; }
    .logo h1 { font-size: 22px; }
    .slogan { font-size: 15px; padding: 5px 12px; }
    .cards { gap: 8px; }
    .cta-button { padding: 8px 24px; font-size: 13px; }
}

@media (max-width: 650px) {
    body { padding: 8px; }
    .container { padding: 14px 10px 10px; border-radius: 12px; }
    .cards { grid-template-columns: repeat(2, 1fr); gap: 6px; }
    .logo-img { max-height: 65px; }
    .logo h1 { font-size: 19px; letter-spacing: 1px; }
    .logo .sub { font-size: 9px; letter-spacing: 1px; }
    .slogan { font-size: 13px; line-height: 1.8; padding: 4px 10px; }
    .section-title { font-size: 10px; letter-spacing: 1.5px; margin: 10px 0 8px; }
    .card { padding: 10px 6px 8px; border-radius: 8px; }
    .card .icon-wrapper { width: 30px; height: 30px; }
    .card h3 { font-size: 11px; }
    .card p { font-size: 9px; margin-bottom: 4px; }
    .card .card-link { font-size: 9px; }
    .card-featured::before { font-size: 8px; top: 3px; right: 6px; }
    .combined-line { gap: 3px; margin: 6px auto 8px; }
    .combined-line .line-primary { width: 14px; }
    .combined-line .line-secondary { width: 20px; }
    .combined-line .line-accent { width: 14px; }
    .cta-button { padding: 7px 18px; font-size: 12px; gap: 6px; }
    .cta-button i { font-size: 14px; }
    .future-section { padding: 8px 10px; margin: 8px 0 4px; border-radius: 8px; }
    .future-section .future-title { font-size: 9px; letter-spacing: 1px; }
    .future-dots { gap: 5px; margin-top: 3px; }
    .future-dots span { width: 5px; height: 5px; }
    .footer { font-size: 8px; margin-top: 10px; padding-top: 8px; flex-direction: column; text-align: center; gap: 6px; }
    .footer-center { gap: 10px; }
    .social-icons a { font-size: 12px; }
    .flower-1 { width: 55px; height: 55px; }
    .flower-2 { width: 40px; height: 40px; }
    .particles-container { display: none; }
}

@media (max-width: 420px) {
    body { padding: 6px; }
    .container { padding: 10px 6px 8px; border-radius: 10px; }
    .cards { grid-template-columns: 1fr 1fr; gap: 4px; }
    .card { padding: 6px 4px 6px; border-radius: 6px; }
    .card .icon-wrapper { width: 24px; height: 24px; }
    .card h3 { font-size: 9px; }
    .card p { font-size: 7px; margin-bottom: 3px; }
    .card .card-link { font-size: 8px; }
    .card-featured::before { display: none; }
    .logo-img { max-height: 50px; }
    .logo h1 { font-size: 15px; letter-spacing: 0.5px; }
    .logo .sub { font-size: 7px; letter-spacing: 0.5px; padding-top: 2px; }
    .slogan { font-size: 11px; line-height: 1.6; padding: 3px 6px; border-radius: 8px; }
    .section-title { font-size: 8px; letter-spacing: 1px; margin: 6px 0 4px; }
    .section-title span { padding: 0 6px; }
    .combined-line { gap: 2px; margin: 4px auto 6px; }
    .combined-line .line-primary { width: 10px; height: 1.5px; }
    .combined-line .line-secondary { width: 14px; height: 1.5px; }
    .combined-line .line-accent { width: 10px; height: 1.5px; }
    .cta-button { padding: 5px 12px; font-size: 10px; border-radius: 30px; }
    .cta-button i { font-size: 11px; }
    .future-section { padding: 4px 6px; border-radius: 6px; margin: 4px 0 2px; }
    .future-section .future-title { font-size: 7px; letter-spacing: 0.5px; }
    .future-dots { gap: 3px; margin-top: 2px; }
    .future-dots span { width: 4px; height: 4px; }
    .footer { font-size: 7px; margin-top: 6px; padding-top: 6px; gap: 4px; }
    .footer-center { gap: 6px; flex-wrap: wrap; justify-content: center; }
    .footer-link { font-size: 7px; }
    .social-icons a { font-size: 10px; margin: 0 2px; }
    .flower-1 { width: 35px; height: 35px; bottom: 4px; right: 4px; }
    .flower-2 { display: none; }
}

::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--secondary-color); border-radius: 2px; }