/**
 * Estilos para la barra de navegación principal de AmbioData
 * Paleta de colores ambientales: verdes naturales, azules del agua, y tonos terrosos
 */

/* Barra de navegación principal */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2000;
    background: linear-gradient(135deg, #059669 0%, #047857 50%, #065f46 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(5, 150, 105, 0.4);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    gap: 32px;
}

/* Sección de marca */
.brand-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Logo de AmbioData */
.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-image {
    height: 46px;
    width: auto;
    filter: brightness(1.1) saturate(1.1);
    transition: all 0.3s ease;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px;
    backdrop-filter: blur(10px);
}

.logo-image:hover {
    transform: scale(1.05);
    filter: brightness(1.2) saturate(1.2);
    background: rgba(255, 255, 255, 0.15);
}

/* Contenido de marca (texto) */
.brand-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.brand-name {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.mission-statement {
    font-size: 11px;
    opacity: 0.9;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #bbf7d0;
}

/* Navegación principal */
.main-navigation {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Navegación desktop */
.desktop-navigation {
    display: flex;
    align-items: center;
}

/* Navegación por secciones */
.section-navigation {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 4px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.nav-item {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    transform: translateY(-1px);
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Navegación con flechas */
.arrow-navigation {
    display: flex;
    align-items: center;
    gap: 8px;
}

.arrow-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.arrow-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.arrow-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

/* Botón hamburguesa */
.hamburger-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    gap: 3px;
    padding: 8px;
}

.hamburger-line {
    width: 18px;
    height: 2px;
    background: white;
    border-radius: 1px;
    transition: all 0.3s ease;
}

.hamburger-menu-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.hamburger-menu-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-menu-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-menu-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Overlay del menú hamburguesa */
.hamburger-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 3000;
    opacity: 1;
    visibility: visible;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.hamburger-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.hamburger-menu {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background: linear-gradient(135deg, #059669 0%, #047857 50%, #065f46 100%);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    transform: translateX(0);
    transition: transform 0.3s ease;
}

.hamburger-overlay.hidden .hamburger-menu {
    transform: translateX(100%);
}

.menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

.menu-header h2 {
    color: white;
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.close-hamburger-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-hamburger-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.menu-content {
    padding: 24px;
}

.menu-description {
    margin-bottom: 32px;
}

.menu-description p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.menu-pins {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.pin-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pin-option:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.pin-option.active {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.pin-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    flex-shrink: 0;
}

.pin-content {
    flex: 1;
    min-width: 0;
}

.pin-content h3 {
    color: white;
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
}

.pin-content p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 8px 0;
    font-size: 13px;
    line-height: 1.4;
}

.pin-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.menu-footer {
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.cta-button {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* Botón de información de ubicación */
.location-info-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.location-info-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Estados de carga */
.arrow-btn.loading,
.nav-item.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.arrow-btn.loading::after,
.nav-item.loading::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: btnSpinner 1s linear infinite;
}

@keyframes btnSpinner {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .header-container {
        padding: 12px 20px;
        gap: 20px;
    }
    
    .logo-image {
        height: 42px;
    }
    
    .brand-name {
        font-size: 22px;
    }
    
    .mission-statement {
        font-size: 10px;
    }
    
    .main-navigation {
        gap: 16px;
    }
    
    .nav-item {
        padding: 6px 12px;
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .main-header {
        background: linear-gradient(135deg, #059669 0%, #047857 100%);
        box-shadow: 0 2px 12px rgba(5, 150, 105, 0.3);
    }
    
    .header-container {
        padding: 10px 16px;
        height: 60px;
        gap: 12px;
    }
    
    .brand-section {
        flex: 1;
        min-width: 0;
    }
    
    .logo-image {
        height: 36px;
    }
    
    .brand-name {
        font-size: 18px;
    }
    
    .main-navigation {
        gap: 12px;
    }
    
    /* Ocultar navegación desktop en móvil */
    .desktop-navigation {
        display: none;
    }
    
    /* Mostrar botón hamburguesa en móvil */
    .hamburger-menu-btn {
        display: flex;
    }
    
    .arrow-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .location-info-btn {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    /* Ajustar menú hamburguesa para tablets */
    .hamburger-menu {
        max-width: 350px;
    }
}

@media (max-width: 480px) {
    .main-header {
        background: linear-gradient(135deg, #059669 0%, #047857 100%);
    }
    
    .header-container {
        padding: 8px 12px;
        height: 56px;
        gap: 8px;
    }
    
    .brand-section {
        gap: 8px;
    }
    
    .logo-image {
        height: 32px;
    }
    
    .brand-name {
        font-size: 16px;
    }
    
    .mission-statement {
        display: none;
    }
    
    .main-navigation {
        gap: 8px;
    }
    
    .arrow-btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .location-info-btn {
        width: 28px;
        height: 28px;
        font-size: 10px;
    }
    
    .hamburger-menu-btn {
        width: 28px;
        height: 28px;
        gap: 2px;
    }
    
    .hamburger-line {
        width: 14px;
        height: 1.5px;
    }
    
    /* Menú hamburguesa full width en móvil */
    .hamburger-menu {
        max-width: 100%;
    }
    
    .menu-header {
        padding: 16px 20px;
    }
    
    .menu-header h2 {
        font-size: 18px;
    }
    
    .close-hamburger-btn {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    .menu-content {
        padding: 20px;
    }
    
    .pin-option {
        padding: 12px;
    }
    
    .pin-content h3 {
        font-size: 15px;
    }
    
    .pin-content p {
        font-size: 12px;
    }
}

/* Estados de hover mejorados para dispositivos táctiles */
@media (hover: hover) and (pointer: fine) {
    .nav-item:hover {
        background: rgba(255, 255, 255, 0.15);
    }
    
    .brand-name:hover {
        transform: scale(1.02);
        filter: brightness(1.1);
    }
}

/* Enfoque para accesibilidad */
.nav-item:focus-visible,
.arrow-btn:focus-visible,
.hamburger-menu-btn:focus-visible,
.location-info-btn:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.6);
    outline-offset: 2px;
}

.brand-name:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.6);
    outline-offset: 4px;
    border-radius: 4px;
}

/* Resto de estilos existentes para el panel de información */
.location-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1500;
    opacity: 1;
    visibility: visible;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}

.location-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.location-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 420px;
    max-height: 70vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    color: #1f2937;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 1600;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

.location-panel:not(.hidden) {
    display: block;
}

.location-panel.hidden {
    display: none;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    border-radius: 16px 16px 0 0;
}

.panel-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: white;
}

.panel-header h2::before {
    content: '📍 ';
    margin-right: 6px;
}

.close-panel-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: normal;
}

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

.location-panel .location-info {
    padding: 20px;
}

.current-location-display .location-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #059669;
}

.current-location-display .location-coordinates {
    font-size: 11px;
    color: #6b7280;
    font-family: 'Courier New', monospace;
    margin-bottom: 12px;
}

.current-location-display .location-description {
    font-size: 13px;
    line-height: 1.5;
    color: #4b5563;
    margin-bottom: 16px;
}

.environmental-data {
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid #e5e7eb;
}

.environmental-data h3 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.data-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.data-grid .data-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.data-grid .data-label {
    font-size: 10px;
    color: #6b7280;
    font-weight: 500;
}

.data-grid .data-value {
    font-size: 12px;
    font-weight: 600;
    color: #059669;
}

.location-panel .quick-nav {
    padding: 0 20px 20px;
}

.quick-nav-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #6b7280;
}

.quick-nav-btn {
    display: block;
    width: 100%;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    color: #374151;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 8px;
    text-align: left;
}

.quick-nav-btn:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
    transform: translateY(-1px);
}

.quick-nav-btn:last-child {
    margin-bottom: 0;
}

/* Responsive adjustments for location panel */
@media (min-width: 769px) and (max-width: 1023px) {
    .location-panel {
        width: 85%;
        max-width: 380px;
    }
    
    .panel-header {
        padding: 14px 18px;
    }
    
    .location-panel .location-info,
    .location-panel .quick-nav {
        padding: 18px;
    }
    
    .location-panel.hidden {
        display: none;
    }
}

@media (min-width: 1024px) {
    .location-panel {
        width: 80%;
        max-width: 400px;
        max-height: 60vh;
    }
    
    .panel-header {
        padding: 16px 20px;
    }
    
    .location-panel .location-info,
    .location-panel .quick-nav {
        padding: 20px;
    }
    
    .location-panel.hidden {
        display: none;
    }
    
    .data-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .data-grid .data-item {
        padding: 10px;
    }
    
    .environmental-data {
        padding: 16px;
    }
}

@media (max-width: 768px) {
    .location-display {
        max-width: 180px;
    }
    
    .location-info-btn {
        right: 16px;
        top: 16px;
    }
    
    .location-panel {
        width: 95%;
        max-width: none;
        max-height: 80vh;
    }
    
    .location-panel.hidden {
        display: none;
    }
    
    .panel-header {
        padding: 14px 16px;
    }
    
    .panel-header h2 {
        font-size: 15px;
    }
    
    .location-panel .location-info,
    .location-panel .quick-nav {
        padding: 16px;
    }
    
    .data-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .data-grid .data-item {
        padding: 8px;
    }
    
    .environmental-data {
        padding: 12px;
    }
    
    .current-location-display .location-name {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    #current-pin-title {
        font-size: 13px;
        padding: 6px 10px;
        max-width: 140px;
    }
    
    .location-display {
        max-width: 140px;
    }
    
    .location-info-btn {
        right: 12px;
        top: 12px;
        width: 28px;
        height: 28px;
    }
    
    .location-panel {
        width: 98%;
        max-height: 85vh;
    }
    
    .location-panel.hidden {
        display: none;
    }
    
    .panel-header {
        padding: 12px 14px;
    }
    
    .panel-header h2 {
        font-size: 14px;
    }
    
    .close-panel-btn {
        width: 26px;
        height: 26px;
        font-size: 12px;
    }
    
    .location-panel .location-info,
    .location-panel .quick-nav {
        padding: 14px;
    }
    
    .current-location-display .location-name {
        font-size: 15px;
    }
    
    .current-location-display .location-description {
        font-size: 12px;
    }
    
    .environmental-data h3 {
        font-size: 13px;
    }
    
    .data-grid .data-label {
        font-size: 9px;
    }
    
    .data-grid .data-value {
        font-size: 11px;
    }
}

.prev-icon {
    content: '←';
}

.next-icon, .home-icon {
    content: '→';
} 