/* --- متغیرهای رنگی (Professional Law Palette 2026) --- */
:root {
    /* رنگ‌های اصلی: سرمه‌ای پررنگ و باوقار */
    --primary-blue: #102C57;      
    --secondary-blue: #3E5F8A;    
    
    /* رنگ تاکیدی: طلایی مات */
    --accent-gold: #C69749;       
    --accent-gold-hover: #D4AF37;

    /* رنگ‌های پس‌زمینه و متن */
    --bg-white: #FFFFFF;
    --bg-light: #F6F8FA;          
    --text-main: #2C3E50;         
    --text-muted: #64748B;        
    
    /* سایه‌ها */
    --shadow-sm: 0 4px 6px rgba(16, 44, 87, 0.05);
    --shadow-md: 0 10px 30px rgba(16, 44, 87, 0.08);
    --shadow-hover: 0 20px 40px rgba(16, 44, 87, 0.12);
    
    /* گردی‌ها */
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 50px;
}

/* --- تنظیمات پایه --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background-color: var(--bg-white);
    color: var(--text-main);
    line-height: 1.8;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.ltr { direction: ltr; display: inline-block; font-weight: 600; }

/* کانتینر مرکزی */
.container {
    max-width: 1150px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- لودینگ اسکرین (Modern & Professional Update) --- */
#loader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    /* پس‌زمینه گرادینت شعاعی عمیق برای حس حرفه‌ای بودن */
    background: radial-gradient(circle at center, #1a4280 0%, #102C57 100%);
    display: flex; justify-content: center; align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-wrapper {
    position: relative;
    width: 250px;
    height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* حلقه‌های متحرک */
.loader-circle {
    position: absolute;
    border-radius: 50%;
    border: 2px solid transparent;
}

/* حلقه بیرونی (طلایی) */
.loader-circle.outer {
    width: 100%;
    height: 100%;
    border-top-color: var(--accent-gold);
    border-left-color: rgba(198, 151, 73, 0.3);
    animation: spin 3s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
}

/* حلقه داخلی (سفید/آبی کم‌رنگ) */
.loader-circle.inner {
    width: 80%;
    height: 80%;
    border-bottom-color: rgba(255, 255, 255, 0.8);
    border-right-color: rgba(255, 255, 255, 0.2);
    animation: spin 2s linear infinite reverse;
}

.loader-content {
    position: relative;
    text-align: center;
    color: white;
    z-index: 2;
    animation: pulse 2s ease-in-out infinite;
}

.loader-icon {
    font-size: 2.5rem;
    color: var(--accent-gold);
    margin-bottom: 15px;
    display: block;
}

.loader-name {
    display: block;
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 5px;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.loader-title {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
    letter-spacing: 1px;
}

/* انیمیشن‌ها */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.02); opacity: 0.9; }
    100% { transform: scale(1); opacity: 1; }
}


/* --- هدر (Header) --- */
.header {
    background: rgba(255, 255, 255, 0.95);
    padding: 18px 0;
    position: sticky; top: 0;
    z-index: 1000;
    backdrop-filter: blur(12px); 
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.header-container {
    display: flex; justify-content: space-between; align-items: center;
}
.lawyer-name { 
    font-size: 1.6rem; 
    color: var(--primary-blue); 
    font-weight: 900; 
    letter-spacing: -0.5px;
}
.btn-header {
    background: var(--primary-blue); 
    color: white;
    padding: 10px 24px; 
    border-radius: var(--radius-full);
    font-size: 0.95rem; 
    font-weight: 600;
    display: flex; align-items: center; gap: 10px;
    box-shadow: var(--shadow-sm);
}
.btn-header i { font-size: 1.2rem; }
.btn-header:hover { 
    background: var(--accent-gold); 
    color: var(--primary-blue); 
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* --- Hero Section --- */
.hero {
    position: relative;
    padding: 140px 0;
    text-align: center;
    background-image: url('https://amirdadgostar.github.io/site/vakil/asli.jpeg'); 
    background-size: cover;
    background-position: center center;
    background-attachment: scroll;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(240, 244, 250, 0.92) 0%, rgba(255, 255, 255, 0.7) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h2 {
    font-size: 3rem; 
    color: var(--primary-blue); 
    margin-bottom: 25px;
    font-weight: 900;
    line-height: 1.3;
}
.text-gold { color: var(--accent-gold); position: relative; display: inline-block; }

.hero-content p {
    color: var(--text-main); 
    font-size: 1.15rem;
    font-weight: 500;
    margin-bottom: 45px;
    opacity: 0.9;
}

.hero-actions { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }

/* دکمه‌های Hero */
.btn { 
    padding: 14px 40px; 
    border-radius: var(--radius-md); 
    font-weight: 700; 
    font-size: 1rem;
    cursor: pointer;
    text-align: center;
}

.btn-primary { 
    background: var(--primary-blue); 
    color: white; 
    border: 2px solid var(--primary-blue); 
    box-shadow: 0 8px 20px rgba(16, 44, 87, 0.25);
}
.btn-primary:hover { 
    background: #1a4280; 
    border-color: #1a4280;
    transform: translateY(-3px);
}

.btn-outline { 
    background: transparent; 
    color: var(--primary-blue); 
    border: 2px solid var(--primary-blue); 
}
.btn-outline:hover { 
    background: var(--primary-blue); 
    color: white; 
    transform: translateY(-3px);
}

/* --- بخش‌ها عمومی --- */
.section { padding: 90px 0; }
.bg-light { background-color: var(--bg-light); }

.section-header { text-align: center; margin-bottom: 60px; }
.section-header h3 { 
    font-size: 2rem; 
    color: var(--primary-blue); 
    margin-bottom: 15px; 
    font-weight: 800; 
}
.line { 
    width: 80px; height: 5px; 
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-gold)); 
    margin: 0 auto; 
    border-radius: 10px; 
}

/* --- درباره --- */
.about-card {
    background: var(--bg-white);
    padding: 50px;
    border-radius: var(--radius-lg);
    text-align: center;
    max-width: 950px;
    margin: 0 auto;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0,0,0,0.03);
    position: relative;
    overflow: hidden;
}
.about-card::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 6px;
    background: var(--primary-blue);
}

