.contacts {
    display: flex;
    background-color: #fff;
    border: 1px solid #cacaca;
    border-radius: 16px;
    padding: 0px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
    margin: 10px;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    margin: 20px;
    width: 100%;
}

.container h1 {
    margin: 15px;
    width: 100%;
    padding: 0px 0;
    text-align: left;
    font-size: 24px;
    color: #333;
    border-bottom: 1px solid #eee; 
    padding-bottom: 10px;
}

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

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.info-section {
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    border-left: 3px solid #6c757d;
}

.info-section h2 {
    color: #333;
    font-size: 1.4rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #eee;  
}

.contact-row:last-child {
    border-bottom: none;
}

.contact-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background-color: #e72630;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-icon img {
    width: 14px;
    height: 14px;
    filter: brightness(0) invert(1);
}

.contact-label {
    color: #333;
    font-weight: 600;
    font-size: 0.9rem;
    min-width: 80px;
}

.contact-value {
    color: #666;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-value:hover {
    color: #e72630;
}

.contact-value[href] {
    color: #e72630;
    font-weight: 500;
}

.contact-value[href]:hover {
    color: #c41e3a;
    text-decoration: underline;
}

.company-description {
    color: #666;
    line-height: 1.6;
}

.company-description p {
    margin-bottom: 15px;
}

.company-description ul {
    margin: 15px 0;
    padding-left: 20px;
}

.company-description li {
    margin-bottom: 8px;
    color: #555;
}

.contact-form-section {
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    border-left: 3px solid #6c757d;
}

.contact-form-section h2 {
    color: #333;
    font-size: 1.4rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.form-description {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.5;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    color: #333;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #fff;
    color: #333;
}

.form-group select option {
    color: #333;
}

/* Стили для select элементов с красным фоном при наведении */
.form-group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' 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 12px center;
    background-size: 16px;
    padding-right: 40px;
}

/* Замена синего цвета выделения на красный в select */
.form-group select {
    accent-color: #e72630;
}

/* Для Firefox */
.form-group select {
    color-scheme: light;
}

/* Замена стандартного синего выделения на красное */
.form-group select:focus {
    outline: 2px solid #e72630;
    border-color: #e72630;
    box-shadow: 0 0 0 2px rgba(231, 38, 48, 0.2);
}

/* Стили для option при наведении (работает в некоторых браузерах) */
.form-group select option:hover {
    background-color: #e72630;
    color: #fff;
}

/* Дополнительные стили для мобильных браузеров */
.form-group select option:checked {
    background-color: #e72630;
    color: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #e72630;
    box-shadow: 0 0 0 2px rgba(231, 38, 48, 0.1);
}

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

.checkbox-group {
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
    margin: 0;
    margin-top: 2px;
    width: auto;
    height: auto;
}

.terms-link {
    color: #e72630;
    text-decoration: none;
}

.terms-link:hover {
    text-decoration: underline;
}

.submit-btn {
    background-color: #e72630;
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-top: 10px;
}

.submit-btn:hover {
    background-color: #c41e3a;
    transform: translateY(-1px);
}

.map-section {
    margin-top: 40px;
    width: 100%;
}

.map-section h2 {
    color: #333;
    font-size: 1.4rem;
    margin-bottom: 20px;
    font-weight: 600;
    border-bottom: 1px solid #eee; 
    padding-bottom: 10px;
}

.map-container {
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 30px;
    border-left: 3px solid #6c757d;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-placeholder {
    text-align: center;
    color: #666;
}

.map-placeholder p {
    margin: 10px 0;
    font-size: 1.1rem;
}

.map-placeholder p:first-child {
    font-weight: 600;
    color: #333;
}

/* Адаптивность */
@media (max-width: 1024px) {
    .contacts-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .container {
        margin: 15px;
    }
    
    .info-section,
    .contact-form-section {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .contacts {
        margin: 5px;
    }
    
    .container {
        margin: 10px;
    }
    
    .container h1 {
        font-size: 18px;
        margin: 10px;
    }
    
    .contact-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        padding: 10px 0;
    }
    
    .contact-icon {
        align-self: flex-start;
    }
    
    .contact-label {
        min-width: auto;
    }
    
    .checkbox-group {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .map-container {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .container h1 {
        font-size: 18px;
    }
    
    .info-section h2,
    .contact-form-section h2,
    .map-section h2 {
        font-size: 1.2rem;
    }
    
    .contact-form {
        gap: 15px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px 12px;
    }
    
    .submit-btn {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
    
    /* Принудительно устанавливаем цвет текста для select на мобильных */
    .form-group select {
        color: #333 !important;
    }
    
    .form-group select option {
        color: #333;
    }
}

/* Кастомный select для контактов */
.custom-select-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
}

.custom-select-button {
    position: relative;
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.custom-select-button:focus,
.custom-select-button.open {
    outline: none;
    border-color: #e72630;
    box-shadow: none;
    border-width: 1px;
}

.custom-select-button::after {
    content: '▼';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #222;
    pointer-events: none;
    transition: transform 0.2s;
}

.custom-select-button.open::after {
    content: '▲';
}

.custom-select-dropdown {
    display: none;
    position: absolute;
    left: 0; right: 0;
    top: 100%;
    background: #fff;
    border: 1.5px solid #e72630;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    z-index: 100;
    max-height: 180px;
    overflow-y: auto;
}

.custom-select-dropdown.open {
    display: block;
}

.custom-select-option {
    border: 1px solid transparent;
    padding: 8px 15px;
    cursor: pointer;
    color: #333;
    background: #fff;
    transition: background 0.15s, color 0.15s, border 0.15s;
    font-size: 14px;
}

.custom-select-option.selected {
    border: 1px solid #e72630;
    background: #fff;
    color: #333;
}

.custom-select-option:hover:not(.disabled) {
    background: #e72630;
    color: #fff;
    border: 1px solid #e72630;
}

.custom-select-option.disabled {
    color: #aaa;
    cursor: not-allowed;
    background: #f5f5f5;
} 