/* Стили для лендинга "Безопасные покрытия для детских площадок" */
:root {
    --primary-color: #2E8B57; /* Зеленый */
    --secondary-color: #1E90FF; /* Синий */
    --accent-color: #FF6347; /* Красный/оранжевый для акцентов */
    --light-color: #F8F9FA;
    --dark-color: #343A40;
    --gray-color: #6C757D;
    --light-gray-color: #E9ECEF;
    --font-main: 'Roboto', sans-serif;
    --font-heading: 'Montserrat', sans-serif;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--dark-color);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition);
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.section {
    padding: 80px 0;
}

.section-gray {
    background-color: var(--light-gray-color);
}

.section-title {
    font-family: var(--font-heading);
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 50px;
    color: var(--dark-color);
    position: relative;
}

.section-title:after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 15px auto 0;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 16px;
}

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

.btn-primary:hover {
    background-color: #236b42;
    color: white;
}

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

.btn-secondary:hover {
    background-color: #1a7ad9;
    color: white;
}

.btn-sm {
    padding: 8px 20px;
    font-size: 14px;
}

/* Хедер */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.header.scrolled {
    padding: 10px 0;
    background-color: rgba(255, 255, 255, 0.98);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo img {
    height: 50px;
}

.main-nav ul {
    display: flex;
}

.main-nav ul li {
    margin-left: 20px;
}

.main-nav ul li a {
    color: var(--dark-color);
    font-weight: 500;
    padding: 5px 0;
    position: relative;
}

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

.main-nav ul li a:hover:after {
    width: 100%;
}

.header-contact {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.phone {
    font-weight: 700;
    font-size: 18px;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.callback-btn {
    background: none;
    border: none;
    color: var(--secondary-color);
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition);
}

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

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    cursor: pointer;
}

.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--dark-color);
    transition: var(--transition);
}

/* Главный экран */
.hero {
    height: 100vh;
    min-height: 600px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    color: white;
    margin-top: 80px;
}

