:root {
    --color-blue: #2D77E2;
    --color-blue-hover: #03488a;
    --color-text-muted: #64748b;
    --color-border: #e2e8f0;
}

.media-layer iframe,
#modal-map-inner-grid iframe {
    width: 100%;
    height: 100%;
}

.contacts-intro-sup {
    color: var(--primary-black-text);
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 25px;
}

.contacts-intro-text {
    color: var(--primary-black-text);
    font-weight: 500;
    max-width: 1220px;
}


.contacts-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 32px;
    padding-bottom: 75px;
    padding-top: 50px;
}

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

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

.info-icon-container {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    flex-shrink: 0;
}

.info-icon-container svg {
    width: 22px;
    height: auto;

}

.info-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 20px;
}

.info-label {
    font-weight: 600;
    color: var(--primary-black-text);
}

.info-val {
    color: var(--primary-black-text);
    font-weight: 500;
}

.socials-container {
    height: 100%;
    gap: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

/* Social Icons Wrap */
.socials-title {
    font-weight: 600;
    font-size: 20px;
}

.socials-row {
    display: flex;
    gap: 10px;
}

.social-badge {
    width: 46px;
    height: 46px;
    background-color: var(--primary-color);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    transition: var(--transition);
}

.social-badge:hover {
    background-color: var(--primary-color-hover);
}

.social-badge svg {
    width: 26px;
    height: 26px;
    fill: currentColor;
}

/* ==========================================================================
       TABS AND MAP CARDS WRAPPER
       ========================================================================== */
.tabs-and-cards-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 40px;
    align-items: start;
    position: relative;
}

.tabs-and-cards-layout>nav {
    align-self: stretch;
}

.country-tabs-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    list-style: none;

    position: sticky;
    top: 32%;
}

.tab-button {
    width: 100%;
    font-weight: 600;
    font-size: 25px; 
    color: var(--primary-dark-text);
    padding: 24px 26px;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.tab-button:hover {
    color: var(--color-blue);
}


.tab-button::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 0;
    background-color: var(--color-blue);
    transition: height 0.3s ease;
    border-radius: 4px;
}

.tab-button.active {
    color: var(--color-blue);
}

.tab-button.active::before {
    height: 76px;
}

.tab-content-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.office-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 10px solid #CDDCF2;
    border-radius: 50px;
    overflow: hidden;

    opacity: 0;
    transform: translateY(40px);
    transition:
        opacity .6s ease,
        transform .6s ease,
        border-color .3s ease;
}

.office-card.visible {
    opacity: 1;
    transform: translateY(0);
}


/* CARD LEFT SIDE: ADDRESS INFO */
.card-info-pane {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 24px;
    color: var(--primary-black-text);
}

.office-address-headline {
    margin-bottom: 15px;
}

.card-info-pane-address {
    font-weight: 500;
    font-size: 20px;
}

.btn-show-map svg {
    color: var(--primary-color);
}

.btn-show-map {
    display: inline-flex;
    align-items: center;
    margin-top: 10px;
    text-decoration: underline;
    gap: 8px;
    color: var(--color-blue);
    cursor: pointer;
    transition: var(--transition);
}

.btn-show-map:hover svg,
.btn-show-map:hover {
    color: var(--color-blue-hover);
}

.btn-show-map svg {
    width: 16px;
    height: auto;
    fill: currentColor;
}

.card-meta-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.card-meta-item {
    display: flex;
    align-items: center;
    gap: 9px;
    font-weight: 500;
    color: var(--primary-black-text);
}

.card-meta-icon {
    width: 22px;
    height: auto;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-meta-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.card-meta-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.card-meta-link:hover {
    color: var(--color-blue);
}

.card-media-pane {
    position: relative;
    height: 100%;
    min-height: 310px;
    cursor: pointer;
    overflow: hidden;
}

/* Shared style for both absolute layers */
.media-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
}

/* Static Photo of Landmark */
.photo-layer {
    z-index: 2;
    object-fit: cover;
    opacity: 1;
}

