:root {
    --primary: #1e3a8a; /* Azul corporativo oscuro CESTE */
    --secondary: #2563eb; /* Azul brillante */
    --accent: #f59e0b; /* Dorado / Amarillo acento */
    
    --bg-main: #f8fafc; /* Gris hiper claro casi blanco */
    --bg-surface: rgba(255, 255, 255, 0.75); /* Superficie blanca traslúcida */
    --bg-surface-solid: #ffffff;
    --border-color: rgba(226, 232, 240, 0.9); /* Borde suave */
    
    --text-primary: #0f172a; /* Texto principal oscuro */
    --text-secondary: #475569; /* Texto secundario gris oscuro */
    
    /* Gradientes App (versión Light) */
    --grad-1-start: #38bdf8; --grad-1-end: #0284c7;
    --grad-2-start: #fb7185; --grad-2-end: #e11d48;
    --grad-3-start: #34d399; --grad-3-end: #059669;
    --grad-4-start: #fbbf24; --grad-4-end: #d97706;
}

/* Utilidades de visualización (Desktop / Mobile) */
@media (min-width: 769px) {
    .mobile-only {
        display: none !important;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', -apple-system, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
    scroll-behavior: smooth;
}

/* Efectos de fondo premium Light */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    background: #f8fafc;
    background-image: 
        radial-gradient(at 80% 0%, hsla(217, 100%, 94%, 1) 0px, transparent 50%),
        radial-gradient(at 0% 100%, hsla(213, 100%, 92%, 1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, hsla(38, 100%, 90%, 0.6) 0px, transparent 50%);
}

.glass-orb {
    display: none; /* Simplificamos para la versión light */
}

/* Header & Navegación (Glassmorphism Light) */
.hub-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 1.2rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.header-content {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

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

.logo-icon-bg {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(245, 158, 11, 0.15));
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(37, 99, 235, 0.1);
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.08);
}

.logo-icon {
    font-size: 1.6rem;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-container h1 {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.logo-container span {
    color: var(--secondary);
}

.logo-container .subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Acciones de Cabecera (Search + Btones) */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    max-width: 440px;
    justify-content: flex-end;
}

/* Buscador */
.search-container {
    position: relative;
    width: 100%;
    max-width: 380px;
    flex: 1;
}

/* Botón Academic Tools */
.academic-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    flex-shrink: 0;
}

.academic-btn:hover {
    color: var(--primary);
    border-color: rgba(37, 99, 235, 0.4);
    box-shadow: 0 6px 15px rgba(37, 99, 235, 0.15);
    transform: translateY(-2px);
}

.search-icon {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    transition: color 0.3s ease;
}

.search-container input {
    width: 100%;
    padding: 0.85rem 2.8rem 0.85rem 3.2rem;
    border-radius: 40px;
    border: 1px solid var(--border-color);
    background: #ffffff;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.search-container input:focus {
    border-color: rgba(37, 99, 235, 0.4);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.search-container input::placeholder {
    color: #94a3b8;
}

.search-container input:focus + .search-icon {
    color: var(--secondary);
}

.clear-btn {
    position: absolute;
    right: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.2s;
}

.clear-btn:hover {
    color: #ef4444;
}

/* Contenido Principal */
.hub-container {
    flex: 1;
    max-width: 1300px;
    width: 100%;
    margin: 0 auto;
    padding: 3rem 2rem 5rem;
}

.hub-intro {
    margin-bottom: 3.5rem;
    text-align: center;
}

.hub-intro h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.8rem;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #0f172a, #334155);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hub-intro p {
    color: var(--text-secondary);
    font-size: 1.15rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Grid de Tarjetas */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2.5rem;
}

.app-card {
    background: var(--bg-surface-solid);
    border: 1px solid var(--border-color);
    border-radius: 28px;
    padding: 2.2rem;
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 280px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.02);
}

.app-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.08), 0 10px 20px -10px rgba(37, 99, 235, 0.1);
    border-color: rgba(37, 99, 235, 0.2);
}

/* Borde superior con gradientes para cada App */
.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    transition: height 0.3s ease;
}

