/* Основные стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #2c3e50;
    --secondary: #3498db;
    --accent: #e74c3c;
    --light: #ecf0f1;
    --dark: #2c3e50;
    --success: #2ecc71;
    --whatsapp: #25D366;
    --avito: #5AC7F5;
}

body {
    background-color: #f9f9f9;
    color: #333;
    line-height: 1.6;
}

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

/* Стили шапки */
header {
    background-color: var(--primary);
    color: white;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

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

.logo i {
    margin-right: 10px;
    color: var(--secondary);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-links a:hover {
    color: var(--secondary);
}

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

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

.mobile-menu {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Главный баннер */
.hero {
    background: linear-gradient(rgba(44, 62, 80, 0.8), rgba(44, 62, 80, 0.9)), var(--hero-bg, url('https://images.unsplash.com/photo-1581094794329-c8112a89af12?ixlib=rb-4.0.3&auto=format&fit=crop&w=1350&q=80'));
    background-size: cover;
    background-position: center;
    color: white;
    padding: 180px 0 100px;
    text-align: center;
    margin-top: 70px;
}

.hero .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    margin: 0 auto 1rem;
    text-align: center;
    width: 100%;
    max-width: 100%;
}

.hero h2 {
    font-size: 2.5rem;
    margin: 0 auto 1rem;
    text-align: center;
    width: 100%;
    max-width: 100%;
    display: none;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2rem;
    line-height: 1.8;
    text-align: center;
}

.btn {
    display: inline-block;
    background-color: var(--secondary);
    color: white;
    padding: 12px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #2980b9;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

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

.btn-secondary:hover {
    background-color: #c0392b;
}

/* Блоки секций */
.section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary);
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    background-color: var(--secondary);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

/* Блок преимуществ в герое */
.hero-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 1.5rem auto;
    max-width: 500px;
    width: 100%;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    padding: 10px;
    border-radius: 6px;
    backdrop-filter: blur(5px);
    text-align: left;
    font-size: 0.85rem;
}

.feature-item i {
    color: var(--secondary);
    font-size: 1rem;
    min-width: 20px;
}

.feature-item span {
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.2;
}

/* Подзаголовок героя */
.hero-subtitle {
    font-size: 1.3rem;
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.6;
    opacity: 0.9;
    font-weight: 400;
    text-align: center;
}

/* Блок локального SEO */
.local-seo {
    background: var(--light);
    padding: 60px 0;
    text-align: center;
}

.local-seo h2 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 2rem;
}

.local-seo p {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.7;
}

/* О нас */
.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text {
    flex: 1;
}

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

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.7;
}

/* Карусель мастерской */
.workshop-carousel {
    flex: 1;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    height: 400px;
}

.workshop-slides {
    display: flex;
    transition: transform 0.5s ease;
    height: 100%;
}

.workshop-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
}

.workshop-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.workshop-nav {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.workshop-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.workshop-dot.active {
    background-color: white;
    transform: scale(1.2);
}

.workshop-prev, .workshop-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
}

.workshop-prev {
    left: 15px;
}

.workshop-next {
    right: 15px;
}

.workshop-prev:hover, .workshop-next:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

/* Услуги */
.services {
    background-color: var(--light);
}

.services-grid {
    display: grid;
    gap: 30px;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.service-card {
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background-color: var(--secondary);
    transform: scaleX(0);
    transition: transform 0.3s;
}

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

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    font-size: 3rem;
    color: var(--secondary);
    margin-bottom: 1.5rem;
}

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

/* Галерея */
.gallery {
    background-color: white;
}

.gallery-carousel {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    height: 500px;
    margin-bottom: 20px;
}

.gallery-slides {
    display: flex;
    transition: transform 0.5s ease;
    height: 100%;
}

.gallery-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
}

.gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.gallery-thumb {
    width: 80px;
    height: 60px;
    border-radius: 5px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.gallery-thumb.active {
    opacity: 1;
    border-color: var(--secondary);
    transform: scale(1.05);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-prev, .gallery-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
    font-size: 1.2rem;
}

.gallery-prev {
    left: 15px;
}

.gallery-next {
    right: 15px;
}

.gallery-prev:hover, .gallery-next:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

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

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 10px;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 5px;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 20px;
}

.lightbox-btn {
    background: rgba(255, 255, 255, 0.8);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-btn:hover {
    background: white;
}

/* Внешние ссылки */
.external-links {
    text-align: center;
}

.links-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 2rem;
}

