/* Основные переменные */
:root {
    --primary-color: #180505;
    --primary-h1: #e37f0d;
    --secondary-color: #041001;
    --dark-color: #333;
    --light-color: #f4f4f4;
    --gray-color: #777;
    --site-bg: #d1d3dd;
    --site-hd-card: #7e83da;
    --site-border: #180505;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: var(--site-bg);
}

/* Контейнеры */
.container {
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Шапка сайта */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--site-hd-card);
    border: 2px solid var(--site-border);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: transform 0.3s ease;
}

.header.hide {
    transform: translateY(-100%);
}

.header-top {
    padding: 10px 0;
}

.header-contact {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Навигация */
.desktop-nav {
    display: flex;
    gap: 25px;
}

.desktop-nav a {
    color: var(--dark-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    white-space: nowrap;
    transition: var(--transition);
}

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

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

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

.header-contacts {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-phone a {
    color: var(--primary-color);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.header-button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

/* Секции */
.heroH1 {
    display: none;
}

.heroMain {
    background-color: var(--site-bg);
    margin: 80px auto 40px;
    text-align: center;
    position: relative;
}

.heroCard {
    background-color: var(--site-bg);
    margin: 20px auto 20px;
    text-align: center;
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    color: var(--primary-h1);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    font-size: 2rem;
}

/* Карточки услуг */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--site-hd-card);
    border-radius: 8px;
    border: 2px solid var(--site-border);
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
}

.service-card:hover {
    transform: translateY(-10px);
}

.service-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.service-content {
    padding: 12px 15px;
    flex-grow: 1;
}

.service-content-h3 {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 15px 0;
}

.service-content-h3 h2 {
    color: var(--primary-h1);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    font-size: 1.6rem;
}

/* Списки услуг */
.service-list {
    padding-left: 20px;
    margin: 8px 0;
}

.service-list li {
    margin-bottom: 4px;
    line-height: 1.3;
    list-style-type: none;
    position: relative;
    padding-left: 25px;
}

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

.service-list.two-columns {
    columns: 2;
    column-gap: 40px;
    padding-left: 0;
}

.service-list.two-columns li {
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 15px;
    font-size: 1.2rem;
    line-height: 1.4;
    padding-left: 30px;
}

/* Изображение с текстом */
.image-with-text {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* Соотношение 16:9 для десктопа */
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-text {
    position: absolute;
    top: 25%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--primary-h1);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    width: 90%;
    max-width: 2000px;
    padding: 0.5rem 1rem;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    backdrop-filter: blur(5px);
    font-size: clamp(16px, 4vw, 32px);
}

.hero-text h1 {
    font-size: clamp(1.5rem, 6vw, 3.5rem);
    margin-bottom: min(1rem, 2vw);
}

.hero-text p {
    font-size: clamp(1rem, 3vw, 1.8rem);
    margin: 0;
}

/* Секция о мастере */
.about {
    margin: 40px auto;
    background-color: var(--site-bg);
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text {
    flex: 1;
}

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

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

.about-features {
    margin-top: 30px;
}

.about-feature {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.about-feature i {
    color: var(--secondary-color);
    font-size: 1.3rem;
}

/* Секция контактов */
.contact {
    margin: 40px auto;
    background-color: var(--site-bg);
}

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

.contact-info {
    background-color: var(--site-hd-card);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.contact-info h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.5rem;
}

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

.contact-item i {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-top: 3px;
}

/* Формы */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark-color);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

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

.form-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 1.1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
    width: 100%;
}

.form-button:hover {
    background-color: #1a252f;
}

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

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

.footer-column h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: white;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--site-hd-card);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.social-icon:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

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

.modal-content {
    background-color: var(--site-hd-card);
    padding: 30px;
    border-radius: 8px;
    border: 2px solid #a69545;
    max-width: 500px;
    width: 90%;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: var(--primary-color);
    background: none;
    border: none;
}

/* Мобильные стили */
@media (max-width: 768px) {
    .service-grid {
        grid-template-columns: 1fr;
    }

    .service-list.two-columns {
        columns: 1;
    }

    .service-list.two-columns li {
        font-size: 1.1rem;
    }

    .service-content-h3 h2 {
        font-size: 1.8rem !important;
    }

    .mobile-menu-toggle {
        background: none;
        border: none;
        font-size: 22px;
        color: var(--primary-color);
        padding: 5px;
    }

    .mobile-phone {
        display: block;
    }

    .mobile-phone .phone-link {
        color: var(--primary-color);
        font-size: 20px;
        margin-right: 10px;
    }

    .header-info {
        display: none;
    }

    .mobile-nav {
        display: none;
        background: var(--site-bg);
        padding: 15px;
        border-top: 1px solid var(--site-bg);
        white-space: nowrap;
    }

    .mobile-nav.active {
        display: flex;
        flex-direction: column;
    }

    .mobile-nav a {
        padding: 12px 0;
        color: var(--dark-color);
        text-decoration: none;
        border-bottom: 1px solid var(--site-border);
        white-space: nowrap;
    }

    .mobile-nav .mobile-call {
        color: var(--primary-color);
        font-weight: bold;
        margin-top: 10px;
    }

    .about-content {
        flex-direction: column;
        gap: 30px;
    }

    .image-with-text {
        padding-bottom: 100%; /* Квадратное соотношение для мобильных */
    }

    .hero-text {
        top: 25%;
        width: 85%;
        padding: 1rem 1.5rem;
    }

    .hero-text h1 {
        font-size: clamp(20px, 5vw, 28px);
    }

    .hero-text p {
        font-size: clamp(14px, 3vw, 18px);
    }
}

/* Десктопные стили */
@media (min-width: 769px) {
    .mobile-menu-toggle,
    .mobile-phone,
    .mobile-nav {
        display: none;
    }

    .header-contact {
        display: flex;
        justify-content: space-between;
    }

    .header-info {
        display: flex;
        align-items: center;
        gap: 30px;
        justify-content: space-between;
        flex-grow: 1;
    }
}

/* Для очень широких экранов */
@media (min-width: 1200px) {
    .service-list.two-columns {
        columns: 3;
        column-gap: 60px;
    }

    .service-list.two-columns li {
        font-size: 1.3rem;
    }
}