/* style.css - Complete Optimized Version with Forecast Styles */

/* ===== STATUS BADGES ===== */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}
.status-clear { background-color: #10B981; color: white; }
.status-light { background-color: #FBBF24; color: white; }
.status-moderate { background-color: #F59E0B; color: white; }
.status-heavy { background-color: #EF4444; color: white; }
.status-unknown { background-color: #6B7280; color: white; }

/* Beach page specific status badge styles */
.beach-page .status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

/* ===== LOADING STATES ===== */
.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0d9488;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== NAVIGATION STYLES ===== */
/* Desktop Dropdown */
.relative.group .absolute {
    transform: translateY(10px);
    transition: all 0.2s ease-in-out;
}

.relative.group:hover .absolute {
    transform: translateY(0);
}

/* Mobile menu - FIXED */
nav {
    position: relative;
    z-index: 1000;
}

#mobile-menu {
    position: relative;
    z-index: 9999;
}

.mobile-beaches-list {
    transition: max-height 0.3s ease-in-out;
}

.rotate-180 {
    transform: rotate(180deg);
}

/* ===== MAP STYLES ===== */
/* Home page map */
#beach-map {
    height: 500px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 1;
    background-color: #f8fafc;
}

/* Beach page map - slightly smaller */
.beach-page #beach-map {
    height: 400px;
}

/* ===== BEACH PAGE SPECIFIC STYLES ===== */
.camera-button-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #0ea5e9 0%, #0891b2 100%);
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.beach-info-card {
    color: white;
    border-radius: 12px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.wave-animation {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%230ea5e9" fill-opacity="0.2" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,160C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-size: cover;
    animation: wave 15s linear infinite;
}

@keyframes wave {
    0% { background-position-x: 0; }
    100% { background-position-x: 1440px; }
}

.sargassum-alert {
    border-left: 4px solid #F59E0B;
    background-color: #FFFBEB;
    border-radius: 8px;
}

.gradient-bg {
    background: linear-gradient(135deg, #0ea5e9 0%, #0891b2 100%);
}

.camera-button {
    display: inline-flex;
    align-items: center;
    background-color: white;
    color: #0ea5e9;
    font-size: 1.25rem;
    font-weight: 600;
    padding: 16px 32px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.camera-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
    background-color: #f8fafc;
}

/* ===== FORECAST PAGE SPECIFIC STYLES ===== */
.forecast-header {
    background: linear-gradient(135deg, #0d9488, #0f766e);
    color: white;
    padding: 40px 0;
    text-align: center;
    margin-bottom: 30px;
}

.forecast-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.location-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.location-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.location-header {
    background-color: #0d9488;
    color: white;
    padding: 15px;
}

.location-header h3 {
    font-size: 1.2rem;
    margin: 0;
}

.forecast-days {
    padding: 15px;
}

.day-forecast {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
}

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

.day-name {
    font-weight: 500;
    width: 100px;
}

.sargassum-level {
    display: flex;
    align-items: center;
}

.level-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.level-low {
    background-color: #10B981;
}

.level-medium {
    background-color: #F59E0B;
}

.level-high {
    background-color: #EF4444;
}

.level-very-high {
    background-color: #9C27B0;
}

.legend {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 40px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.legend h3 {
    margin-bottom: 15px;
    color: #0d9488;
}

.legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-right: 20px;
}

.forecast-note {
    background-color: #f0fdfa;
    border-left: 4px solid #0d9488;
    padding: 15px;
    margin-bottom: 30px;
    border-radius: 0 8px 8px 0;
}

.last-updated {
    text-align: center;
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.confidence-indicator {
    font-size: 0.75rem;
    color: #6b7280;
    margin-left: 8px;
}

.beach-hero-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.seo-content-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.keyword-highlight {
    color: #0d9488;
    font-weight: 600;
}

/* ===== MOBILE STYLES ===== */
@media (max-width: 767px) {
    /* Hide map section entirely on mobile - HOME PAGE ONLY */
    body:not(.beach-page) section:has(#beach-map) {
        display: none !important;
    }
    
    /* Ensure map container is hidden - HOME PAGE ONLY */
    body:not(.beach-page) #beach-map {
        display: none !important;
        height: 0 !important;
        min-height: 0 !important;
    }
    
    /* Beach pages should show map but make it smaller on mobile */
    .beach-page #beach-map {
        height: 300px !important;
    }
    
    /* Forecast page mobile optimization */
    .forecast-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .location-card {
        margin-bottom: 0;
    }
    
    .legend-items {
        flex-direction: column;
        gap: 10px;
    }
    
    .legend-item {
        margin-right: 0;
    }
    
    .beach-hero-image {
        height: 200px;
    }
    
    /* Instagram feed mobile optimization */
    .instagram-feed {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    /* Touch-friendly buttons for mobile */
    button, .camera-button, .beach-card-link {
        min-height: 44px;
    }
    
    .status-badge {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    /* Beach card mobile optimization */
    .beach-card {
        margin-bottom: 1rem;
        transform: translateZ(0);
    }
    
    .beach-card img {
        min-height: 192px;
        background-color: #f3f4f6;
        height: 160px;
    }
    
    /* Loading spinner mobile optimization */
    .loading-spinner {
        width: 20px;
        height: 20px;
        border-width: 2px;
    }
}

/* ===== DESKTOP STYLES ===== */
@media (min-width: 768px) {
    .beach-info-row {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .instagram-feed {
        grid-template-columns: repeat(3, 1fr);
    }
    
    #beach-map {
        height: 500px;
        display: block !important;
    }
    
    .forecast-container {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

/* ===== UTILITY STYLES ===== */
.leaflet-container {
    -webkit-tap-highlight-color: transparent;
}

.custom-beach-marker {
    background: transparent !important;
    border: none !important;
}

.leaflet-popup-content-wrapper {
    border-radius: 8px !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
}

.bg-orange-400 {
    --tw-bg-opacity: 1;
    background-color: #F59E0B;
}

/* Offline/fallback message styles */
.offline-message {
    background: linear-gradient(135deg, #fef3c7, #fef7cd);
    border: 1px solid #f59e0b;
    color: #92400e;
}

/* Instagram feed styles */
.instagram-feed {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 20px;
}

.instagram-post {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
}

/* Remove debug styles */
#mobile-menu:not(.hidden) {
    background: inherit !important;
    border: none !important;
}

#mobile-menu-button {
    background: inherit !important;
    padding: inherit !important;
}

/* ===== LOGO STYLES ===== */
.logo-image {
    height: 2rem;
    width: 2rem;
    object-fit: contain;
}

.footer-logo {
    height: 1.5rem;
    width: 1.5rem;
}

/* Mobile logo sizing */
@media (max-width: 767px) {
    .logo-image {
        height: 1.75rem;
        width: 1.75rem;
    }
}