/* ============================================
   MuniAsist — Landing Page completa
   Secciones: Hero / Métricas / Beneficios
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600&display=swap');

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'IBM Plex Sans', sans-serif;
    margin: 0;
    background-color: #0d2b4e;
    background-image:
        radial-gradient(ellipse at 15% 85%, rgba(15, 76, 129, 0.55) 0%, transparent 55%),
        radial-gradient(ellipse at 85% 10%, rgba(26, 90, 160, 0.35) 0%, transparent 50%),
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 38px,
            rgba(255, 255, 255, 0.018) 38px,
            rgba(255, 255, 255, 0.018) 39px
        );
    color: white;
}

/* ══════════════════════════════════
   LAYOUT GENERAL
══════════════════════════════════ */
.section {
    max-width: 900px;
    margin: 0 auto;
    padding: 80px 40px;
}

.section-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.35);
    margin-bottom: 12px;
}

.section-title {
    font-size: 30px;
    font-weight: 600;
    color: #fff;
    line-height: 1.25;
    letter-spacing: -0.4px;
    margin-bottom: 36px;
}

/* ══════════════════════════════════
   NAVBAR
══════════════════════════════════ */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 80px;
}

.nav-brand {
    font-size: 20px;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    gap: 9px;
    letter-spacing: -0.3px;
}

.nav-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.7);
    animation: pulse-dot 2.2s infinite;
    flex-shrink: 0;
}

.nav-tag {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 400;
}

/* ══════════════════════════════════
   SECCIÓN A — HERO
══════════════════════════════════ */
.hero-section {
    padding-top: 48px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.28);
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 12px;
    color: #4ade80;
    font-weight: 500;
    margin-bottom: 24px;
}

.badge-dot {
    width: 6px;
    height: 6px;
    background: #4ade80;
    border-radius: 50%;
    animation: pulse-dot 2.2s infinite;
    flex-shrink: 0;
}

.hero-title {
    font-size: 48px;
    font-weight: 600;
    color: #fff;
    line-height: 1.1;
    letter-spacing: -1px;
    margin: 0 0 20px;
}

.hero-title em {
    font-style: normal;
    color: #7ec8f5;
}

.hero-sub {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.58);
    line-height: 1.75;
    max-width: 560px;
    margin-bottom: 36px;
}

.hero-ctas {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 64px;
    flex-wrap: wrap;
}

.btn-primary {
    background: #1a5aa0;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 13px 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    font-family: 'IBM Plex Sans', sans-serif;
    transition: background 0.2s, transform 0.15s;
    letter-spacing: -0.1px;
}
.btn-primary:hover { background: #0f4c81; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 2px;
    transition: color 0.2s, border-color 0.2s;
}
.btn-ghost:hover { color: white; border-color: rgba(255,255,255,0.5); }

/* Pilares */
.pillars {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.pillar {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 20px;
    transition: background 0.2s;
}
.pillar:hover { background: rgba(255, 255, 255, 0.09); }

.pillar-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}
.icon-blue  { background: rgba(126, 200, 245, 0.15); }
.icon-green { background: rgba(74, 222, 128, 0.15); }
.icon-amber { background: rgba(239, 159, 39, 0.15); }

.pillar h4 {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 7px;
}

.pillar p {
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.6;
    margin: 0;
}

/* Separador entre secciones */
.metrics-section,
.benefits-section {
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

/* ══════════════════════════════════
   SECCIÓN B — MÉTRICAS + FLUJO
══════════════════════════════════ */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.metric-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 24px 20px;
    text-align: center;
    transition: background 0.2s;
}
.metric-card:hover { background: rgba(255, 255, 255, 0.09); }

.metric-featured {
    background: rgba(26, 90, 160, 0.25);
    border-color: rgba(26, 90, 160, 0.5);
}

.metric-num {
    font-size: 36px;
    font-weight: 600;
    color: #7ec8f5;
    line-height: 1;
    margin-bottom: 8px;
    letter-spacing: -1px;
}

.metric-lbl {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 6px;
}

.metric-desc {
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.38);
    line-height: 1.5;
}

/* Flujo */
.flow {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
    align-items: stretch;
    gap: 0;
}

.flow-step {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 20px 16px;
    text-align: center;
    transition: background 0.2s;
}
.flow-step:hover { background: rgba(255, 255, 255, 0.09); }

.flow-num {
    font-size: 11px;
    font-weight: 600;
    color: #7ec8f5;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.flow-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.flow-step h5 {
    font-size: 13px;
    font-weight: 600;
    color: white;
    margin: 0 0 5px;
}

.flow-step p {
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.5;
    margin: 0;
}

.flow-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.2);
    font-size: 22px;
    padding: 0 8px;
}

/* ══════════════════════════════════
   SECCIÓN C — BENEFICIOS + CTA
══════════════════════════════════ */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 40px;
}

.benefit-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 22px 20px;
    transition: background 0.2s;
}
.benefit-card:hover { background: rgba(255, 255, 255, 0.09); }

.benefit-bar {
    height: 3px;
    width: 36px;
    border-radius: 2px;
    margin-bottom: 14px;
}

