/* استایل‌های عمومی برای سایت */
:root {
    --primary-color: #2c4b4d;
    --primary-light: #3a5f61;
    --primary-dark: #1c3739;
    --secondary-color: #f8f9fa;
    --accent-color: #e9c46a;
    --text-color: #333;
    --light-gray: #f5f5f5;
    --border-radius: 12px;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* فونت نازک (Thin) */
@font-face {
    font-family: 'Vazirmatn';
    src: url('/static/core/fonts/Vazirmatn-Thin.woff2') format('woff2');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

/* فونت خیلی سبک (ExtraLight) */
@font-face {
    font-family: 'Vazirmatn';
    src: url('/static/core/fonts/Vazirmatn-ExtraLight.woff2') format('woff2');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

/* فونت سبک (Light) */
@font-face {
    font-family: 'Vazirmatn';
    src: url('/static/core/fonts/Vazirmatn-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

/* فونت معمولی (Regular) */
@font-face {
    font-family: 'Vazirmatn';
    src: url('/static/core/fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* فونت متوسط (Medium) */
@font-face {
    font-family: 'Vazirmatn';
    src: url('/static/core/fonts/Vazirmatn-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

/* فونت نیمه‌ضخیم (SemiBold) */
@font-face {
    font-family: 'Vazirmatn';
    src: url('/static/core/fonts/Vazirmatn-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* فونت ضخیم (Bold) */
@font-face {
    font-family: 'Vazirmatn';
    src: url('/static/core/fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* فونت خیلی ضخیم (ExtraBold) */
@font-face {
    font-family: 'Vazirmatn';
    src: url('/static/core/fonts/Vazirmatn-ExtraBold.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

/* فونت سیاه (Black) */
@font-face {
    font-family: 'Vazirmatn';
    src: url('/static/core/fonts/Vazirmatn-Black.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-color);
}

img {
    max-width: 100%;
    height: auto;
}

/* Utility Classes */
.section-title {
    color: var(--primary-color);
    font-weight: 700;
    position: relative;
    display: inline-block;
    margin-bottom: 15px;
    font-size: 2rem;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
    bottom: -10px;
    right: 50%;
    transform: translateX(50%);
}

.section-subtitle {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 12px 30px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary:hover {
    background-color: var(--primary-light);
    border-color: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(44, 75, 77, 0.2);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 12px 30px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

/* Navigation Styles */
.navbar {
    background-color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 10px 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
}

.navbar-nav .nav-link {
    color: var(--primary-color) !important;
    font-weight: 500;
    margin: 0 8px;
    position: relative;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    bottom: 0;
    right: 0;
    transition: var(--transition);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 100%;
}

.navbar-nav .nav-link.active {
    color: var(--accent-color) !important;
}

/* Hero Section */
.hero-section {
    padding: 100px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    margin-top: -80px;
    padding-top: 180px;
}

.hero-section h1 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 3rem;
}

.hero-section p {
    color: #555;
    font-size: 1.2rem;
    line-height: 1.8;
}

/* About Section */
.about-img-container {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
}

.about-img-container img {
    transition: var(--transition);
}

.about-img-container:hover img {
    transform: scale(1.05);
}

.about-content {
    padding-right: 30px;
}

.about-content h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.feature-icon {
    width: 50px;
    height: 50px;
    background-color: rgba(44, 75, 77, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* Service Cards */
.service-card {
    border: none;
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    background-color: white;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--box-shadow);
}

.service-card .card-img-top {
    height: 200px;
    object-fit: cover;
    transition: var(--transition);
}

.service-card:hover .card-img-top {
    transform: scale(1.05);
}

.service-icon {
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-top: -40px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

/* Project Cards */
.project-card {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    background-color: white;
}

.project-card:hover {
    transform: translateY(-10px);
}

.project-img {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .project-img img {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(44, 75, 77, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-info {
    padding: 20px;
}

.project-info h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

/* Testimonials */
.testimonials-slider {
    max-width: 800px;
    margin: 0 auto;
}

.testimonial-item {
    background-color: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-align: center;
}

.testimonial-content {
    font-style: italic;
    color: #555;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.testimonial-author h5 {
    color: var(--primary-color);
    margin-bottom: 5px;
}

.rating {
    margin-top: 10px;
}

/* Footer */
.footer {
    background-color: var(--primary-dark) !important;
}

.footer h5 {
    color: white;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.footer a:hover {
    color: white;
    padding-right: 5px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--accent-color);
    color: var(--primary-dark);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
        padding-top: 140px;
        text-align: center;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .about-content {
        padding-right: 0;
        margin-top: 30px;
    }
    
    .navbar-nav .nav-link {
        text-align: right;
        padding: 10px 0;
    }
}

@media (max-width: 576px) {
    .btn-primary,
    .btn-outline-primary {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .hero-section h1 {
        font-size: 1.8rem;
    }
    
    .service-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
        margin-top: -30px;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* ========== Responsive Improvements ========== */

/* بهبود تصاویر */
.hero-image {
    max-height: 500px;
    object-fit: cover;
    width: 100%;
    margin-top: 8%;
}

/* بهبود کارت‌ها در موبایل */
@media (max-width: 576px) {
    .service-card .card-body {
        padding: 1rem !important;
    }
    
    .service-icon {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
        margin-top: -25px;
    }
    
    .project-info {
        padding: 1rem !important;
    }
    
    .project-img {
        height: 200px;
    }
}

/* تنظیمات تبلت */
@media (min-width: 768px) and (max-width: 991px) {
    .h4-md {
        font-size: 1.25rem;
    }
    
    .h5-md {
        font-size: 1.1rem;
    }
    
    .h2-md {
        font-size: 2rem;
    }
    
    .service-card .card-body {
        padding: 1.5rem !important;
    }
}

/* بهبود فواصل در موبایل */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0 40px !important;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
        padding: 0 15px;
    }
    
    .btn-lg {
        padding: 10px 20px;
        font-size: 1rem;
    }
}

/* بهبود دکمه‌ها در موبایل */
@media (max-width: 576px) {
    .btn-lg {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .d-flex.gap-2 .btn {
        flex: 1;
    }
}

/* بهبود testimonial slider در موبایل */
.testimonials-slider {
    padding: 0 10px;
}

.testimonial-item {
    margin: 10px;
}

/* بهبود فوتر */
@media (max-width: 768px) {
    .footer .row > div {
        margin-bottom: 2rem;
        text-align: center;
    }
    
    .social-links {
        justify-content: center !important;
    }
}

/* بهبود عکس بنر */
.about-img-container {
    width: 100%;
    overflow: hidden;
}

.about-img-container img {
    width: 100%;
    height: auto;
    object-fit: cover;
    max-height: 400px;
}

@media (max-width: 768px) {
    .about-img-container img {
        max-height: 300px;
    }
}

/* بهبود نمایش در صفحه‌های بسیار کوچک */
@media (max-width: 360px) {
    .hero-section h1 {
        font-size: 1.6rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    .feature-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .feature-icon + div h5 {
        font-size: 0.95rem;
    }
}

/* بهبود hover روی کارت‌ها در موبایل */
@media (hover: none) and (pointer: coarse) {
    .service-card:hover,
    .project-card:hover {
        transform: none;
    }
    
    .project-overlay {
        opacity: 1;
        background-color: rgba(44, 75, 77, 0.6);
    }
    
    .project-overlay .btn {
        padding: 8px 20px;
        font-size: 0.9rem;
    }
}

/* بهبود گپ بین المنت‌ها */
.gap-2 {
    gap: 0.5rem !important;
}
.gap-3 {
    gap: 1rem !important;
}

@media (max-width: 576px) {
    .gap-2 {
        gap: 0.4rem !important;
    }
    .gap-3 {
        gap: 0.8rem !important;
    }
}

/* بهبود متن‌ها در موبایل */
.small {
    font-size: 0.875rem;
}

@media (max-width: 576px) {
    .small {
        font-size: 0.8rem;
    }
}

/* بهبود نمایش گرید */
.row {
    margin-right: -12px;
    margin-left: -12px;
}

[class*="col-"] {
    padding-right: 12px;
    padding-left: 12px;
}

@media (max-width: 576px) {
    .row {
        margin-right: -8px;
        margin-left: -8px;
    }
    
    [class*="col-"] {
        padding-right: 8px;
        padding-left: 8px;
    }
}