/* Page Container */
.contact-page {
    background: linear-gradient(135deg, #f8f9fc 0%, #ffffff 25%, #f1f3f8 75%, #e8ecf4 100%);
    min-height: 100vh;
}

/* Hero Section */
.contact-hero {
    background: linear-gradient(rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0.65)),
        url('../images/Kontakt/compiled photo 5.jpg');
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 108vh;
    position: relative;
}

/* Apple devices (iOS Safari) - use scroll with center positioning */
@supports (-webkit-touch-callout: none) {
    .contact-hero {
        background-attachment: scroll;
        background-position: center center;
        background-size: cover !important;
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
        min-height: 100vh;
    }
}

@media (max-width: 1150px) {
    .contact-hero {
        background-size: 190%;
    }
}

@media (max-width: 1000px) {
    .contact-hero {
        background-position: 50% 11%;
        min-height: 67vh;
    }
}

@media (max-width: 900px) {
    .contact-hero {
        min-height: 59vh;
    }
}

@media (max-width: 800px) {
    .contact-hero {
        min-height: 51vh;
    }
}

@media (max-width: 700px) {
    .contact-hero {
        min-height: 48vh;
    }
}

@media (max-width: 650px) {
    .contact-hero {
        min-height: 44vh;
    }
}

@media (max-width: 600px) {
    .contact-hero {
        min-height: 40vh;
    }
}

@media (max-width: 550px) {
    .contact-hero {
        min-height: 37vh;
    }
}

@media (max-width: 500px) {
    .contact-hero {
        min-height: 33vh;
    }
}

@media (max-width: 450px) {
    .contact-hero {
        min-height: 29vh;
    }
}

@media (max-width: 400px) {
    .contact-hero {
        min-height: 27vh;
    }
}

.contact-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
    pointer-events: none;
}

.hero-content {
    max-width: var(--max-content-width);
    text-align: center;
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1.2s ease-out 0.3s forwards;
}

.hero-title {
    font-family: 'TeXGyreChorus';
    font-weight: 500;
    font-style: italic;
    font-size: clamp(54px, 5.5vw, 78px);
    color: var(--header-background-color);
    line-height: 1.2;
    margin-bottom: 20px;
    margin-top: 0px;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8);
}

.hero-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-style: italic;
    font-size: clamp(18px, 2.2vw, 26px);
    color: var(--header-background-color);
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8);
}

/* Contact Info Section */
.contact-info-section {
    padding: 80px var(--horizontal-padding) 40px var(--horizontal-padding);
    background: white;
    display: flex;
    flex-direction: column;
}

.contact-info-container {
    max-width: var(--max-content-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: calc(35% - 30px) calc(65% - 30px);
    gap: 60px;
    align-items: start;
}

.contact-details {
    opacity: 0;
    transform: translateX(-30px);
    animation: fadeInLeft 1s ease-out 0.6s forwards;
}

.contact-company {
    margin-top: 0px;
}

.contact-item {
    flex-direction: column;
    text-align: center;

    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
    transition: all 0.3s ease;
}

.office-hours-item {
    margin-bottom: 0px;
}

.contact-text {
    color: #444;
    line-height: 1.6;
    flex-grow: 1;
}

.contact-text a {
    color: var(--header-background-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.contact-text a:hover {
    color: #2b4670;
    text-decoration: underline;
}

.contact-text .office-hours {
    margin: 0px;
    text-align: center;
    max-width: 175px;
}

.ru .contact-text .office-hours,
.ua .contact-text .office-hours {
    max-width: 260px;
}

.contact-map {
    margin-top: 17px;
    align-self: start;
    opacity: 0;
    transform: translateX(30px);
    animation: fadeInRight 1s ease-out 0.8s forwards;
    text-align: center;
    position: relative;
    display: inline-block;
}

.map-link {
    display: inline-block;
    position: relative;
    cursor: pointer;
    text-decoration: none;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.map-link:hover {
    transform: scale(1.02);
    box-shadow: 0 16px 45px rgba(34, 58, 94, 0.25);
}

.map-image {
    width: 100%;
    height: auto;
    border-radius: 20px;
    transition: all 0.3s ease;
    display: block;
}

.map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(34, 58, 94, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    border-radius: 20px;
}

.map-link:hover .map-overlay {
    opacity: 1;
}

.map-hint {
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 16px;
    text-align: center;
    padding: 20px;
    line-height: 1.4;
}

.map-container {
    position: relative;
}

/* Map attribution overlay */
.map-attribution {
    position: absolute;
    right: 0px;
    bottom: 4px;
    background: #ffffff;
    color: #333333;
    padding: 6px 10px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(34, 58, 94, 0.12);
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 12px;
    line-height: 1.2;
    z-index: 3;
}

.map-attribution a {
    color: var(--header-background-color);
    text-decoration: none;
}

.map-attribution a:hover {
    text-decoration: underline;
}

/* Personal Section */
.personal-section {
    padding: 40px var(--horizontal-padding) 80px var(--horizontal-padding);
    background: linear-gradient(135deg, #f8f9fc, white);
}

.personal-container {
    max-width: var(--max-content-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.personal-image {
    opacity: 0;
    transform: translateX(-30px);
    animation: fadeInLeft 1s ease-out 1s forwards;
    text-align: center;
}

.personal-image img {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 12px 35px rgba(34, 58, 94, 0.15);
    transition: all 0.3s ease;
    border: 2px solid rgba(34, 58, 94, 0.1);
}

.personal-image img:hover {
    transform: scale(1.02);
    box-shadow: 0 16px 45px rgba(34, 58, 94, 0.25);
}

.personal-text {
    opacity: 0;
    transform: translateX(30px);
    animation: fadeInRight 1s ease-out 1.2s forwards;
}

.personal-message-map {
    max-width: var(--max-content-width);
    align-self: center;
    margin-bottom: 25px;
    background: white;
    transition: all 0.3s ease;
    text-align: right;
    width: 100%;
    margin-bottom: 0px;
    margin-top: 6px;
}

.personal-message-map-one-line {
    display: none;
}

.personal-message {
    padding: 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 6px 20px rgba(34, 58, 94, 0.08);
    transition: all 0.3s ease;
    margin-right: 30px;
}

.personal-message div:first-child {
    margin-bottom: 10px;
}

.personal-message:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 25px rgba(34, 58, 94, 0.12);
}

/* Animations */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media screen and (max-width: 1050px) {
    .contact-info-section {
        padding: 40px var(--horizontal-padding);
    }

    .personal-section {
        padding: 40px var(--horizontal-padding);
    }

    .personal-message-map {
        font-size: clamp(13px, (100vw - -148.5px) * 0.014184, 17px); /* AutoClamp(768, 13, 1050, 17) */
    }
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .personal-message {
        margin-right: 0px;
        padding: 15px;
    }

    .personal-message-map {
        font-size: clamp(13px, (100vw - -1328px) * 0.007634, 16px) /* AutoClamp(375, 13, 768, 16) */;
    }

    .contact-map {
        margin-top: 0px;
    }

    .contact-info-section {
        padding: 20px var(--horizontal-padding);
    }

    .personal-section {
        padding: 20px var(--horizontal-padding);
    }

    .contact-info-container,
    .personal-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .contact-details,
    .contact-map,
    .personal-image,
    .personal-text {
        animation-delay: 0.3s;
    }

    .contact-item {
        margin-bottom: 0px;
    }

    .office-hours-item {
        margin-top: 25px;
    }
}

@media screen and (max-width: 515px) {
    .personal-message-map-one-line {
        display: block;
        text-align: justify;
    }
    .personal-message-map-two-lines {
        display: none;
    }
}
