/* Estilos exclusivos del Index */

/* ==========================================================================
   ESTILOS DEL UNIVERSO Y OVERLAYS (Importados de index.html)
   ========================================================================== */

/* ===== UNIVERSE EXPANSION SYSTEM ===== */



/* Universe Overlay */
#universe-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: 99999;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.5s ease;
}
#universe-overlay.active { opacity: 1; }

#universe-bg {
    position: absolute;
    inset: 0;
    /* Fondo base: Gris Pizarra (Slate Gray) elegante estilo tarjeta del blog */
    background: linear-gradient(145deg, #5b626c 0%, #464c56 50%, #31363e 100%);
    z-index: 0;
}
#universe-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 15% 50%, var(--svc-color, #05c46b) 0%, transparent 60%),
        radial-gradient(ellipse 40% 40% at 85% 15%, var(--svc-color, #05c46b) 0%, transparent 50%);
    opacity: 0.45; /* Mucho más visible (antes 0.12) */
    mix-blend-mode: color-dodge; /* Fusión de luz intensa con el gris */
    z-index: 0;
}

/* Back button */
#universe-back {
    position: absolute;
    top: 35px; right: 50px; left: auto;
    z-index: 20;
    background: rgba(var(--svc-rgb, 0, 255, 204), 0.1);
    border: 1px solid var(--svc-color, #00ffcc);
    color: var(--svc-color, #00ffcc);
    padding: 10px 22px 10px 12px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex; align-items: center; gap: 8px;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(var(--svc-rgb, 0, 255, 204), 0.15);
    opacity: 0; transform: translateX(20px);
    transition: opacity 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) 0.3s, 
                transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) 0.3s,
                background 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
}
#universe-back.show { opacity: 1; transform: translateX(0); }
#universe-back:hover {
    background: var(--svc-color, #00ffcc);
    color: #fff;
    box-shadow: 0 0 20px rgba(var(--svc-rgb, 0, 255, 204), 0.5);
}
.portal-icon {
    width: 30px; height: 30px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.45);
    display: flex; align-items: center; justify-content: center;
}
.portal-icon .material-symbols-outlined { font-size: 15px; color: #fff; }

/* Universe grid layout */
#universe-content {
    position: relative;
    z-index: 5;
    width: 100%; height: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    grid-template-rows: auto 1fr;
    padding: 35px 50px 40px 60px;
    gap: 0 30px;
    overflow: hidden;
}

/* Header */
#universe-header {
    grid-column: 1; grid-row: 1;
    padding-bottom: 35px;
    display: flex;
    align-items: center;
    gap: 28px;
    opacity: 0; transform: translateY(28px);
    transition: opacity 0.6s ease 0.2s, transform 0.6s cubic-bezier(0.16,1,0.3,1) 0.2s;}
#universe-lottie {
    width: 140px; height: 140px;
    display: flex; align-items: center; justify-content: center;
}
#universe-lottie svg, #universe-lottie canvas {
    width: 100% !important;
    height: 100% !important;
}
.header-text-group {
    display: flex; flex-direction: column; justify-content: center;
}
#universe-header.show { opacity: 1; transform: translateY(0); }

.svc-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.13);
    padding: 8px 18px;
    border-radius: 50px;
    margin-bottom: 22px;
    backdrop-filter: blur(8px);
}
.svc-badge .material-symbols-outlined { font-size: 20px; color: var(--svc-color, #05c46b); }
.svc-badge-label { font-size: 12px; font-weight: 700; color: rgba(255,255,255,0.75); letter-spacing: 1.5px; text-transform: uppercase; }

#universe-title {
    font-size: 60px; 
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -1.5px;
    margin: 0 0 10px;
    color: #ffffff;
    text-shadow: 0 0 40px rgba(var(--svc-rgb), 0.7), 0 0 15px rgba(var(--svc-rgb), 0.4);
    background: none;
    -webkit-text-fill-color: #ffffff;
}
#universe-tagline {
    font-size: 18px; color: rgba(255,255,255,0.45);
    font-weight: 400; margin: 0;
}

