/* =========================================
   Clinical Variables & Color Psychology 
   ========================================= */
:root {
    --primary-blue: #1a365d;   
    --calm-teal: #0d9488;      
    --bg-offwhite: #f8f9fa;    
    --text-dark: #1f2937;      
    --white: #ffffff;
    
    /* پترن هندسی ملایم شبکه‌های عصبی */
    --neural-pattern: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%231a365d' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* =========================================
   Global Reset & Accessibility Base
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, h1, h2, h3, h4, h5, h6, p, a, button, input, textarea, summary {
    font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
}

body {
    background-color: var(--bg-offwhite);
    color: var(--text-dark);
    line-height: 1.8;
    font-size: 16px;
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    *, ::before, ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* =========================================
   Buttons & Containers
   ========================================= */
button, .btn, a.cta-link {
    display: inline-block;
    min-height: 55px; 
    min-width: 120px;
    padding: 15px 30px;
    background-color: var(--calm-teal);
    color: var(--white);
    text-decoration: none;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

a.cta-link:hover {
    background-color: #0f766e; 
    box-shadow: 0 4px 15px rgba(13, 148, 136, 0.4); 
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================================
   Ultra-Premium Header Layout
   ========================================= */
.top-bar {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 12px 0;
    text-align: center;
    font-weight: bold;
    font-size: 0.95rem;
}

.main-header {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(240, 253, 250, 0.92) 100%);
    backdrop-filter: blur(15px); 
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(13, 148, 136, 0.15); 
    box-shadow: 0 10px 30px rgba(26, 54, 93, 0.05); 
    padding: 15px 0; 
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; 
}

.logo-area h1 {
    color: var(--primary-blue);
    font-size: 1.8rem;
    margin-bottom: 5px;
    transition: color 0.3s ease;
}

.logo-area a:hover h1 {
    color: var(--calm-teal);
}

.logo-area h2 {
    color: var(--calm-teal);
    font-size: 1.1rem;
    font-weight: normal;
}

.medical-id {
    display: inline-block;
    background: #e5e7eb;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-top: 8px;
    color: var(--text-dark);
}

.contact-area p {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--primary-blue);
}

/* =========================================
   Hero Section Layout
   ========================================= */
.hero-section {
    position: relative;
    background-image: linear-gradient(rgba(26, 54, 93, 0.85), rgba(13, 148, 136, 0.75)), url('../images/hero-bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; 
    padding: 100px 0 140px 0; 
    text-align: center;
    border-bottom: none; 
}

.hero-section h2 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    color: var(--white); 
    -webkit-text-fill-color: var(--white); 
    background: none; 
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.4); 
}

.hero-section p {
    font-size: 1.4rem; 
    line-height: 2; 
    margin-bottom: 50px; 
    max-width: 850px; 
    margin-left: auto;
    margin-right: auto;
    color: var(--white); 
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4); 
}

/* =========================================
   Organic SVG Waves Configuration
   ========================================= */
.wave-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: rotate(180deg); 
    z-index: 10;
}

.wave-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 60px; 
}

.wave-divider .shape-fill {
    fill: var(--white); 
}

.wave-fill-blue {
    fill: #e0e7ff !important;
}

/* =========================================
   Gradient Typography
   ========================================= */
.section-title h2, 
.service-page-title {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--calm-teal) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* =========================================
   Clinical Services Layout
   ========================================= */
.services-section {
    position: relative; 
    padding: 60px 0 120px 0;
    background-color: var(--white); 
    background-image: var(--neural-pattern);
    background-attachment: fixed;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    position: relative;
    z-index: 15; 
}

@media (min-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    /* وسط چین کردن هدر و کارت ویزیت در موبایل */
    .header-flex {
        flex-direction: column;
        text-align: center;
        justify-content: center;
    }
    .contact-area p {
        justify-content: center !important; /* برای وسط چین شدن شماره تماس */
        margin-top: 10px;
    }
    
    /* وسط چین کردن متن‌ها و دکمه‌های اصلی بدنه سایت */
    .hero-section, .about-section, .services-section {
        text-align: center;
    }
    .cta-link, .btn {
        margin: 10px auto; /* قرار دادن دکمه‌ها در وسط */
        display: block;
        max-width: fit-content;
    }
}

@media (min-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* =========================================
   Modern Service Cards (Glassmorphism Effect)
   ========================================= */
.service-card {
    background-color: rgba(255, 255, 255, 0.65); 
    backdrop-filter: blur(16px); 
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.8); 
    border-top: 4px solid var(--calm-teal);
    padding: 40px 30px; 
    border-radius: 16px; 
    text-align: center; 
    box-shadow: 0 8px 32px rgba(26, 54, 93, 0.05); 
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .service-card:hover {
        transform: translateY(-8px); 
        box-shadow: 0 20px 40px rgba(13, 148, 136, 0.15); 
        border-top: 4px solid var(--primary-blue); 
    }
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px auto; 
    background-color: #f0fdfa; 
    border-radius: 50%; 
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(13, 148, 136, 0.1); 
    transition: transform 0.3s ease;
}

