/* Pollution Map Styles */

/* Smell Pollution Reports List Styles */
/* Noise Pollution Reports List Styles */
.smell-pollution-reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.smell-pollution-report-card {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.smell-pollution-report-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.smell-pollution-report-card h3 {
    margin: 0 0 15px 0;
    font-size: 1.3rem;
}

.smell-pollution-report-card h3 a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s ease;
}

.smell-pollution-report-card h3 a:hover {
    color: #007cba;
}

.smell-pollution-report-card .report-image {
    margin-bottom: 15px;
}

.smell-pollution-report-card .report-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 6px;
}

.smell-pollution-report-card .report-details {
    margin-bottom: 15px;
}

.smell-pollution-report-card .report-details p {
    margin: 8px 0;
    line-height: 1.5;
}

.smell-pollution-report-card .report-meta {
    border-top: 1px solid #f0f0f0;
    padding-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.smell-pollution-report-card .report-meta small {
    color: #666;
}

.smell-pollution-report-card .read-more-btn {
    background-color: #007cba;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.smell-pollution-report-card .read-more-btn:hover {
    background-color: #005a87;
    color: white;
}

.no-reports {
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border-radius: 10px;
    margin-top: 30px;
}

.no-reports p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 20px;
}

.add-report-btn {
    background-color: #28a745;
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.add-report-btn:hover {
    background-color: #218838;
    color: white;
}

/* Responsive Design for Smell Reports */
@media (max-width: 768px) {
    .smell-pollution-reports-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .smell-pollution-report-card .report-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* Single Smell Pollution Report Styles */
.single-smell-pollution-repo .report-date,
.single-smell-pollution-repo .report-location,
.single-smell-pollution-repo .report-description,
.single-smell-pollution-repo .report-image,
.single-smell-pollution-repo .additional-content {
    margin: 30px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid #007cba;
}

.single-smell-pollution-repo .report-date h3,
.single-smell-pollution-repo .report-location h3,
.single-smell-pollution-repo .report-description h3,
.single-smell-pollution-repo .report-image h3,
.single-smell-pollution-repo .additional-content h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.3rem;
}

.single-smell-pollution-repo .coordinates {
    font-family: monospace;
    background: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #ddd;
    display: inline-block;
    margin: 0;
}

.single-smell-pollution-repo .description-content {
    line-height: 1.6;
    color: #333;
}

.single-smell-pollution-repo .report-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.single-smell-pollution-repo .image-caption {
    margin-top: 10px;
    color: #666;
    font-style: italic;
    text-align: center;
}

.single-smell-pollution-repo .back-to-reports {
    margin: 50px 0 30px 0;
    text-align: center;
}

.single-smell-pollution-repo .btn-back-to-reports {
    display: inline-block;
    padding: 12px 24px;
    background-color: #007cba;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.single-smell-pollution-repo .btn-back-to-reports:hover {
    background-color: #005a8b;
    color: white;
    text-decoration: none;
}

/* Mobile responsive for single smell reports */
@media (max-width: 768px) {
    .single-smell-pollution-repo .report-date,
    .single-smell-pollution-repo .report-location,
    .single-smell-pollution-repo .report-description,
    .single-smell-pollution-repo .report-image,
    .single-smell-pollution-repo .additional-content {
        margin: 20px 0;
        padding: 15px;
    }
}

.pollution-marker {
    background: none;
    border: none;
}

.leaflet-popup-content-wrapper {
    border-radius: 8px;
}

.leaflet-popup-content {
    margin: 10px;
}

/* Pollution Reports Grid */
.pollution-reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.pollution-report-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.pollution-report-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.pollution-report-card h4 {
    margin: 0 0 10px 0;
}

.pollution-report-card h4 a {
    text-decoration: none;
    color: #333;
}

.pollution-report-card h4 a:hover {
    color: #007cba;
}

.pollution-report-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 10px;
}

.pollution-report-card p {
    margin: 5px 0;
    line-height: 1.5;
}

.pollution-report-card small {
    color: #666;
}

#pollution-map {
    height: 600px;
    width: 100%;
    margin: 20px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1; /* Ensure map stays below navigation */
}

/* Center Button Styles */
.map-center-button {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
    background: #007cba;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.map-center-button:hover {
    background: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.map-center-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.map-center-button svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Temporarily remove z-index restrictions to test popup functionality */
/* Fix Leaflet controls z-index to stay below navigation */
#pollution-map .leaflet-control-container {
    /* z-index: 10 !important; */
}

#pollution-map .leaflet-control {
    /* z-index: 10 !important; */
}

/* Let Leaflet use its default z-index for popups */
#pollution-map .leaflet-popup-pane {
    /* z-index: 50 !important; */
}

