@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,500&display=swap');

/* =========================================
   1. VARIABLES & DESIGN SYSTEM
   ========================================= */
:root {
    /* Colors */
    --primary-hue: 222;
    --primary-sat: 47%;
    --primary-light: 6%; /* Deep Space Black */
    
    --primary: hsl(var(--primary-hue), var(--primary-sat), var(--primary-light));
    --primary-hover: hsl(var(--primary-hue), var(--primary-sat), 10%);
    --primary-muted: hsl(var(--primary-hue), var(--primary-sat), 15%);
    
    --accent: hsl(190, 95%, 45%); /* Neon Cyan */
    --accent-hover: hsl(190, 100%, 40%);
    --accent-light: rgba(6, 182, 212, 0.1);
    --accent-glow: rgba(6, 182, 212, 0.2);
    --accent-gradient: linear-gradient(135deg, hsl(190, 95%, 45%), hsl(217, 91%, 60%)); /* Cyan to Electric Blue */
    
    --success: hsl(142, 76%, 45%);
    --danger: hsl(350, 89%, 60%);
    
    --bg-main: hsl(222, 47%, 4%); /* Midnight Black */
    --card-bg: rgba(15, 23, 42, 0.65); /* Glassmorphic dark card */
    --border-color: rgba(255, 255, 255, 0.08);
    
    --text-main: hsl(210, 40%, 98%); /* High-contrast white */
    --text-muted: hsl(215, 20%, 65%);
    --text-light: hsl(0, 0%, 100%);
    
    /* Glassmorphism */
    --glass-bg: rgba(10, 15, 30, 0.7);
    --glass-border: rgba(6, 182, 212, 0.15);
    --glass-blur: 12px;
    
    /* Layout */
    --header-height: 80px;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.5);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.6);
    --shadow-premium: 0 20px 40px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.05);
    --shadow-glow: 0 0 20px rgba(6, 182, 212, 0.2);
}

/* =========================================
   2. BASE / RESET & TYPOGRAPHY
   ========================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-main);
    overflow-x: hidden;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    border: 2px solid var(--bg-main);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
}

h2 {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

p {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.6;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
a:hover {
    color: var(--text-light);
    text-shadow: 0 0 8px var(--accent);
}

/* =========================================
   3. HEADER & NAVIGATION
   ========================================= */
header {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    width: 100%;
    z-index: 1020;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 1px 0 rgba(6, 182, 212, 0.1);
}

header .logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid rgba(6, 182, 212, 0.2);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.logo:hover {
    transform: scale(1.05) rotate(5deg);
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
}

.h2-header {
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    margin-left: 0.5rem;
    text-shadow: none;
    font-family: inherit;
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    padding-left: 1rem;
}

#menu-navegacion {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-left: auto;
}

#menu-navegacion a {
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

#menu-navegacion a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
    box-shadow: 0 0 8px var(--accent);
}

#menu-navegacion a:hover {
    color: var(--text-light);
    background: rgba(255, 255, 255, 0.05);
}

#menu-navegacion a:hover::after {
    transform: scaleX(1);
}

/* Hamburguesa */
.hamburguesa-grande {
    display: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    z-index: 10005;
}

.hamburguesa-grande .linea {
    width: 100%;
    height: 3px;
    background: var(--text-light);
    border-radius: 2px;
    transition: all 0.3s ease;
}

#menu-navegacion-celu {
    display: none;
}

/* =========================================
   4. MAP & SIDEBAR CONTROLLER
   ========================================= */
.contenedor {
    display: flex;
    height: calc(100vh - var(--header-height));
    position: relative;
    background: var(--bg-main);
}

#map {
    flex: 1;
    height: 100%;
    z-index: 1;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.08);
}

.barra {
    width: 360px;
    background: var(--card-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-left: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    z-index: 10;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filtros {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.filtro-busqueda {
    position: relative;
    width: 100%;
}

.filtro-busqueda #search {
    width: 100%;
    padding: 12px 16px 12px 42px;
    font-size: 0.95rem;
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-main);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 0;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.2);
}

.filtro-busqueda::before {
    content: "🔍";
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    color: var(--text-muted);
    pointer-events: none;
}

.filtro-busqueda #search:focus {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 12px var(--accent-glow);
    outline: none;
}

#search-results {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    max-height: 250px;
    overflow-y: auto;
    z-index: 1030;
    display: none;
}

#search-results:not(:empty) {
    display: block;
}

#search-results.hidden {
    display: none !important;
}

#search-results div {
    padding: 10px 14px;
    font-size: 0.9rem;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.15s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

