/* =============================================
   course.css — Estilos para páginas de curso
   Aprendepor10k
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700;800&display=swap');

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --indigo:     #4f46e5;
    --violet:     #7c3aed;
    --pink:       #ec4899;
    --amber:      #f59e0b;
    --green:      #10b981;
    --dark:       #0f0e17;
    --surface:    #1a1830;
    --card-bg:    #ffffff;
    --text:       #1e1b3a;
    --muted:      #6b7280;
    --light-bg:   #f5f3ff;
    --radius:     18px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Outfit', 'Segoe UI', sans-serif;
    background: #faf9fe;
    color: var(--text);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

/* ── Tipografía global ── */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', 'Segoe UI', sans-serif;
    font-weight: 800;
    color: var(--text);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

p {
    font-family: 'Outfit', 'Segoe UI', sans-serif;
    font-size: 0.97rem;
    color: var(--muted);
    line-height: 1.65;
}

a {
    font-family: 'Outfit', 'Segoe UI', sans-serif;
}

ul, li {
    font-family: 'Outfit', 'Segoe UI', sans-serif;
}

strong {
    font-weight: 700;
    color: var(--text);
}

/* ── Navbar de curso ── */
.course-nav {
    background: #0a0918;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}

.course-nav-logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 800;
    color: white;
    text-decoration: none;
    letter-spacing: -0.01em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.nav-profile-img {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.course-nav-logo em {
    font-style: normal;
    background: linear-gradient(90deg, #a78bfa, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.course-nav-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    transition: color 0.2s ease;
}

.course-nav-back:hover {
    color: rgba(255,255,255,0.9);
}

/* ── Hero del curso ── */
.course-hero {
    background: linear-gradient(135deg, #0f0e17 0%, #1a1254 40%, #2d1b69 100%);
    padding: 44px 24px 48px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.course-hero::before {
    content: '';
    position: absolute;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(79,70,229,0.4) 0%, transparent 70%);
    top: -150px; right: -100px;
    border-radius: 50%;
    pointer-events: none;
}

.course-hero-inner {
    position: relative;
    z-index: 2;
    max-width: 700px;
    margin: 0 auto;
}

.course-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #f8d548;
    background: rgba(248,213,72,0.12);
    border: 1px solid rgba(248,213,72,0.28);
    padding: 4px 14px;
    border-radius: 50px;
    margin-bottom: 16px;
}

.course-hero-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 14px;
}

.course-hero h1 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 800;
    color: white;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 12px;
}

.course-hero-desc {
    font-size: 0.97rem;
    color: rgba(255,255,255,0.6);
    max-width: 520px;
    margin: 0 auto;
    font-weight: 300;
    line-height: 1.65;
}

/* ── Info bar ── */
.info-bar {
    background: white;
    border-bottom: 1px solid rgba(124,58,237,0.1);
    padding: 0;
}

.info-bar-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    justify-content: center;
}

.info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 18px 28px;
    border-right: 1px solid rgba(124,58,237,0.08);
    gap: 3px;
    flex: 1;
    min-width: 140px;
}

.info-item:last-child {
    border-right: none;
}

.info-item-icon {
    font-size: 1.3rem;
}

.info-item-value {
    font-size: 1rem;
    font-weight: 700;
    color: #1e1b3a;
    font-family: 'Outfit', sans-serif;
}

.info-item-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #9ca3af;
}

/* ── Layout principal del curso ── */
.course-body {
    background: #faf9fe;
    padding: 52px 24px 72px;
}

.course-layout {
    max-width: 960px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
    align-items: start;
}

/* ── Sección de temas ── */
.course-main h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: #1e1b3a;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.course-main h2::before {
    content: '';
    display: block;
    width: 4px;
    height: 22px;
    background: linear-gradient(180deg, #7c3aed, #ec4899);
    border-radius: 4px;
}

.topics-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 32px;
}

.topics-list li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: white;
    border: 1px solid rgba(124,58,237,0.08);
    border-radius: 14px;
    padding: 16px 18px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    color: #374151;
    line-height: 1.5;
    transition: all 0.2s ease;
}

.topics-list li:hover {
    border-color: rgba(124,58,237,0.2);
    box-shadow: 0 4px 16px rgba(124,58,237,0.08);
    transform: translateX(3px);
}

