/* Reset и базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Premium Minimalist Palette */
    /* Colors */
    --primary-color: #2563eb;       /* Deeper, more sophisticated Blue */
    --primary-hover: #1d4ed8;
    --text-dark: #111827;           /* Almost Black for high contrast */
    --text-light: #6b7280;          /* Balanced Gray */
    --bg-white: #ffffff;
    --bg-light: #f3f4f6;            /* Cool Light Gray */
    --bg-warm: #fafaf9;             /* Warm Greige */
    --border-color: #e5e7eb;
    
    /* Spacing Scale (4px base) */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;
    --space-20: 80px;
    
    /* Radii */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    /* Shadows - Ultra Soft & Diffused */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05); /* Softer spread */
    --shadow-md: 0 12px 30px -4px rgba(0, 0, 0, 0.08); /* Deep soft shadow */
    --shadow-lg: 0 20px 40px -6px rgba(0, 0, 0, 0.1);
    
    /* Typography */
    --font-heading: 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Gallery Filters */
    --before-saturate: 0.8;
    --before-contrast: 0.95;
    --before-brightness: 0.92;
    --before-sepia: 0.1;
    --before-grayscale: 0.1;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--space-20); /* Increased for comfortable offset */
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white); /* Clean white background */
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

/* Header & Nav */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.8); /* More transparent */
    backdrop-filter: blur(16px); /* Stronger blur */
    border-bottom: 1px solid rgba(229, 231, 235, 0.5);
    transition: all var(--transition-base);
}

.header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    border-bottom-color: var(--border-color);
    box-shadow: var(--shadow-sm);
    padding-top: 0; /* Ensure consistent height */
    padding-bottom: 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    transition: height var(--transition-base);
}

.header.scrolled .header-container {
    height: 70px; /* Shrink on scroll for refined look */
}

/* Logo Styles */
.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    /* Removed 'group: logo' as it's not standard CSS property */
}

.logo-icon {
    width: 42px;
    height: 42px;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(59, 130, 246, 0.15)); 
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo:hover .logo-icon {
    transform: rotate(-12deg) scale(1.1); 
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    letter-spacing: -0.02em;
    line-height: 1;
}

.logo-brand {
    font-weight: 800;
    margin-left: var(--space-2);
    background: linear-gradient(135deg, #1e3a8a 0%, var(--primary-color) 50%, #60a5fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

/* Mobile Adaptive for Logo */
@media (max-width: 480px) {
    .logo-icon {
        width: 32px;
        height: 32px;
    }
    .logo-text {
        font-size: 1.25rem;
    }
    .logo {
        gap: 8px;
    }
}

/* Responsive Fixes */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem; /* Fallback */
        font-size: clamp(2rem, 8vw, 3rem);
    }
    
    .section-title {
        font-size: 2rem;
    }

    .pricing-item {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-4);
    }
    
    .pricing-price {
        margin-left: 0;
        align-self: flex-start;
    }
    
    /* Carousel on Mobile */
    .card-item {
        width: 85vw; /* More breathing room */
        max-width: 480px;
    }
    
    .cards-carousel {
        padding: 0 var(--space-4) var(--space-6);
        gap: var(--space-4);
    }
}

.nav {
    display: flex;
    align-items: center;
    gap: var(--space-8);
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.9375rem;
    transition: color var(--transition-fast);
    position: relative;
    padding: var(--space-2) 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: width var(--transition-base);
    border-radius: var(--radius-full);
}

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

.nav-link:hover::after {
    width: 100%;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    transition: transform var(--transition-base);
}

.mobile-menu-toggle:focus {
    outline: none; /* Removed default outline */
}

.burger-line {
    width: 100%;
    height: 2px; /* Thinner lines */
    background-color: var(--text-dark);
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
    transform-origin: center;
}

.mobile-menu-toggle[aria-expanded="true"] .burger-line:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}

.mobile-menu-toggle[aria-expanded="true"] .burger-line:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px); /* Slide out effect */
}

