:root {
    --color-primary-black: #27201f;
    --color-primary-red: #da291c;
    --color-white: #ffffff;
    --color-bg-light: #f7f7f7;
    --color-text-gray: #666666;
    --color-border-gray: #e3e3e3;
    --color-placeholder: #999999;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    background-color: var(--color-white);
    color: var(--color-primary-black);
}

/* Banner Section */
.banner-section {
    position: relative;
    height: 500px;
    width: 100%;
    overflow: hidden;
    background-color: #000312;
}

.banner-background {
    position: absolute;
    width: 100%;
    height: 100%;
}

.bg-image-wrapper {
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    height: 100%;
    /* Approximation of the positioning */
}

.bg-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: right center;
}

.bg-mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.map-mask {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.banner-content {
    position: absolute;
    top: 50%;
    left: 18%;
    transform: translateY(-50%);
    z-index: 10;
}

.page-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 48px;
    color: var(--color-white);
    text-shadow: 0px 4px 6px rgba(0, 0, 0, 0.25);
    margin: 0;
}

/* Main Content */
.main-container {
    max-width: 1220px;
    margin: 0 auto;
    padding: 80px 20px;
    box-sizing: border-box;
}

/* Search Section */
.search-section {
    margin-bottom: 48px;
}

.search-bar-group {
    display: flex;
    gap: 20px;
    align-items: center;
    width: 100%;
}

.search-input-wrapper {
    background: var(--color-white);
    border: 1px solid var(--color-placeholder);
    border-radius: 8px;
    height: 52px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    box-sizing: border-box;
    position: relative;
    -webkit-transition: border-color 0.3s ease, border-width 0.3s ease;
    -moz-transition: border-color 0.3s ease, border-width 0.3s ease;
    transition: border-color 0.3s ease, border-width 0.3s ease;
}

.search-input-wrapper:hover {
    border-color: var(--color-primary-black);
    border-width: 1.5px;
}

.search-input-wrapper:focus,
.search-input-wrapper:focus-within {
    border-color: var(--color-primary-black);
    border-width: 1.5px;
    outline: none;
}

.search-input-wrapper.dropdown-open {
    border-color: var(--color-primary-black);
    border-width: 1.5px;
}

.country-select {
    flex: 0 1 300px;
    min-width: 180px;
    justify-content: space-between;
    cursor: pointer;
}

    .country-select .placeholder-text {
        font-family: 'Poppins', sans-serif;
        font-size: 16px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-weight: 500;
    }

/* Dropdown Menu */
.dropdown-options {
    display: none;
    position: absolute;
    top: 52px; /* Height of the wrapper */
    left: -1px; /* Align with border */
    width: calc(100% + 2px); /* Include borders */
    background: var(--color-white);
    border: 1px solid var(--color-placeholder);
    border-radius: 4px;
    list-style: none;
    padding: 0;
    margin: 0;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    max-height: 300px;
    overflow-y: auto;
}

    .dropdown-options.show {
        display: block;
    }

    .dropdown-options li {
        padding: 12px 16px;
        cursor: pointer;
        font-family: 'Poppins', sans-serif;
        font-size: 16px;
        color: var(--color-primary-black);
        transition: background 0.2s;
    }

        .dropdown-options li:hover {
            background-color: var(--color-bg-light);
        }

        .dropdown-options li.selected {
            background: #f0f0f0;
            font-weight: 600;
            color: #DA291C;
        }

.text-input {
    flex: 1;
    min-width: 200px;
}

    .text-input input {
        width: 100%;
        border: none;
        outline: none;
        font-family: 'Inter', sans-serif;
        font-size: 16px;
        color: var(--color-primary-black);
    }

        .text-input input::placeholder {
            color: var(--color-placeholder);
        }

.btn-search {
    --btn-fill-bg: var(--color-primary-black);
    --btn-fill-sweep: #fff;
    --btn-fill-text: var(--color-primary-black);
    background-color: var(--color-primary-black);
    color: var(--color-white);
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 16px;
    border: 1.5px solid var(--color-primary-black);
    border-radius: 8px;
    padding: 0 24px;
    height: 52px;
    flex: 0 0 150px;
    cursor: pointer;
}

/* Results Block */
.results-block {
    background-color: var(--color-bg-light);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 32px;
}

.no-results-state {
    border-radius: 12px;
    padding: 40px 24px;
    margin-bottom: 32px;
    text-align: center;
}

.no-results-img {
    display: block;
    max-width: 240px;
    margin: 0 auto 24px;
}

.no-results-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--color-primary-black);
    margin: 0 0 12px;
}

.no-results-description {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-primary-black);
    max-width: 720px;
    margin: 0 auto;
}

.region-header {
    background-color: var(--color-bg-light);
    border-top: 4px solid var(--color-primary-black);
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e3e3e3;
}

.region-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-primary-black);
    margin: 0;
}

.leave-message-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--color-primary-red);
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
}

.leave-message {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-arrow-down {
    width: 10px;
    height: 5px;
}

.leave-message-link:hover {
    text-decoration: underline;
}

/* Grid */
.office-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 12px;
    margin-bottom: 32px;
}

.office-card {
    background-color: var(--color-white);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02); /* subtle shadow not in design but helps */
    height: 100%;
    box-sizing: border-box;
    min-width: 0;
}

.office-name {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-primary-black);
    margin: 0;
    line-height: 1.4;
}

.office-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.icon-wrapper {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

    .icon-wrapper img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

.detail-text {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    color: var(--color-primary-black);
    margin: 0;
    line-height: normal;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.light-text {
    color: #999;
}


/* Responsive Design */

/* Tablet and below */
@media (max-width: 1024px) {
    .bg-image-wrapper {
        width: 100%;
        opacity: 0.3; /* Fade image on smaller screens to make text readable if overlapping */
    }

    .banner-content {
        left: 50%;
        transform: translate(-50%, -50%);
        text-align: center;
        width: 100%;
    }

    .office-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .country-select {
        flex: 0 1 200px;
    }

    .text-input {
        flex: 1;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .banner-section {
        height: 350px;
    }

    .page-title {
        font-size: 32px;
    }

    .main-container {
        padding: 40px 16px;
    }

    .search-bar-group {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .country-select, .text-input, .btn-search {
        width: 100%;
        min-width: 0;
        flex: 0 0 auto;
    }

    .office-grid {
        grid-template-columns: 1fr;
    }

    .no-results-state {
        padding: 32px 20px;
    }

    .no-results-title {
        font-size: 24px;
    }

    .region-header {
        flex-direction: row;
        gap: 12px;
        align-items: center;
    }

    .leave-message-link {
        white-space: nowrap;
    }
}

/* Pagination Hidden Blocks */
.results-block.hidden {
    display: none;
}

/* Loading Sentinel */
.loading-sentinel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px;
    gap: 12px;
    opacity: 0;
    transition: opacity 0.3s;
}

    .loading-sentinel.visible {
        opacity: 1;
    }

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--color-border-gray);
    border-top: 3px solid var(--color-primary-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}
