:root {
    --blue: #3b82f6;
    --blue-dark: #2563eb;
    --blue-light: #eff6ff;
    --green: #10b981;
    --green-light: #ecfdf5;
    --red: #ef4444;
    --red-light: #fef2f2;
    --amber: #f59e0b;
    --amber-light: #fffbeb;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-500: #64748b;
    --gray-700: #334155;
    --gray-900: #0f172a;
    --white: #ffffff;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
    --shadow-lg: 0 4px 6px rgba(0,0,0,.07), 0 10px 40px rgba(0,0,0,.10);
}

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

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--gray-50);
    color: var(--gray-700);
    line-height: 1.6;
    font-size: 15px;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Header ── */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 8px rgba(0,0,0,.06);
}
.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--gray-900);
    text-decoration: none;
}
.site-logo img { height: 36px; }
.header-nav a {
    color: var(--gray-500);
    font-size: 0.875rem;
    font-weight: 500;
    margin-left: 20px;
}
.header-nav a:hover { color: var(--blue); text-decoration: none; }

/* ── Hero ── */
.hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #1e40af 100%);
    color: white;
    padding: 72px 24px 60px;
    text-align: center;
}
.hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.2;
}
.hero p {
    font-size: 1.1rem;
    opacity: 0.85;
    max-width: 560px;
    margin: 0 auto;
}

/* ── Container ── */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Section ── */
.section { padding: 56px 0; }
.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}
.section-subtitle {
    color: var(--gray-500);
    margin-bottom: 36px;
}

/* ── Course Card ── */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 28px;
}
.course-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}
.course-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}
.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, #1e3a5f, #2563eb);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}
.card-image img { width: 100%; height: 200px; object-fit: cover; }
.card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.card-category {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--blue);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}
.card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 10px;
    line-height: 1.4;
}
.card-desc {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 20px;
    flex: 1;
    white-space: pre-line;
}
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    font-size: 0.8rem;
    color: var(--gray-500);
}
.meta-item { display: flex; align-items: center; gap: 5px; }
.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--gray-100);
}
.card-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--gray-900);
}
.card-price span { font-size: 0.8rem; font-weight: 400; color: var(--gray-500); }

/* ── Cupos badge ── */
.cupos-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.cupos-ok { background: var(--green-light); color: #065f46; }
.cupos-low { background: var(--amber-light); color: #92400e; }
.cupos-full { background: var(--red-light); color: #991b1b; }

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.18s;
    text-decoration: none;
    font-family: inherit;
}
.btn-primary {
    background: var(--blue);
    color: white;
}
.btn-primary:hover { background: var(--blue-dark); color: white; text-decoration: none; }
.btn-primary:disabled { background: var(--gray-300); cursor: not-allowed; }
.btn-success { background: var(--green); color: white; }
.btn-success:hover { background: #059669; color: white; text-decoration: none; }
.btn-outline {
    background: transparent;
    border: 1.5px solid var(--gray-300);
    color: var(--gray-700);
}
.btn-outline:hover { border-color: var(--blue); color: var(--blue); text-decoration: none; }
.btn-lg { padding: 13px 28px; font-size: 1rem; }
.btn-full { width: 100%; }

/* ── Form ── */
.form-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 36px;
    max-width: 680px;
    margin: 0 auto;
}
.form-title { font-size: 1.4rem; font-weight: 700; color: var(--gray-900); margin-bottom: 6px; }
.form-subtitle { color: var(--gray-500); font-size: 0.9rem; margin-bottom: 28px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--gray-200);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--gray-900);
    background: var(--white);
    transition: border-color 0.15s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}
.form-group textarea { resize: vertical; min-height: 80px; }

/* Payment tabs */
.pay-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}
.pay-tab {
    flex: 1;
    padding: 14px;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.18s;
    background: var(--white);
}
.pay-tab:hover { border-color: var(--blue); color: var(--blue); }
.pay-tab.active { border-color: var(--blue); background: var(--blue-light); color: var(--blue); }

.transfer-info {
    background: var(--gray-50);
    border: 1.5px solid var(--gray-200);
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 16px;
    font-size: 0.875rem;
}
.transfer-info .ti-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid var(--gray-200);
}
.transfer-info .ti-row:last-child { border-bottom: none; }
.transfer-info .ti-label { color: var(--gray-500); }
.transfer-info .ti-value { font-weight: 600; color: var(--gray-900); }

/* Checkbox consent */
.consent-box {
    background: #eff6ff;
    border: 1.5px solid #bfdbfe;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 18px;
}
.consent-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--gray-700);
}
.consent-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--blue);
}

/* Alert */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-bottom: 16px;
}
.alert-error { background: var(--red-light); color: #991b1b; border: 1px solid #fecaca; }
.alert-success { background: var(--green-light); color: #065f46; border: 1px solid #a7f3d0; }
.alert-info { background: var(--blue-light); color: #1e40af; border: 1px solid #bfdbfe; }
.alert-warning { background: var(--amber-light); color: #92400e; border: 1px solid #fde68a; }

/* ── Quiz ── */
.quiz-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px;
    max-width: 720px;
    margin: 0 auto;
}
.question-block { margin-bottom: 32px; }
.question-text {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 14px;
    line-height: 1.5;
}
.options-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.option-item label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border: 1.5px solid var(--gray-200);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 0.9rem;
}
.option-item label:hover { border-color: var(--blue); background: var(--blue-light); }
.option-item input[type="radio"]:checked + label,
.option-item label:has(input:checked) {
    border-color: var(--blue);
    background: var(--blue-light);
}

/* ── Verificar ── */
.verify-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px;
    max-width: 560px;
    margin: 60px auto;
    text-align: center;
}
.cert-result {
    margin-top: 24px;
    padding: 24px;
    border-radius: 10px;
}
.cert-aprobacion { background: var(--green-light); border: 2px solid #a7f3d0; }
.cert-asistencia { background: var(--blue-light); border: 2px solid #bfdbfe; }

/* ── Footer ── */
.site-footer {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: 32px 24px;
    text-align: center;
    font-size: 0.85rem;
}
.site-footer a { color: var(--gray-300); }

/* ── Responsive ── */
@media (max-width: 640px) {
    .hero { padding: 48px 20px 40px; }
    .form-row { grid-template-columns: 1fr; }
    .pay-tabs { flex-direction: column; }
    .form-card { padding: 24px 20px; }
    .courses-grid { grid-template-columns: 1fr; }
}