/* Pricing */
#universe-pricing {
    grid-column: 1; grid-row: 2;
    display: flex;
    align-items: flex-start;
    gap: 18px;
    align-content: flex-start;
    padding-right: 15px;
    opacity: 0; transform: translateY(35px);
    transition: opacity 0.7s ease 0.4s, transform 0.7s cubic-bezier(0.16,1,0.3,1) 0.4s;
    overflow-x: auto;
    padding-bottom: 10px;
}
#universe-pricing.show { opacity: 1; transform: translateY(0); }
#universe-pricing::-webkit-scrollbar { height: 5px; width: 5px; }
#universe-pricing::-webkit-scrollbar-track { background: transparent; }
#universe-pricing::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 6px; }
#universe-pricing::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.45); }
#universe-pricing::-webkit-scrollbar-button,
#universe-pricing::-webkit-scrollbar-corner { display: none !important; background: transparent !important; }

.u-section { margin-bottom: 35px; width: 100%; }
.u-section-title { 
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px; 
    font-weight: 800; 
    color: rgba(255,255,255,0.5); 
    margin-bottom: 25px; 
    letter-spacing: 3px; 
    text-transform: uppercase; 
}
.u-section-title::before {
    content: "";
    display: block;
    width: 24px;
    height: 3px;
    border-radius: 2px;
    background: var(--svc-color);
    box-shadow: 0 0 10px var(--svc-color);
}
.u-section-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.pricing-card.feed-card { min-width: unset; max-width: unset; flex: unset; display: flex; flex-direction: column; }
.feed-card .p-desc { font-size: 12px; color: rgba(255,255,255,0.7); margin-bottom: 16px; line-height: 1.5; }

