* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --primary-color: #FF6B00;
    --primary-dark: #E55A00;
    --dark-color: #1A1A1A;
    --light-color: #FFFFFF;
    --gray-color: #F5F5F5;
    --text-color: #333333;
    --shadow: 0 5px 15px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

/* Стили для секции даты и времени */
.datetime-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
}

.datetime-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

@media (min-width: 768px) {
    .datetime-row {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    
    /* Для первого ряда (дата) на десктопах - одна колонка */
    .datetime-row:first-child {
        grid-template-columns: 1fr;
    }
}

.datetime-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.datetime-label {
    font-size: 0.95rem;
    color: #555;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.datetime-icon {
    font-size: 1rem;
}

.date-input-wrapper {
    position: relative;
}

/* Утолщенные поля с закругленными углами */
#visitDate,
.datetime-item select {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #ddd;
    border-radius: 12px; /* Закругленные углы */
    font-size: 1rem;
    transition: var(--transition);
    -webkit-appearance: none;
    appearance: none;
    background-color: white;
    cursor: pointer;
    min-height: 56px; /* Толще поле */
    font-weight: 500;
}

#visitDate {
    padding-right: 20px;
}

.datetime-item select {
    padding-right: 45px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23777' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 20px;
}

/* Фокус состояния */
#visitDate:focus,
.datetime-item select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(255, 107, 0, 0.15);
}

/* Ховер состояния */
#visitDate:hover,
.datetime-item select:hover {
    border-color: #bbb;
}

/* Сделаем также адресное поле толще */
#clientAddress {
    padding: 16px 20px;
    min-height: 56px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    border: 2px solid #ddd;
}

#clientAddress:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(255, 107, 0, 0.15);
}

/* Календарь */
input[type="date"] {
    position: relative;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    position: absolute;
    right: 0;
    top: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    opacity: 0;
}

/* Для iOS */
@supports (-webkit-touch-callout: none) {
    #visitDate,
    .datetime-item select,
    #clientAddress {
        font-size: 16px !important;
        min-height: 56px;
    }
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Header & Navigation */
header {
    background-color: var(--dark-color);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 12px 0;
    box-shadow: var(--shadow);
    height: 70px;
}

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

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 46px;
}

.logo {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--light-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    height: 100%;
    z-index: 1001;
}

.logo span {
    color: var(--primary-color);
}

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

.nav-menu li {
    margin-left: 25px;
}

.nav-menu a {
    color: var(--light-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    padding: 5px 0;
    position: relative;
    font-size: 1rem;
    white-space: nowrap;
}

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

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

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

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--light-color);
    font-size: 1.8rem;
    cursor: pointer;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    padding: 0;
    -webkit-appearance: none;
}

.call-btn {
    background-color: var(--primary-color);
    color: var(--light-color);
    padding: 10px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid var(--primary-color);
    font-size: 0.95rem;
    white-space: nowrap;
}

.call-btn:hover {
    background-color: transparent;
    color: var(--primary-color);
}

/* Убираем кнопку из меню на больших экранах */
.nav-menu .mobile-call-btn {
    display: none;
}

/* Показываем отдельную кнопку на десктопах */
.desktop-call-btn {
    display: block;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0,0,0,0.8), rgba(0,0,0,0.8)), url('../images/mainCard.jpeg');
    background-size: cover;
    background-position: center;
    min-height: 100vh;
    display: flex;
    align-items: center;
    color: var(--light-color);
    text-align: center;
    padding: 100px 0 60px;
    margin-top: 70px;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 15px;
    width: 100%;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
    padding: 0 10px;
}

.hero h1 span {
    color: var(--primary-color);
}

.hero p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.9;
    padding: 0 10px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--light-color);
    padding: 14px 35px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    border: 2px solid var(--primary-color);
    margin-top: 10px;
    min-height: 48px;
}

.hero-btn:hover {
    background-color: transparent;
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* Services Section */
.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    padding: 0 15px;
}

.section-title h2 {
    font-size: 2.2rem;
    color: var(--dark-color);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
    padding: 0 10px;
}

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

.section-title p {
    max-width: 700px;
    margin: 20px auto 0;
    font-size: 1.05rem;
    color: #666;
    padding: 0 10px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    padding: 0 15px;
}

.service-card {
    background-color: var(--light-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
    padding: 25px 15px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.15);
}

