/* Page Header */
.page-header {
    background-color: var(--primary-color);
    padding: 120px 0 60px;
    color: #fff;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin: 0;
}

/* Contact Section */
.contact-section {
    padding: 120px 0 30px;
    background-color: #fff;
    min-height: calc(100vh - 80px - 80px);
    display: flex;
    flex-direction: column;
    flex: 1 0 auto;
}

.contact-section .container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.contact-section .section-title {
    text-align: center;
    margin: 0 0 60px;
    color: #333333;
    font-size: 2rem;
    font-weight: 700;
}

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

.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    margin-bottom: 30px;
}

/* Contact Info */
.contact-info {
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.info-block {
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
}

.info-block::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, 
        rgba(var(--primary-color-rgb), 0.1) 0%,
        rgba(var(--primary-color-rgb), 0.3) 50%,
        rgba(var(--primary-color-rgb), 0.1) 100%
    );
}

.info-block:last-child::after {
    display: none;
}

.info-block p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.2;
}

.info-block .icon {
    margin-right: 15px;
    color: #666;
    font-size: 1.2rem;
    vertical-align: middle;
    display: inline-block;
}

.info-block h3 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
}

.info-block a,
.info-block p {
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    position: relative;
}

.info-block a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--primary-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.info-block a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.info-block a:hover {
    color: var(--primary-color);
}

.map-container {
    width: 100%;
    margin-top: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    height: 300px;
}

.map-container iframe {
    display: block;
    border-radius: 8px;
    transition: opacity 0.3s ease;
    width: 100%;
    height: 100%;
}

.map-container iframe:hover {
    opacity: 0.9;
}

/* Contact Form */
.contact-form {
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.contact-form h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 30px;
    font-weight: 600;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    position: relative;
    margin-bottom: 20px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group input,
.form-group textarea {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    color: #333;
    font-size: 1rem;
    padding: 12px 15px;
    transition: all 0.3s ease;
    width: 100%;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #767676;
    opacity: 1;
}

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

.form-group label {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #fff;
    padding: 0 5px;
    color: #666;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    pointer-events: none;
}

.form-group textarea + label {
    top: 20px;
    transform: none;
}

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

.form-group input:focus + label,
.form-group textarea:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:not(:placeholder-shown) + label {
    top: -8px;
    font-size: 0.8rem;
    color: var(--primary-color);
}

.submit-button {
    display: inline-block;
    padding: 12px 30px;
    background-color: #666;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

/* Icons */
.icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.icon-location {
    background-image: url('../images/icons/location.svg');
}

.icon-phone {
    background-image: url('../images/icons/phone.svg');
}

.icon-email {
    background-image: url('../images/icons/email.svg');
}

/* Responsive Design */
@media (max-width: 991px) {
    .contact-section {
        padding: 100px 0 25px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        max-width: 600px;
        gap: 40px;
        margin-bottom: 25px;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 30px;
    }

    .map-container {
        height: 500px;
    }
}

@media (max-width: 767px) {
    .contact-section {
        padding: 80px 0 20px;
    }

    .contact-grid {
        gap: 30px;
        margin-bottom: 20px;
    }

    .contact-section .section-title {
        margin-top: 40px;
    }

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

    .contact-info,
    .contact-form {
        padding: 20px;
    }

    .info-block {
        margin-bottom: 15px;
        padding-bottom: 12px;
    }

    .info-block .icon {
        font-size: 16px;
        margin-right: 12px;
        vertical-align: middle;
        display: inline-block;
    }

    .info-block p,
    .info-block a {
        font-size: 0.85rem;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 25px;
    }

    .map-container {
        height: 300px;
    }
}

@media (max-width: 575px) {
    .contact-section {
        padding: 60px 0 15px;
    }

    .contact-section .section-title {
        margin-top: 60px;
        margin-bottom: 40px;
        font-size: 1.8rem;
    }

    .contact-grid {
        gap: 20px;
        margin-bottom: 15px;
    }

    .info-block {
        margin-bottom: 15px;
        padding-bottom: 12px;
    }

    .info-block .icon {
        font-size: 16px;
        margin-right: 12px;
        vertical-align: middle;
        display: inline-block;
    }

    .info-block p,
    .info-block a {
        font-size: 0.85rem;
    }

    .submit-button {
        width: 100%;
    }

    .map-container {
        height: 250px;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Print Styles */
@media print {
    .contact-section {
        padding: 20px 0;
    }

    .contact-grid {
        display: block;
    }

    .contact-info,
    .contact-form {
        box-shadow: none;
        border: 1px solid #ddd;
        margin-bottom: 20px;
    }

    .submit-button {
        display: none;
    }
}

/* Thank You Section */
.thank-you-section {
    padding-top: calc(var(--header-height) + 60px);
    padding-bottom: 60px;
    background-color: #fff;
    min-height: calc(100vh - var(--header-height));
    display: flex;
    align-items: center;
}

.thank-you-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    padding: 40px;
}

.thank-you-content h1 {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.thank-you-content p {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 30px;
    line-height: 1.6;
}

.back-home {
    display: inline-block;
    padding: 15px 30px;
    background-color: var(--primary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.1rem;
    transition: background-color 0.3s ease;
}

.back-home:hover {
    background-color: #0042a6;
}

@media (max-width: 575px) {
    .thank-you-content h1 {
        font-size: 2rem;
    }
    
    .thank-you-content p {
        font-size: 1rem;
    }
}

/* Footer Styles */
.footer {
    background-color: #1a1a1a;
    color: #fff;
    padding: 30px 0 15px;
    margin-top: 0;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
    margin-top: auto;
    position: relative !important;
    bottom: auto !important;
}

/* Footer Styles для страницы контактов */
.contact-section + .footer {
    margin-top: 0;
}

/* Стили для прикрепления футера к низу страницы */
.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Основной контент займет все доступное пространство */
main.contact-section {
    flex: 1 0 auto;
}

/* Корректировка вертикального отображения контактов в футере */
.footer-contact {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
}

.footer-contact-item {
    display: flex;
    align-items: flex-start !important;
    margin-bottom: 5px !important;
}

.footer-contact-item .icon {
    margin-top: 3px;
}

.footer-contact-item a {
    line-height: 1.2;
}

@media (max-width: 768px) {
    /* Сохранение структуры обертки страницы */
    .page-wrapper {
        min-height: 100vh;
        display: flex;
        flex-direction: column;
    }
    
    /* Правильное отображение на мобильных устройствах */
    .contact-page main.contact-section {
        padding-bottom: 0 !important;
    }
} 