/* Estilos generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Variables de color */


body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--primary-color);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Navbar - Estilo mejorado */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: #0d0d1a;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    width: 100%;
    height: 70px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-left {
    display: flex;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-color);
    letter-spacing: 1px;
    white-space: nowrap;
}

.logo span {
    color: var(--accent-color);
}

.nav-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    height: 100%;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    height: 100%;
    align-items: center;
}

.nav-links li {
    display: flex;
    align-items: center;
    height: 100%;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    height: 100%;
    position: relative;
}

.nav-links a:hover {
    color: var(--accent-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-color);
    transition: width 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Estilos específicos para el ícono de brújula */
.compass-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    font-size: 1.5rem;
    position: relative;
    transition: all 0.3s ease;
    margin: 0;
    padding: 0;
}

.compass-icon i {
    animation: spin 8s linear infinite;
}

.compass-icon:hover {
    transform: scale(1.1);
}

.compass-icon:hover i {
    animation: spin 2s linear infinite;
    color: var(--secondary-color);
}

.compass-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid transparent;
    border-radius: 50%;
    top: 0;
    left: 0;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.compass-icon:hover::after {
    border-color: var(--accent-color);
    transform: scale(1.2);
    opacity: 0.5;
}

/* Botón hamburguesa */
.navbar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Botón de aplicaciones */
.apps-btn {
    background-color: transparent;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.apps-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.apps-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    padding: 1rem;
    width: auto; /* Cambiamos de width fijo a auto */
    min-width: 300px; /* Ancho mínimo */
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); /* Grid flexible */
    gap: 0.8rem;
    z-index: 1001;
}

.apps-dropdown.active {
    display: grid;
    animation: fadeIn 0.3s ease;
}

.app-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.8rem; /* Aumentamos el padding */
    border-radius: 8px;
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
    min-width: 80px; /* Ancho mínimo para cada item */
}

.app-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

.app-icon {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.app-name {
    font-size: 0.8rem;
    color: var(--text-color);
    text-align: center;
    white-space: nowrap; /* Evita que el texto se divida en varias líneas */
    overflow: visible; /* Permite que el texto sobresalga si es necesario */
    text-overflow: clip; /* No añade puntos suspensivos */
    width: 100%; /* Ocupa todo el ancho disponible */
}

/* Botón para el sidebar */
.sidebar-toggle {
    background-color: var(--accent-color);
    border: none;
    border-radius: 5px;
    color: white;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 15px;
    cursor: pointer;
    transition: all 0.3s;
}

.sidebar-toggle:hover {
    background-color: #d91a6a;
    transform: scale(1.05);
}

/* Estilos para el sidebar */
.sidebar {
    position: fixed;
    top: 70px;
    left: 0;
    width: var(--sidebar-width);
    height: calc(100% - 70px);
    background-color: #0d0d1a;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 999;
    overflow-y: auto;
}

.sidebar.active {
    transform: translateX(0);
}

.sidebar-header {
    padding: 1rem;
    display: flex;
    justify-content: flex-end;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.close-sidebar {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
}

.sidebar-categories {
    padding: 1rem;
}

.category-item {
    padding: 0.8rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
}

.category-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.category-item.active {
    background-color: var(--accent-color);
    color: white;
}

.category-item i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* Overlay para cuando el sidebar está abierto */
.sidebar-overlay {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: calc(100% - 70px);
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Main content */
.main-container {
    padding: 2rem;
    margin-top: 70px;
    transition: margin-left 0.3s ease;
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Clase para cuando el sidebar está abierto */
body.sidebar-open {
    overflow-x: hidden;
}

body.sidebar-open .main-container {
    margin-left: var(--sidebar-width);
}

/* Estilos para la página de locales */
.back-btn {
    display: inline-block;
    margin: 1rem 0;
    color: var(--accent-color);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s;
}

.back-btn i {
    margin-right: 5px;
}

.back-btn:hover {
    color: var(--accent-dark);
}

/* Local Card */
.local-detail-container {
    width: 100%;
    margin: 1rem 0;
    padding: 0;
}

.local-detail-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

/* Estilos para el horario con formato especial */
.schedule {
    white-space: pre-line;
    line-height: 1.6;
}

.schedule .indented {
    display: inline-block;
    margin-left: 2em; /* Ajusta este valor para cambiar la indentación */
}

.local-header {
    padding: 1.5rem;
    text-align: center;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-dark));
    color: white;
}

.local-icon {
    font-size: 2.2rem;
    margin-bottom: 0.8rem;
}

.local-header h1 {
    font-size: 1.8rem;
    margin: 0.5rem 0;
}

.category-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.15);
}