.service-icon {
    width: 70px;
    height: 70px;
    background-color: rgba(255, 107, 0, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    flex-shrink: 0;
}

.service-icon svg {
    width: 32px;
    height: 32px;
    fill: var(--primary-color);
}

.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--dark-color);
    line-height: 1.3;
}

.service-card p {
    color: #666;
    margin-bottom: 20px;
    flex-grow: 1;
    font-size: 0.95rem;
}

/* About Section */
.about {
    background-color: var(--gray-color);
}

.about-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    align-items: center;
    padding: 0 15px;
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--dark-color);
    line-height: 1.3;
}

.about-text p {
    margin-bottom: 15px;
    font-size: 1.05rem;
}

.features-list {
    list-style: none;
    margin-top: 20px;
}

.features-list li {
    margin-bottom: 10px;
    padding-left: 28px;
    position: relative;
    line-height: 1.5;
}

.features-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.1rem;
}

.about-image {
    width: 100%;
    height: auto;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    min-height: 250px;
}

/* CTA Section */
.cta {
    background: linear-gradient(rgba(26,26,26,0.9), rgba(26,26,26,0.9)), url('../images/mainCard.jpeg');
    background-size: cover;
    background-position: center;
    color: var(--light-color);
    text-align: center;
    padding: 80px 0;
}

.cta h2 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    padding: 0 15px;
}

.cta p {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 40px;
    opacity: 0.9;
    padding: 0 15px;
}

/* Contacts Section */
.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 35px;
    padding: 0 15px;
}

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

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

.contact-icon {
    width: 45px;
    height: 45px;
    background-color: rgba(255, 107, 0, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
}

.contact-icon svg {
    width: 20px;
    height: 20px;
    fill: var(--primary-color);
}

.contact-text h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.contact-text p {
    color: #666;
}

.contact-form {
    background-color: var(--gray-color);
    padding: 25px;
    border-radius: 10px;
}

.contact-form h3 {
    font-size: 1.6rem;
    margin-bottom: 20px;
    color: var(--dark-color);
}

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    -webkit-appearance: none;
    appearance: none;
    background-color: white;
}

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

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

.submit-btn {
    background-color: var(--primary-color);
    color: var(--light-color);
    border: none;
    padding: 15px 35px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    min-height: 48px;
    margin-top: 10px;
}

.submit-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
}

/* Сообщение об успешной отправке */
.success-message {
    background-color: #4CAF50;
    color: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    margin-top: 15px;
    display: none;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: var(--light-color);
    padding: 50px 0 25px;
}

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

.footer-logo {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--light-color);
    margin-bottom: 20px;
    display: block;
}

.footer-logo span {
    color: var(--primary-color);
}

.footer-about p {
    opacity: 0.8;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.footer-links h4,
.footer-contact h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--light-color);
}

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

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