.mobile-menu-toggle[aria-expanded="true"] .burger-line:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 300px; /* Slightly wider */
    height: 100vh;
    background-color: var(--bg-white);
    box-shadow: var(--shadow-lg); /* Deeper shadow */
    z-index: 1000;
    padding: 100px var(--space-6) var(--space-6);
    transform: translateX(100%);
    transition: transform var(--transition-base);
    overflow-y: auto;
    pointer-events: none;
}

.mobile-menu.active {
    transform: translateX(0);
    pointer-events: auto;
}

.mobile-menu-link {
    display: block;
    padding: var(--space-4) 0;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 1.125rem;
    border-bottom: 1px solid var(--border-color);
    transition: color var(--transition-fast), padding-left var(--transition-fast);
}

.mobile-menu-link:hover,
.mobile-menu-link:focus {
    color: var(--primary-color);
    padding-left: var(--space-2); /* Indent on hover */
}

.mobile-menu-btn {
    margin-top: var(--space-8);
    padding: var(--space-4) var(--space-6);
    background-color: var(--primary-color);
    color: white;
    border-radius: var(--radius-md);
    text-align: center;
    border: none;
    font-weight: 600;
    /* Reset link styles */
    border-bottom: none; 
}

.mobile-menu-btn:hover,
.mobile-menu-btn:focus {
    background-color: var(--primary-hover);
    padding-left: var(--space-4); /* Cancel hover indent for button */
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: white;
}

.mobile-menu-overlay {
    visibility: hidden;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3); /* Lighter, more premium overlay */
    z-index: 999;
    opacity: 0;
    transition: opacity var(--transition-base), visibility var(--transition-base);
    pointer-events: none;
    backdrop-filter: blur(4px); /* Add blur to overlay */
}

.mobile-menu-overlay.active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

/* Hero Section */
.hero {
    /* Updated background with overlay for text readability */
    background-color: #1f2937; /* Fallback color */
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('img/hero-background.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll;
    color: white;
    padding: 180px 0 120px; /* More padding top for header */
    text-align: center;
    position: relative;
    min-height: 400px;
    z-index: 1;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem); /* Fluid hero title */
    font-weight: 800;
    margin-bottom: var(--space-6);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.35rem);
    margin-bottom: var(--space-4);
    opacity: 0.95;
    max-width: 65ch;
    margin-left: auto;
    margin-right: auto;
    font-weight: 300;
    line-height: 1.5;
}

.hero-location {
    font-size: 1.1rem;
    margin-bottom: 40px;
    opacity: 0.8;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.hero-location::before {
    content: "📍";
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4) var(--space-8);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
    cursor: pointer;
    border: none;
    font-family: inherit;
    position: relative;
    z-index: 2;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.btn-sm {
    padding: var(--space-2) var(--space-5);
    font-size: 0.875rem;
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25); /* Colored shadow */
}

.btn-submit {
    width: 100%;
    margin-top: var(--space-4);
    border-radius: var(--radius-md);
    padding: var(--space-4);
}

/* Sections Global */
section {
    padding: var(--space-20) 0;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.5rem); /* Fluid typography */
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--space-12);
    color: var(--text-dark);
    letter-spacing: -0.03em; /* Tighter tracking */
    line-height: 1.2;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: var(--space-12);
    font-size: 1.125rem;
    margin-top: calc(var(--space-8) * -1);
    max-width: 65ch; /* Readable line length */
    margin-left: auto;
    margin-right: auto;
    padding: 0 var(--space-5);
    line-height: 1.6;
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 40px;
}

.advantage-card {
    background: var(--bg-white);
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.advantage-card:hover {
    transform: translateY(-5px);
    border-color: transparent;
    box-shadow: var(--shadow-md);
}

.advantage-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    display: inline-block;
    padding: 16px;
    background: var(--bg-light);
    border-radius: 50%;
}

.advantage-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.advantage-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Gallery */
.gallery {
    background-color: var(--bg-white);
}

.gallery-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: var(--space-12);
    font-size: 1.125rem;
    margin-top: calc(var(--space-10) * -1);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-8);
}

.gallery-item {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: none; /* Removed border */
    box-shadow: var(--shadow); /* Soft shadow */
    transition: all var(--transition-base);
}

.gallery-item:hover {
    transform: translateY(-4px); /* Reduced movement */
    box-shadow: var(--shadow-md);
}

