/* ══════════════════════════════════════════════════════════
   CSS Personalizado — Cecilia Cabrera
   Paleta monocromática — blanco, negro y tonalidades grises
   ══════════════════════════════════════════════════════════ */

/* ── Variables de marca (B&W) ────────────────────────────── */
:root {
    --brand-brown:  #1A1A1A;   /* gris muy oscuro */
    --brand-gold:   #C8C8C8;   /* gris claro — acento sobre fondos oscuros */
    --brand-dark:   #080808;   /* negro profundo */
    --brand-cream:  #F5F5F5;   /* gris muy claro — fondo claro */
    --brand-muted:  #6E6E6E;   /* gris medio — texto secundario */
    --brand-border: #E2E2E2;   /* gris suave — bordes */
}

/* ── Base ────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
    font-family: 'Libre Bodoni', Georgia, serif;
    background-color: var(--brand-cream);
    color: var(--brand-dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Tipografía ──────────────────────────────────────────── */
.font-serif { font-family: 'Libre Bodoni', Georgia, serif; }

/* ── Navbar ──────────────────────────────────────────────── */
#navbar {
    transition: background-color .35s ease, box-shadow .35s ease;
}
#navbar.scrolled {
    background-color: var(--brand-dark) !important;
    box-shadow: 0 2px 24px rgba(0,0,0,.35);
}

/* ── Hero ────────────────────────────────────────────────── */
.hero-section {
    background: linear-gradient(150deg, #080808 0%, #1A1A1A 50%, #080808 100%);
    position: relative;
    overflow: hidden;
}
.hero-texture {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23FFFFFF' fill-opacity='0.03' fill-rule='evenodd'%3E%3Cpath d='M0 0h40v40H0V0zm40 40h40v40H40V40zm0-40h2l-2 2V0zm0 4l4-4h2l-6 6V4zm0 4l8-8h2L40 10V8zm0 4L52 0h2L40 14v-2zm0 4L56 0h2L40 18v-2zm0 4L60 0h2L40 22v-2zm0 4L64 0h2L40 26v-2zm0 4L68 0h2L40 30v-2zm0 4L72 0h2L40 34v-2zm0 4L76 0h2L40 38v-2zm0 4L80 0v2L42 40h-2zm4 0L80 4v2L46 40h-2zm4 0L80 8v2L50 40h-2zm4 0l28-28v2L54 40h-2zm4 0l24-24v2L58 40h-2zm4 0l20-20v2L62 40h-2zm4 0l16-16v2L66 40h-2zm4 0l12-12v2L70 40h-2zm4 0l8-8v2l-6 6h-2zm4 0l4-4v2l-2 2h-2z'/%3E%3C/g%3E%3C/svg%3E");
    opacity: .6;
}
.hero-glow {
    position: absolute;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,.05) 0%, transparent 70%);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* ── Divisor de marca ────────────────────────────────────── */
.brand-divider {
    width: 56px; height: 3px;
    background: linear-gradient(90deg, var(--brand-gold), var(--brand-brown));
    border-radius: 2px;
    display: inline-block;
}

/* ── Botones ─────────────────────────────────────────────── */
.btn-gold {
    background-color: #0A0A0A;
    color: #FFFFFF;
    font-weight: 600;
    letter-spacing: .4px;
    transition: background-color .2s ease, transform .15s ease, box-shadow .2s ease;
    display: inline-flex; align-items: center; gap: .5rem;
}
.btn-gold:hover {
    background-color: #2D2D2D;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,.3);
}
.btn-gold:active { transform: translateY(0); }

.btn-outline-gold {
    border: 2px solid var(--brand-gold);
    color: var(--brand-gold);
    font-weight: 600;
    transition: all .2s ease;
    display: inline-flex; align-items: center; gap: .5rem;
}
.btn-outline-gold:hover {
    background-color: var(--brand-gold);
    color: var(--brand-dark);
}

