/* ========================================
   MAP CONTAINER
   ======================================== */
#map-container {
    width: 100%;
    height: 400px; /* default for mobile */
    max-height: 600px; /* max height for bigger screens */
    min-height: 300px;
}

@media (min-width: 768px) {
    #map-container {
        height: 500px; /* desktop/tablet */
    }
}

/* ========================================
   MONITOR CONTROLS (Buttons: Apply, Toggle, Reset)
   ======================================== */
.monitor-controls {
    display: block;
    width: 100%;
}

/* ---------- Subsection: Button Styles ---------- */
.monitor-controls #apply-filters,
.monitor-controls #toggle-faultlines,
.monitor-controls #reset-map {
    background-color: #d6642d !important;
    color: #fff !important;
    border: none !important;
    padding: 10px 10px !important;
    border-radius: 5px !important;
    cursor: pointer !important;
    font-size: 18px !important;
    transition: background-color 0.3s ease !important;
    display: inline-block !important;
    width: auto !important;
    margin: 0 !important;
}

/* --- Hover Styles --- */
.monitor-controls #apply-filters:hover,
.monitor-controls #toggle-faultlines:hover,
.monitor-controls #reset-map:hover {
    background-color: #b05221 !important;
}

/* --- Mobile Layout --- */
@media (max-width: 767px) {
    .monitor-controls {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 auto !important;
    }

    .monitor-controls #apply-filters,
    .monitor-controls #toggle-faultlines,
    .monitor-controls #reset-map {
        width: 100% !important;
        margin-bottom: 12px !important;
        box-sizing: border-box !important;
        padding-left: 14px !important;
        padding-right: 14px !important;
        text-align: center !important;
        display: block !important;
    }

    .monitor-controls #reset-map {
        font-size: 16px !important;
        padding: 8px 10px !important;
    }

    .monitor-controls #toggle-faultlines {
        margin-left: 0 !important;
    }
}

/* ========================================
   HOMEPAGE DASHBOARD STYLES
   ======================================== */
#homepage-dashboard {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.dashboard-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* ---------- Subsection: Dashboard Cards ---------- */
.dashboard-card {
    flex: 1;
    min-width: 300px;
    background: white;
    border-radius: 6px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #dee2e6;
}

.dashboard-card h3 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 1.1em;
    border-bottom: 2px solid #d6642d;
    padding-bottom: 5px;
}

/* ---------- Subsection: Stats Content ---------- */
#stats-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
}

.stat-label {
    font-weight: 600;
    color: #6c757d;
}

.stat-value {
    font-weight: bold;
    color: #d6642d;
}

/* ---------- Subsection: Event & Hotspot Lists ---------- */
#recent-events-list, #hotspots-list {
    max-height: none;
    overflow-y: visible;
}

/* Desktop only: keep scrolling on larger screens */
@media (min-width: 768px) {
    #recent-events-list, #hotspots-list {
        max-height: 200px;
        overflow-y: auto;
    }
}

.event-item, .hotspot-item {
    padding: 8px;
    margin: 5px 0;
    border-left: 3px solid #d6642d;
    background-color: #f8f9fa;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background-color 0.2s;
}

.event-item:hover, .hotspot-item:hover {
    background-color: #e9ecef;
}

.event-mag {
    font-weight: bold;
    color: #dc3545;
}

.event-location {
    color: #495057;
    font-size: 0.9em;
}

.event-time {
    color: #6c757d;
    font-size: 0.8em;
}

/* ---------- Subsection: Loading Messages ---------- */
.loading-message {
    color: #6c757d;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

/* ---------- Subsection: Data Status ---------- */
.data-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

#last-updated {
    font-size: 0.9em;
    color: #6c757d;
}

#update-timestamp {
    font-weight: bold;
}

/* --- Mobile Dashboard Layout --- */
@media (max-width: 767px) {
    .dashboard-row {
        flex-direction: column;
    }
    
    .dashboard-card {
        min-width: auto;
    }
    
    #homepage-dashboard {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .data-status {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .stat-item {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ========================================
   EARTHQUAKE TABLE STYLES MOVED TO:
   /css/earthquake-table.css
   ======================================== */

/* ========================================
   LEGEND & ALERT STYLES
   ======================================== */
.info.legend {
    background: white;
    padding: 8px;
    line-height: 1.5;
    font-size: 12px;
    font-family: sans-serif;
    border-radius: 5px;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
    margin-top: 10px;
}

.info.legend i {
    width: 18px;
    height: 18px;
    float: left;
    margin-right: 8px;
    opacity: 0.7;
}

#major-quake-alert {
    background-color: #e74c3c;
    color: white;
    font-weight: bold;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin: 0 auto 24px auto;
    font-size: 1.2em;
    max-width: 600px;
    width: 90%;
    text-align: center;
}

@media (min-width: 768px) {
    #major-quake-alert {
        width: auto;
    }
}

/* ========================================
   HERO SECTION
   ======================================== */
.earthquake-hero-section {
    background: linear-gradient(135deg, #f5f5f5 0%, #ffffff 100%);
    padding: 60px 40px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 1px solid #e0e0e0;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
}

.earthquake-hero-section h1 {
    font-size: 48px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 20px 0;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 20px;
    color: #666;
    margin: 0 0 30px 0;
    line-height: 1.5;
}

/* --- Hero Badges --- */
.hero-badges {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}

.live-badge {
    background-color: rgba(214, 100, 45, 0.1);
    color: #d6642d;
    border: 2px solid #d6642d;
}

.update-badge {
    background-color: rgba(0, 0, 0, 0.05);
    color: #666;
    border: 1px solid #ddd;
}

/* --- Hero Pulse Animation --- */
.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #d6642d;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.1);
    }
}

/* --- Mobile Hero Layout --- */
@media (max-width: 768px) {
    .earthquake-hero-section {
        padding: 40px 20px;
        border-radius: 0;
        margin-bottom: 20px;
    }
    
    .earthquake-hero-section h1 {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .hero-badges {
        flex-direction: column;
        align-items: stretch;
    }
    
    .badge {
        justify-content: center;
    }
}

/* ========================================
   EXPLORE REGIONAL EARTHQUAKE ACTIVITY SECTION
   ======================================== */
.regional-section {
  padding: 2rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.regional-section h2 {
  text-align: left;
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: #222;
}

.regional-section p {
  text-align: left;
  color: #555;
  margin-bottom: 2rem;
  max-width: 800px;
  margin-left: 0;
  margin-right: auto;
}

.regions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.region {
  background-color: #fafafa;
  padding: 1rem;
  border-radius: 8px;
  transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.region:hover {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.region h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.region a {
  color: #d35400;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease, transform 0.2s ease;
}

.region a:hover {
  color: #007bff;
  text-decoration: underline;
}

.region p {
  color: #444;
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
}

@media (max-width: 600px) {
  .regional-section {
    padding: 1.5rem 0.5rem;
  }

  .region {
    padding: 0.8rem;
  }
}