.topic-num {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    background: linear-gradient(135deg, #7c3aed, #ec4899);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Sidebar ── */
.course-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-card {
    background: white;
    border: 1px solid rgba(124,58,237,0.1);
    border-radius: 18px;
    padding: 22px 20px;
    box-shadow: 0 4px 20px rgba(79,70,229,0.06);
}

.sidebar-card h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e1b3a;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.sidebar-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.88rem;
    color: #4b5563;
    line-height: 1.45;
    font-family: 'Outfit', sans-serif;
}

.sidebar-list li::before {
    content: '✓';
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    background: rgba(16,185,129,0.12);
    color: #10b981;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

.sidebar-list li.warn::before {
    content: '!';
    background: rgba(245,158,11,0.12);
    color: #d97706;
}

.sidebar-list li.info::before {
    content: 'i';
    background: rgba(79,70,229,0.1);
    color: #7c3aed;
    font-style: italic;
}

/* ── Precio destacado en sidebar ── */
.price-sidebar {
    background: linear-gradient(135deg, #f5f3ff 0%, #fdf2f8 100%);
    border: 2px solid rgba(124,58,237,0.18);
    text-align: center;
}

.price-sidebar .big-price {
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, #7c3aed, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    line-height: 1;
    margin-bottom: 4px;
}

.price-sidebar .price-note {
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 16px;
    display: block;
}

/* ── CTA en sidebar ── */
.btn-whatsapp-course {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 20px;
    background: #25d366;
    color: white;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 4px 16px rgba(37,211,102,0.3);
}

.btn-whatsapp-course:hover {
    background: #20ba5a;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37,211,102,0.35);
}

.btn-mail-course {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px 20px;
    background: transparent;
    color: #7c3aed;
    font-family: 'Outfit', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    border: 1.5px solid rgba(124,58,237,0.3);
    transition: all 0.25s ease;
    margin-top: 10px;
}

.btn-mail-course:hover {
    background: rgba(124,58,237,0.06);
    border-color: rgba(124,58,237,0.5);
}

/* ── Nota al pie ── */
.course-note {
    background: rgba(245,158,11,0.07);
    border: 1px solid rgba(245,158,11,0.2);
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 0.82rem;
    color: #92400e;
    font-family: 'Outfit', sans-serif;
    line-height: 1.55;
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.course-note-icon {
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ── Footer ── */
.course-footer {
    background: #0a0918;
    color: rgba(255,255,255,0.35);
    text-align: center;
    padding: 20px 16px;
    font-size: 0.82rem;
    font-family: 'Outfit', sans-serif;
}

.course-footer strong {
    color: rgba(255,255,255,0.6);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .course-layout {
        grid-template-columns: 1fr;
    }

    .course-sidebar {
        order: -1;
    }

    .info-bar-inner {
        padding: 0 12px;
    }

    .info-item {
        padding: 14px 16px;
        min-width: 100px;
    }

    .info-item-value {
        font-size: 0.9rem;
    }

    .course-body {
        padding: 36px 16px 56px;
    }
}

@media (max-width: 480px) {
    .course-hero {
        padding: 32px 16px 36px;
    }

    .info-bar-inner {
        flex-direction: column;
        gap: 0;
    }

    .info-item {
        border-right: none;
        border-bottom: 1px solid rgba(124,58,237,0.08);
        flex-direction: row;
        justify-content: flex-start;
        padding: 12px 16px;
    }

    .info-item:last-child {
        border-bottom: none;
    }

    .info-item-icon { font-size: 1.1rem; }

    .topics-list li {
        padding: 14px 14px;
    }
}

/* ==========================================================================
   Zapier Chatbot Widget Custom Floating Window
   ========================================================================== */
.zapier-chat-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    font-family: 'Outfit', 'Segoe UI', sans-serif;
}

.zapier-chat-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--indigo) 0%, var(--violet) 100%);
    color: #ffffff;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.zapier-chat-button:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 12px 28px rgba(124, 58, 237, 0.5);
}

.zapier-chat-button:active {
    transform: scale(0.95);
}

.zapier-chat-button svg {
    width: 28px;
    height: 28px;
    transition: transform 0.3s ease;
}

.zapier-chat-button.open svg {
    transform: rotate(90deg);
}

.zapier-chat-container {
    position: fixed;
    bottom: 96px;
    right: 24px;
    width: 380px;
    height: 600px;
    max-width: calc(100vw - 48px);
    max-height: calc(100vh - 140px);
    background: #ffffff;
    border-radius: var(--radius);
    box-shadow: 0 16px 48px rgba(15, 14, 23, 0.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.8) translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10000;
}

.zapier-chat-container.open {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.zapier-chat-header {
    background: linear-gradient(135deg, #0f0e17 0%, #1a1254 100%);
    color: #ffffff;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.zapier-chat-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.zapier-chat-status-dot {
    width: 8px;
    height: 8px;
    background-color: var(--green);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px var(--green);
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.zapier-chat-header h4 {
    color: #ffffff;
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.zapier-chat-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.zapier-chat-close:hover {
    color: #ffffff;
}

.zapier-chat-iframe {
    width: 100%;
    flex: 1;
    border: none;
    background: #ffffff;
}

/* Responsivo para móviles */
@media (max-width: 480px) {
    .zapier-chat-container {
        bottom: 0;
        right: 0;
        width: 100vw;
        height: 100vh;
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0;
        transform: translateY(100%);
    }
    .zapier-chat-container.open {
        transform: translateY(0);
    }
    .zapier-chat-button {
        bottom: 16px;
        right: 16px;
    }
}