/* Contenedor de imagen ajustado */
.local-image-container {
    width: 100%;
    height: 250px; /* o el alto que necesites */
    overflow: hidden;
    background-color: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
}

.local-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    transition: transform 0.3s ease;
}

.local-image:hover {
    transform: scale(1.02);
}

.local-info {
    padding: 1.5rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.2rem;
    margin-bottom: 1.5rem;
}

.info-item {
    padding: 1rem;
    border-radius: 8px;
    background-color: rgba(247, 37, 133, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.info-label {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.info-label i {
    margin-right: 8px;
}

.info-content {
    font-size: 0.95rem;
    line-height: 1.5;
}

.info-content a {
    color: var(--accent-color);
    text-decoration: none;
}

.info-content a:hover {
    text-decoration: underline;
}

.directions-container {
    padding: 1.2rem;
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.btn-directions {
    display: inline-flex;
    align-items: center;
    padding: 0.7rem 1.3rem;
    background-color: #4285F4;
    color: white;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-directions:hover {
    background-color: #3367D6;
}

/* Botón para subir */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background-color: var(--accent-dark);
    transform: translateY(-3px);
}

/* Footer */
footer {
    padding: 1.5rem;
    text-align: center;
    background-color: #0d0d1a;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0;
}

.social-icons a {
    color: var(--text-color);
    font-size: 1.2rem;
    transition: color 0.3s;
}

.social-icons a:hover {
    color: var(--accent-color);
}

.copyright {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 1rem;
}

.titulo-centrado {
    text-align: center;
    font-family: Arial, sans-serif;
}

.span {
    color: #3a25f7;
}

/* Animaciones */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.compass-icon.loading {
    animation: pulse 1.5s ease-in-out 2;
}

/* Responsive */
@media (max-width: 768px) {
    .schedule .indented {
        margin-left: 1.5em; /* Ajuste para móviles */
    }
    .navbar {
        height: 60px;
        padding: 0.5rem 1rem;
    }
    
    .navbar-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .nav-links {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background-color: var(--card-bg);
        width: 100%;
        flex-direction: column;
        align-items: center;
        padding: 1rem 0;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
        transform: translateY(-150%);
        transition: transform 0.5s ease-in;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        height: auto;
    }
    
    .nav-links.active {
        transform: translateY(0);
    }
    
    .nav-links li {
        margin: 1rem 0;
        margin-left: 0;
        width: 100%;
        height: auto;
        justify-content: center;
    }
    
    .nav-links a {
        width: 100%;
        justify-content: center;
        padding: 0.8rem;
    }
    
    .compass-icon {
        margin: 0.5rem 0;
    }
    
    .apps-btn {
        order: 2;
    }
    
    .hamburger {
        order: 1;
    }
    
    .toggle .line1 {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .toggle .line2 {
        opacity: 0;
    }
    
    .toggle .line3 {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    .apps-dropdown {
        width: 280px;
    }
    
    .main-container {
        margin-top: 60px;
        padding: 1rem;
    }
    
    .sidebar {
        top: 60px;
        height: calc(100% - 60px);
    }
    
    .sidebar-overlay {
        top: 60px;
        height: calc(100% - 60px);
    }

    .local-image-container {
        max-height: 220px;
        padding: 0.8rem;
    }
    
    .local-header {
        padding: 1.2rem;
    }
    
    .local-header h1 {
        font-size: 1.5rem;
    }
    
    .local-icon {
        font-size: 2rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .apps-dropdown {
        width: 250px;
        grid-template-columns: repeat(2, 1fr);
    }
    
    .scroll-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }

    .local-image-container {
        max-height: 180px;
    }
    
    .local-info {
        padding: 1.2rem;
    }
    
    .back-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}
@media (max-width: 480px) {
    .apps-dropdown {
        min-width: 250px;
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        right: 10px;
    }
    
    .app-name {
        font-size: 0.7rem; /* Tamaño un poco más pequeño en móviles */
    }
}