/* styles.css - Улучшенная версия */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #ff6b00;
    --primary-hover: #ff8c00;
    --dark-bg: #1a1a1a;
    --dark-bg-secondary: #2d2d2d;
    --text-dark: #1a1a1a;
    --text-light: #666;
    --light-bg: #f5f5f5;
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-md: 0 5px 20px rgba(0,0,0,0.15);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* Плавная прокрутка */
html {
    scroll-behavior: smooth;
}

/* Header с улучшенными эффектами */
.header {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: white;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.header.scrolled {
    padding: 10px 0;
    background: rgba(26, 26, 26, 0.95);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    position: relative;
}

.logo::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.logo:hover::after {
    width: 100%;
}

.logo:hover {
    transform: translateY(-2px);
    filter: brightness(1.2);
}

.nav {
    display: flex;
    gap: 30px;
}

.nav a {
    color: white;
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
    position: relative;
    padding: 5px 0;
}

.nav a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav a:hover::before {
    width: 100%;
}

.nav a:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

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

.phone, .phone2 {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
    transition: var(--transition);
    text-shadow: 0 2px 4px rgba(255, 107, 0, 0.3);
}

.phone:hover, .phone2:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
}

/* Hero Section с анимацией */
.hero {
    background: linear-gradient(135deg, rgba(0,0,0,0.7), rgba(26,26,26,0.8)),
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><rect fill="%23333" width="1200" height="600"/><path fill="%23444" d="M0 300 L300 200 L600 350 L900 250 L1200 300 L1200 600 L0 600 Z"/></svg>');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    padding: 140px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(255, 107, 0, 0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

.hero h1 {
    font-size: 52px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
    animation: fadeInUp 1s ease-out;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.hero p {
    font-size: 20px;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 1s ease-out 0.2s backwards;
    line-height: 1.8;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cta-button {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    padding: 16px 45px;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    animation: fadeInUp 1s ease-out 0.4s backwards;
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.cta-button:hover::before {
    width: 300px;
    height: 300px;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 0, 0.5);
}

.cta-button:active {
    transform: translateY(-1px);
}

/* Services Section */
.services {
    padding: 100px 20px;
    background: linear-gradient(to bottom, #f5f5f5, #ffffff);
    position: relative;
}

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

.section-title {
    text-align: center;
    font-size: 42px;
    margin-bottom: 60px;
    color: var(--text-dark);
    font-weight: 700;
    letter-spacing: -0.5px;
    position: relative;
    animation: fadeInUp 0.8s ease-out;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
    margin: 20px auto 0;
    border-radius: 2px;
    animation: expandWidth 0.8s ease-out 0.3s backwards;
}

@keyframes expandWidth {
    from { width: 0; }
    to { width: 80px; }
}

/* Scroll Container */
.scroll-container {
    overflow-x: auto;
    padding: 10px 0;
    scroll-behavior: smooth;
}

.scroll-container::-webkit-scrollbar {
    height: 10px;
}

.scroll-container::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
    border-radius: 10px;
    transition: background 0.3s;
}

.scroll-container::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
}

.scroll-container::-webkit-scrollbar-track {
    background: #e0e0e0;
    border-radius: 10px;
}

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

.gallery-grid {
    display: flex;
    gap: 25px;
    padding: 10px 0;
    min-width: max-content;
}

.service-card {
    background: white;
    padding: 45px 35px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-align: center;
    min-width: 300px;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

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

.service-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    font-size: 56px;
    margin-bottom: 25px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

.service-card h3 {
    font-size: 24px;
    margin-bottom: 18px;
    color: var(--text-dark);
    font-weight: 600;
}

.service-card p {
    color: var(--text-light);
    line-height: 1.8;
    font-size: 15px;
}

/* Advantages Section */
.advantages {
    padding: 100px 20px;
    background: white;
    position: relative;
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 45px;
    margin-top: 60px;
}

.advantage-item {
    text-align: center;
    transition: var(--transition);
}

.advantage-item:hover {
    transform: translateY(-8px);
}

.advantage-icon {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 42px;
    color: white;
    box-shadow: 0 8px 20px rgba(255, 107, 0, 0.3);
    transition: var(--transition);
    position: relative;
}

.advantage-icon::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    opacity: 0;
    transition: var(--transition);
}

.advantage-item:hover .advantage-icon {
    transform: rotate(360deg) scale(1.1);
    box-shadow: 0 12px 30px rgba(255, 107, 0, 0.4);
}

.advantage-item:hover .advantage-icon::after {
    opacity: 1;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
}

.advantage-item h3 {
    font-size: 22px;
    margin-bottom: 12px;
    color: var(--text-dark);
    font-weight: 600;
}

.advantage-item p {
    color: var(--text-light);
    line-height: 1.8;
}

/* Gallery Section */
.gallery {
    padding: 100px 20px;
    background: linear-gradient(to bottom, #f5f5f5, #ffffff);
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    height: 350px;
    width: 500px;
    background: white;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.gallery-item::before,
.gallery-item::after {
    display: none !important;
}

.gallery-item:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-lg);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    border-radius: 16px;
    display: block;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

/* Contact Form Section */
.contact-form {
    padding: 100px 20px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.contact-form::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 107, 0, 0.1) 0%, transparent 70%);
}

.form-container {
    max-width: 600px;
    margin: 50px auto 0;
    position: relative;
    z-index: 1;
}

.form-group {
    margin-bottom: 28px;
    animation: fadeInUp 0.6s ease-out backwards;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.3px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid transparent;
    border-radius: 10px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.95);
    transition: var(--transition);
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 4px rgba(255, 107, 0, 0.1);
    transform: translateY(-2px);
}

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

