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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8fafc;
    opacity: 1;
    transition: opacity 0.2s ease;
    /* will-change удален - не нужен для простой анимации opacity, экономит память */
}

body.page-exit {
    opacity: 0;
}

body.page-enter {
    opacity: 0;
}

body.page-enter.page-enter-active {
    opacity: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
    color: #64748b;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn svg {
    width: 20px;
    height: 20px;
}

.btn-primary {
    background-color: #f97316;
    color: white;
}

.btn-primary:hover {
    background-color: #ea580c;
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.btn-outline:hover {
    background-color: white;
    color: #1e293b;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.btn:focus {
    outline: 2px solid #f97316;
    outline-offset: 2px;
}

/* Navigation */
.navbar {
    background-color: #1e293b;
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.navbar .container {
    position: static;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 700;
}

.logo-icon {
    width: 32px;
    height: 32px;
    color: #f97316;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    background-color: #f97316 !important;
    color: white !important;
}

.nav-link:focus {
    outline: 2px solid #f97316;
    outline-offset: 2px;
}

.phone-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #f97316;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.phone-btn:hover {
    background-color: #ea580c;
}

.phone-btn svg {
    width: 16px;
    height: 16px;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background-color: white;
    transition: all 0.3s ease;
}

.mobile-menu-btn:focus {
    outline: 2px solid #f97316;
    outline-offset: 2px;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    color: white;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    z-index: -1;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 100px 0 50px;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.text-accent {
    color: #f97316;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: #cbd5e1;
}

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

/* Features Section */
.features {
    padding: 80px 0;
    background-color: #f1f5f9;
}

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

.feature-item {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    background-color: #f97316;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.feature-icon svg {
    width: 30px;
    height: 30px;
}

.feature-item h3 {
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.feature-item p {
    color: #64748b;
    margin: 0;
}

/* Services Section */
.services {
    padding: 80px 0;
    background-color: white;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    color: #1e293b;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.25rem;
    color: #64748b;
}

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

.service-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.service-icon {
    width: 60px;
    height: 60px;
    background-color: #f97316;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 1.5rem;
}

.service-icon svg {
    width: 30px;
    height: 30px;
}

.service-card h3 {
    color: #1e293b;
    margin-bottom: 1rem;
}

.service-card p {
    color: #64748b;
    margin-bottom: 1.5rem;
}

.service-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #f97316;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.service-link:hover,
.service-link:focus {
    color: #ea580c;
    gap: 0.75rem;
    outline: 2px solid #f97316;
    outline-offset: 2px;
}

.service-link svg {
    width: 16px;
    height: 16px;
}

/* Contact Form Section */
.contact-form-section {
    padding: 80px 0;
    background-color: #f1f5f9;
}

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

.contact-info h2 {
    color: #1e293b;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.contact-info p {
    font-size: 1.25rem;
    color: #64748b;
    margin-bottom: 2rem;
}

.contact-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-feature {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #1e293b;
}

.contact-feature svg {
    width: 24px;
    height: 24px;
    color: #10b981;
}

.contact-form-container {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

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

.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: #ef4444;
}

.form-group input[aria-invalid="true"],
.form-group select[aria-invalid="true"],
.form-group textarea[aria-invalid="true"] {
    border-color: #ef4444;
}

.error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-disclaimer {
    font-size: 0.875rem;
    color: #6b7280;
    text-align: center;
    margin: 0;
}

.form-disclaimer a {
    color: #f97316;
    text-decoration: none;
}

.form-disclaimer a:hover,
.form-disclaimer a:focus {
    color: #ea580c;
    outline: 2px solid #f97316;
    outline-offset: 2px;
}

.success-message {
    text-align: center;
    padding: 1.5rem;
    position: relative;
}

/* Убираем крестик из successMessage - используем только крестик модального окна */
.success-close {
    display: none;
}

.success-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin: 0 auto 1rem;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.success-icon svg {
    width: 30px;
    height: 30px;
}

.success-message h3,
.success-message h4 {
    color: #1e293b;
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.success-message p {
    color: #64748b;
    margin: 0;
    font-size: 0.9375rem;
}

/* Стили для successMessage внутри модального окна */
#successMessage {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 12px;
    padding: 1.25rem;
    margin-top: 0.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

/* Мобильные стили для successMessage */
@media (max-width: 768px) {
    .quote-form-container .success-message,
    .quote-form-container #successMessage,
    .modal-content .success-message,
    .modal-content #successMessage {
        padding: 1rem 0.75rem;
        margin-top: 0.5rem;
    }

    .quote-form-container .success-icon,
    .modal-content .success-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 0.75rem;
    }

    .quote-form-container .success-icon svg,
    .modal-content .success-icon svg {
        width: 24px;
        height: 24px;
    }

    .quote-form-container .success-message h3,
    .quote-form-container .success-message h4,
    .modal-content .success-message h3,
    .modal-content .success-message h4,
    .quote-form-container #successMessage h3,
    .quote-form-container #successMessage h4,
    .modal-content #successMessage h3,
    .modal-content #successMessage h4 {
        font-size: 1rem;
        margin-bottom: 0.4rem;
        line-height: 1.3;
    }

    .quote-form-container .success-message p,
    .modal-content .success-message p,
    .quote-form-container #successMessage p,
    .modal-content #successMessage p {
        font-size: 0.875rem;
        line-height: 1.4;
    }
}