.gallery-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    position: relative;
}

.gallery-image-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.gallery-item:hover .gallery-image {
    transform: scale(1.03);
}

.gallery-image-wrapper[data-state="before"] .gallery-image {
    filter:
        saturate(var(--before-saturate))
        contrast(var(--before-contrast))
        brightness(var(--before-brightness))
        sepia(var(--before-sepia))
        grayscale(var(--before-grayscale));
}

.gallery-label {
    position: absolute;
    top: var(--space-4);
    left: var(--space-4);
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-dark);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-sm);
}

.gallery-description {
    padding: var(--space-6);
    text-align: center;
    color: var(--text-dark);
    font-size: 1rem;
    font-weight: 500;
    border-top: 1px solid var(--bg-light);
}

/* Reviews */
.reviews {
    background-color: var(--bg-white);
}

.reviews-container {
    max-width: 1000px;
    margin: 0 auto;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-8);
    margin-bottom: var(--space-10);
}

.reviews-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--space-10);
    color: var(--text-light);
    font-size: 1.125rem;
}

.review-card {
    background: var(--bg-warm); /* Slight contrast from white bg */
    padding: var(--space-8);
    border-radius: var(--radius-lg);
    border: none;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
}

.review-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    background: var(--bg-white); /* Pop on hover */
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-4);
}

.review-name {
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--text-dark);
    margin: 0;
}

.review-date {
    font-size: 0.875rem;
    color: var(--text-light);
    white-space: nowrap;
    margin-left: var(--space-4);
}

.review-rating {
    display: flex;
    gap: 4px;
    margin-bottom: var(--space-4);
    font-size: 1.125rem;
    line-height: 1;
}

.review-rating .star-filled {
    color: #fbbf24;
}

.review-rating .star-empty {
    color: #e5e7eb;
}

.review-text {
    color: var(--text-light);
    line-height: 1.6;
    flex-grow: 1;
    margin: 0;
}

.review-images {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
    max-width: 100%;
}

.review-image-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.review-image-preview:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.review-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.reviews-actions {
    text-align: center;
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal {
    background: var(--bg-white);
    border-radius: 24px;
    padding: 40px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-light);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    line-height: 1;
}

.modal-close:hover {
    background-color: var(--bg-light);
    color: var(--text-dark);
}

.modal-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--text-dark);
}

.review-form {
    margin-top: 20px;
}

.star-rating {
    display: flex;
    gap: 8px;
    margin: 12px 0;
}

.star-rating .star {
    font-size: 2rem;
    color: #e5e7eb;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
    user-select: none;
}

.star-rating .star:hover {
    color: #fbbf24;
    transform: scale(1.1);
}

.star-rating .star.active {
    color: #fbbf24;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.btn-secondary {
    background-color: var(--bg-light);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--border-color);
    transform: none;
    box-shadow: none;
}

/* Lightbox */
.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 3000;
    opacity: 0;
    transition: opacity 0.3s ease;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox-overlay.active {
    display: flex;
    opacity: 1;
}

.lightbox-container {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    filter: grayscale(0.9) contrast(1.02) brightness(1.2) saturate(0.8);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 2.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    line-height: 1;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 3rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    line-height: 1;
    user-select: none;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 10;
}

/* Pricing */
.pricing {
    background-color: var(--bg-white);
}

.pricing-location {
    text-align: center;
    margin-bottom: var(--space-12);
    font-size: 1.125rem;
    color: var(--text-light);
    margin-top: calc(var(--space-10) * -1);
}

.pricing-list {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: var(--space-2) 0;
    border: none;
    overflow: hidden;
}

.pricing-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-6) var(--space-8);
    border-bottom: 1px solid var(--bg-light);
    transition: background-color var(--transition-fast);
    cursor: pointer;
}

.pricing-item:last-child {
    border-bottom: none;
}

.pricing-item:hover {
    background-color: var(--bg-warm);
}

.pricing-info h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--space-2);
    color: var(--text-dark);
}

.pricing-info p {
    font-size: 0.9375rem;
    color: var(--text-light);
    margin: 0;
}

.pricing-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-left: var(--space-6);
    white-space: nowrap;
    background: var(--bg-light);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
}