/* لینک شماره پروانه */
.license-wrapper {
    margin: 25px 0;
}
.license-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: rgba(198, 151, 73, 0.1);
    color: #a07630;
    border: 1px dashed #a07630;
    padding: 8px 20px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}
.license-btn:hover {
    background-color: var(--accent-gold);
    color: white;
    border-style: solid;
    border-color: var(--accent-gold);
    transform: scale(1.02);
}
.license-btn i { font-size: 1.2rem; }


.features {
    display: flex; justify-content: center; gap: 40px; flex-wrap: wrap;
    margin-top: 40px; 
    padding-top: 30px;
    border-top: 1px solid #eee;
}
.features span { 
    display: flex; align-items: center; gap: 12px; 
    font-size: 1.05rem; 
    color: var(--primary-blue); 
    font-weight: 600; 
}
.features i { 
    color: var(--accent-gold); 
    font-size: 1.6rem; 
}

/* --- کارت‌های خدمات --- */
.grid-services {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
}
.card {
    background: var(--bg-white); 
    padding: 40px 30px;
    border-radius: var(--radius-lg);
    text-align: center; 
    transition: all 0.4s ease;
    border: 1px solid rgba(0,0,0,0.02);
    box-shadow: var(--shadow-sm);
}
.card:hover { 
    transform: translateY(-10px); 
    box-shadow: var(--shadow-hover);
    border-color: rgba(16, 44, 87, 0.1);
}
.icon-circle {
    width: 70px; height: 70px;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 25px auto;
    color: var(--primary-blue);
    font-size: 2rem;
    transition: 0.3s;
}
.card:hover .icon-circle { background: var(--primary-blue); color: var(--accent-gold); }

.card h4 { margin-bottom: 15px; font-size: 1.3rem; color: var(--primary-blue); font-weight: 700; }
.card p { font-size: 0.95rem; color: var(--text-muted); line-height: 1.7; }

/* --- تماس و نقشه --- */
.contact-wrapper {
    display: grid; grid-template-columns: 1fr 1fr; gap: 60px;
    align-items: center;
}
.info-row { 
    display: flex; gap: 20px; margin-bottom: 35px; align-items: flex-start;
    background: var(--bg-white); padding: 15px; border-radius: var(--radius-md);
    transition: 0.3s;
}
.info-row:hover { transform: translateX(-5px); }

.info-icon {
    width: 50px; height: 50px;
    background: var(--primary-blue); 
    color: white;
    border-radius: 12px; 
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(16, 44, 87, 0.3);
}
.info-row strong { display: block; font-size: 1rem; margin-bottom: 5px; color: var(--primary-blue); }
.info-row p { font-size: 1rem; color: var(--text-muted); }

/* --- نقشه و دکمه‌ها --- */
.map-box { display: flex; flex-direction: column; gap: 20px; }

/* استایل جدید نقشه واقعی (Google Map Iframe) */
.google-map-frame {
    width: 100%;
    height: 240px;
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    filter: grayscale(100%) contrast(1.1); /* افکت سیاه‌سفید لوکس */
    transition: filter 0.4s ease;
}
.google-map-frame:hover {
    filter: grayscale(0%) contrast(1); /* رنگی شدن هنگام هاور */
}

.routing-label { font-size: 0.9rem; color: var(--text-muted); font-weight: 600; margin-bottom: 5px; }

/* دکمه‌های مسیریابی */
.routing-buttons { display: flex; gap: 15px; }

