body {
    overflow-x: hidden;
}

.header-container {
    margin-bottom: 0px;
}

.main-container {
    margin-bottom: -15px;
}

#ponudba-map {
    height: 600px;
    width: 100%;
    margin-bottom: 20px;
    border-radius: 8px;
}

.map-controls {
    display: flex;
    gap: 10px;
    padding-left: 5px;
    padding-right: 5px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Moved repeated property definitions for .member-details h2 into one block */
.member-details h1,
.member-details h2 {
    color: var(--brand-primary-color);
    margin-top: 0;
    margin-bottom: 10px;
    font-weight: bold;
}

.member-details h1 {
    font-size: 24px;
}

.member-details h2 {
    font-size: 18px; /* Consolidated to 18px as final definition */
}

.map-controls {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1000;
}

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

button.btn-default:hover {
    color: #FFF;
    background-color: var(--brand-secondary-color);
}

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

button.btn-default:select {
    color: #FFF;
    background-color: var(--brand-secondary-color);
    border-color: var(--brand-primary-color);  
}

.section-sidebar {
    background: white;
}

/* Simplified sidebar collapse - only use display none */
#sidebarContainer.collapsed {
    display: none !important;
}

.section-item {
    display: flex;
    align-items: center;
    padding: 1px;
    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;
    padding-right: 45px;
}

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

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

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

.section-icon {
    width: 35px;
    margin-right: 10px;
}

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

.section-icon-wrapper {
    position: relative;
    display: inline-block;
}

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

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

.section-button:hover {
    background-color: var(--brand-secondary-color);
}

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

.keyword-icon-wrapper {
    position: relative;
    display: inline-block;
}

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

.keyword-buttons {
    margin: 10px 0;
}

.keyword-btn {
    margin: 5px;
}

.keyword-btn.active {
    background-color: var(--brand-secondary-color);
    color: white;
}

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

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

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

.info-window-header h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.info-window .status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: 500;
    margin-left: 5px;
    margin-bottom: 10px;
}

.info-window .status-badge.open {
    background-color: #4CAF50;
    color: white;
}

.info-window .status-badge.closed {
    background-color: #f44336;
    color: white;
}

.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: 10px;
    margin-top: 15px;
}

.info-window .btn {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.info-window .btn i {
    color: var(--brand-primary-color);
}

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

.info-window .btn:hover i {
    color: white;
}

.info-window .hours-btn {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
}

.info-window .hours-content {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    z-index: 1000;
    width: 250px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    margin-top: 5px;
}

.info-window .hours-content.show {
    display: block;
}

.info-window .hours-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid #eee;
    font-size: 0.9em;
}

.info-window .hours-row:last-child {
    border-bottom: none;
}

.info-window .hours-day {
    font-weight: 500;
}

.info-window .hours-time {
    text-align: right;
}

.working-hours-container {
    margin-top: 10px;
}

.working-hours-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: #fff;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.working-hours-btn.open {
    color: #4CAF50;
}

.working-hours-btn.closed {
    color: #f44336;
}

.working-hours-content {
    display: none;
    border: 1px solid #ddd;
    border-top: none;
    padding: 10px;
    background: #fff;
}

.working-hours-content.show {
    display: block;
}

.day-hours {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px solid #eee;
}

.day-hours:last-child {
    border-bottom: none;
}

.day-hours.closed span:last-child {
    color: #f44336;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.status-badge.open {
    background-color: #4CAF50;
    color: white;
}

.status-badge.closed {
    background-color: #f44336;
    color: white;
}

.info-window-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: -15px;
}

.info-window-header h4 {
    margin: 0;
}

.info-window .gm-ui-hover-effect {
    display: none; /* Hide default close button if needed */
}

.btn-icon {
    margin-right: 5px;
}

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

.map-container.full-width {
    min-height: 610px;
}

.member-content {
    position: relative;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-top: 20px;
    padding: 20px;
    display: none;
}

.company-title {
    margin-bottom: 15px;
}

.company-title h1 {
    margin: 0;
    font-size: 24px;
    color: var(--brand-primary-color);
    font-weight: bold;
    text-transform: uppercase;
}

.company-title p {
    margin: 10px 0 0 0;
    font-size: 16px;
    font-weight: bold;
}

