/* style.css - ОПТИМИЗИРОВАННАЯ ВЕРСИЯ */
:root {
    --primary-color: #1e40af;
    --primary-dark: #1e3a8a;
    --primary-light: #3b82f6;
    --secondary-color: #059669;
    --secondary-dark: #047857;
    --accent-color: #dc2626;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --light-bg: #f8fafc;
    --white: #ffffff;
    --gray: #9ca3af;
    --light-gray: #f3f4f6;
    --border-light: #e5e7eb;
    --border-radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --gradient-primary: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    --gradient-secondary: linear-gradient(135deg, #059669 0%, #10b981 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    padding-top: 80px;
    background: var(--white);
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

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

/* HEADER */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo a::before {
    content: "📊";
    font-size: 1.3rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-menu > li > a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
    display: block;
    font-size: 0.95rem;
    position: relative;
}

.nav-menu > li > a:hover {
    color: var(--primary-color);
}

.nav-menu > li > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-menu > li > a:hover::after {
    width: 100%;
}

/* DROPDOWN */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.dropdown-arrow {
    transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--white);
    width: 800px;
    max-width: 90vw;
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1001;
    padding: 1.5rem;
    margin-top: 1rem;
    border: 1px solid var(--border-light);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.menu-section h4 {
    color: var(--primary-color);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.menu-section ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu-section li {
    margin-bottom: 0.25rem;
}

.menu-section a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
    display: block;
    transition: all 0.2s ease;
    border-radius: 6px;
    border-left: 2px solid transparent;
}

.menu-section a:hover {
    color: var(--primary-color);
    background: var(--light-bg);
    border-left-color: var(--primary-color);
    transform: translateX(4px);
}

/* HEADER ACTIONS */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-phone {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    white-space: nowrap;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.header-phone:hover {
    color: var(--primary-color);
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

/* MOBILE TOGGLE */
.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    width: 30px;
    height: 30px;
    justify-content: center;
    align-items: center;
}

.nav-toggle span {
    width: 20px;
    height: 2px;
    background: var(--primary-color);
    margin: 2px 0;
    transition: 0.3s;
    display: block;
}

/* HERO SECTION */
.hero {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.services-preview,
.about-section,
.contact-section {
    padding: 60px 0;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero .container {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    line-height: 1.5;
    font-weight: 400;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.hero .btn {
    padding: 1.25rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

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

.hero .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: var(--light-bg);
}

.hero .btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.hero .btn-secondary:hover {
    background: var(--white);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* SERVICES PREVIEW */
.services-preview {
    padding: 100px 0;
    background: var(--light-bg);
}

.services-preview h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-color);
    font-weight: 700;
}

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

.service-card {
    background: var(--white);
    padding: 2.5rem 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.service-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.4rem;
    font-weight: 600;
}

.service-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    flex-grow: 1;
}

.service-card .btn-secondary {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0.875rem 1.5rem;
    align-self: center;
}

.service-card .btn-secondary:hover {
    background: var(--primary-dark);
    color: var(--white);
}

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

/* ABOUT PAGE STYLES */
.about-section {
    padding: 80px 0;
    background: var(--white);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-text h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    color: var(--text-light);
}

.about-features {
    margin: 2.5rem 0;
}

.feature-item {
    background: var(--light-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

.feature-item h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.feature-item ul {
    list-style: none;
    padding: 0;
}

.feature-item li {
    padding: 0.5rem 0;
    position: relative;
    padding-left: 1.5rem;
}

.feature-item li:before {
    content: "✓";
    color: var(--secondary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    text-align: center;
}

.stat-item {
    padding: 1.5rem;
    background: var(--light-bg);
    border-radius: var(--border-radius);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* CONTACT PAGE STYLES */
.contact-section {
    padding: 80px 0;
    background: var(--light-bg);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-form-container h2 {
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

.contact-form {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

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

.form-input,
.form-textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

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

.btn-full {
    width: 100%;
}

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

.info-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.info-card h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
}

.contact-item {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.contact-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.contact-item strong {
    display: block;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.contact-item span,
.contact-item a {
    color: var(--text-light);
    text-decoration: none;
}

.contact-item a:hover {
    color: var(--primary-color);
}

/* MODAL STYLES */
.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: 10% auto;
    padding: 2.5rem;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 450px;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s ease;
}

.close {
    color: var(--text-light);
    float: right;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

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

.modal-form {
    margin-top: 1.5rem;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    text-align: center;
}

.close {
    color: var(--text-light);
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 1.8rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    background: none;
    border: none;
    padding: 0;
}

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

.modal-form {
    margin-top: 1rem;
}

.modal-form .form-group {
    margin-bottom: 1.2rem;
}

.modal-form .form-input,
.modal-form .form-textarea {
    width: 100%;
    padding: 0.875rem;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.modal-form .form-input:focus,
.modal-form .form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

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

.modal-form .btn-primary {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

/* Убедимся что модальное окно поверх всего */
.modal {
    z-index: 9999 !important;
}

.modal-content {
    z-index: 10000 !important;
}

/* FOOTER STYLES */
.footer {
    background: var(--text-color);
    color: var(--white);
    padding: 3rem 0 1rem;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--white);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.footer-section h4 {
    color: var(--primary-light);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-section p {
    color: var(--gray);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

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

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

.footer-section a {
    color: var(--gray);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary-light);
}

.footer-bottom {
    border-top: 1px solid var(--gray);
    padding-top: 1.5rem;
    text-align: center;
}

.footer-bottom p {
    color: var(--gray);
    font-size: 0.9rem;
    margin: 0;
}

/* Дополнительные улучшения для подвала */
.footer-contacts a {
    color: var(--gray);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-contacts a:hover {
    color: var(--primary-light);
}

.footer-section h3::before {
    content: "📊";
    margin-right: 0.5rem;
}

/* Улучшаем внешний вид ссылок в подвале */
.footer-section ul li {
    position: relative;
    padding-left: 0;
    transition: transform 0.2s ease;
}

.footer-section ul li:hover {
    transform: translateX(5px);
}

.footer-section ul li::before {
    content: "•";
    color: var(--primary-light);
    margin-right: 0.5rem;
}

/* Делаем подвал более компактным на десктопе */
@media (min-width: 769px) {
    .footer {
        padding: 2.5rem 0 1rem;
    }

    .footer-content {
        gap: 2rem;
    }
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .about-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-item {
        padding: 1rem;
    }

    .stat-number {
        font-size: 2rem;
    }

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

    .contact-form,
    .info-card {
        padding: 1.5rem;
    }

    .modal-content {
        margin: 10% auto;
        padding: 1.5rem;
        width: 95%;
    }

    .feature-item {
        padding: 1.5rem;
    }

    .footer {
        padding: 2rem 0 1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-section {
        padding: 0 1rem;
    }

    /* Еще уменьшаем отступы для мобильных */
    .hero {
        padding: 70px 0 50px;
        min-height: 50vh;
    }

    .services-preview,
    .about-section,
    .contact-section {
        padding: 50px 0;
    }
}

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

    .hero h1 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .services-preview,
    .about-section,
    .contact-section {
        padding: 40px 0;
    }
}

/* Стили для переиспользуемых блоков в base.html */
.pricing-cta {
    background: var(--white);
    padding: 3rem 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 2px solid var(--primary-light);
    margin: 2rem auto;
    max-width: 1200px;
}

.pricing-cta h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.pricing-cta p {
    color: var(--text-light);
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Убираем фон у pricing-section чтобы был белый как у других страниц */
.pricing-section {
    padding: 80px 0;
    background: var(--white);
}

/* Адаптив для CTA */
@media (max-width: 768px) {
    .pricing-cta {
        padding: 2rem 1.5rem;
        margin: 2rem 1rem;
    }
}