.btn-dark {
    background-color: var(--brand-dark);
    color: #fff;
    font-weight: 600;
    transition: background-color .2s ease, transform .15s ease;
}
.btn-dark:hover { background-color: #2D2D2D; transform: translateY(-1px); }

/* ── Cards ───────────────────────────────────────────────── */
.card-hover {
    transition: transform .25s ease, box-shadow .25s ease;
}
.card-hover:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(0,0,0,.12);
}

/* ── Inputs ──────────────────────────────────────────────── */
.form-input {
    border: 1.5px solid var(--brand-border);
    background: #fff;
    color: var(--brand-dark);
    transition: border-color .2s ease, box-shadow .2s ease;
    width: 100%;
    padding: .625rem .875rem;
    border-radius: .5rem;
    font-size: .9375rem;
}
.form-input:focus {
    outline: none;
    border-color: #0A0A0A;
    box-shadow: 0 0 0 3px rgba(10,10,10,.10);
}
.form-input::placeholder { color: #AAAAAA; }

/* ── Selector de cantidad ────────────────────────────────── */
.qty-btn {
    width: 38px; height: 38px;
    border: 1.5px solid var(--brand-border);
    background: #fff;
    font-weight: 700; font-size: 1.1rem;
    cursor: pointer;
    transition: all .15s ease;
    display: flex; align-items: center; justify-content: center;
    border-radius: .375rem;
}
.qty-btn:hover:not(:disabled) {
    background: #0A0A0A;
    border-color: #0A0A0A;
    color: #FFFFFF;
}
.qty-btn:disabled { opacity: .35; cursor: not-allowed; }

/* ── Video ───────────────────────────────────────────────── */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,.22);
}
.video-wrapper video {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    border-radius: 12px;
    object-fit: cover;
}

/* ── Badge del carrito ───────────────────────────────────── */
.cart-badge {
    position: absolute; top: -7px; right: -7px;
    background: #FFFFFF;
    color: #080808;
    font-size: 10px; font-weight: 700;
    width: 19px; height: 19px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}

/* ── Testimonial ─────────────────────────────────────────── */
.testimonial-card {
    border-left: 4px solid #1A1A1A;
    background: #fff;
    position: relative;
}
.testimonial-card::before {
    content: '\201C';
    position: absolute;
    top: -10px; left: 16px;
    font-size: 5rem; line-height: 1;
    font-family: 'Libre Bodoni', serif;
    color: #1A1A1A;
    opacity: .15;
}

/* ── Admin sidebar ───────────────────────────────────────── */
.admin-sidebar { background: var(--brand-dark); min-height: 100vh; }

.admin-nav-link {
    color: rgba(255,255,255,.65);
    transition: all .15s ease;
    padding: .6rem 1rem;
    border-radius: .5rem;
    display: flex; align-items: center; gap: .6rem;
    border-left: 3px solid transparent;
    font-size: .9rem;
}
.admin-nav-link:hover,
.admin-nav-link.active {
    color: #fff;
    background: rgba(255,255,255,.08);
    border-left-color: #C8C8C8;
}

