/* CSS Variables - Brand Palette */
:root {
    --primary: #2772A0;   /* buttons, accents */
    --navy: #1F3B57;      /* headings, footer, strong text */
    --soft: #CCDDEA;      /* soft backgrounds, separators */
    --accent: #E6B8A2;    /* secondary button/hover */
    --white: #FFFFFF;     /* surfaces/text on dark */
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Vazirmatn', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--white);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--navy);
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: var(--gray-600);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--navy);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--navy);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39, 114, 160, 0.3);
}

.btn-secondary {
    background-color: var(--accent);
    color: var(--navy);
}

.btn-secondary:hover {
    background-color: var(--navy);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(31, 59, 87, 0.3);
}

/* Header */
.header {
    position: sticky;
    top: 0;
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--navy);
    text-decoration: none;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--gray-600);
    font-weight: 500;
    transition: color 0.3s ease;
}

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

.language-switcher {
    display: flex;
    gap: 0.5rem;
}

.language-switcher a {
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-weight: 500;
    color: var(--gray-600);
    transition: all 0.3s ease;
}

.language-switcher a:hover,
.language-switcher a.active {
    background-color: var(--primary);
    color: var(--white);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--navy);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* Hero Section */
.hero {
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--soft) 100%);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--navy);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.hero-tagline {
    font-size: 1.125rem;
    color: var(--gray-600);
    margin-bottom: 1rem;
}

.hero-note {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 2rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 1rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* About Section */
.about {
    padding: 4rem 0;
    background-color: var(--white);
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text p {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--gray-700);
}

.about-signature img {
    width: 100%;
    max-width: 200px;
    height: auto;
    opacity: 0.8;
}

/* Section Titles */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--navy);
}

/* Services Section */
.services {
    padding: 4rem 0;
    background-color: var(--gray-50);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    text-align: center;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--navy);
}

.service-card p {
    color: var(--gray-600);
    margin-bottom: 0;
}

/* Results Section */
.results {
    padding: 4rem 0;
    background-color: var(--white);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
}

.ba-slider {
    text-align: center;
}

.ba-container {
    position: relative;
    width: 100%;
    height: 400px;
    border-radius: 1rem;
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.ba-before,
.ba-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ba-after {
    clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%);
}

.ba-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background-color: var(--white);
    cursor: ew-resize;
    transform: translateX(-50%);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.ba-handle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background-color: var(--white);
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.ba-handle::after {
    content: '◀ ▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    color: var(--navy);
    font-weight: bold;
}

.ba-caption {
    font-weight: 500;
    color: var(--navy);
    margin-top: 1rem;
}

/* Testimonials Section */
.testimonials {
    padding: 4rem 0;
    background-color: var(--gray-50);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.testimonial-card blockquote {
    font-size: 1.125rem;
    font-style: italic;
    color: var(--gray-700);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.testimonial-card cite {
    font-weight: 600;
    color: var(--primary);
}

/* Booking CTA Section */
.booking-cta {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--navy) 100%);
    color: var(--white);
    text-align: center;
}

.booking-content h2 {
    color: var(--white);
    margin-bottom: 1rem;
}

.booking-content p {
    color: var(--soft);
    margin-bottom: 2rem;
    font-size: 1.125rem;
}

.booking-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Contact Section */
.contact {
    padding: 4rem 0;
    background-color: var(--white);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.location-card {
    background-color: var(--gray-50);
    padding: 2rem;
    border-radius: 1rem;
    border-left: 4px solid var(--primary);
}

.location-card h3 {
    color: var(--navy);
    margin-bottom: 0.5rem;
}

.location-card p {
    color: var(--gray-600);
    margin-bottom: 1rem;
}

.phone-link {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary);
}

.phone-link:hover {
    color: var(--navy);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    padding: 0.75rem 1.5rem;
    background-color: var(--primary);
    color: var(--white);
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: var(--navy);
    color: var(--white);
    transform: translateY(-2px);
}

/* Forms */
.contact-form-container h3 {
    margin-bottom: 1.5rem;
    color: var(--navy);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--navy);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--gray-200);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(39, 114, 160, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Footer */
.footer {
    background-color: var(--navy);
    color: var(--white);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social .social-link {
    background-color: transparent;
    border: 1px solid var(--gray-400);
    color: var(--gray-300);
}

.footer-social .social-link:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.footer-text p {
    color: var(--gray-300);
    margin-bottom: 0.5rem;
}

.footer-credit a {
    color: var(--accent);
    font-weight: 500;
}

.footer-credit a:hover {
    color: var(--white);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--white);
    margin: 5% auto;
    padding: 2rem;
    border-radius: 1rem;
    width: 90%;
    max-width: 500px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    color: var(--gray-400);
    transition: color 0.3s ease;
}

.close:hover {
    color: var(--navy);
}

.modal h2 {
    margin-bottom: 1.5rem;
    color: var(--navy);
}

/* Toast Container */
.toast-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 3000;
}

.toast {
    background-color: var(--white);
    color: var(--gray-800);
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary);
    animation: slideIn 0.3s ease;
}

.toast.success {
    border-left-color: #10B981;
}

.toast.error {
    border-left-color: #EF4444;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.reveal.reveal-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-content {
        gap: 3rem;
    }
    
    .contact-content {
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .booking-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 1.5rem;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .hero {
        padding: 4rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .location-card {
        padding: 1.5rem;
    }
    
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .toast-container {
        top: 1rem;
        right: 1rem;
        left: 1rem;
    }
    
    .toast {
        margin-bottom: 0.5rem;
    }
}

/* RTL Specific Adjustments */
[dir="rtl"] .location-card {
    border-left: none;
    border-right: 4px solid var(--primary);
}

[dir="rtl"] .toast {
    border-left: none;
    border-right: 4px solid var(--primary);
}

[dir="rtl"] .toast.success {
    border-left: none;
    border-right: 4px solid #10B981;
}

[dir="rtl"] .toast.error {
    border-left: none;
    border-right: 4px solid #EF4444;
}

/* LTR Specific Adjustments */
[dir="ltr"] .hero-content {
    direction: ltr;
}

[dir="ltr"] .about-content {
    direction: ltr;
}

[dir="ltr"] .contact-content {
    direction: ltr;
}