#search-results div:last-child {
    border-bottom: none;
}

#search-results div:hover {
    background: rgba(6, 182, 212, 0.12);
    color: var(--accent);
    padding-left: 18px;
}

.filtro-grupo {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.filtro-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.filtro-item label {
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filtro-item select {
    padding: 10px 12px;
    font-size: 0.9rem;
    font-family: inherit;
    border-radius: 10px;
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='%2306b6d4' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
    padding-right: 35px;
}

.filtro-item select:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.filtro-item select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
    outline: none;
}

#filtrar {
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: var(--accent-gradient);
    color: var(--text-light);
    font-weight: 800;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.25);
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

#filtrar:hover {
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.45);
    transform: translateY(-2px);
}

#filtrar:active {
    transform: translateY(0);
}

/* =========================================
   5. POPUPS & TOOLTIPS (Leaflet Customization)
   ========================================= */
.leaflet-popup-content-wrapper {
    padding: 0 !important;
    border-radius: 16px !important;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6) !important;
}

.leaflet-popup-content {
    margin: 0 !important;
    width: 320px !important;
    font-family: inherit !important;
    color: var(--text-main) !important;
}

.leaflet-popup-close-button {
    color: var(--text-light) !important;
    font-size: 20px !important;
    top: 10px !important;
    right: 10px !important;
    z-index: 100;
}

.leaflet-popup-tip {
    background: rgba(15, 23, 42, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.popup-card {
    display: flex;
    flex-direction: column;
}

.popup-card-img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-bottom: 2px solid var(--accent);
}

.popup-card-body {
    padding: 1rem;
}

.popup-card-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.popup-card-info {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.popup-especialidades {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0.75rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 0.75rem;
}

.popup-esp-link {
    font-size: 0.75rem !important;
    font-weight: 600;
    background: rgba(6, 182, 212, 0.12) !important;
    color: var(--accent) !important;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease !important;
}
.popup-esp-link:hover {
    background: var(--accent) !important;
    color: var(--text-light) !important;
    text-decoration: none !important;
    box-shadow: 0 0 8px var(--accent-glow);
}

.popup-card-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.popup-link-btn {
    text-align: center;
    padding: 8px 0;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    transition: all 0.2s ease !important;
}

.popup-link-btn:first-child {
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--text-main) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}
.popup-link-btn:first-child:hover {
    background: rgba(255, 255, 255, 0.12) !important;
}

.popup-link-btn:last-child {
    background: var(--accent) !important;
    color: var(--text-light) !important;
}
.popup-link-btn:last-child:hover {
    background: var(--accent-hover) !important;
    box-shadow: 0 0 10px var(--accent-glow);
}

/* Tooltip */
.leaflet-tooltip {
    background: rgba(10, 15, 30, 0.9) !important;
    border: 1px solid var(--accent) !important;
    color: var(--accent) !important;
    font-family: inherit !important;
    font-weight: 600 !important;
    font-size: 0.8rem !important;
    border-radius: 6px !important;
    padding: 6px 10px !important;
    box-shadow: var(--shadow-md) !important;
}

/* =========================================
   6. FOOTER
   ========================================= */
.footer {
    background: var(--primary);
    color: var(--text-light);
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer h2 {
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255,255,255,0.7);
}

.footer .div-footer {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer .div-footer a {
    color: rgba(255,255,255,0.7);
    font-size: 1.25rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.footer .div-footer a:hover {
    color: var(--text-light);
    background: var(--accent);
    transform: translateY(-2px);
}

/* =========================================
   7. BACK TO TOP BUTTON
   ========================================= */
#btnTop {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--accent);
    color: var(--text-light);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

#btnTop.show {
    opacity: 1;
    visibility: visible;
}

#btnTop:hover {
    background: var(--accent-hover);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(37, 99, 235, 0.4);
}

/* =========================================
   8. LOGIN PAGE
   ========================================= */
.is-main {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    height: calc(100vh - var(--header-height));
    background-image: linear-gradient(rgba(3, 7, 18, 0.65), rgba(3, 7, 18, 0.9)), url("mapadeorientatecfondo.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 1.5rem;
}

.login-container {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid rgba(6, 182, 212, 0.15);
    border-radius: 16px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-premium), 0 0 30px rgba(6, 182, 212, 0.08);
    color: var(--text-light);
}

.login-container h2 {
    font-size: 1.75rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 1.75rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.015em;
}

.login-container label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    display: block;
    color: var(--text-muted);
}