.submit-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    padding: 16px;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.4);
    animation: fadeInUp 0.6s ease-out 0.5s backwards;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 0, 0.5);
}

.submit-btn:active {
    transform: translateY(-1px);
}

.success-message {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 18px;
    border-radius: 10px;
    margin-top: 25px;
    display: none;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    animation: slideIn 0.5s ease-out;
}

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

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

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

.footer-section h3 {
    color: var(--primary-color);
    margin-bottom: 25px;
    font-size: 20px;
    font-weight: 600;
}

.footer-section p,
.footer-section a {
    color: #ccc;
    text-decoration: none;
    display: block;
    margin-bottom: 12px;
    transition: var(--transition);
    line-height: 1.8;
}

.footer-section a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #333;
    color: #888;
    font-size: 14px;
}

/* Responsive Design */

/* Планшеты (768px - 1024px) */
@media (max-width: 1024px) {
    .hero h1 {
        font-size: 44px;
    }

    .hero p {
        font-size: 18px;
    }

    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 28px;
    }

    .advantages-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 35px;
    }

    .gallery-item {
        width: 370px;
        height: 240px;
    }

    .gallery-item:hover {
        transform: none;
        box-shadow: var(--shadow-sm);
    }

    .gallery-item:hover img {
        transform: none;
    }
}

/* Мобильные устройства (до 768px) */
@media (max-width: 768px) {
    .header {
        padding: 12px 0;
    }

    .header-container {
        flex-direction: column;
        gap: 18px;
    }

    .logo {
        font-size: 22px;
    }

    .nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 18px;
        justify-content: center;
        width: 100%;
    }

    .nav a {
        font-size: 14px;
    }

    .contact-header {
        align-items: center;
    }

    .phone, .phone2 {
        font-size: 16px;
    }

    .hero {
        padding: 90px 20px;
    }

    .hero h1 {
        font-size: 36px;
        margin-bottom: 18px;
    }

    .hero p {
        font-size: 16px;
        margin-bottom: 28px;
    }

    .cta-button {
        padding: 14px 35px;
        font-size: 16px;
    }

    .services, .advantages, .gallery, .contact-form {
        padding: 60px 20px;
    }

    .section-title {
        font-size: 32px;
        margin-bottom: 40px;
    }

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

    .service-card {
        padding: 35px 25px;
        min-width: auto;
    }

    .service-icon {
        font-size: 48px;
    }

    .advantages-grid {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .advantage-icon {
        width: 75px;
        height: 75px;
        font-size: 38px;
    }

    .gallery-grid {
        gap: 18px;
    }

    .gallery-item {
        width: 320px;
        height: 220px;
        transition: none !important;
    }

    .gallery-item:hover,
    .gallery-item:active,
    .gallery-item:focus {
        transform: none !important;
        box-shadow: var(--shadow-sm) !important;
    }

    .gallery-item img {
        transition: none !important;
    }

    .gallery-item:hover img,
    .gallery-item:active img,
    .gallery-item:focus img {
        transform: none !important;
    }

    .gallery-item::before,
    .gallery-item::after,
    .gallery-item *::before,
    .gallery-item *::after {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
    }

    .form-container {
        margin-top: 35px;
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 12px 15px;
        font-size: 15px;
    }

    .footer {
        padding: 50px 20px 20px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 35px;
    }
}

/* Очень маленькие экраны (до 480px) */
@media (max-width: 480px) {
    .logo {
        font-size: 20px;
    }

    .nav {
        gap: 12px;
    }

    .nav a {
        font-size: 13px;
    }

    .hero h1 {
        font-size: 28px;
    }

    .hero p {
        font-size: 15px;
    }

    .cta-button {
        padding: 12px 30px;
        font-size: 15px;
    }

    .section-title {
        font-size: 28px;
    }

    .service-card h3 {
        font-size: 20px;
    }

    .service-card p {
        font-size: 14px;
    }

    .advantage-icon {
        width: 65px;
        height: 65px;
        font-size: 32px;
    }

    .advantage-item h3 {
        font-size: 18px;
    }

    .gallery-item {
        width: 290px;
        height: 190px;
    }

    .gallery-item:hover {
        transform: none;
        box-shadow: var(--shadow-sm);
    }

    .gallery-item:hover img {
        transform: none;
    }

    .phone, .phone2 {
        font-size: 15px;
    }
}

/* Большие экраны (от 1400px) */
@media (min-width: 1400px) {
    .container,
    .header-container,
    .footer-content {
        max-width: 1400px;
    }

    .hero h1 {
        font-size: 60px;
    }

    .hero p {
        font-size: 22px;
        max-width: 850px;
    }

    .section-title {
        font-size: 48px;
    }

    .gallery-item {
        width: 470px;
        height: 300px;
    }
}

/* Дополнительные анимации для скролла */
@media (prefers-reduced-motion: no-preference) {
    .service-card,
    .advantage-item,
    .gallery-item {
        opacity: 0;
        animation: fadeInUp 0.8s ease-out forwards;
    }

    .service-card:nth-child(1) { animation-delay: 0.1s; }
    .service-card:nth-child(2) { animation-delay: 0.2s; }
    .service-card:nth-child(3) { animation-delay: 0.3s; }
    .service-card:nth-child(4) { animation-delay: 0.4s; }
    
    .advantage-item:nth-child(1) { animation-delay: 0.1s; }
    .advantage-item:nth-child(2) { animation-delay: 0.2s; }
    .advantage-item:nth-child(3) { animation-delay: 0.3s; }
    .advantage-item:nth-child(4) { animation-delay: 0.4s; }
}