@media (max-width: 600px) {
    .pricing-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .pricing-price {
        margin-left: 0;
        align-self: flex-start;
    }
}

.pricing-note {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Order Form */
.order-form {
    background-color: var(--bg-white);
}

.form-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: var(--space-10);
    font-size: 1.125rem;
    margin-top: calc(var(--space-10) * -1);
}

.form {
    max-width: 520px;
    margin: 0 auto;
    background: var(--bg-white);
    padding: var(--space-12);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: var(--space-6);
}

.form-row {
    display: flex;
}

.form-contact-type {
    width: 35% !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-right: none !important;
    background-color: var(--bg-light) !important;
}

.form-contact-input {
    width: 65% !important;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

@media (max-width: 480px) {
    .form-row {
        flex-direction: column;
    }
    .form-contact-type {
        width: 100% !important;
        border-radius: var(--radius-md) var(--radius-md) 0 0 !important;
        border-right: 1px solid var(--border-color) !important;
        border-bottom: none !important;
    }
    .form-contact-input {
        width: 100% !important;
        border-radius: 0 0 var(--radius-md) var(--radius-md) !important;
    }
}

.form-group label {
    display: block;
    margin-bottom: var(--space-2);
    font-weight: 500;
    font-size: 0.9375rem;
    color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: var(--space-4);
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    font-family: inherit;
    background-color: var(--bg-warm); /* Subtle contrast */
    color: var(--text-dark);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: var(--bg-white);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.form-message {
    margin-top: 20px;
    padding: 16px;
    border-radius: 12px;
    text-align: center;
    font-weight: 500;
    font-size: 0.95rem;
    display: none;
}

.form-message.success {
    background-color: #ecfdf5;
    color: #059669;
}

.form-message.error {
    background-color: #fef2f2;
    color: #dc2626;
}

/* Footer */
.footer {
    background-color: #111827; /* Very Dark */
    color: white;
    text-align: center;
    padding: 40px 20px;
}

.footer p {
    margin-bottom: 12px;
    opacity: 0.9;
}

.footer p:last-child {
    opacity: 0.6;
    font-size: 0.85rem;
}

/* Animations - Reveal */
.reveal {
    opacity: 0;
    transform: translateY(15px); /* Reduced from 30px */
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1); /* Smoother bezier */
}

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

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .reveal {
        transform: none !important;
        transition: none !important;
        opacity: 1 !important;
    }
}

/* Delays */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; }

/* Technologies Carousel */
.technologies {
    background-color: var(--bg-white);
    overflow: hidden;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 50px;
    font-size: 1.1rem;
    margin-top: -40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

/* Technologies Grid */
.technologies {
    background-color: var(--bg-white);
    overflow: hidden;
}

.cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-8);
    max-width: 900px;
    margin: 0 auto;
}

.card-item {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    cursor: pointer;
    background: #ffffff;
    box-shadow: var(--shadow);
    border: none;
    position: relative;
}

.card-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.card-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0; 
    pointer-events: none;
    filter: grayscale(0.9) contrast(1.02) brightness(1.2) saturate(0.8);
    transition: transform var(--transition-slow);
}

.card-item:hover img {
    transform: scale(1.0);
}

/* Класс для карточек с внутренним padding */
.card-item-padded {
    padding: var(--space-8);
}

.carousel-loading {
    grid-column: 1 / -1;
    width: 100%;
    text-align: center;
    padding: var(--space-10);
    color: var(--text-light);
}

/* Responsive Clean-up */
@media (max-width: 768px) {
    .nav {
        display: none; /* Hide desktop nav */
    }

    .mobile-menu-toggle {
        display: flex; /* Show hamburger */
    }

    .mobile-menu {
        display: block;
    }

    .hero {
        padding: 140px 0 80px;
        min-height: 350px;
    }
    
    /* Cards grid on Mobile */
    .cards-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 120px 0 60px;
        min-height: 300px;
    }
}

@media (max-width: 360px) {
    .hero-title {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.35rem;
    }
    
    .container {
        padding: 0 12px;
    }
    
    .advantage-card {
        padding: 24px 16px;
    }
}