.login-container input[type="text"],
.login-container input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: var(--text-light);
    margin-bottom: 1.25rem;
    transition: all 0.25s ease;
}

.login-container input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.login-container input:focus {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
    outline: none;
}

.button {
    width: 100%;
    padding: 12px;
    background: var(--accent-gradient);
    color: var(--text-light);
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.25);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.button:hover {
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.45);
    transform: translateY(-2px);
}

/* =========================================
   9. ADMIN DASHBOARD
   ========================================= */
.cuadro_admin {
    background: linear-gradient(135deg, var(--primary-muted), var(--primary));
    color: var(--text-light);
    padding: 2.25rem;
    border-radius: 16px;
    max-width: 900px;
    width: 90%;
    margin: 2rem auto 0;
    box-shadow: var(--shadow-lg), 0 0 20px rgba(6, 182, 212, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.cuadro_admin .username {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-light);
    margin-top: 0;
}

.cuadro_admin .gestion {
    font-size: 1.1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    margin-top: 0.5rem;
}

.cuadro_admin .establishment {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
    background: rgba(6, 182, 212, 0.1);
    display: inline-block;
    padding: 6px 14px;
    border-radius: 6px;
    margin-top: 0.75rem;
    font-family: monospace;
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.form-admin {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2.5rem;
    background: var(--card-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-admin h3 {
    grid-column: span 2;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--accent);
    border-bottom: 2px solid rgba(255, 255, 255, 0.04);
    padding-bottom: 0.75rem;
}

.form-admin label {
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.35rem;
}

.form-admin input[type="text"],
.form-admin input[type="file"],
.form-admin select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.25s ease;
}

.form-admin input[type="text"]:focus,
.form-admin select:focus {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 12px var(--accent-glow);
    outline: none;
}

.form-admin select {
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='%2306b6d4' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
}

.form-admin button {
    grid-column: span 2;
    padding: 12px;
    background: var(--accent-gradient);
    color: var(--text-light);
    font-weight: 800;
    font-size: 1.1rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.25);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-admin button:hover {
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.45);
    transform: translateY(-2px);
}

a[href="logout.php"] {
    display: block;
    width: fit-content;
    margin: 1.5rem auto;
    color: var(--danger);
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    padding: 10px 24px;
    border: 1.5px solid var(--danger);
    border-radius: 10px;
    font-size: 0.95rem;
}

a[href="logout.php"]:hover {
    background: var(--danger);
    color: var(--text-light);
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.2);
}

/* =========================================
   10. ABOUT US PAGE
   ========================================= */
.sb-main {
    max-width: 1000px;
    margin: 3rem auto;
    padding: 0 1.5rem;
    background: var(--bg-main);
}

.sb-main h1 {
    margin-bottom: 2rem;
}

.cartel {
    background: var(--card-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 2.25rem;
    margin: 1.5rem auto;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 100%;
}

.cartel:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(6, 182, 212, 0.1);
    border-color: rgba(6, 182, 212, 0.3);
}

.cartel h2 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 0.75rem;
    text-align: left;
}

.cartel p {
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1rem;
    text-align: left;
    color: var(--text-muted);
}
.cartel p:last-child {
    margin-bottom: 0;
}

/* =========================================
   11. STUDY PAGE
   ========================================= */
.estudio {
    max-width: 1000px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}

.estudio h2 {
    font-size: 1.35rem;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent);
    color: var(--text-main);
    padding: 12px 20px;
    border-radius: 12px;
    width: 100%;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
}

.estudio p {
    font-size: 1rem;
    color: var(--text-muted);
    width: 100%;
    line-height: 1.75;
    margin-bottom: 1.5rem;
}

.estudio ul {
    width: 100%;
    list-style: none;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.estudio ul li {
    background: var(--card-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border-color);
    margin: 0;
    padding: 1.25rem;
    border-left: 4px solid var(--accent);
    box-shadow: var(--shadow-sm);
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text-main);
    line-height: 1.6;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.estudio ul li:hover {
    transform: translateX(4px);
    border-color: rgba(6, 182, 212, 0.3);
    box-shadow: var(--shadow-md);
}

#descargaPlanEstudio {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-gradient);
    color: var(--text-light);
    font-weight: 800;
    padding: 12px 24px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.25);
    margin: 1.5rem auto;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

#descargaPlanEstudio:hover {
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.4);
    transform: translateY(-2px);
}

#vistaPlanEstudio {
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    background: rgba(15, 23, 42, 0.8);
}

/* =========================================
   12. ERROR PAGES
   ========================================= */