.app-card.gradient-1::before { background: linear-gradient(90deg, var(--grad-1-start), var(--grad-1-end)); }
.app-card.gradient-2::before { background: linear-gradient(90deg, var(--grad-2-start), var(--grad-2-end)); }
.app-card.gradient-3::before { background: linear-gradient(90deg, var(--grad-3-start), var(--grad-3-end)); }
.app-card.gradient-4::before { background: linear-gradient(90deg, var(--grad-4-start), var(--grad-4-end)); }

.app-card:hover::before {
    height: 6px;
}

/* Iconos de las Apps */
.icon-wrapper {
    width: 65px;
    height: 65px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 1.8rem;
    background: #ffffff;
    border: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}

.app-card:hover .icon-wrapper {
    transform: scale(1.1) rotate(5deg);
}

.gradient-1 .icon-wrapper { 
    color: var(--grad-1-end); 
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.1), rgba(2, 132, 199, 0.1));
    border-color: rgba(2, 132, 199, 0.2);
}
.gradient-2 .icon-wrapper { 
    color: var(--grad-2-end); 
    background: linear-gradient(135deg, rgba(251, 113, 133, 0.1), rgba(225, 29, 72, 0.1));
    border-color: rgba(225, 29, 72, 0.2);
}
.gradient-3 .icon-wrapper { 
    color: var(--grad-3-end); 
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.1), rgba(5, 150, 105, 0.1));
    border-color: rgba(5, 150, 105, 0.2);
}
.gradient-4 .icon-wrapper { 
    color: var(--grad-4-end); 
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(217, 119, 6, 0.1));
    border-color: rgba(217, 119, 6, 0.2);
}

/* Textos dentro de Card */
.card-content h3 {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.app-card:hover .card-content h3 {
    color: var(--secondary);
}

.card-content p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    font-weight: 400;
}

/* Efecto Hover Bottom Bandeja */
.card-hover-effect {
    position: absolute;
    bottom: -65px;
    left: 0;
    width: 100%;
    padding: 1.2rem 2.2rem;
    background: #f8fafc;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 0.95rem;
    transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-top: 1px solid var(--border-color);
    color: var(--secondary);
}

.app-card:hover .card-hover-effect {
    bottom: 0;
}

/* Huecos Vacíos (Próximamente) */
.empty-slot {
    border: 2px dashed #cbd5e1;
    background: transparent; 
    box-shadow: none;
    cursor: default;
}

.empty-slot:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.7);
    border-color: #94a3b8;
    box-shadow: none;
}

.empty-slot .icon-wrapper.empty {
    color: #94a3b8;
    background: transparent;
    border: 2px dashed #cbd5e1;
    box-shadow: none;
}

.empty-slot:hover .icon-wrapper.empty {
    transform: rotate(90deg);
    border-color: #64748b;
    color: #64748b;
}

.empty-slot h3, .empty-slot p {
    color: #64748b;
}

.empty-slot .empty-effect {
    color: #64748b;
    background: #f1f5f9;
    border-top: 1px solid #e2e8f0;
    justify-content: center;
    gap: 10px;
}

/* Mensaje sin resultados */
.no-results-state i {
    color: #cbd5e1 !important;
}

.no-results-state h3 {
    color: var(--text-primary) !important;
}

/* Footer */
.hub-footer {
    border-top: 1px solid var(--border-color);
    padding: 2.5rem 0;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
}

.footer-content {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.95rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.footer-links a:hover {
    color: var(--secondary);
}

.separator {
    margin: 0 0.8rem;
    color: #cbd5e1;
}

/* Responsive */
@media (max-width: 900px) {
    .hub-intro h2 { font-size: 2rem; }
    .hub-container { padding: 3rem 1.5rem; }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        align-items: stretch;
    }
    
    .header-actions {
        max-width: 100%;
        justify-content: space-between;
    }

    .search-container {
        max-width: 100%;
    }

    .hidden-mobile, .desktop-only {
        display: none !important;
    }

    .logo-container {
        width: 100%;
        justify-content: flex-start;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

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