/* Contacts Page Styles */

.contacts-page-section {
    padding-top: 40px;
    padding-bottom: 40px;
}

.contacts-page-title {
    margin: 0 0 40px;
}

.contacts-page-content {
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    margin-bottom: 60px;
}

.contacts-page-map-wrapper {
    width: 100%;
    margin-bottom: 80px;
    border-radius: 16px;
    overflow: hidden;
}

.contacts-page-map {
    width: 100%;
    height: 500px;
    background: #f5f5f5;
}

.contact-map-label {
    background: #fff;
    padding: 4px 8px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Google Maps InfoWindow Styles */
.gm-style .gm-style-iw-c {
    padding: 0 !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15) !important;
    max-width: 280px !important;
}

.gm-style .gm-style-iw-d {
    overflow: auto !important;
    max-height: none !important;
}

.gm-style .gm-style-iw-t::after {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15) !important;
}

/* Hide default close button */
.gm-style .gm-ui-hover-effect {
    display: none !important;
}

/* Map tooltip (shared for contacts and projects) */
#contacts-map-tooltip,
#map-tooltip {
    display: none;
    position: fixed;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    z-index: 10000;
    pointer-events: auto;
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    max-width: 280px;
}

/* Tooltip content wrapper */
.tooltip-content-wrapper {
    padding-right: 24px; /* Space for close button */
}

/* Tooltip title */
.tooltip-title {
    font-weight: 500;
    font-size: 15px;
    margin-bottom: 4px;
}

/* Tooltip distance */
.tooltip-distance {
    font-size: 13px;
    opacity: 0.9;
}

/* Tooltip close button */
.tooltip-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 24px;
    height: 24px;
    transition: opacity 0.2s;
    z-index: 1;
}

.tooltip-close:hover {
    opacity: 0.7;
}

/* Mobile tooltip specific styles */
#map-tooltip.map-tooltip-mobile,
#contacts-map-tooltip.map-tooltip-mobile {
    position: fixed;
    transform: translateZ(0); /* Force GPU acceleration */
}

/* InfoWindow content wrapper */
.map-infowindow-wrapper {
    position: relative;
    padding: 12px 32px 12px 12px;
    min-width: 180px;
}

/* InfoWindow content text */
.map-infowindow-content {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.4;
    color: #111111;
    cursor: pointer;
}

/* InfoWindow close button */
.map-infowindow-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.map-infowindow-close:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Tooltip content wrapper */
.map-tooltip-content {
    font-weight: 500;
    font-size: 15px;
}

.contacts-offices-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-office-item {
    display: flex;
    flex-direction: column;
}

.contact-office-image {
    width: 100%;
    overflow: hidden;
    border-radius: 16px;
}

.contact-office-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

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

.contact-office-title {
    font-size: 32px;
    font-weight: 500;
    line-height: 1.2;
    color: var(--color-text);
    margin: 0;
}

.contact-office-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 0;
    border-bottom: 1px solid rgba(20, 20, 20, 0.1);
}

.contact-office-row-address {
    align-items: flex-start;
}

.contact-office-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-office-address {
    font-size: 16px;
    line-height: 1.5;
    color: var(--color-text);
}

.contact-office-label {
    font-size: 16px;
    font-weight: 500;
    color: var(--color-text);
    margin-left: 20px;
    flex-shrink: 0;
}

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

.contact-office-hour-item {
    font-size: 16px;
    line-height: 1.5;
    color: var(--color-text);
}

.contact-office-phone-link {
    font-size: 16px;
    font-weight: 500;
    color: var(--color-text);
    text-decoration: none;
    transition: opacity 0.3s ease;
    flex: 1;
}

@media (hover: hover) {
    .contact-office-phone-link:hover {
        opacity: 0.7;
    }
}

.contact-office-call-btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--color-text, #141414);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 8px;
    transition: opacity 0.3s ease;
    margin-top: 20px;
    align-self: flex-start;
}

@media (hover: hover) {
    .contact-office-call-btn:hover {
        opacity: 0.8;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .contacts-page-section {
        padding-top: 50px;
        padding-bottom: 60px;
    }

    .contacts-page-title {
        margin-bottom: 30px;
    }

    .contacts-page-content {
        margin-bottom: 50px;
    }

    .contacts-page-map-wrapper {
        margin-bottom: 60px;
    }

    .contacts-page-map {
        height: 400px;
    }

    .contacts-offices-list {
        gap: 30px;
    }

    .contact-office-title {
        font-size: 28px;
    }
}

@media (max-width: 768px) {
    .contacts-page-section {
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .contacts-page-title {
        margin-bottom: 24px;
    }

    .contacts-page-content {
        font-size: 14px;
        margin-bottom: 40px;
    }

    .contacts-offices-list {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contact-office-content {
        gap: 16px;
    }

    .contact-office-title {
        font-size: 24px;
    }

    .contact-office-row {
        flex-direction: row;
        align-items: flex-start;
        gap: 12px;
        padding: 12px 0;
    }

    .contact-office-left {
        width: 100%;
        flex: 1;
    }

    .contact-office-address,
    .contact-office-label,
    .contact-office-hour-item {
        font-size: 14px;
    }

    .contact-office-label {
        margin-left: 12px;
        flex-shrink: 0;
    }

    .contact-office-phone-link {
        font-size: 14px;
    }

    .contact-office-call-btn {
        width: 100%;
        text-align: center;
        padding: 12px 20px;
        font-size: 11px;
    }
}