.container2 {
    min-height: calc(100vh - var(--header-height) - 100px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem;
}

.box {
    background: var(--card-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border-color);
    padding: 3rem;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.code {
    font-size: 6.5rem;
    font-weight: 900;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    letter-spacing: -0.04em;
    margin-bottom: 1rem;
}

.container2 h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.message {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 10px;
    font-weight: 800;
    background: var(--accent-gradient);
    color: var(--text-light);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.25);
}

.btn:hover {
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.4);
    transform: translateY(-2px);
}

/* =========================================
   13. RESPONSIVE BREAKPOINTS
   ========================================= */

/* --- Tablet (960px) --- */
@media (max-width: 960px) {
    header {
        padding: 0 1.5rem;
    }
    .h2-header {
        display: none;
    }
}

/* --- Mobile / Tablet (768px) --- */
@media (max-width: 768px) {
    .contenedor {
        flex-direction: column;
        height: auto;
        min-height: calc(100vh - var(--header-height));
    }

    .hamburguesa-grande {
        display: flex;
    }

    .barra {
        width: 100%;
        order: 1;
        height: auto;
        border-left: none;
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-sm);
    }

    .filtros {
        padding: 1rem;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.75rem;
        align-items: stretch;
    }

    .filtro-busqueda {
        flex: 1 1 100%;
    }

    .filtro-grupo {
        flex-direction: row;
        flex-wrap: wrap;
        width: 100%;
        gap: 0.75rem;
    }

    .filtro-item {
        flex: 1 1 calc(33.333% - 0.5rem);
        min-width: 100px;
    }

    #filtrar {
        flex: 1 1 100%;
        margin-top: 0;
    }

    #map {
        order: 2;
        min-height: 50vh;
        height: calc(100vh - 250px);
    }

    #menu-navegacion {
        display: none;
    }

    #menu-navegacion-celu {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        width: 260px;
        height: 100%;
        background: rgba(15, 23, 42, 0.95);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-right: 1px solid var(--border-color);
        z-index: 10000;
        padding: 3rem 1.5rem;
        box-shadow: var(--shadow-lg);
        transform: translateX(-270px);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        list-style: none;
        gap: 1.25rem;
    }

    #menu-navegacion-celu.show {
        transform: translateX(0);
    }

    #menu-navegacion-celu a {
        font-size: 1.1rem;
        font-weight: 700;
        color: rgba(255, 255, 255, 0.85);
        display: block;
        padding: 8px 12px;
        border-radius: 8px;
        transition: all 0.2s ease;
    }
    
    #menu-navegacion-celu a:hover {
        background: rgba(6, 182, 212, 0.1);
        color: var(--accent);
    }

    .form-admin {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }

    .form-admin h3,
    .form-admin button {
        grid-column: span 1;
    }
    
    #vistaPlanEstudio {
        display: none;
    }
}

/* --- Small Mobile (500px) --- */
@media (max-width: 500px) {
    .filtros {
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .filtro-item {
        flex: 1 1 100%;
    }

    .footer {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem 1rem;
    }
    
    .login-container {
        padding: 1.5rem;
    }
}

/* =========================================
   14. CUSTOM MULTI-SELECT DROPDOWNS
   ========================================= */
.multi-select-container {
    position: relative;
    width: 100%;
}

.multi-select-btn {
    width: 100%;
    padding: 10px 12px;
    font-size: 0.9rem;
    font-family: inherit;
    border-radius: 10px;
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-main);
    text-align: left;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    padding-right: 35px;
}

.multi-select-btn::after {
    content: "";
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--accent);
    transition: transform 0.2s ease;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}

.multi-select-btn:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.15);
}

.multi-select-container.open .multi-select-btn {
    border-color: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
    background: rgba(6, 182, 212, 0.05);
}

.multi-select-container.open .multi-select-btn::after {
    transform: translateY(-50%) rotate(180deg);
}

.multi-select-options {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1030;
    padding: 6px 0;
    display: none;
}

.multi-select-container.open .multi-select-options {
    display: block;
}

.multi-select-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    font-size: 0.85rem;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.15s ease;
}

.multi-select-option:hover {
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent);
}

.multi-select-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--accent);
    margin: 0;
}

.multi-select-option label {
    margin: 0;
    font-size: 0.85rem;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-main);
    user-select: none;
    transition: color 0.15s ease;
}

.multi-select-option:hover label {
    color: var(--accent);
}

/* Extra padding at the bottom of filters to avoid scroll clipping of expanded dropdowns */
.filtros {
    padding-bottom: 120px !important;
}