.external-link {
    display: flex;
    align-items: center;
    background-color: white;
    padding: 15px 25px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.external-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.external-link i {
    font-size: 1.5rem;
    margin-right: 10px;
}

.external-link.avito i {
    color: var(--avito);
}

/* Контакты */
.contact {
    background-color: var(--light);
}

.contact-container {
    display: flex;
    gap: 50px;
}

.contact-info {
    flex: 1;
    text-align: left;
}

.contact-form {
    flex: 1;
}

.info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
    justify-content: flex-start;
    text-align: left;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.info-icon {
    font-size: 1.5rem;
    color: var(--secondary);
    margin-right: 15px;
    margin-top: 5px;
    flex-shrink: 0;
}

.info-text {
    text-align: left;
}

.info-text h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
    text-align: left;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 1rem;
    justify-content: flex-start;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: white;
    border-radius: 50%;
    color: var(--secondary);
    text-decoration: none;
    transition: all 0.3s;
    font-size: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

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

.social-links a.telegram:hover {
    background-color: #0088cc;
    color: white;
}

.social-links a.vk:hover {
    background-color: #4C75A3;
    color: white;
}

.social-links a:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.map {
    margin-top: 3rem;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.map iframe {
    width: 100%;
    height: 300px;
    border: none;
}

/* Подвал */
footer {
    background-color: var(--primary);
    color: white;
    padding: 50px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 30px;
    text-align: left;
}

.footer-column {
    flex: 1;
    min-width: 200px;
    text-align: left;
}

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

.footer-column h3::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 3px;
    background-color: var(--secondary);
    bottom: 0;
    left: 0;
}

.footer-column p {
    text-align: left;
    line-height: 1.6;
}

.footer-links {
    list-style: none;
    text-align: left;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
    text-align: left;
}

.footer-links a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s;
    text-align: left;
}

.footer-links a:hover {
    color: var(--secondary);
}

.footer-links li {
    display: flex;
    align-items: flex-start;
    text-align: left;
}

.footer-links i {
    margin-right: 10px;
    width: 16px;
    color: var(--secondary);
    flex-shrink: 0;
    margin-top: 2px;
}

.footer-links span {
    text-align: left;
    flex: 1;
}

.footer-social-links {
    display: flex;
    gap: 15px;
    margin-top: 1rem;
    justify-content: flex-start;
}

.footer-social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
}

.footer-social-links a:hover {
    background-color: var(--secondary);
    transform: translateY(-3px);
}

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

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: left;
    }
    
    .footer-column {
        text-align: left;
    }
    
    .footer-column h3 {
        text-align: left;
    }
    
    .footer-column h3::after {
        left: 0;
    }
    
    .footer-links {
        text-align: left;
    }
    
    .footer-links li {
        justify-content: flex-start;
        text-align: left;
    }
    
    .footer-social-links {
        justify-content: flex-start;
    }
    
    .footer-column p {
        text-align: left;
    }
}

/* Анимации */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s, transform 0.6s;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Всплывающее окно скидки */
.discount-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 3000;
    justify-content: center;
    align-items: center;
}

.discount-popup.active {
    display: flex;
}

.popup-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: popupShow 0.3s ease-out;
}

@keyframes popupShow {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
}

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

.popup-icon {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

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

.popup-content p {
    margin-bottom: 1.5rem;
    line-height: 1.5;
    color: #666;
}

.popup-code {
    background: var(--light);
    padding: 15px;
    border-radius: 8px;
    margin: 1.5rem 0;
    border: 2px dashed var(--secondary);
}

.popup-code strong {
    color: var(--accent);
    font-size: 1.2rem;
}

.btn-accent {
    background: var(--accent);
    color: white;
    width: 100%;
}

.btn-accent:hover {
    background: #c0392b;
}

/* Адаптивность */
@media (max-width: 992px) {
    .about-content, .contact-container {
        flex-direction: column;
    }
    
    .workshop-carousel {
        margin-top: 30px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--primary);
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    }

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

    .nav-links li {
        margin: 10px 0;
    }

    .mobile-menu {
        display: block;
    }

    .hero h1 {
        display: none;
    }

    .hero h2 {
        display: block;
        font-size: 2.2rem;
        margin-bottom: 1.5rem;
        line-height: 1.3;
    }

    .hero p {
        font-size: 1.1rem;
        line-height: 1.7;
        margin-bottom: 2.5rem;
    }
    
    .gallery-carousel {
        height: 300px;
    }
    
    .gallery-thumb {
        width: 60px;
        height: 45px;
    }
    
    .hero-features {
        grid-template-columns: 1fr;
        max-width: 300px;
        gap: 8px;
    }
    
    .feature-item {
        padding: 8px 10px;
        font-size: 0.8rem;
    }
    
    .feature-item i {
        font-size: 0.9rem;
    }
    
    .feature-item span {
        font-size: 0.75rem;
    }
    
    .info-item {
        flex-direction: column;
        text-align: center;
    }
    
    .info-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-column {
        text-align: center;
    }
    
    .footer-links {
        text-align: center;
    }
}

/* Mobile-first подход для заголовков */
.hero h1 {
    display: none;
}

.hero h2 {
    display: block;
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

@media (min-width: 769px) {
    .hero h1 {
        display: block;
        font-size: 3.5rem;
    }
    
    .hero h2 {
        display: none;
    }
}

/* Оптимизация загрузки изображений */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Кликабельные телефоны */
.clickable-phone {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
}

.clickable-phone:hover {
    color: var(--secondary);
}

/* Стили для email ссылок */
a[href^="mailto:"] {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
}

a[href^="mailto:"]:hover {
    color: var(--secondary);
    text-decoration: underline;
}

/* Конкретно для email в контактах и футере */
#contact-email a, #footer-email a {
    color: inherit;
    text-decoration: none;
    font-weight: 500;
}

#contact-email a:hover, #footer-email a:hover {
    color: var(--secondary);
}

/* Улучшение для печати */
@media print {
    .hero, .discount-popup, .mobile-menu {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}