.benefit-card h4 {
    font-size: 14px;
    font-weight: 600;
    color: white;
    margin: 0 0 8px;
}

.benefit-card p {
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.65;
    margin: 0;
}

/* CTA block */
.cta-block {
    background: rgba(26, 90, 160, 0.2);
    border: 1px solid rgba(26, 90, 160, 0.4);
    border-radius: 16px;
    padding: 32px 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 60px;
}

.cta-text h3 {
    font-size: 18px;
    font-weight: 600;
    color: white;
    margin: 0 0 6px;
    letter-spacing: -0.2px;
}

.cta-text p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

/* Footer */
.page-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.25);
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-wrap: wrap;
    gap: 8px;
}

/* ══════════════════════════════════
   ANIMACIONES
══════════════════════════════════ */
@keyframes pulse-dot {
    0%   { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5); }
    60%  { box-shadow: 0 0 0 5px rgba(74, 222, 128, 0); }
    100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

/* ══════════════════════════════════
   WIDGET CHATBOT (fijo)
══════════════════════════════════ */
.chat-launcher {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 58px;
    height: 58px;
    background: #1a5aa0;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(26, 90, 160, 0.55);
    transition: transform 0.25s, box-shadow 0.25s;
    z-index: 1000;
}
.chat-launcher:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 28px rgba(26, 90, 160, 0.7);
}

.chat-window {
    position: fixed;
    bottom: 96px;
    right: 24px;
    width: 370px;
    height: 520px;
    background: white;
    border-radius: 18px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.1);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000;
    animation: slideUp 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.chat-header {
    background: linear-gradient(135deg, #1a3a5c 0%, #0f4c81 100%);
    color: white;
    padding: 16px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.header-info h3 {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.2px;
}

.status {
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.78);
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-dot {
    width: 7px;
    height: 7px;
    background: #4ade80;
    border-radius: 50%;
    display: inline-block;
    animation: pulse-dot 2.2s infinite;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

#admin-btn {
    cursor: pointer;
    font-size: 16px;
    opacity: 0.75;
    transition: transform 0.25s, opacity 0.2s;
}
#admin-btn:hover { transform: rotate(35deg); opacity: 1; }

.close-btn {
    cursor: pointer;
    font-size: 15px;
    opacity: 0.75;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, opacity 0.2s;
}
.close-btn:hover { background: rgba(255,255,255,0.15); opacity: 1; }

.chat-messages {
    flex: 1;
    padding: 18px 16px;
    overflow-y: auto;
    background: #c8d6e8;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: #cfd8e3; border-radius: 4px; }

.message {
    padding: 10px 14px;
    border-radius: 14px;
    max-width: 82%;
    font-size: 13.5px;
    line-height: 1.5;
    word-break: break-word;
    overflow-wrap: break-word;
    text-align: left;
}

.bot-msg {
    background: #eaf0f8;
    color: #1e2d3d;
    align-self: flex-start;
    border-bottom-left-radius: 3px;
    border: none;
    box-shadow: none;
}

.user-msg {
    background: #1a3a5c;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 3px;
    margin-left: auto;
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 11px 15px;
    background: #eaf0f8;
    border-radius: 14px;
    border-bottom-left-radius: 3px;
    border: none;
    align-self: flex-start;
    width: fit-content;
    box-shadow: none;
}

.typing-indicator span {
    width: 7px;
    height: 7px;
    background: #8fa0b5;
    border-radius: 50%;
    display: inline-block;
    animation: typing-bounce 1.2s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) { animation-delay: 0s; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-bounce {
    0%, 60%, 100% { transform: translateY(0); background: #8fa0b5; }
    30%            { transform: translateY(-6px); background: #1a3a5c; }
}

.chat-input-area {
    padding: 12px 14px;
    background: #dce8f2;
    border-top: 1px solid #b8ccde;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
}

.chat-input-area input {
    flex: 1;
    padding: 10px 16px;
    border-radius: 22px;
    border: 1px solid #b8ccde;
    background: #eaf0f8;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 13px;
    color: #1e2d3d;
    outline: none;
    transition: border 0.25s, background 0.25s;
}
.chat-input-area input::placeholder { color: #7a96ae; }
.chat-input-area input:focus { border-color: #1a5aa0; background: #f4f8fc; }

.chat-input-area button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #1a3a5c;
    color: white;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.15s;
    line-height: 1;
}
.chat-input-area button:hover { background: #0f4c81; transform: scale(1.08); }
.chat-input-area button:active { transform: scale(0.96); }

/* ══════════════════════════════════
   RESPONSIVE
══════════════════════════════════ */
@media (max-width: 700px) {
    .section { padding: 60px 24px; }
    .hero-title { font-size: 32px; }
    .pillars { grid-template-columns: 1fr; }
    .metrics-grid { grid-template-columns: 1fr; }
    .flow { grid-template-columns: 1fr; }
    .flow-arrow { display: none; }
    .benefits-grid { grid-template-columns: 1fr; }
    .cta-block { flex-direction: column; text-align: center; }
    .chat-window { width: calc(100vw - 32px); right: 16px; }
}