@media (max-width: 480px) {
    .quote-form-container .success-message,
    .quote-form-container #successMessage,
    .modal-content .success-message,
    .modal-content #successMessage {
        padding: 0.875rem 0.625rem;
        margin-top: 0.5rem;
    }

    .quote-form-container .success-icon,
    .modal-content .success-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 0.625rem;
    }

    .quote-form-container .success-icon svg,
    .modal-content .success-icon svg {
        width: 20px;
        height: 20px;
    }

    .quote-form-container .success-message h3,
    .quote-form-container .success-message h4,
    .modal-content .success-message h3,
    .modal-content .success-message h4,
    .quote-form-container #successMessage h3,
    .quote-form-container #successMessage h4,
    .modal-content #successMessage h3,
    .modal-content #successMessage h4 {
        font-size: 0.9375rem;
        margin-bottom: 0.35rem;
    }

    .quote-form-container .success-message p,
    .modal-content .success-message p,
    .quote-form-container #successMessage p,
    .modal-content #successMessage p {
        font-size: 0.8125rem;
    }
}

/* Footer */
.footer {
    background-color: #1e293b;
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: white;
    margin-bottom: 1rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-logo svg {
    width: 32px;
    height: 32px;
    color: #f97316;
}

.footer-section p {
    color: #cbd5e1;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover,
.footer-section ul li a:focus {
    color: #f97316;
    outline: 2px solid #f97316;
    outline-offset: 2px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: #cbd5e1;
}

.contact-item svg {
    width: 20px;
    height: 20px;
    color: #f97316;
    margin-top: 2px;
}

.footer-section a {
    color: #f97316;
    text-decoration: none;
}

.footer-section a:hover,
.footer-section a:focus {
    color: #ea580c;
    outline: 2px solid #f97316;
    outline-offset: 2px;
}

.footer-bottom {
    border-top: 1px solid #334155;
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    color: #94a3b8;
    margin: 0;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.page-fade-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.22s ease;
    background-color: #f8fafc;
    /* Matches body background */
}

.page-fade-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

section {
    scroll-margin-top: 70px;
}

/* Responsive */
@media (max-width: 992px) {
    .navbar {
        width: 100%;
        left: 0;
        right: 0;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }

    .container {
        width: 100%;
        max-width: 100%;
        padding: 0 12px;
        box-sizing: border-box;
    }

    body {
        overflow-x: hidden;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: #1e293b;
        flex-direction: column;
        padding: 1rem;
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }
}