.hero:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.7));
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 20px;
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.hero-features {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.hero-feature {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 10px 15px;
    border-radius: 30px;
}

.hero-feature i {
    margin-right: 10px;
    color: var(--primary-color);
}

/* О покрытиях */
.about-content {
    display: flex;
    gap: 50px;
    align-items: center;
}

.about-text {
    flex: 1;
}

.about-text p {
    margin-bottom: 20px;
}

.about-features {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 30px;
}

.about-feature {
    flex: 1;
    min-width: 200px;
    text-align: center;
    padding: 20px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    background-color: white;
    transition: var(--transition);
}

.about-feature:hover {
    transform: translateY(-5px);
}

.about-feature i {
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.about-feature h3 {
    margin-bottom: 10px;
    font-weight: 600;
}

.about-image {
    flex: 1;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

/* Преимущества */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.benefit-card {
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.benefit-card:hover {
    transform: translateY(-5px);
}

.benefit-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--light-gray-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.benefit-icon i {
    font-size: 36px;
    color: var(--primary-color);
}

.benefit-card h3 {
    margin-bottom: 15px;
    font-weight: 600;
}

/* Наши работы */
.portfolio-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
}

.filter-btn {
    background: none;
    border: 2px solid var(--light-gray-color);
    padding: 8px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.filter-btn.active, .filter-btn:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.portfolio-item {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    position: relative;
}

.portfolio-image {
    position: relative;
    height: 250px;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-info {
    text-align: center;
    color: white;
    padding: 20px;
}

.portfolio-info h3 {
    margin-bottom: 10px;
    font-weight: 600;
}

.portfolio-info p {
    margin-bottom: 15px;
}

/* Безопасность */
.safety-content {
    display: flex;
    gap: 50px;
    align-items: center;
}

.safety-text {
    flex: 1;
}

.safety-text p {
    margin-bottom: 30px;
}

.safety-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.safety-list li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.safety-list i {
    font-size: 24px;
    color: var(--primary-color);
    margin-top: 5px;
}

.safety-list h3 {
    margin-bottom: 5px;
    font-weight: 600;
}

.safety-image {
    flex: 1;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.safety-badge {
    position: absolute;
    bottom: 30px;
    right: 30px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: var(--primary-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
}

.safety-badge span:first-child {
    font-size: 24px;
}

/* Калькулятор */
.calculator-wrapper {
    display: flex;
    gap: 50px;
    background-color: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 30px;
}

.calculator-form, .calculator-result {
    flex: 1;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--light-gray-color);
    border-radius: 5px;
    font-size: 16px;
    transition: var(--transition);
}

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

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-checkbox input {
    width: auto;
}

.calculator-result {
    background-color: var(--light-gray-color);
    padding: 30px;
    border-radius: 10px;
}

.calculator-result h3 {
    margin-bottom: 20px;
    font-weight: 600;
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.result-item.total {
    font-weight: 700;
    font-size: 20px;
    margin-top: 10px;
    border-bottom: none;
}

.result-note {
    font-size: 14px;
    color: var(--gray-color);
    margin: 20px 0;
}

/* Отзывы */
.testimonials-slider {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.testimonial-card {
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: var(--shadow);
    display: none;
}

.testimonial-content {
    margin-bottom: 20px;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.testimonial-author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.testimonial-author h4 {
    font-weight: 600;
    margin-bottom: 5px;
}

.testimonial-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.prev-btn, .next-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: white;
    border: none;
    box-shadow: var(--shadow);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.prev-btn:hover, .next-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Контакты */
.contact-content {
    display: flex;
    gap: 50px;
}

.contact-info, .contact-form-wrapper {
    flex: 1;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 30px;
}

.contact-item i {
    font-size: 24px;
    color: var(--primary-color);
    margin-top: 5px;
}

.contact-item h3 {
    margin-bottom: 5px;
    font-weight: 600;
}

.contact-social h3 {
    margin-bottom: 15px;
    font-weight: 600;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--light-gray-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-color);
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary-color);
    color: white;
}

.contact-form {
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: var(--shadow);
}

/* Футер */
.footer {
    background-color: var(--dark-color);
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    margin-bottom: 40px;
}

.footer-logo {
    flex: 1;
    min-width: 250px;
}

.footer-logo img {
    height: 50px;
    margin-bottom: 15px;
}

.footer-links {
    flex: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-links-column {
    flex: 1;
    min-width: 150px;
}

.footer-links-column h3 {
    margin-bottom: 20px;
    font-weight: 600;
    color: var(--light-color);
}

.footer-links-column ul li {
    margin-bottom: 10px;
}

.footer-links-column ul li a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links-column ul li a:hover {
    color: white;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.footer-bottom-links {
    display: flex;
    gap: 20px;
}

.footer-bottom-links a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-bottom-links a:hover {
    color: white;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    max-width: 500px;
    width: 100%;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: var(--gray-color);
    transition: var(--transition);
}

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

.modal-content h2 {
    margin-bottom: 20px;
    font-weight: 600;
}

/* Кнопка "Наверх" */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow);
    z-index: 900;
}

.scroll-top.active {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background-color: var(--secondary-color);
}

/* Медиа-запросы */
@media (max-width: 992px) {
    .section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 32px;
        margin-bottom: 40px;
    }
    
    .hero h1 {
        font-size: 40px;
    }
    
    .about-content, .safety-content, .calculator-wrapper, .contact-content {
        flex-direction: column;
    }
    
    .about-image, .safety-image {
        margin-top: 30px;
    }
    
    .about-features {
        gap: 20px;
    }
    
    .about-feature {
        min-width: calc(50% - 20px);
    }
}

@media (max-width: 768px) {
    .header-inner {
        position: relative;
    }
    
    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: white;
        padding: 20px;
        box-shadow: var(--shadow);
        display: none;
    }
    
    .main-nav.active {
        display: block;
    }
    
    .main-nav ul {
        flex-direction: column;
    }
    
    .main-nav ul li {
        margin: 10px 0;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 30px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .section {
        padding: 40px 0;
    }
    
    .section-title {
        font-size: 28px;
        margin-bottom: 30px;
    }
    
    .hero {
        min-height: 500px;
    }
    
    .hero h1 {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .about-feature {
        min-width: 100%;
    }
    
    .portfolio-filters {
        flex-direction: column;
        align-items: center;
    }
    
    .testimonial-author {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-item i {
        margin: 0 auto 10px;
    }
    
    .social-links {
        justify-content: center;
    }
}

/* Стили для загрузки калькулятора */
.calculator-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--gray-color);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--light-gray-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.calculator-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

/* Скрыть loading при загрузке калькулятора */
.modern-calculator-loaded .calculator-loading {
    display: none;
}

/* Улучшения для мобильных устройств */
@media (max-width: 768px) {
    /* Улучшенные touch targets */
    .btn {
        min-height: 44px;
        padding: 12px 20px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Улучшенные формы */
    input, select, textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 44px;
        padding: 12px 15px;
    }
    
    /* Более удобные кнопки навигации */
    .mobile-menu-btn {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Улучшенные карточки */
    .benefit-card, .testimonial-card {
        padding: 20px;
        margin-bottom: 15px;
    }
    
    /* Улучшенный контакт */
    .contact-item {
        padding: 15px 0;
        border-bottom: 1px solid var(--light-gray-color);
    }
    
    /* Улучшенные социальные ссылки */
    .social-links a {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
    }
    
    /* Улучшенная навигация */
    .main-nav ul li a {
        padding: 15px 0;
        display: block;
        border-bottom: 1px solid var(--light-gray-color);
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    /* Еще больше адаптации для маленьких экранов */
    .hero-content h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .section-title {
        font-size: 1.8rem;
        text-align: center;
    }
    
    .portfolio-filters {
        gap: 8px;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .filter-btn {
        padding: 8px 12px;
        font-size: 14px;
    }
}


/* Улучшения модального окна для мобильных */
@media (max-width: 768px) {
    .modal-content {
        margin: 20px;
        padding: 25px;
        max-width: calc(100vw - 40px);
        max-height: calc(100vh - 40px);
        overflow-y: auto;
    }
    
    .close-modal {
        font-size: 24px;
        padding: 10px;
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}
