/* ============================================
   Header styles
   ============================================ */

/* Mobile menu link sizes */
#hidden-nav .footer-nav__item {
    padding-bottom: 20px;
    font-size: 20px;
    line-height: 1.3;
}

#hidden-nav .footer-nav__item:last-child {
    padding-bottom: 0;
}

.header__right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding-top: 4px;
}

@media (max-width: 1024px) {
    .header__right {
        display: none;
    }
}

.header__tel {
    font-size: 20px;
    line-height: 24px;
    margin-bottom: 2px;
}

.btn-write-header {
    background: linear-gradient(
        90deg,
        #fff 0%,
        #fff 40%,
        rgba(255, 255, 255, 0.5) 50%,
        #fff 60%,
        #fff 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 0.5px rgba(255, 255, 255, 0.3);
    border: none;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.2px;
    cursor: pointer;
    padding: 0;
    white-space: nowrap;
    transition: opacity 0.2s;
    animation: btn-shimmer 3s ease-in-out infinite;
}

@keyframes btn-shimmer {
    0% {
        background-position: 100% 50%;
    }
    100% {
        background-position: -100% 50%;
    }
}

.btn-write-header:hover {
    opacity: 0.8;
}

/* ============================================
   Contact Modal (global)
   ============================================ */
.contact-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.contact-modal.active {
    display: flex;
}

.contact-modal__overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
    animation: fadeIn 0.3s ease;
    z-index: -1;
}

.contact-modal__content {
    position: relative;
    background: #ffffff;
    width: 100%;
    max-width: 520px;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    animation: slideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1;
}

.contact-modal__close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    padding: 0;
}

.contact-modal__close:hover {
    color: #333;
}

.contact-modal__title {
    font-size: 24px;
    font-weight: 600;
    color: #111;
    margin: 0 0 24px 0;
}

.contact-modal__form {
    margin: 0;
}

/* Contact form in modal */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-form__input,
.contact-form__textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    color: #333;
    box-sizing: border-box;
    transition: border-color 0.2s;
    background: #fafafa;
}

.contact-form__input::placeholder,
.contact-form__textarea::placeholder {
    color: #999;
}

.contact-form__input:focus,
.contact-form__textarea:focus {
    outline: none;
    border-color: #004B73;
    background: #fff;
}

.contact-form__textarea {
    resize: vertical;
    min-height: 110px;
}

.contact-form__consent {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
}

.contact-form__checkbox {
    display: inline-block;
    appearance: checkbox;
    -webkit-appearance: checkbox;
    width: 16px;
    height: 16px;
    margin: 3px 0 0 0;
    cursor: pointer;
    flex-shrink: 0;
}

.contact-form__consent-text {
    font-size: 16px;
    color: #666;
    line-height: 1.5;
}

.contact-form__consent-text a {
    color: #004B73;
    text-decoration: none;
}

.contact-form__consent-text a:hover {
    text-decoration: underline;
}

.contact-form__turnstile {
    margin-top: 4px;
}

.contact-form__msg {
    display: none;
    font-size: 13px;
    line-height: 1.4;
}

.contact-form__msg--ok {
    display: block;
    color: #060;
}

.contact-form__msg--err {
    display: block;
    color: #c00;
}

.contact-modal__actions {
    margin-top: 16px;
}

.contact-modal__submit {
    width: 100%;
    background-color: #004B73;
    color: #ffffff;
    padding: 14px 28px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.contact-modal__submit:hover {
    background-color: #003754;
}

.contact-modal__submit:disabled {
    opacity: 0.6;
    cursor: default;
}

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

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

/* Modal responsive */
@media (max-width: 768px) {
    .contact-modal__content {
        width: calc(100% - 40px);
        padding: 32px 24px;
        max-width: none;
    }

    .contact-modal__title {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .btn-write-header {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .contact-modal__content {
        padding: 24px 20px;
    }

    .contact-modal__close {
        top: 16px;
        right: 16px;
    }

    .contact-modal__title {
        font-size: 18px;
        margin-bottom: 16px;
    }

    .contact-modal__form input[type="submit"] {
        width: 100%;
    }
}