/* ── Alertas flotantes ───────────────────────────────────── */
.alert-toast {
    position: fixed; top: 1.5rem; right: 1.5rem; z-index: 9999;
    padding: .875rem 1.25rem;
    border-radius: .625rem;
    box-shadow: 0 8px 24px rgba(0,0,0,.15);
    max-width: 22rem;
    font-size: .9rem; font-weight: 500;
    border-left: 4px solid;
    animation: slideInRight .3s ease;
}
.alert-toast.success { background:#f0fdf4; border-color:#22c55e; color:#15803d; }
.alert-toast.error   { background:#fef2f2; border-color:#ef4444; color:#b91c1c; }
.alert-toast.info    { background:#eff6ff; border-color:#3b82f6; color:#1d4ed8; }

/* ── Animaciones ─────────────────────────────────────────── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeOut {
    to { opacity: 0; transform: translateX(40px); }
}

.animate-fade-in-up { animation: fadeInUp .6s ease both; }
.anim-delay-1 { animation-delay: .1s; }
.anim-delay-2 { animation-delay: .2s; }
.anim-delay-3 { animation-delay: .3s; }
.anim-delay-4 { animation-delay: .4s; }

.on-scroll { opacity: 0; }
.on-scroll.visible { animation: fadeInUp .65s ease forwards; }

/* ── Scrollbar personalizada ─────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--brand-cream); }
::-webkit-scrollbar-thumb { background: var(--brand-muted); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--brand-brown); }

/* ── Sección stats ───────────────────────────────────────── */
.stats-bg {
    background: linear-gradient(135deg, #080808 0%, #1A1A1A 100%);
}

/* ── Lista del temario ───────────────────────────────────── */
.temario-item {
    display: flex; align-items: flex-start; gap: .75rem;
    padding: .6rem 0;
    border-bottom: 1px solid var(--brand-border);
}
.temario-item:last-child { border-bottom: none; }
.temario-dot {
    width: 8px; height: 8px;
    background: #1A1A1A;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: .45rem;
}

/* ── Tabla admin ─────────────────────────────────────────── */
.admin-table th {
    background: rgba(0,0,0,.04);
    font-weight: 600;
    font-size: .8rem;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: #1A1A1A;
    padding: .75rem 1rem;
}
.admin-table td { padding: .75rem 1rem; border-bottom: 1px solid #EEEEEE; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(0,0,0,.02); }

/* ── Badge de estado ─────────────────────────────────────── */
.badge {
    display: inline-flex; align-items: center;
    padding: .2rem .65rem;
    border-radius: 9999px;
    font-size: .75rem; font-weight: 600;
}
.badge-success  { background:#E8E8E8; color:#1A1A1A; }
.badge-pending  { background:#D4D4D4; color:#1A1A1A; }
.badge-danger   { background:#2D2D2D; color:#F5F5F5; }
.badge-inactive { background:#F0F0F0; color:#6E6E6E; }

/* ── Digin Perú Branding ─────────────────────────────────── */
.digin-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.digin-copyright {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.3);
}
.digin-dev {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.72rem;
    color: rgba(255,255,255,0.45);
}
.digin-footer--light .digin-copyright,
.digin-footer--light .digin-dev { color: var(--brand-muted); }
.digin-heart {
    color: #e74c3c;
    flex-shrink: 0;
    animation: digin-heartbeat 1.5s ease-in-out infinite;
}
@keyframes digin-heartbeat {
    0%, 100% { transform: scale(1); }
    25%       { transform: scale(1.25); }
    50%       { transform: scale(1); }
}
.digin-link { display: inline-block; text-decoration: none; }
.digin-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.38rem 0.9rem;
    background: linear-gradient(135deg, rgba(52,152,219,0.12), rgba(46,204,113,0.12));
    border-radius: 50px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.digin-pill::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
    transition: left 0.5s ease;
}
.digin-link:hover .digin-pill {
    border-color: #2ecc71;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(52,152,219,0.25);
}
.digin-link:hover .digin-pill::before { left: 100%; }
.digin-icon-circle {
    width: 26px; height: 26px;
    background: linear-gradient(135deg, #3498db, #2ecc71);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: transform 0.5s ease;
}
.digin-link:hover .digin-icon-circle { transform: rotate(360deg); }
.digin-text-block { display: flex; flex-direction: column; gap: 1px; }
.digin-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: white;
    letter-spacing: 0.3px;
    line-height: 1.1;
}
.digin-tagline {
    font-size: 0.58rem;
    color: rgba(255,255,255,0.55);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    line-height: 1;
}
.digin-footer--light .digin-name    { color: var(--brand-dark); }
.digin-footer--light .digin-tagline { color: var(--brand-muted); }
@media (max-width: 640px) {
    .digin-footer { flex-direction: column; text-align: center; align-items: center; }
}
