/* Enhanced Map Container - RESTORED and FIXED */
#map {
    height: calc(100vh - 120px);
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 54, 74, 0.1);
    border: none;
    overflow: hidden;
    position: relative;
    background: transparent;
}

/* CRITICAL FIX: Leaflet container compatibility - MINIMAL interference */
.leaflet-container {
    width: 100% !important;
    height: 100% !important;
    background: transparent !important;
}

/* CRITICAL FIX: Only fix tile borders - nothing else */
.leaflet-tile {
    border: none !important;
    outline: none !important;
}

.leaflet-tile-loaded {
    border: none !important;
    outline: none !important;
}

/* RESTORED: Leaflet controls with proper HBRC styling */
.leaflet-control-container {
    position: absolute !important;
    z-index: 1000 !important;
}

.leaflet-control {
    background: rgba(255, 255, 255, 0.95) !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 54, 74, 0.15) !important;
    border: 1px solid rgba(0, 54, 74, 0.1) !important;
}

.leaflet-control-layers {
    background: rgba(255, 255, 255, 0.98) !important;
    border-radius: 12px !important;
    box-shadow: 0 6px 20px rgba(0, 54, 74, 0.2) !important;
    padding: 12px !important;
    border: 1px solid rgba(0, 54, 74, 0.1) !important;
}

.leaflet-control-zoom a {
    background: rgba(255, 255, 255, 0.95) !important;
    color: #00364a !important;
    text-decoration: none !important;
    border-radius: 6px !important;
    border: 1px solid rgba(0, 54, 74, 0.1) !important;
}

.leaflet-control-zoom a:hover {
    background: #00364a !important;
    color: white !important;
}

/* RESTORED: Enhanced Dashboard Help with HBRC colors */
.dashboard-help {
    padding: 24px;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.98) 0%, 
        rgba(235, 247, 247, 0.95) 100%);
    border: 1px solid rgba(0, 54, 74, 0.1);
    border-radius: 16px;
    box-shadow: 
        0 8px 32px rgba(0, 54, 74, 0.08),
        0 4px 16px rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(12px);
}

.dashboard-help h2,
.dashboard-help h3 {
    color: #00364a;
    font-weight: 700;
}

.dashboard-help h5 {
    color: #5087A9;
    font-style: italic;
    font-weight: 500;
}

/* RESTORED: Enhanced Content Cards with HBRC styling */
.content-card {
    padding: 24px;
    margin-bottom: 24px;
    border-radius: 16px;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.98) 0%, 
        rgba(235, 247, 247, 0.95) 100%);
    border: 1px solid rgba(0, 54, 74, 0.1);
    box-shadow: 
        0 8px 32px rgba(0, 54, 74, 0.08),
        0 4px 16px rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(12px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.content-card:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 12px 40px rgba(0, 54, 74, 0.12),
        0 6px 24px rgba(0, 0, 0, 0.06);
}

.content-card.header {
    background: linear-gradient(135deg, #00364a 0%, #002832 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* RESTORED: Enhanced Card System with HBRC colors */
.card, #chart-container, .dashboard-help:not(.content-card), .content-card:not(.header) {
    border: 1px solid rgba(0, 54, 74, 0.1);
    box-shadow: 
        0 8px 32px rgba(0, 54, 74, 0.08),
        0 4px 16px rgba(0, 0, 0, 0.04);
    border-radius: 16px;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.98) 0%, 
        rgba(235, 247, 247, 0.95) 100%);
    width: 100%;
    backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover, 
#chart-container:hover, 
.content-card:not(.header):hover {
    transform: translateY(-2px);
    box-shadow: 
        0 12px 40px rgba(0, 54, 74, 0.12),
        0 6px 24px rgba(0, 0, 0, 0.06);
}

/* RESTORED: Modern Weather Widget with HBRC styling */
.card.weather {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.98) 0%, 
        rgba(235, 247, 247, 0.95) 100%);
    border: 1px solid rgba(0, 54, 74, 0.1);
}

/* RESTORED: Enhanced Filter Card with proper HBRC colors */
.filters.card {
    background: linear-gradient(135deg, #00364a 0%, #002832 100%);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 12px 40px rgba(0, 54, 74, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.filters.card .card-body {
    background: rgba(255, 255, 255, 0.05);
    margin: 8px;
    border-radius: 12px;
    backdrop-filter: blur(8px);
}

/* RESTORED: Enhanced Dashboard Cards with HBRC theme */
.dashboard .cards .card {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.98) 0%, 
        rgba(235, 247, 247, 0.95) 100%);
    border: 1px solid rgba(0, 54, 74, 0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dashboard .cards .card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        #00364a, 
        #5087A9, 
        #00364a);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dashboard .cards .card:hover::after {
    opacity: 1;
}

.dashboard .cards .card .card-body {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    margin: 8px;
    padding: 20px;
}

/* RESTORED: Enhanced Accordion with HBRC styling */
.accordion .card {
    border: 1px solid rgba(0, 54, 74, 0.1);
    box-shadow: 
        0 4px 16px rgba(0, 54, 74, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.98) 0%, 
        rgba(235, 247, 247, 0.95) 100%);
    margin-bottom: 8px;
    overflow: hidden;
    backdrop-filter: blur(12px);
}

.accordion .card-header a {
    padding: 20px 24px;
    color: #00364a;
    font-weight: 600;
    background: linear-gradient(135deg, 
        rgba(235, 247, 247, 0.8) 0%, 
        rgba(235, 247, 247, 0.4) 100%);
    transition: all 0.3s ease;
    border-radius: 16px;
}

.accordion .card-header a:hover {
    background: linear-gradient(135deg, 
        rgba(80, 135, 169, 0.2) 0%, 
        rgba(235, 247, 247, 0.8) 100%);
    color: #002832;
}

.accordion-button:not(.collapsed) {
    background: linear-gradient(135deg, #00364a 0%, #002832 100%);
    color: #fff;
    box-shadow: 
        0 6px 20px rgba(0, 54, 74, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* RESTORED: Enhanced Webcam Grid with HBRC theme */
.webcam.content-card {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.98) 0%, 
        rgba(235, 247, 247, 0.95) 100%);
    border: 1px solid rgba(0, 54, 74, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(12px);
}

.webcam.content-card:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 16px 48px rgba(0, 54, 74, 0.12),
        0 8px 32px rgba(0, 0, 0, 0.06);
}

.webcams .title .mainTitle {
    color: #00364a;
    margin: 0;
    font-weight: 600;
    font-size: 16px;
    transition: color 0.3s ease;
}

.webcam.content-card:hover .webcams .title .mainTitle {
    color: #002832;
}

/* Mobile responsive fixes with proper HBRC styling */
@media only screen and (max-width: 768px) {
    /* Enhanced Mobile Map - ONLY ON MOBILE */
    #map {
        height: 100vh !important;
        min-height: 280px !important;
        width: 100% !important;
        border-radius: 12px !important;
        max-height: 88vh !important;
        background: transparent !important;
        overflow: hidden !important;
    }

    .card {
        margin-bottom: 16px;
        border-radius: 12px !important;
        box-shadow: 
            0 6px 20px rgba(0, 54, 74, 0.08),
            0 2px 8px rgba(0, 0, 0, 0.04) !important;
    }

    .content-card {
        padding: 16px !important;
        border-radius: 12px !important;
    }

    .dashboard-help {
        padding: 16px !important;
        border-radius: 12px !important;
    }

    .webcam.content-card {
        border-radius: 12px !important;
    }

    .accordion .card {
        border-radius: 12px !important;
    }
}

