/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Исправление для iOS */
html {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #0a0a0a;
    overflow-x: hidden;
    min-height: 100%;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

section {
    padding: 80px 0;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    text-align: center;
    margin-bottom: 15px;
    color: #f5f5f5;
    letter-spacing: 1px;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 60px;
    color: #aaa;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.highlight {
    color: #c9a86a;
}

.btn {
    display: inline-block;
    background: linear-gradient(45deg, #c9a86a, #d4b57f);
    color: #000;
    padding: 15px 35px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(201, 168, 106, 0.3);
    text-transform: uppercase;
    font-size: 0.9rem;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(201, 168, 106, 0.4);
    background: linear-gradient(45deg, #d4b57f, #e5c893);
}

/* Навигация */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: all 0.3s ease;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

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

.logo h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    color: #c9a86a;
    letter-spacing: 2px;
}

.logo-subtitle {
    font-size: 0.7rem;
    color: #aaa;
    letter-spacing: 3px;
    display: block;
    text-transform: uppercase;
}

.nav-links a {
    color: #f5f5f5;
    text-decoration: none;
    margin-left: 40px;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: #c9a86a;
}

.nav-links a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: #c9a86a;
    left: 0;
    bottom: -5px;
    transition: width 0.3s ease;
}

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

/* Герой секция - ПОЛНОСТЬЮ ИСПРАВЛЕНА ДЛЯ iOS */
.hero {
    height: 100vh;
    min-height: -webkit-fill-available;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    overflow: hidden;
}

/* Используем отдельный элемент для фона вместо background-image */
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7));
}

/* Картинка фона как отдельный элемент */
.hero-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    will-change: transform;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
}

.hero-text-center {
    text-align: center;
    margin-bottom: 40px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-text-center h2 {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    margin-bottom: 20px;
    letter-spacing: 3px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    text-align: center;
    width: 100%;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.hero-subtitle-center {
    font-size: 1.3rem;
    color: #ddd;
    line-height: 1.6;
    margin: 0 auto;
    text-align: center;
    max-width: 700px;
    padding: 0 20px;
}

.hero-scroll {
    position: absolute;
    bottom: 40px;
    color: #c9a86a;
    font-size: 1.8rem;
    animation: bounce 2s infinite;
    z-index: 3;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-10px);}
    60% {transform: translateY(-5px);}
}

/* О компании */
.about {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    position: relative;
    overflow: hidden;
}

.about:before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(201, 168, 106, 0.05) 0%, rgba(0,0,0,0) 70%);
    z-index: 0;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #ccc;
    position: relative;
    z-index: 1;
}

.about-content p {
    margin-bottom: 25px;
}

/* Галерея */
.gallery {
    background-color: #0a0a0a;
    padding: 80px 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.gallery-item {
    overflow: hidden;
    border-radius: 10px;
    height: 300px;
    position: relative;
    transition: transform 0.5s ease;
}

.gallery-item:hover {
    transform: translateY(-10px);
}

.gallery-img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
    background-repeat: no-repeat;
}

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

#car-img-1 {
    background-image: url('car1.jpg');
}

#car-img-2 {
    background-image: url('car2.jpg');
}

#car-img-3 {
    background-image: url('car3.jpg');
}

#car-img-4 {
    background-image: url('car4.jpg');
}

/* Услуги */
.services {
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
}

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