/* Remove z-index overrides to let Leaflet handle popup display naturally */
#pollution-map .leaflet-popup {
    /* z-index: 1000 !important; */
}

#pollution-map .leaflet-popup-content-wrapper {
    /* z-index: 1000 !important; */
    /* display: block !important; */
    /* visibility: visible !important; */
}

#pollution-map .leaflet-popup-content {
    /* z-index: 1000 !important; */
    /* display: block !important; */
    /* visibility: visible !important; */
}

/* Make sure the map container doesn't interfere with header */
.pollution-map-container {
    position: relative;
    z-index: 1;
}

#pollution-reports-list {
    margin-top: 30px;
}

#pollution-reports-list h3 {
    margin-bottom: 20px;
    color: #333;
}

/* Single Pollution Report Styles - Clean Astra Integration */
.single-pollution_report {
    background: white !important;
}

.single-pollution_report #primary {
    background: white !important;
}

.single-pollution_report article {
    background: white !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.single-pollution_report .single-layout-1 {
    background: white !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.single-pollution_report .entry-content {
    background: white !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
}

.single-pollution_report .entry-meta {
    color: #666;
    font-size: 16px;
    text-align: center;
    margin-bottom: 30px;
}

.single-pollution_report .entry-meta .posted-on,
.single-pollution_report .entry-meta .date-found {
    margin-right: 20px;
}

.single-pollution_report .entry-content h3 {
    color: #333;
    margin: 40px 0 20px 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.single-pollution-map {
    height: 400px;
    width: 100%;
    margin: 20px 0;
}

.coordinates {
    margin: 15px 0 0 0;
    color: #666;
    font-style: italic;
    text-align: left;
    font-size: 14px;
}

.description-content {
    line-height: 1.6;
    color: #333;
    margin-bottom: 40px;
}

.back-to-map {
    margin: 50px 0 30px 0;
    text-align: center;
}

.btn-back-to-map {
    display: inline-block;
    padding: 12px 24px;
    background-color: #007cba;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.btn-back-to-map:hover {
    background-color: #005a8b;
    color: white;
    text-decoration: none;
}

/* GNR SOR Report Download Button */
.gnr-sor-report-download {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.gnr-sor-report-download h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.3rem;
}

.btn-download-report {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background-color: #28a745;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
}

.btn-download-report:hover {
    background-color: #218838;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.btn-download-report:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
}

.btn-download-report svg {
    flex-shrink: 0;
}

/* Simple Single Illegal Trash Dump Styles */
.description-content {
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Gallery Styles - Smart Layout */
.single-pollution_report .evidence-gallery-grid.smart-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin: 20px 0 40px 0;
}

/* Landscape images take full width */
.single-pollution_report .gallery-item.landscape {
    grid-column: 1 / -1;
}

/* Portrait images in a flexible row */
.single-pollution_report .portrait-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    grid-column: 1 / -1;
}

.single-pollution_report .gallery-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.single-pollution_report .gallery-item:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.single-pollution_report .gallery-thumbnail {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    object-fit: contain;
}

/* Landscape images take full width with natural aspect ratio */
.single-pollution_report .gallery-item.landscape .gallery-thumbnail {
    width: 100%;
    height: auto;
    max-height: none;
}

/* Portrait images keep natural aspect ratio */
.single-pollution_report .gallery-item.portrait .gallery-thumbnail {
    max-height: 350px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .single-pollution_report .portrait-row {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .single-pollution_report .gallery-item.landscape .gallery-thumbnail {
        width: 100%;
        height: auto;
        max-height: none;
    }
    
    .single-pollution_report .gallery-item.portrait .gallery-thumbnail {
        max-height: 250px;
    }
}

@media (max-width: 480px) {
    .single-pollution_report .portrait-row {
        grid-template-columns: 1fr;
    }
}


/* Responsive design */
@media (max-width: 768px) {
    .pollution-reports-grid {
        grid-template-columns: 1fr;
    }
    
    #pollution-map {
        height: 400px;
        margin: 15px 0;
    }
    
    /* Mobile responsive for center button */
    .map-center-button {
        top: 5px;
        right: 5px;
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .map-center-button svg {
        width: 14px;
        height: 14px;
    }
    
    /* Single pollution report responsive */
    .single-pollution_report #primary {
        padding: 20px 15px;
    }
    
    .entry-title {
        font-size: 1.8rem;
    }
    
    .single-pollution-map {
        height: 300px;
    }
    
    .single-pollution_report .evidence-gallery-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .single-pollution_report .gallery-thumbnail {
        min-height: 250px;
    }
    
    .pollution-report-content h3 {
        font-size: 1.5rem;
        margin: 30px 0 15px 0;
    }
    
    .description-content {
        font-size: 15px;
    }
}

@media (max-width: 1024px) {
    .single-pollution_report .evidence-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