.pricing-card {
    background: linear-gradient(135deg, #3d3d3d 0%, rgba(255,255,255,0.03) 100%);
    flex: 1;
    min-width: 210px; max-width: 260px;
    
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 20px;
    padding: 28px 22px;
    
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: default;
}
.pricing-card:hover { transform: translateY(-6px); box-shadow: 0 24px 48px rgba(0,0,0,0.35); }
.pricing-card.featured {
    border-color: var(--svc-color, #05c46b);
    background: rgba(255,255,255,0.09);
    box-shadow: 0 0 40px rgba(59,130,246,0.12);
}
.pricing-card.featured::before {
    content: 'MÁS POPULAR';
    position: absolute; top: -13px; left: 50%;
    transform: translateX(-50%);
    background: var(--svc-color, #05c46b);
    color: #fff; font-size: 10px; font-weight: 800;
    letter-spacing: 2px; padding: 4px 14px;
    border-radius: 20px; white-space: nowrap;
}
.p-name { font-size: 13px; font-weight: 700; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.p-price { font-size: 42px; font-weight: 900; color: #fff; line-height: 1; margin-bottom: 4px; }
.p-price sup { font-size: 18px; vertical-align: top; margin-top: 7px; display: inline-block; font-weight: 600; }
.p-period { font-size: 12px; color: rgba(255,255,255,0.35); margin-bottom: 22px; }
.p-features { list-style: none; padding: 0; margin: 0 0 22px; display: flex; flex-direction: column; gap: 9px; }
.p-features li { display: flex; align-items: center; gap: 8px; font-size: 12px; color: rgba(255,255,255,0.65); }
.p-features li::before { content:''; width:5px; height:5px; border-radius:50%; background: var(--svc-color,#05c46b); flex-shrink:0; }
.p-btn {
    width: 100%; padding: 11px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.18);
    background: transparent; color: #fff;
    font-size: 12px; font-weight: 700; font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
}
.pricing-card.featured .p-btn { background: var(--svc-color, #05c46b); border-color: transparent; }
.p-btn:hover { background: var(--svc-color, #05c46b); border-color: transparent; }

/* Universe Chat */
#universe-chat {
    grid-column: 2; grid-row: 1 / 3;
    display: flex; flex-direction: column;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 22px; overflow: hidden;
    backdrop-filter: blur(20px);
    margin-top: 55px; /* Empuja el chat debajo del botón Volver */
    opacity: 0; transform: translateX(28px);
    transition: opacity 0.7s ease 0.6s, transform 0.7s cubic-bezier(0.16,1,0.3,1) 0.6s;
}
#universe-chat.show { opacity: 1; transform: translateX(0); }

.uc-header {
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    display: flex; align-items: center; gap: 12px;
    flex-shrink: 0;
}
.uc-avatar {
    width: 85px; height: 85px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.uc-avatar img {
    width: 100%; height: 100%; object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.7));
}
.uc-info h4 { margin:0; font-size:13px; font-weight:800; color:#fff; }
.uc-info p  { margin:0; font-size:11px; color:rgba(255,255,255,0.4); }
.uc-online { width:8px; height:8px; border-radius:50%; background:#10b981; margin-left:auto; box-shadow:0 0 7px #10b981; flex-shrink:0; }

.uc-messages {
    flex:1; overflow-y:auto; padding:16px;
    display:flex; flex-direction:column; gap:10px;
}
.uc-messages::-webkit-scrollbar { width:4px; }
.uc-messages::-webkit-scrollbar-track { background: transparent; }
.uc-messages::-webkit-scrollbar-thumb { background:rgba(255,255,255,0.2); border-radius:4px; }
.uc-messages::-webkit-scrollbar-thumb:hover { background:rgba(255,255,255,0.45); }
.uc-messages::-webkit-scrollbar-button,
.uc-messages::-webkit-scrollbar-corner { display: none !important; background: transparent !important; }

.uc-msg { display:flex; gap:8px; align-items:flex-end; }
.uc-msg.u { flex-direction:row-reverse; }
.uc-bubble {
    max-width:88%; padding:12px 15px; border-radius:16px 16px 16px 4px;
    font-size:13px; line-height:1.5;
    color:#ffffff;
    background:rgba(0,0,0,0.35);
    border:1px solid rgba(255,255,255,0.15);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.uc-msg.u .uc-bubble {
    background: var(--svc-color, #05c46b);
    border-color:transparent; color:#1a1a1a; font-weight:600;
    border-radius:16px 16px 4px 16px;
}

.uc-typing .uc-bubble { display:flex; align-items:center; gap:5px; padding:14px 16px; }
.uc-typing .uc-dot {
    width:7px; height:7px; border-radius:50%;
    background: var(--svc-color, #05c46b); opacity:0.35;
    animation: ucDotBounce 1.2s infinite ease-in-out;
}
.uc-typing .uc-dot:nth-child(2) { animation-delay:0.18s; }
.uc-typing .uc-dot:nth-child(3) { animation-delay:0.36s; }
@keyframes ucDotBounce {
    0%, 60%, 100% { transform: translateY(0); opacity:0.35; }
    30% { transform: translateY(-5px); opacity:1; }
}

.uc-input-area {
    padding:13px; border-top:1px solid rgba(255,255,255,0.07);
    display:flex; gap:9px; flex-shrink:0;
}
.uc-input {
    flex:1; background:rgba(255,255,255,0.07);
    border:1px solid rgba(255,255,255,0.11); border-radius:11px;
    padding:9px 13px; color:#fff; font-size:12px; font-family:inherit; outline:none;
}
.uc-input::placeholder { color:rgba(255,255,255,0.28); }
.uc-send {
    width:38px; height:38px; border-radius:11px;
    background:var(--svc-color,#05c46b);
    border:none; cursor:pointer;
    display:flex; align-items:center; justify-content:center;
    flex-shrink:0;
    transition:transform 0.2s ease, opacity 0.2s ease;
}
.uc-send:hover { transform:scale(1.07); opacity:0.9; }
.uc-send .material-symbols-outlined { font-size:17px; color:#fff; }

/* En Tabletas (<= 1100px - Incluye iPad Pro 13, iPad Mini, Air, Foldables) ZinaBot pasa a ser Flotante en Universos */
@media (max-width: 1100px) {
    #universe-content {
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-rows: auto 1fr !important;
        padding: 40px 30px 40px 30px !important;
        gap: 20px 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    #universe-header {
        padding-right: 120px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }
    #universe-pricing {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        padding-right: 0 !important;
        overflow-x: hidden !important;
        overflow-y: visible !important; /* Elimina la barra de scroll duplicada interna */
    }
    #universe-fab-bot {
        display: flex !important;
    }
    #universe-chat {
        position: fixed !important;
        bottom: 25px !important;
        right: 25px !important;
        width: calc(100vw - 50px) !important;
        max-width: 400px !important;
        height: 520px !important;
        max-height: 80vh !important;
        z-index: 999999 !important;
        margin-top: 0 !important;
        box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5), 0 0 25px rgba(var(--svc-rgb, 0, 255, 204), 0.25) !important;
        border: 1.5px solid var(--svc-color, #00ffcc) !important;
        background: rgba(15, 23, 42, 0.94) !important;
        transform: translateY(120%) scale(0.9) !important;
        opacity: 0 !important;
        pointer-events: none !important;
        transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
    }
    #universe-chat.mobile-chat-open {
        transform: translateY(0) scale(1) !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }
    .uc-close-btn {
        display: flex !important;
    }
}

/* Mobile Universos */
@media (max-width: 768px) {
    #universe-content {
        grid-template-columns: minmax(0, 1fr) !important;
        padding: 58px 14px 20px 14px !important;
        gap: 10px 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }
    #universe-header {
        padding-bottom: 8px !important;
        margin-bottom: 10px !important;
        gap: 12px !important;
        padding-right: 80px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }
    #universe-lottie {
        width: 65px !important;
        height: 65px !important;
        flex-shrink: 0 !important;
    }
    .header-text-group {
        min-width: 0 !important;
        flex: 1 1 0 !important;
        overflow: hidden !important;
    }
    #universe-title { 
        font-size: 22px !important; 
        letter-spacing: -0.5px !important; 
        margin-bottom: 2px !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
    }
    #universe-tagline { 
        font-size: 12px !important; 
        line-height: 1.3 !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
    }
    #universe-back { 
        top: 14px !important; 
        right: 14px !important; 
        left: auto !important; 
        padding: 6px 12px 6px 8px !important;
        font-size: 11px !important;
    }
    .portal-icon {
        width: 22px !important;
        height: 22px !important;
    }
    .portal-icon span {
        font-size: 14px !important;
    }
    #universe-pricing { 
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        padding-right: 0 !important;
        overflow-x: hidden !important;
        overflow-y: visible !important;
    }
    .u-section {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }
}

.alacarta-grid { grid-template-columns: repeat(4, 1fr); gap: 15px; }
@media (max-width: 900px) { .alacarta-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .alacarta-grid { grid-template-columns: 1fr; } }



/* Scrollbar de universe-pricing unificada arriba */


/* ==========================================================================
   TIMELINE (PROCESO RESCATE / OTROS)
   ========================================================================== */
/* .proceso-timeline REMOVED */
/* .timeline-step REMOVED */
/* .timeline-step::before REMOVED */
/* .step-icon REMOVED */
.step-content h4 { 
    margin: 0 0 6px; color: #fff; font-size: 16px; font-weight: 800; 
}
.step-content p { 
    margin: 0; font-size: 14px; color: rgba(255,255,255,0.7); line-height: 1.5; 
}

/* ==========================================================================
   ZINABOT FLOTANTE & CÁMARA DINÁMICA POR UNIVERSO
   ========================================================================== */

/* Botón de Cámara: toma el color del universo activo */
.uc-upload {
    background: transparent;
    border: none;
    color: var(--svc-color, #00ffcc);
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 0 6px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.uc-upload:hover {
    transform: scale(1.1);
    opacity: 0.85;
}

/* Botón cerrar/minimizar chat en universos */
.uc-close-btn {
    display: none;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    margin-left: auto;
    padding: 4px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.uc-close-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* Botón Flotante ZinaBot para Universos */
#universe-fab-bot {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 999999;
    display: none;
    align-items: center;
    gap: 10px;
    background: rgba(15, 23, 42, 0.88);
    border: 1.5px solid var(--svc-color, #00ffcc);
    padding: 6px 16px 6px 6px;
    border-radius: 40px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35), 0 0 15px rgba(var(--svc-rgb, 0, 255, 204), 0.3);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
#universe-fab-bot.show {
    opacity: 1;
    transform: scale(1);
}
#universe-fab-bot.fab-hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.6);
}
.fab-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--svc-color, #00ffcc);
    overflow: hidden;
}
.fab-avatar img {
    width: 90%;
    height: 90%;
    object-fit: contain;
}
.fab-label {
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.fab-pulse {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10b981;
    display: inline-block;
}
.fab-unread-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ff007f;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(255, 0, 127, 0.6);
    animation: badgePulse 1.5s infinite;
}
@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}



@media (max-width: 600px) {
    #universe-chat {
        bottom: 12px !important;
        right: 12px !important;
        left: 12px !important;
        width: calc(100vw - 24px) !important;
        max-width: 100% !important;
        height: 75vh !important;
    }
    #universe-fab-bot {
        bottom: 18px !important;
        right: 18px !important;
        padding: 5px 12px 5px 5px !important;
    }
    .fab-label {
        font-size: 12px !important;
    }
}