@keyframes softPulse {
    0% { box-shadow: 0 0 0 0 rgba(13, 148, 136, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(13, 148, 136, 0); }
    100% { box-shadow: 0 0 0 0 rgba(13, 148, 136, 0); }
}

.service-card:hover .service-icon {
    transform: scale(1.1);
    animation: softPulse 2s infinite;
}

.service-icon i {
    font-size: 2.2rem; 
    color: var(--calm-teal); 
    transition: color 0.3s ease;
}

.service-card:hover .service-icon i {
    color: var(--primary-blue);
}

.service-card h3 {
    color: var(--primary-blue);
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.text-link {
    display: inline-block;
    margin-top: 15px;
    color: var(--calm-teal);
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s ease;
}

.text-link:hover {
    color: var(--primary-blue);
}

/* =========================================
   About Doctor Layout
   ========================================= */
.about-section {
    position: relative; 
    padding: 80px 0 120px 0;
    background-color: #e0e7ff; 
    background-image: var(--neural-pattern);
    background-attachment: fixed;
}

.about-flex {
    display: flex;
    align-items: center;
    gap: 50px;
    flex-wrap: wrap; 
    position: relative;
    z-index: 15;
}

.about-text {
    flex: 1; 
    min-width: 300px;
}

.about-text h2 {
    color: var(--primary-blue);
    font-size: 2rem;
    margin-bottom: 5px;
}

.about-text .subtitle {
    color: var(--calm-teal);
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 20px;
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 15px;
    text-align: justify;
}

.about-image {
    flex: 1;
    min-width: 300px;
    display: flex;
    justify-content: center;
}

.image-placeholder {
    width: 300px;
    height: 400px;
    background-color: #cbd5e1;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-blue);
    font-weight: bold;
    border: 4px solid var(--white);
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
    overflow: hidden;
}

.image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* =========================================
   FAQ & Location Layout
   ========================================= */
.faq-location-section {
    padding: 80px 0;
    background-color: var(--white);
    background-image: var(--neural-pattern);
    background-attachment: fixed;
}

.faq-flex {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.faq-area, .location-area {
    flex: 1;
    min-width: 300px;
}

.faq-area h2, .location-area h2 {
    color: var(--primary-blue);
    font-size: 1.8rem;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--calm-teal);
    padding-bottom: 10px;
    display: inline-block;
}

.faq-item {
    background-color: var(--bg-offwhite);
    margin-bottom: 15px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    transition: background-color 0.3s ease;
}

.faq-item:hover {
    background-color: #f1f5f9;
}

.faq-item summary {
    padding: 18px 20px;
    font-weight: bold;
    color: var(--primary-blue);
    cursor: pointer;
    font-size: 1.1rem;
    list-style: none; 
    position: relative;
    user-select: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    position: absolute;
    left: 20px; 
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--calm-teal);
    transition: transform 0.3s ease;
}

.faq-item[open] summary::after {
    content: '-';
    transform: translateY(-50%) rotate(180deg);
}

.faq-item p {
    padding: 0 20px 20px 20px;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.7;
    animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* کارت تماس با افکت شیشه‌ای آبی ملایم */
.contact-card {
    background-color: rgba(224, 231, 255, 0.65); 
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    padding: 30px;
    border-radius: 12px;
    border-right: 5px solid var(--primary-blue); 
    box-shadow: 0 8px 32px rgba(26, 54, 93, 0.05);
}

.contact-card p {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.route-btn {
    margin-top: 15px;
    width: 100%; 
    background-color: var(--primary-blue);
}

.route-btn:hover {
    background-color: #1e3a8a;
}

/* =========================================
   Service Detail Pages (Sub-pages CSS)
   ========================================= */
.service-page-wrapper {
    padding: 80px 0;
    background-color: var(--bg-offwhite); 
    background-image: var(--neural-pattern);
    background-attachment: fixed;
}

.service-page-title {
    color: var(--primary-blue);
    margin-bottom: 20px;
    font-size: 2.5rem;
}

.service-page-subtitle {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--calm-teal);
    font-weight: bold;
}

.service-info-box {
    background-color: var(--white);
    padding: 30px;
    border-radius: 12px;
    border-right: 5px solid var(--calm-teal);
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.service-info-box h3 {
    color: var(--primary-blue);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.service-info-list {
    margin-right: 20px;
    line-height: 2;
}

.service-description {
    line-height: 1.8;
    margin-bottom: 20px;
    text-align: justify;
}

.back-link {
    display: inline-block;
    margin-top: 30px;
    color: var(--primary-blue);
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: var(--calm-teal);
}

/* =========================================
   Footer Layout
   ========================================= */
.main-footer {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 50px 0 20px 0;
    text-align: center;
    margin-top: 60px; 
    border-top: 5px solid var(--calm-teal); 
    position: relative; 
    z-index: 10;
}

.main-footer p {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: #e2e8f0; 
}

.main-footer strong {
    color: var(--calm-teal); 
}

.footer-phone-link {
    color: #e2e8f0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-phone-link:hover {
    color: var(--white);
    text-decoration: underline;
}

.copyright {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1); 
}

.copyright p {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-bottom: 0;
}
.designed-by {
    font-size: 0.85rem;
    margin-top: 8px;
    opacity: 0.8;
}
.designed-by a {
    color: var(--calm-teal); /* همرنگ دکمه‌ها و تم سایت */
    text-decoration: none;
    font-weight: bold;
}
/* =========================================================
   تنظیمات مخصوص موبایل (وسط چین کردن عناصر)
   ========================================================= */
@media (max-width: 768px) {
    /* وسط چین کردن کل سکشن‌ها، متن‌ها و نوار بالای سایت */
    .hero-section,
    .hero-section .container,
    .about-text,
    .services-section .section-title,
    .service-card,
    .faq-area,
    .location-area,
    .top-bar {
        text-align: center !important;
    }

    /* وسط چین کردن اطلاعات تماس در نوار بالا */
    .top-bar-info {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 5px;
    }

    /* وسط چین کردن آیکون‌های خدمات */
    .service-card {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* وسط چین کردن دکمه‌ها (CTA) */
    .cta-link {
        margin-left: auto !important;
        margin-right: auto !important;
        display: block !important;
        width: fit-content !important;
        margin-top: 20px !important;
    }

    /* تنظیم فاصله تصویر در بخش درباره دکتر برای موبایل */
    .about-flex {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .about-image {
        margin-top: 30px;
        display: flex;
        justify-content: center;
    }
}
/* =========================================================
   بهینه‌سازی هدر (کارت ویزیت) برای دسکتاپ و موبایل
   ========================================================= */

/* استایل‌دهی به شماره نظام پزشکی در تمام دستگاه‌ها */
.medical-id {
    display: inline-block;
    background-color: rgba(13, 148, 136, 0.1); /* پس‌زمینه محو همرنگ تخصص */
    color: var(--calm-teal);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-top: 10px;
    font-weight: bold;
    border: 1px solid rgba(13, 148, 136, 0.2);
}

/* تنظیمات مخصوص موبایل برای هدر */
@media (max-width: 768px) {
    /* تبدیل چیدمان افقی به ستونی و وسط‌چین */
    .header-flex {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        gap: 15px; /* فاصله بین بخش نام و بخش تلفن */
    }

    /* تنظیم اندازه فونت‌ها برای جلوگیری از به هم ریختگی در موبایل */
    .logo-area h1 {
        font-size: 1.4rem !important;
        margin-bottom: 8px;
    }
    
    .logo-area h2 {
        font-size: 1rem !important;
    }

    /* تبدیل شماره تلفن به یک دکمه تماس جذاب در موبایل */
    .contact-area {
        width: 100%;
        display: flex;
        justify-content: center;
        margin-top: 5px;
    }

    
}
/* =========================================================
   استایل دکمه تماس در هدر (لینک قابل کلیک)
   ========================================================= */
/* استایل برای دسکتاپ */
.phone-link {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
    text-decoration: none !important;
    color: #333; /* رنگ متن پیش‌فرض */
    font-size: 1.1rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.phone-link i {
    color: var(--calm-teal);
    font-size: 1.2rem;
}

.phone-link:hover {
    color: var(--calm-teal);
}
@media (max-width: 768px) {
    
    /* ۱. مخفی کردن آدرس طولانی در بالای سایت برای خلوت شدن هدر */
    .top-bar {
        display: none !important;
    }

    /* ۲. ظریف کردن نام و تخصص پزشک در هدر */
    .logo-area h1 {
        font-size: 1.3rem !important;
        margin-bottom: 5px !important;
    }
    
    .logo-area h2 {
        font-size: 0.85rem !important;
        font-weight: normal;
        margin-bottom: 10px !important;
    }

    /* ۳. اصلاح پاراگراف طولانی در بخش سبز رنگ (هیرو) */
    /* فرض بر این است که پاراگراف شما داخل کلاسی مثل hero-text یا مشابه آن است */
    .hero-section p, 
    .hero-text p {
        font-size: 0.9rem !important; /* کوچک کردن سایز متن */
        line-height: 1.8 !important; /* فاصله دادن به خطوط برای خوانایی */
        font-weight: 300 !important; /* نازک‌تر کردن وزن فونت */
        color: rgba(255, 255, 255, 0.85) !important; /* کاهش شدت سفیدی متن */
        margin-bottom: 25px !important;
        padding: 0 10px; /* ایجاد یک حاشیه امن از چپ و راست گوشی */
    }

    /* تیتر بخش سبز رنگ */
    .hero-section h2, 
    .hero-text h1 {
        font-size: 1.5rem !important;
        line-height: 1.4 !important;
        margin-bottom: 15px !important;
    }
}
