/* ========================================
   NitroAir - Global Styles
   ======================================== */

:root {
    --primary-color: #4a90e2;
    --secondary-color: #1a1f3a;
    --accent-color: #64b5f6;
    --success-color: #43e97b;
    --warning-color: #feca57;
    --danger-color: #f5576c;
    --info-color: #4facfe;
    
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e1e8ed;
    
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.15);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-fluid {
    width: 100%;
    padding: 0 20px;
}

/* ========================================
   Header & Navigation
   ======================================== */

.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
}

.logo i {
    font-size: 2rem;
    animation: rotate 10s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 8px;
    transition: var(--transition);
    font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* ========================================
   Alert Banner
   ======================================== */

.alert-banner {
    background: linear-gradient(135deg, #f5576c 0%, #ff6b81 100%);
    color: white;
    padding: 1rem 0;
    animation: slideDown 0.5s ease-out;
}

.alert-banner.hidden {
    display: none;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.alert-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.alert-content i {
    font-size: 1.5rem;
}

.alert-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.alert-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* ========================================
   Hero Section
   ======================================== */

.hero {
    background: linear-gradient(135deg, #1a1f3a 0%, #0a0e27 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease-out;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Buttons
   ======================================== */

.btn {
    padding: 12px 28px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: white;
    color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--primary-color);
    color: white;
}

.btn-secondary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.btn-info {
    background: var(--info-color);
    color: white;
}

.btn-info:hover {
    background: #00f2fe;
    transform: translateY(-2px);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #38f9d7;
    transform: translateY(-2px);
}

.btn-warning {
    background: #ff9800;
    color: white;
}

.btn-warning:hover {
    background: #fb8c00;
    transform: translateY(-2px);
}

.btn-warning.active {
    background: #f57c00;
    box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.3);
}

/* ========================================
   Status Cards
   ======================================== */

.status-section {
    padding: 3rem 0;
    margin-top: -2rem;
    position: relative;
    z-index: 10;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.status-card {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    animation: fadeInUp 0.6s ease-out;
}

.status-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.status-card:nth-child(1) { animation-delay: 0.1s; }
.status-card:nth-child(2) { animation-delay: 0.2s; }
.status-card:nth-child(3) { animation-delay: 0.3s; }
.status-card:nth-child(4) { animation-delay: 0.4s; }

.status-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: white;
    font-size: 2rem;
}

.status-info h3 {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.status-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.status-label {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* ========================================
   Map Section
   ======================================== */

.map-section {
    background: var(--bg-white);
    padding: 3rem 0;
}

.map-controls {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    box-shadow: var(--shadow-sm);
    width: 90%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.5rem;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-group label {
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
}

.control-select,
.control-input {
    padding: 10px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    background: white;
    transition: var(--transition);
}

.control-select:focus,
.control-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.control-slider {
    width: 100px;
    accent-color: var(--primary-color);
}

#opacityValue {
    min-width: 40px;
    font-weight: 600;
    color: var(--primary-color);
}

.map-container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    height: 60vh;
    min-height: 500px;
    max-height: 700px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    position: relative;
    border: 3px solid var(--primary-color);
}

/* ========================================
   Map Overlays - Panel Lateral Espacial
   ======================================== */

.map-overlay {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(145deg, rgba(10, 14, 39, 0.98), rgba(26, 31, 58, 0.98));
    backdrop-filter: blur(20px);
    padding: 0;
    border-radius: 25px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(74, 144, 226, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    max-width: 420px;
    width: calc(100vw - 40px);
    z-index: 1000;
    animation: slideInRight 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: none;
    border: 2px solid rgba(74, 144, 226, 0.4);
    overflow: hidden;
}

.map-overlay.active {
    display: block;
}

@keyframes slideInRight {
    from {
        transform: translateX(120%) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

.overlay-content {
    padding: 1.5rem;
    color: white;
}

.overlay-content h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.5rem;
    color: white;
    font-size: 1.4rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(74, 144, 226, 0.3);
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.2), rgba(100, 181, 246, 0.1));
    padding: 1.2rem 1.5rem;
    margin: 0 -1.5rem 1.5rem -1.5rem;
    border-radius: 25px 25px 0 0;
}

.overlay-content h3 i {
    color: #64b5f6;
    font-size: 1.3rem;
    animation: pulseIcon 2s ease-in-out infinite;
}

/* Sección de estado de calidad del aire */
.overlay-content > div:first-of-type {
    background: linear-gradient(135deg, rgba(26, 31, 58, 0.6), rgba(45, 27, 78, 0.4));
    padding: 1.2rem;
    border-radius: 15px;
    margin-bottom: 1.2rem;
    border: 1px solid rgba(74, 144, 226, 0.3);
    transition: all 0.3s ease;
}

.overlay-content > div:first-of-type:hover {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.2), rgba(100, 181, 246, 0.1));
    border-color: rgba(74, 144, 226, 0.5);
    transform: translateX(-5px);
}

/* Estilos para los íconos de calidad del aire */
.overlay-content .fa-smile,
.overlay-content .fa-meh,
.overlay-content .fa-frown {
    font-size: 2.5rem;
    margin-right: 1rem;
    filter: drop-shadow(0 0 10px currentColor);
}

/* Texto de calidad */
.overlay-content strong {
    color: #64b5f6;
    font-size: 1.15rem;
    display: block;
    margin-bottom: 0.3rem;
}

.overlay-content p {
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.6;
    font-size: 1rem;
}

/* Sección de datos (coordenadas, fecha, fuente) */
.overlay-content > div:nth-of-type(2) {
    background: linear-gradient(135deg, rgba(26, 31, 58, 0.5), rgba(45, 27, 78, 0.3));
    padding: 1rem;
    border-radius: 15px;
    margin-bottom: 1.2rem;
    border: 1px solid rgba(74, 144, 226, 0.2);
}

.overlay-content > div:nth-of-type(2) p {
    margin: 0.7rem 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
}

.overlay-content > div:nth-of-type(2) strong {
    color: #64b5f6;
    font-size: 1rem;
}

.overlay-content > div:nth-of-type(2) span {
    color: white;
    font-weight: 500;
}

/* Contaminantes medidos */
.overlay-content h4 {
    color: #64b5f6;
    font-size: 1.2rem;
    margin: 1.5rem 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.overlay-content h4 i {
    color: #64b5f6;
}

/* Grid de PM */
.overlay-content > div[style*="display: grid"] {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.overlay-content > div[style*="display: grid"] > div {
    background: linear-gradient(145deg, rgba(26, 31, 58, 0.8), rgba(45, 27, 78, 0.6));
    padding: 1.5rem 1rem;
    border-radius: 18px;
    text-align: center;
    border: 2px solid rgba(74, 144, 226, 0.4);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.overlay-content > div[style*="display: grid"] > div::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.1), rgba(100, 181, 246, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.overlay-content > div[style*="display: grid"] > div:hover {
    background: linear-gradient(145deg, rgba(74, 144, 226, 0.3), rgba(100, 181, 246, 0.2));
    border-color: rgba(100, 181, 246, 0.8);
    transform: translateY(-5px) scale(1.03);
    box-shadow: 
        0 10px 25px rgba(74, 144, 226, 0.4),
        0 0 20px rgba(100, 181, 246, 0.3);
}

.overlay-content > div[style*="display: grid"] > div:hover::before {
    opacity: 1;
}

.overlay-content > div[style*="display: grid"] > div strong {
    display: block;
    font-size: 2.2rem;
    color: #64b5f6;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 15px rgba(100, 181, 246, 0.5);
}

.overlay-content > div[style*="display: grid"] > div div {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 600;
}

.overlay-content > div[style*="display: grid"] > div small {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    margin-top: 0.3rem;
}

/* Sección AOD */
.overlay-content > div:has(h4:contains("AOD")),
.overlay-content > div:last-of-type {
    background: linear-gradient(145deg, rgba(26, 31, 58, 0.8), rgba(45, 27, 78, 0.6));
    padding: 1.5rem;
    border-radius: 20px;
    border: 2px solid rgba(74, 144, 226, 0.3);
    text-align: center;
    margin-top: 1.5rem;
}

/* Valor AOD grande */
.overlay-content > div strong:only-child {
    font-size: 3rem;
    color: #64b5f6;
    display: block;
    text-align: center;
    text-shadow: 0 0 30px rgba(100, 181, 246, 0.6);
    animation: pulseGlow 2s ease-in-out infinite;
    margin: 1rem 0;
}

/* Categoría AOD */
.overlay-content > div[style*="padding"] {
    padding: 1rem 1.5rem !important;
    border-radius: 15px !important;
    margin: 1rem 0;
    font-weight: 600;
    font-size: 1.1rem;
    text-align: center;
    border: 2px solid currentColor !important;
    background: rgba(0, 0, 0, 0.3) !important;
    backdrop-filter: blur(5px);
}

/* Recomendaciones de salud */
.overlay-content > div:has(strong:contains("Recomendación")) {
    background: linear-gradient(145deg, rgba(26, 31, 58, 0.8), rgba(45, 27, 78, 0.6)) !important;
    padding: 1.5rem !important;
    border-radius: 20px;
    border: 2px solid rgba(74, 144, 226, 0.3);
    margin-top: 1.5rem;
}

.overlay-content ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.overlay-content ul li {
    padding: 0.7rem 0;
    padding-left: 1.8rem;
    position: relative;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.6;
    font-size: 0.98rem;
}

.overlay-content ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #64b5f6;
    font-weight: bold;
    font-size: 1.2rem;
}

.overlay-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(74, 144, 226, 0.3);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    color: white;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.overlay-close:hover {
    background: rgba(255, 77, 77, 0.9);
    border-color: rgba(255, 77, 77, 1);
    transform: rotate(90deg) scale(1.15);
    box-shadow: 0 0 20px rgba(255, 77, 77, 0.6);
}

.overlay-close i {
    pointer-events: none;
}

.grid-overlay {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
}

.grid-header {
    display: flex;
    align-items: center;
    gap: 15px;
}

.grid-header h4 {
    margin: 0;
    color: var(--text-dark);
}

/* Safety Legend Styles */
.safety-legend {
    z-index: 1000 !important;
}

.safety-legend .leaflet-control {
    margin: 0;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: var(--transition);
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: var(--transition);
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--success-color);
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

/* ========================================
   Information Section
   ======================================== */

.info-section {
    padding: 4rem 0;
    background: var(--bg-white);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.section-title i {
    color: var(--primary-color);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.info-card {
    background: var(--bg-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.info-header {
    padding: 1.5rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.3rem;
}

.info-header.pm25 {
    background: linear-gradient(135deg, #ff6b81 0%, #f5576c 100%);
}

.info-header.pm10 {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.info-header.pm1 {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.info-header.aod {
    background: linear-gradient(135deg, #4a90e2 0%, #1a1f3a 100%);
}

.info-body {
    padding: 1.5rem;
}

.info-body p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.info-body strong {
    color: var(--primary-color);
}

.info-body ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.info-body li {
    margin-bottom: 0.5rem;
}

/* Health Scale */
.health-scale {
    margin-top: 1.5rem;
    border-top: 2px solid var(--border-color);
    padding-top: 1.5rem;
}

.health-scale h4 {
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.scale-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    margin-bottom: 8px;
    border-radius: 8px;
    font-weight: 500;
}

.scale-item.good {
    background: linear-gradient(135deg, #00d084 0%, #00a956 100%);
    color: white;
}

.scale-item.moderate {
    background: linear-gradient(135deg, #ffd700 0%, #ffb700 100%);
    color: #333;
}

.scale-item.unhealthy-sensitive {
    background: linear-gradient(135deg, #ff8c00 0%, #ff6b00 100%);
    color: white;
}

.scale-item.unhealthy {
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    color: white;
}

.scale-item.very-unhealthy {
    background: linear-gradient(135deg, #9c27b0 0%, #7b1fa2 100%);
    color: white;
}

.scale-item.hazardous {
    background: linear-gradient(135deg, #7e0023 0%, #5c0019 100%);
    color: white;
}

.scale-range {
    font-weight: 700;
    font-size: 1.1rem;
}

.scale-label {
    font-size: 0.9rem;
}

/* Alert Box */
.alert-box {
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 1rem;
    display: flex;
    gap: 15px;
    align-items: start;
}

.alert-box.warning {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    color: #856404;
}

.alert-box i {
    font-size: 1.5rem;
    margin-top: 2px;
}

/* ========================================
   Recommendations Section
   ======================================== */

.recommendations-section {
    margin-top: 4rem;
    padding: 3rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 16px;
}

.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.recommendation-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border-top: 4px solid;
}

.recommendation-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.recommendation-card.green { border-top-color: #00d084; }
.recommendation-card.yellow { border-top-color: #ffd700; }
.recommendation-card.orange { border-top-color: #ff8c00; }
.recommendation-card.red { border-top-color: #ff0000; }
.recommendation-card.purple { border-top-color: #9c27b0; }
.recommendation-card.maroon { border-top-color: #7e0023; }

.rec-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.recommendation-card.green .rec-icon {
    background: linear-gradient(135deg, #00d084 0%, #00a956 100%);
    color: white;
}

.recommendation-card.yellow .rec-icon {
    background: linear-gradient(135deg, #ffd700 0%, #ffb700 100%);
    color: #333;
}

.recommendation-card.orange .rec-icon {
    background: linear-gradient(135deg, #ff8c00 0%, #ff6b00 100%);
    color: white;
}

.recommendation-card.red .rec-icon {
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    color: white;
}

.recommendation-card.purple .rec-icon {
    background: linear-gradient(135deg, #9c27b0 0%, #7b1fa2 100%);
    color: white;
}

.recommendation-card.maroon .rec-icon {
    background: linear-gradient(135deg, #7e0023 0%, #5c0019 100%);
    color: white;
}

.recommendation-card h3 {
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.recommendation-card ul {
    margin-left: 1.5rem;
}

.recommendation-card li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

/* ========================================
   About Section
   ======================================== */

.about-section {
    padding: 4rem 0;
    background: var(--bg-light);
}

.about-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
}

.about-text h3,
.about-tech h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.about-text h4 {
    color: var(--text-dark);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.about-text ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.about-text li {
    margin-bottom: 0.5rem;
}

.acknowledgment {
    margin-top: 2rem;
    padding: 1.5rem;
    background: white;
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.tech-item {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.tech-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.tech-item i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.tech-item h4 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.tech-item p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ========================================
   Footer
   ======================================== */

.footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section p {
    opacity: 0.9;
    line-height: 1.8;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    opacity: 0.9;
    transition: var(--transition);
}

.footer-links a:hover {
    opacity: 1;
    padding-left: 5px;
}

.footer-contact li {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.8;
}

/* ========================================
   Modal
   ======================================== */

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease-out;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    animation: slideInUp 0.4s ease-out;
}

@keyframes slideInUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.2rem;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
    max-height: calc(80vh - 100px);
}

/* ========================================
   Loading Overlay
   ======================================== */

.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    z-index: 3000;
    align-items: center;
    justify-content: center;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    text-align: center;
}

.loading-spinner i {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.loading-spinner p {
    font-size: 1.2rem;
    color: var(--text-dark);
    font-weight: 600;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    .nav {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .hero-content h2 {
        font-size: 1.8rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .status-grid {
        grid-template-columns: 1fr;
    }
    
    .map-controls {
        flex-direction: column;
        align-items: stretch;
        width: 95%;
    }
    
    .control-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .map-container {
        height: 450px;
        min-height: 400px;
        width: 95%;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .tech-grid {
        grid-template-columns: 1fr;
    }
    
    .recommendations-grid {
        grid-template-columns: 1fr;
    }
    
    /* Panel lateral responsive */
    .map-overlay {
        position: fixed;
        top: auto;
        bottom: 0;
        right: 0;
        left: 0;
        max-width: 100%;
        width: 100%;
        max-height: 75vh;
        overflow-y: auto;
        border-radius: 25px 25px 0 0;
        animation: slideInUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    }
    
    @keyframes slideInUp {
        from {
            transform: translateY(100%);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
    
    .overlay-content {
        padding: 1.2rem;
    }
    
    .overlay-content h3 {
        font-size: 1.2rem;
        padding: 1rem 1.2rem;
        margin: 0 -1.2rem 1.2rem -1.2rem;
    }
    
    .overlay-content > div[style*="display: grid"] {
        grid-template-columns: 1fr !important;
        gap: 0.8rem;
    }
    
    .overlay-content > div[style*="display: grid"] > div {
        padding: 1.2rem 1rem;
    }
    
    .overlay-content > div[style*="display: grid"] > div strong {
        font-size: 2rem;
    }
    
    .overlay-content > div strong:only-child {
        font-size: 2.5rem;
    }
    
    .overlay-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 1.1rem;
    }
}

/* ========================================
   Utility Classes
   ======================================== */

.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

/* ========================================
   Leaflet Custom Styles
   ======================================== */

.leaflet-popup-content-wrapper {
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 0;
}

.leaflet-popup-content {
    margin: 10px;
    max-height: 600px;
    overflow-y: auto;
}

/* Custom popup scrollbar */
.leaflet-popup-content::-webkit-scrollbar {
    width: 6px;
}

.leaflet-popup-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.leaflet-popup-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.leaflet-popup-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Custom popup class */
.custom-popup .leaflet-popup-content-wrapper {
    background: #ffffff;
    color: #333;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.custom-popup .leaflet-popup-tip {
    background: #ffffff;
}

/* Popup button hover effect */
.custom-popup button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.custom-popup button:active {
    transform: translateY(0);
}

.leaflet-control-zoom a {
    border-radius: 8px !important;
}

.leaflet-bar {
    border-radius: 8px !important;
    box-shadow: var(--shadow-md) !important;
}