/* Styled Interactive Vector Roadmap Representation */
.map-layer {
    z-index: 1;
    background-color: #f1f5f9;
    opacity: 0;
    transform: scale(1.05);
    position: relative;
}

/* Visual trigger on overall Card Hover */
.office-card:hover .photo-layer {
    opacity: 0;
    transform: scale(0.95);
}

.office-card:hover .map-layer {
    opacity: 1;
    transform: scale(1);
}


/* Map Geolocation Indicator Pin */
.map-pin {
    position: absolute;
    top: 55%;
    left: 45%;
    transform: translate(-50%, -100%);
    width: 32px;
    height: 32px;
    color: var(--color-blue);
    animation: pinBounce 2s infinite ease-in-out;
}

.map-pin svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

@keyframes pinBounce {

    0%,
    100% {
        transform: translate(-50%, -100%) translateY(0);
    }

    50% {
        transform: translate(-50%, -100%) translateY(-6px);
    }
}

/* Overlaid click to inspect visual banner on hover */
.map-hover-hint {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--primary-black-text);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transition: all 0.3s ease;
    white-space: nowrap;
    z-index: 5;
}

.office-card:hover .map-hover-hint {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}


/* ==========================================================================
       MAP OVERLAY MODAL WINDOW (Click to Open)
       ========================================================================== */
.map-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 45, 89, 0.8);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    padding: 20px;
}

.map-modal.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-content-wrap {
    background: #ffffff;
    width: 100%;
    max-width: 1200px;
    max-height: 75%;
    height: 100%;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    transform: scale(0.95);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.map-modal.open .modal-content-wrap {
    transform: scale(1);
}

/* Modal Close Trigger */
.modal-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    color: var(--primary-black-text);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    z-index: 100;
}

.modal-close-btn:hover {
    background-color: var(--primary-black-text);
    color: #ffffff;
    transform: rotate(90deg);
}

.modal-close-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* The click-to-zoom interactive modal map viewport */
.modal-map-viewport {
    width: 100%;
    height: 100%;
    background-color: #f1f5f9;
    position: relative;
    overflow: hidden;
    cursor: zoom-in;
}

/* Target wrapper that physically zooms on click */
.modal-map-zoom-target {
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center center;
}

/* Click scale zoom state */
.modal-map-viewport.zoomed {
    cursor: zoom-out;
}

.modal-map-viewport.zoomed .modal-map-zoom-target {
    transform: scale(1.65);
}

/* Title banner inside modal */
.modal-map-banner {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(15, 45, 89, 0.9);
    color: #ffffff;
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    pointer-events: none;
}

.office-card.active{
    border-color: var(--primary-color);
}
/* ==========================================================================
       RESPONSIVE BREAKPOINTS (Mobile-First)
       ========================================================================== */

@media (max-width: 1024px) {
    .contacts-info-grid {
        gap: 24px;
    }

    .office-card {
        grid-template-columns: 1.1fr 1fr;
    }
}

@media (max-width: 768px) {

    .contacts-intro-text {
        font-size: 16px;
        margin-bottom: 30px;
    }

    .contacts-info-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding-top: 0px;
        padding-bottom: 30px;
    }

    /* Tabs transform into a horizontal scrollbar list on mobile */
    .tabs-and-cards-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .country-tabs-list {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 8px;
        border-bottom: 1.5px solid var(--color-border);
        gap: 8px;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;

    }

    .country-tabs-list::-webkit-scrollbar {
        display: none;
        /* Hide scrollbar Safari/Chrome */
    }

    .office-card.active{
    border-color:  #CDDCF2;
}

    .office-card {
        grid-template-columns: 1fr;
    }

    .card-info-pane {
        padding: 24px;
    }

    .card-media-pane {
        height: 240px;
        min-height: 240px;
    }

    .tabs-and-cards-layout>nav {
        display: none;
    }

    .contacts-intro-sup {
        font-size: 18px;
    }

    .card-info-pane-address,
    .info-details {
        font-size: 16px;
    }
}