.footer-links a {
    color: #aaa;
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-contact p {
    margin-bottom: 10px;
    opacity: 0.8;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

.social-links {
    display: flex;
    margin-top: 20px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    color: var(--light-color);
    text-decoration: none;
    transition: var(--transition);
}

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

.footer-bottom {
    text-align: center;
    padding-top: 25px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.85rem;
    opacity: 0.7;
    padding-left: 15px;
    padding-right: 15px;
}

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

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

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    color: #777;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.modal-close:hover {
    background-color: #f5f5f5;
    color: #333;
}

.modal-icon {
    width: 70px;
    height: 70px;
    background-color: rgba(76, 175, 80, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.modal-icon svg {
    width: 36px;
    height: 36px;
    fill: #4CAF50;
}

.modal-content h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.modal-content p {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
}

.modal-btn {
    background-color: var(--primary-color);
    color: var(--light-color);
    border: none;
    padding: 14px 30px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-block;
    text-decoration: none;
    min-width: 200px;
}

.modal-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Responsive */
@media (max-width: 1024px) {
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    header {
        height: 65px;
        padding: 10px 0;
    }
    
    .nav-container {
        height: 45px;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .nav-menu {
        position: fixed;
        top: 65px;
        right: -100%;
        flex-direction: column;
        background-color: var(--dark-color);
        width: 100%;
        text-align: center;
        padding: 25px 0;
        transition: var(--transition);
        box-shadow: var(--shadow);
        height: calc(100vh - 65px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        z-index: 999;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-menu li {
        margin: 0;
        width: 100%;
    }
    
    .nav-menu a {
        display: block;
        padding: 15px 20px;
        font-size: 1.1rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        width: 100%;
    }
    
    .nav-menu a::after {
        display: none;
    }
    
    /* Показываем кнопку в меню на мобильных устройствах */
    .nav-menu .mobile-call-btn {
        display: inline-block;
        margin: 10px auto 0;
        width: auto;
        max-width: 200px;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    /* Скрываем отдельную кнопку на мобильных */
    .desktop-call-btn {
        display: none;
    }
    
    .hero {
        padding: 90px 0 50px;
        margin-top: 65px;
        min-height: calc(100vh - 65px);
    }
    
    .hero h1 {
        font-size: 1.9rem;
        padding: 0;
    }
    
    .hero p {
        padding: 0;
        font-size: 1rem;
    }
    
    .section {
        padding: 70px 0;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 20px;
    }
    
    .service-card {
        padding: 20px 15px;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .contact-form {
        padding: 20px;
    }
    
    .time-range {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .cta h2 {
        font-size: 1.9rem;
    }
    
    .modal-content {
        padding: 30px 20px;
        width: 95%;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.7rem;
        line-height: 1.3;
    }
    
    .hero-btn {
        padding: 12px 30px;
        font-size: 0.95rem;
        width: 100%;
        max-width: 300px;
    }
    
    .service-card {
        padding: 20px 12px;
    }
    
    .service-card h3 {
        font-size: 1.2rem;
    }
    
    .section-title h2 {
        font-size: 1.6rem;
    }
    
    .section-title p {
        font-size: 1rem;
    }
    
    .contacts-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .contact-form h3 {
        font-size: 1.4rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .container {
        padding: 0 12px;
    }
    
    .services-grid,
    .about-content,
    .contacts-grid,
    .section-title,
    .hero-content {
        padding: 0 10px;
    }
}

@media (max-width: 360px) {
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .service-card h3 {
        font-size: 1.15rem;
    }
    
    .section-title h2 {
        font-size: 1.5rem;
    }
    
    .logo {
        font-size: 1.4rem;
    }
}

/* iOS specific fixes */
@supports (-webkit-touch-callout: none) {
    .hero {
        min-height: -webkit-fill-available;
    }
    
    .mobile-menu-btn {
        cursor: pointer;
    }
    
    input, textarea, button, select {
        font-size: 16px !important; /* Prevents zoom on focus in iOS */
    }
    
    .hero-btn, .submit-btn, .call-btn {
        cursor: pointer;
    }
    
    input[type="date"] {
        min-height: 48px;
    }
}

/* Стили для чекбокса согласия */
.privacy-checkbox {
    display: flex;
    align-items: flex-start;
    margin: 20px 0;
    padding: 15px;
    background-color: rgba(245, 245, 245, 0.8);
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    transition: var(--transition);
}

.privacy-checkbox:hover {
    background-color: rgba(245, 245, 245, 0.95);
    border-color: #d0d0d0;
}

.privacy-checkbox input[type="checkbox"] {
    width: 22px;
    height: 22px;
    margin-right: 12px;
    margin-top: 3px;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: var(--primary-color);
    border-radius: 4px;
}

.privacy-checkbox label {
    font-size: 0.9rem;
    color: #555;
    cursor: pointer;
    line-height: 1.5;
    user-select: none;
    flex-grow: 1;
}

.privacy-checkbox a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    padding-bottom: 2px;
}

.privacy-checkbox a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.privacy-checkbox a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.privacy-checkbox a:hover:after {
    width: 100%;
}

/* Адаптивность для чекбокса */
@media (max-width: 768px) {
    .privacy-checkbox {
        padding: 12px;
        margin: 15px 0;
    }
    
    .privacy-checkbox input[type="checkbox"] {
        width: 20px;
        height: 20px;
    }
    
    .privacy-checkbox label {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .privacy-checkbox {
        padding: 10px;
    }
    
    .privacy-checkbox label {
        font-size: 0.8rem;
    }
}

/* Стиль для обязательного поля */
.privacy-checkbox input:required + label:before {
    content: '*';
    color: #ff4444;
    margin-right: 3px;
}

.simple-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 20px;
}