.service-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 40px 30px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.service-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(201, 168, 106, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.service-icon {
    font-size: 2.5rem;
    color: #c9a86a;
    margin-bottom: 25px;
}

.service-card h3 {
    color: #f5f5f5;
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.service-card p {
    color: #aaa;
    line-height: 1.6;
}

/* Контакты - ИСПРАВЛЕНО ДЛЯ iOS */
.contact {
    background-color: #0a0a0a;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-top: 40px;
    width: 100%;
}

.contact-info, .map-section {
    width: 100%;
    min-width: 0; /* Исправление для iOS */
}

.contact-card-simple {
    background: rgba(20, 20, 20, 0.7);
    border-radius: 20px;
    padding: 40px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(201, 168, 106, 0.1);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    height: 100%;
    width: 100%;
    box-sizing: border-box;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.contact-header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.contact-header i {
    font-size: 2rem;
    color: #c9a86a;
    margin-right: 15px;
}

.contact-header h3 {
    color: #f5f5f5;
    font-size: 1.5rem;
    font-weight: 600;
}

.contact-item {
    display: flex;
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

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

.contact-icon {
    width: 50px;
    height: 50px;
    background: rgba(201, 168, 106, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    flex-shrink: 0;
}

.contact-icon i {
    font-size: 1.3rem;
    color: #c9a86a;
}

.contact-details h4 {
    color: #f5f5f5;
    font-size: 1.1rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.contact-details p {
    color: #aaa;
    font-size: 0.95rem;
    line-height: 1.5;
}

.contact-details strong {
    color: #c9a86a;
    font-weight: 600;
}

.phone-number, .email-address {
    font-size: 0.95rem;
    color: #aaa;
    line-height: 1.5;
    text-decoration: none;
    display: block;
    transition: color 0.3s ease;
}

.phone-number:hover, .email-address:hover {
    color: #c9a86a;
}

.address-detail {
    font-size: 0.85rem !important;
    color: #777 !important;
    margin-top: 5px;
}

.contact-social {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.contact-social h4 {
    color: #f5f5f5;
    font-size: 1.1rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.social-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.social-btn {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.03);
}

.social-btn:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.social-btn i {
    font-size: 1.5rem;
    margin-right: 15px;
    width: 30px;
}

.social-btn span {
    color: #f5f5f5;
    font-weight: 500;
    flex-grow: 1;
}

.whatsapp-btn {
    background: rgba(37, 211, 102, 0.05);
    border-color: rgba(37, 211, 102, 0.1);
}

.whatsapp-btn i {
    color: #25D366;
}

.whatsapp-btn:hover {
    background: rgba(37, 211, 102, 0.1);
    border-color: rgba(37, 211, 102, 0.3);
}

.telegram-btn {
    background: rgba(0, 136, 204, 0.05);
    border-color: rgba(0, 136, 204, 0.1);
}

.telegram-btn i {
    color: #0088cc;
}

.telegram-btn:hover {
    background: rgba(0, 136, 204, 0.1);
    border-color: rgba(0, 136, 204, 0.3);
}

/* Карта - ИСПРАВЛЕНО ДЛЯ iOS */
.map-section {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    min-width: 0;
}

.map-container-rounded {
    flex-grow: 1;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(201, 168, 106, 0.1);
    width: 100%;
    height: 500px;
    position: relative;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

#map {
    height: 100%;
    width: 100%;
    min-height: 400px;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.map-note {
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #777;
    font-size: 0.85rem;
}

.map-note i {
    margin-right: 8px;
    color: #c9a86a;
}

/* Футер */
.footer {
    background: #050505;
    padding: 40px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.footer-logo {
    flex-shrink: 0;
    margin-right: 40px;
}

.footer-logo h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    color: #c9a86a;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.footer-logo p {
    color: #aaa;
    font-size: 0.8rem;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.footer-info {
    flex-grow: 1;
}

.company-details {
    margin-bottom: 20px;
}

.company-name {
    color: #f5f5f5;
    font-size: 1.1rem;
    margin-bottom: 10px;
    font-weight: 500;
    line-height: 1.4;
}

.company-rekv p {
    color: #777;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 8px;
}

.footer-copyright {
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-copyright p {
    color: #777;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.footer-note {
    color: #aaa !important;
    font-size: 0.85rem !important;
    font-style: italic;
}

/* Адаптивность - ДОБАВЛЕНЫ ИСПРАВЛЕНИЯ ДЛЯ iOS */
@media (max-width: 992px) {
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-text-center h2 {
        font-size: 2.8rem;
    }
    
    .hero-subtitle-center {
        font-size: 1.2rem;
    }
    
    .footer-content {
        flex-direction: column;
    }
    
    .footer-logo {
        margin-right: 0;
        margin-bottom: 20px;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
    }
    
    .nav-links {
        margin-top: 20px;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-links a {
        margin: 0 15px 10px;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .hero {
        height: 100vh;
        height: -webkit-fill-available;
        min-height: 500px;
    }
    
    .hero-text-center h2 {
        font-size: 2.2rem;
        padding: 0 15px;
    }
    
    .hero-subtitle-center {
        font-size: 1.1rem;
        padding: 0 15px;
    }
    
    .contact-card-simple {
        padding: 30px;
        width: 100%;
        max-width: 100%;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-info {
        margin-top: 20px;
    }
    
    .footer-info p {
        text-align: center;
    }
    
    /* Исправление для карты на iOS */
    .map-container-rounded {
        height: 400px;
        min-height: 400px;
    }
    
    .contact-content {
        display: flex;
        flex-direction: column;
        gap: 30px;
    }
    
    .contact-info, .map-section {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-text-center h2 {
        font-size: 2rem;
    }
    
    .hero-subtitle-center {
        font-size: 1rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-card-simple {
        padding: 20px;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-icon {
        margin-right: 0;
        margin-bottom: 15px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .map-container-rounded {
        height: 350px;
        min-height: 350px;
    }
}

/* iOS специфичные исправления */
@supports (-webkit-touch-callout: none) {
    /* Улучшение отображения на iOS */
    .hero-bg-image {
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }
    
    /* Отключаем bounce эффект на iOS */
    body {
        overscroll-behavior-y: none;
        -webkit-overflow-scrolling: touch;
    }
    
    .map-container-rounded {
        -webkit-overflow-scrolling: touch;
    }
    
    .contact-card-simple, .service-card, .gallery-item {
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
    }
    
    /* Исправление для фиксированных элементов */
    .navbar {
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
    }
    
    /* Улучшение производительности при скролле */
    .hero, .contact-card-simple, .map-container-rounded {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        will-change: transform;
    }
    
    /* Улучшение кликабельности ссылок на iOS */
    .phone-number, .email-address {
        -webkit-tap-highlight-color: rgba(201, 168, 106, 0.2);
        cursor: pointer;
    }
}