.route-card {
    flex: 1;
    background: var(--bg-white);
    border: 1px solid #eee;
    padding: 15px;
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center; gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.route-card.neshan { border-bottom: 4px solid #0054BE; }
.route-card.neshan i { color: #0054BE; font-size: 1.5rem; }
.route-card.neshan:hover { background: #0054BE; border-bottom-color: #003d8a; color: white; }
.route-card.neshan:hover i { color: white; }

.route-card.balad { border-bottom: 4px solid #26C6DA; }
.route-card.balad i { color: #0097a7; font-size: 1.5rem; }
.route-card.balad:hover { background: #26C6DA; border-bottom-color: #00acc1; color: white; }
.route-card.balad:hover i { color: white; }

.route-card span { font-weight: 700; font-size: 1rem; }

/* --- استایل‌های ویجت هوشمند --- */
.smart-widget-container {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 2000;
    font-family: 'Vazirmatn', sans-serif;
    
    /* وضعیت اولیه مخفی (برای انیمیشن ورود) */
    transform: translateY(100px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1); /* افکت فنری نرم */
}

/* کلاسی که با جاوااسکریپت اضافه می‌شود تا ویجت ظاهر شود */
.smart-widget-container.intro-visible {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

/* دکمه اصلی ویجت */
.widget-trigger {
    background: var(--primary-blue);
    color: white;
    border-radius: 50px; 
    height: 60px;
    padding: 0 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    box-shadow: 0 8px 30px rgba(16, 44, 87, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    border: 2px solid white;
    min-width: 180px;
}

.widget-trigger:hover {
    transform: scale(1.05);
    background: #0d254a;
}

.trigger-content {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 700;
}
.trigger-content i { font-size: 1.5rem; }

.close-icon {
    display: none;
    font-size: 1.5rem;
    position: absolute;
    left: 0; right: 0; top: 0; bottom: 0;
    justify-content: center;
    align-items: center;
}

/* انیمیشن لرزش (Shake Animation) */
@keyframes shake {
    0% { transform: rotate(0deg); }
    10% { transform: rotate(5deg) scale(1.05); }
    20% { transform: rotate(-5deg) scale(1.05); }
    30% { transform: rotate(3deg) scale(1.05); }
    40% { transform: rotate(-3deg) scale(1.05); }
    50% { transform: rotate(0deg); }
    100% { transform: rotate(0deg); }
}

.shaking {
    animation: shake 1s ease;
}

/* بج نوتیفیکیشن */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #e74c3c;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    opacity: 0;
    transform: scale(0);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.notification-badge.show {
    opacity: 1;
    transform: scale(1);
}

/* منوی بازشونده */
.widget-menu {
    position: absolute;
    bottom: 80px; 
    left: 0;
    width: 300px;
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: bottom left;
    border: 1px solid rgba(0,0,0,0.05);
}

/* کلاس فعال شدن منو */
.smart-widget-container.active .widget-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.smart-widget-container.active .trigger-content {
    opacity: 0;
}

.smart-widget-container.active .close-icon {
    display: flex; 
}

.smart-widget-container.active .widget-trigger {
    width: 60px; 
    min-width: 60px;
    padding: 0;
    justify-content: center;
    background: var(--text-main); 
}

/* آیتم‌های منو */
.widget-header-title {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    font-weight: 600;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 8px;
}

.w-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    border-radius: 12px;
    transition: 0.2s;
    margin-bottom: 8px;
    border: 1px solid transparent;
}
.w-item:last-child { margin-bottom: 0; }
.w-item:hover {
    background: var(--bg-light);
    border-color: #e0e0e0;
}

.w-icon {
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.item-phone .w-icon { background: var(--primary-blue); }
.item-whatsapp .w-icon { background: #25D366; }
.item-insta .w-icon { background: linear-gradient(45deg, #f09433, #dc2743, #bc1888); }

.w-text { display: flex; flex-direction: column; }
.w-text strong { font-size: 0.95rem; color: var(--text-main); }
.w-text span { font-size: 0.8rem; color: var(--text-muted); }

/* --- فوتر --- */
footer {
    background: var(--primary-blue); color: white;
    text-align: center; padding: 30px 0; font-size: 0.95rem;
    border-top: 5px solid var(--accent-gold);
}

/* --- انیمیشن --- */
.fade-in { opacity: 0; transform: translateY(30px); transition: all 0.8s ease-out; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* --- ریسپانسیو --- */
@media (max-width: 768px) {
    .header-container { flex-direction: column; gap: 15px; }
    .hero-content h2 { font-size: 2rem; }
    .hero { padding: 100px 0; }
    .contact-wrapper { grid-template-columns: 1fr; gap: 40px; }
    
    .smart-widget-container { left: 20px; bottom: 20px; }
    .widget-menu { width: 280px; }
    
    .btn { width: 100%; display: block; margin-bottom: 12px; }
    .hero-actions { flex-direction: column; }
    .about-card { padding: 30px 20px; }
}
