/* Global Styles */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --white-color: #ffffff;
    --gray-color: #6c757d;
    --border-radius: 8px;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --transition: all 0.3s ease;
    
    /* Hero Slider Images */
    --hero-image-1: url('https://images.unsplash.com/photo-1544551763-46a013bb70d5?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    --hero-image-2: url('https://images.unsplash.com/photo-1566576912321-d58ddd7a6088?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    --hero-image-3: url('https://images.unsplash.com/photo-1586528116311-ad8dd3c8310d?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    --hero-image-4: url('https://zehnagahane.ir/wp-content/uploads/2024/08/012313-780x450.webp');
    
    /* Hero Slider Overlay Colors */
    --hero-overlay-1: rgba(13, 110, 253, 0.7);
    --hero-overlay-2: rgba(25, 135, 84, 0.7);
    --hero-overlay-3: rgba(220, 53, 69, 0.7);
    --hero-overlay-4: rgba(108, 117, 125, 0.7);
    
    /* Logo and Favicon */
    --logo-url: url('/img/logo.png');
    --favicon-url: url('/img/favicon.ico');
}

/* Font Face Definitions */


@font-face {
    font-family: 'BYekan';
    src: url('/font/IRANSansX-Regular.woff') format('woff'),
         url('/font/IRANSansX-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'BYekan';
    src: url('/fonts/BYekan-Light.woff2') format('woff2'),
         url('/fonts/BYekan-Light.woff') format('woff'),
         url('/fonts/BYekan-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'BYekan', 'Vazirmatn', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    line-height: 1.6;
    color: var(--dark-color);
    overflow-x: hidden;
    direction: rtl;
}

.carousel-item {
    position: relative;
    display: none;
    float: left;
    width: 100%;
    margin-right: -100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transition: transform .6s ease-in-out;
    text-align: center !important;
    font-family: b yekan !important;
  }


.text-primary {
    --bs-text-opacity: 1;
    color: rgb(255, 255, 255) !important;
  }

.text-muted {
    --bs-text-opacity: 1;
    color: rgb(27, 27, 27) !important;
  }


/* RTL Support */
[dir="rtl"] {
    text-align: right;
}

[dir="ltr"] {
    text-align: left;
}

/* Navigation */
.navbar {
    transition: var(--transition);
    padding: 1rem 0;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'BYekan', sans-serif;
}

.navbar-brand i {
    font-size: 2rem;
}

.navbar-brand .brand-text {
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-link {
    font-weight: 500;
    margin: 0 0.5rem;
    transition: var(--transition);
    position: relative;
    font-family: 'BYekan', sans-serif;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 100%;
}

/* Language Selector */
.dropdown-toggle::after {
    margin-right: 0.5rem;
}

[dir="rtl"] .dropdown-toggle::after {
    margin-right: 0;
    margin-left: 0.5rem;
}

/* Hero Slider */
.hero-slider {
    margin-top: 76px;
}

.hero-slide {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--hero-overlay-1) 0%, var(--hero-overlay-2) 100%);
    z-index: 1;
}

.hero-slide .container {
    position: relative;
    z-index: 2;
}

.hero-slide h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    font-family: 'BYekan', sans-serif;
}

.hero-slide p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    font-family: 'BYekan', sans-serif;
}

.hero-slide .btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
    font-family: 'BYekan', sans-serif;
}

.hero-slide .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.4);
}

/* Carousel Controls */
.carousel-control-prev,
.carousel-control-next {
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    margin: 0 2rem;
    transition: var(--transition);
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

.carousel-indicators {
    bottom: 2rem;
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 0.5rem;
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.carousel-indicators button.active {
    background-color: var(--white-color);
    transform: scale(1.2);
}

/* Services Section */
.service-card {
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
}

.service-card .card {
    border-radius: var(--border-radius);
    transition: var(--transition);
    overflow: hidden;
}

.service-card:hover .card {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transition: var(--transition);
}

.service-icon i {
    font-size: 2rem;
    color: var(--white-color);
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

.service-card .card-title {
    color: var(--dark-color);
    margin-bottom: 1rem;
    font-family: 'BYekan', sans-serif;
}

.service-card .card-text {
    color: var(--gray-color);
    line-height: 1.6;
    font-family: 'BYekan', sans-serif;
}

/* About Section */
.about-section {
    background: linear-gradient(135deg, var(--light-color) 0%, #e9ecef 100%);
}

.about-section img {
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.about-section .d-flex {
    margin-bottom: 1rem;
}

.about-section i {
    font-size: 1.2rem;
}

/* Stats Section */
.stat-item {
    padding: 2rem 1rem;
    transition: var(--transition);
}

.stat-item:hover {
    transform: scale(1.05);
}

.stat-item h3 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    font-family: 'BYekan', sans-serif;
}

.stat-item p {
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 0.9;
    font-family: 'BYekan', sans-serif;
}

/* Contact Section */
.contact-section .card {
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.form-control,
.form-select {
    border-radius: var(--border-radius);
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: var(--transition);
    font-family: 'BYekan', sans-serif;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    font-family: 'BYekan', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
    font-family: 'BYekan', sans-serif;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.4);
    background: linear-gradient(135deg, #0b5ed7, #0aa2c0);
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--dark-color) 0%, #343a40 100%);
}

footer h5,
footer h6 {
    color: var(--white-color);
    margin-bottom: 1.5rem;
    font-family: 'BYekan', sans-serif;
}

footer .social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    transition: var(--transition);
}

footer .social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

footer ul li {
    margin-bottom: 0.5rem;
}

footer ul li a {
    transition: var(--transition);
    font-family: 'BYekan', sans-serif;
}

footer ul li a:hover {
    color: var(--primary-color) !important;
    padding-right: 0.5rem;
}

[dir="ltr"] footer ul li a:hover {
    padding-right: 0;
    padding-left: 0.5rem;
}

/* WhatsApp Chat Button */
.whatsapp-chat {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
}

.whatsapp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: white;
    border-radius: 50%;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    transition: var(--transition);
    animation: pulse 2s infinite;
}

.whatsapp-btn:hover {
    background-color: #128c7e;
    transform: scale(1.1);
    color: white;
}

.whatsapp-btn i {
    font-size: 2rem;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* reCAPTCHA Styles */
.g-recaptcha {
    margin: 1rem 0;
    display: flex;
    justify-content: center;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-slide h1 {
        font-size: 2.5rem;
    }
    
    .hero-slide p {
        font-size: 1rem;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        width: 40px;
        height: 40px;
        margin: 0 1rem;
    }
    
    .stat-item h3 {
        font-size: 2rem;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
    }
    
    .service-icon i {
        font-size: 1.5rem;
    }
    
    .whatsapp-btn {
        width: 50px;
        height: 50px;
    }
    
    .whatsapp-btn i {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .hero-slide h1 {
        font-size: 2rem;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .navbar-brand i {
        font-size: 1.5rem;
    }
    
    .hero-slide .btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading Animation */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--white-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0b5ed7;
}

/* Print Styles */
@media print {
    .navbar,
    .carousel-control-prev,
    .carousel-control-next,
    .carousel-indicators,
    footer,
    .whatsapp-chat {
        display: none !important;
    }
    
    .hero-slider {
        margin-top: 0;
    }
    
    .hero-slide {
        min-height: auto;
        padding: 2rem 0;
    }
}

/* Security Headers */
/* Force HTTPS */
@media (max-width: 0px) {
    body::before {
        content: "HTTPS Required";
        display: none;
    }
}

/* Focus Styles for Accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus,
.nav-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0000ff;
        --dark-color: #000000;
        --light-color: #ffffff;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
