body {
    overflow-x: hidden;
}

.map-layout-row {
    margin-bottom: 16px;
}

.map-container {
    position: relative;
    margin-top: 10px;
    min-height: 600px;
    transition: all 0.3s ease;
}

.map-controls {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px;
    background: rgba(255, 255, 255, 0.92);
    border-radius: var(--brand-radius);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.map-controls .btn {
    width: 36px;
    height: 36px;
    padding: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.map-controls .btn i {
    font-size: 16px;
    line-height: 1;
}

.btn.btn-default,
button.btn-default {
    color: #fff;
    background-color: var(--brand-primary-color);
    border-color: transparent;
}

.btn.btn-default:hover,
.btn.btn-default:focus,
button.btn-default:hover,
button.btn-default:focus {
    color: #fff;
    background-color: var(--brand-secondary-color);
    border-color: var(--brand-primary-color);
}

.section-sidebar {
    background: #fff;
}

.map-sections-row {
    margin-bottom: 18px;
}

.map-sections-strip {
    width: 100%;
}

.map-sections-strip .section-sidebar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px 12px;
    background: transparent;
}

.section-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 48px 6px 8px;
    margin: 2px 0;
    cursor: pointer;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-weight: bold;
    font-size: 16px;
    color: var(--brand-primary-color);
    position: relative;
    min-height: 48px;
}

.map-sections-strip .section-item {
    min-height: 44px;
    margin: 0;
    padding: 6px 44px 6px 8px;
    font-size: 15px;
}

.section-item:hover {
    color: var(--brand-secondary-color);
    background-color: #f5f5f5;
}

.section-item.active {
    background-color: #e8e8e8;
    border-color: var(--brand-primary-color);
}

.section-item:focus-visible {
    outline: 2px solid var(--brand-primary-color);
    outline-offset: 2px;
}

.section-icon-wrapper {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
}

.section-icon {
    width: 35px;
    height: 35px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.map-sections-strip .section-icon {
    width: 32px;
    height: 32px;
}

.section-count {
    position: absolute;
    top: 10px;
    left: -15px;
    width: 18px;
    height: 18px;
    background-color: var(--brand-primary-color);
    color: #fff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
}

.map-sections-strip .section-count {
    top: 7px;
}

.section-label {
    flex: 1 1 auto;
    line-height: 1.3;
}

.section-button {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 35px;
    height: 35px;
    background-color: var(--brand-primary-color);
    color: #fff;
    border: none;
    border-radius: var(--brand-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.section-button:hover,
.section-button:focus {
    background-color: var(--brand-secondary-color);
    color: #fff;
    text-decoration: none;
}

.section-button i {
    font-size: 16px;
}

.map-sections-strip .section-button {
    width: 32px;
    height: 32px;
}

.map-sections-strip .section-button i {
    font-size: 14px;
}

.search-container {
    position: relative;
    min-width: 220px;
    flex: 1 1 240px;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: auto;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 5px;
    max-height: 400px;
    width: 350px;
    max-width: min(350px, 100%);
    overflow-y: auto;
    display: none;
    z-index: 1000;
}

.search-result {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-result:last-child {
    border-bottom: none;
}

.search-result:hover {
    background-color: #f5f5f5;
}

.search-result i {
    color: var(--brand-primary-color);
    width: 20px;
}

.search-result span {
    flex: 1;
}

.search-result small {
    color: #666;
}

#searchInput {
    margin-top: 0;
}

.no-results,
.error-message {
    padding: 15px;
    text-align: center;
    color: #666;
}

.member-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px 0;
    position: relative;
    z-index: 1;
}

.member-card {
    display: flex;
    position: relative;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: var(--brand-radius);
    border: 1px solid #ddd;
    background: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.member-card:hover {
    box-shadow: 0 6px 12px var(--brand-secondary-color);
}

.member-card .card-actions {
    display: flex;
    margin-top: 15px;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.gm-style-iw.gm-style-iw-c {
    min-height: 420px;
}

.gm-style .gm-style-iw-c {
    border-radius: var(--brand-radius);
}

.info-window {
    padding: 15px 50px;
    max-width: 400px;
    min-height: 320px;
}

.info-window-header {
    text-align: center;
    margin-bottom: 15px;
}

.info-window-header h4 {
    margin: 0;
    font-size: 18px;
    color: var(--brand-primary-color);
}

.info-window img {
    display: block;
    margin: 0 auto 15px;
    max-width: 220px;
    object-fit: contain;
}

.info-window .contact-info {
    text-align: center;
    margin-bottom: 15px;
    font-size: 0.95em;
    line-height: 1.5;
}

.info-window .action-buttons {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.info-window .action-buttons .btn {
    width: 36px;
    height: 36px;
    padding: 6px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: var(--brand-radius);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.info-window .action-buttons .btn i {
    font-size: 16px;
    line-height: 1;
    color: var(--brand-primary-color);
}

.info-window .action-buttons .btn:hover {
    background-color: var(--brand-secondary-color);
    border-color: var(--brand-secondary-color);
}

.info-window .action-buttons .btn:hover i {
    color: #fff;
}

@media (max-width: 768px) {
    .section-item {
        font-size: 18px;
    }

    .map-sections-strip .section-sidebar {
        grid-template-columns: 1fr;
    }

    .map-sections-strip .section-item {
        font-size: 16px;
    }

    .search-container {
        min-width: 0;
    }

    .search-results {
        width: min(350px, calc(100vw - 24px));
        max-width: calc(100vw - 24px);
    }

    .info-window {
        padding-left: 24px;
        padding-right: 24px;
        max-width: 320px;
    }
}