.close-member-content {
    position: absolute;
    right: 15px;
    top: 15px;
    z-index: 10;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.close-member-content i {
    font-size: 35px;
    color: var(--brand-primary-color);
    transition: color 0.2s ease;
}

.close-member-content:hover i {
    color: var(--brand-secondary-color);
}

.member-spotlight {
    border-radius: 8px;
    border: 1px solid var(--brand-primary-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-left: 0px;
    margin-bottom: 15px;
    margin-right: 0px;
    margin-top: 15px;
    padding-top: 10px;
    padding-bottom: 15px;
}

.member-details {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

/* Combined repeated .member-details h2 above. */

.company-logo {
    max-width: 100%;
    height: auto;
    margin-bottom: 20px;
}

.member-description {
    font-size: 14px;
    line-height: 1.6;
    text-align: left;
    color: var(--brand-primary-color);
}

.list-icons,
.list {
    list-style: none;
    text-align: left;
    color: var(--brand-primary-color);
    font-weight: bold;
}

.list-icons,
.li,
.em {
    font-size: 15px;
}

#streetView {
    width: 100%;
    height: 100%;
    min-height: 300px;
}

@media (max-width: 768px) {
    #streetView {
        min-height: 200px;
    }
}

.letak-button {
    position: absolute;
    top: -12px;
    right: -12px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.letak-button:hover {
    transform: scale(1.1);
}

.dropdown {
    position: relative;
}

.working-hours-dropdown {
    position: absolute !important;
    left: 0 !important;
    padding: 15px;
    min-width: 250px;
    align-content: start;
    text-align: left;
}

.working-hours-btn {
    padding: 4px 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    min-width: 140px;
}

.working-hours-btn.is-open {
    color: var(--brand-primary-color);
    border-color: var(--brand-primary-color);
}

.working-hours-btn.is-closed {
    color: #d32f2f;
    border-color: #d32f2f;
}

.open>.dropdown-menu {
    display: block;
    width: 250px;
}

.search-container {
    position: relative;
    margin-left: 10px;
    min-width: 300px;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 5px;
    max-height: 400px;
    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:9px;
}

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

.member-card {
    display: flex;
    position: relative;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    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 {
    cursor: pointer;
    box-shadow: 0 6px 12px var(--brand-secondary-color);
}

.member-card h4 {
    color: var(--brand-primary-color);
    margin-bottom: 0px;
    font-weight: bold;
}

.member-card .contact-details {
    margin: 15px 0;
    line-height: 1.6;
}

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

a.card-distance {
    color: var(--brand-primary-color);
    font-weight: bold;
    font-size: 17px;
    text-decoration: none;
    position: absolute;
    bottom: 0px;
    right: 5px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.member-area {
    padding: 35px; 
}

.member-menu {
    display: none;
}

.member-menu.active {
    display: block;
}

.menu-category {
    margin-bottom: 20px;
}

.menu-category h4 {
    color: #333;
    border-bottom: 2px solid #eee;
    padding-bottom: 8px;
    margin-bottom: 10px;
}

.menu-category .nav-pills > li > a {
    color: #666;
    padding: 8px 15px;
    transition: all 0.3s ease;
}

.menu-category .nav-pills > li > a:hover {
    background-color: #f8f8f8;
    color: #333;
}

.navbar-default .navbar-nav > .open > a,
.navbar-default .navbar-nav > .open > a:hover,
.navbar-default .navbar-nav > a:hover {
    color: #4D7A2B;
    font-size: 16px;
    line-height: 20px;
    background-color: #FFF;
}

.member-menu-container {
    margin: 20px 0;
    border: 1px solid #eee;
    border-radius: 4px;
}

.member-menu-container .navbar {
    margin-bottom: 0;
}

.member-menu-container .language-switcher {
    text-align: right;
}

.member-menu-container .language-switcher .btn {
    margin-left: 5px;
    vertical-align: middle;
}

.member-menu-container .language-switcher .btn img.flag {
    margin-right: 5px;
    vertical-align: middle;
}

.member-menu.active {
    display: block;
}

.member-menu .navbar-default {
    background-color: transparent;
    border: none;
    min-height: 40px;
}

.member-menu .navbar-nav > li > a {
    color: var(--brand-primary-color);
    font-weight: bold;
    padding: 10px 15px;
    line-height: 20px;
    font-size: 16px;
}

.member-menu .navbar-nav > li > a:hover {
    color: var(--brand-secondary-color);
    font-weight: bold;
    background-color: #FFF;
}

.member-menu .navbar-toggle {
    margin-top: 3px;
    margin-bottom: 3px;
    padding: 6px 10px;
}

@media (max-width: 767px) {
    .member-menu .navbar-default {
        background-color: #f8f8f8;
        border: 1px solid #e7e7e7;
    }
    
    .member-menu-container .language-switcher {
        text-align: center;
    }
}

.page-title {
    margin: 20px 0;
    font-size: 24px;
    color: var(--brand-primary-color);
    font-weight: 600;
    text-align: left;
}

#ponudba-map-loading,
#ponudba-map-error {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loading-text {
    font-size: 18px;
    color: #333;
}

.error-message {
    text-align: center;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.error-message i {
    font-size: 48px;
    color: #e74c3c;
    margin-bottom: 15px;
}

.error-message p {
    font-size: 16px;
    color: #333;
    margin: 10px 0 20px;
}

.error-message button {
    padding: 10px 20px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.error-message button:hover {
    background: #2980b9;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Ensure proper Bootstrap grid behavior when sidebar is collapsed */
@media (min-width: 992px) {
    /* When sidebar is collapsed, ensure map column takes full width */
    .col-md-9.map-expanded {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    
    /* Smooth transition for column width changes */
    .col-md-9, .col-md-12 {
        transition: all 0.3s ease;
    }
}

/* Mobile responsiveness - sidebar should be collapsed by default on mobile */
@media (max-width: 991px) {
    #sidebarContainer {
        display: none;
    }
    
    .map-container {
        min-height: 500px;
    }
    
    /* On mobile, always show the toggle button to expand sidebar */
    #sidebarToggle {
        display: block !important;
    }
}
