:root {
    --primary: #6b21a8;
    --primary-hover: #581c87;
    --accent-yellow: #fde047;
    --accent-gold: #f59e0b;
    --whatsapp: #25d366;
    --whatsapp-hover: #1ebd59;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --text-slate: #334155;
    --border-light: #e2e8f0;
    --card-bg: #ffffff;
    --radius-card: 18px;
    --radius-pill: 50px;
    --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.1);
    --shadow-hover: 0 18px 40px rgba(15, 23, 42, 0.16);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #fef08a 0%, #d8b4fe 45%, #581c87 100%) !important;
    background-attachment: fixed !important;
    color: var(--text-dark);
    min-height: 100vh;
    padding-bottom: 50px;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* -------------------------------------------------------------
   BARRA DE NAVEGACIÓN (Limpia, Blanca y Flotante)
------------------------------------------------------------- */
.navbar {
    position: sticky;
    top: 16px;
    z-index: 1000;
    max-width: 1200px;
    margin: 16px auto 32px auto;
    padding: 0 20px;
}

.navbar-container {
    background: #ffffff !important;
    border-radius: var(--radius-pill) !important;
    padding: 10px 24px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12) !important;
    border: 1px solid var(--border-light) !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.navbar-logo {
    width: 38px;
    height: 38px;
}

.navbar-title {
    font-size: 20px;
    font-weight: 800;
    color: #4c1d95;
}

.navbar-title span {
    color: #d97706;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 14px;
    list-style: none;
    flex-wrap: wrap;
}

.navbar-nav a {
    color: var(--text-slate);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.navbar-nav a:hover,
.navbar-nav a.active {
    color: #ffffff;
    background: #6b21a8;
}

/* -------------------------------------------------------------
   TITULOS DE SECCIÓN
------------------------------------------------------------- */
.section-header {
    text-align: center;
    margin: 40px 0 28px 0;
}

.section-header h2 {
    font-size: 28px;
    font-weight: 800;
    color: #4c1d95;
    background: #ffffff !important;
    display: inline-block;
    padding: 10px 30px;
    border-radius: var(--radius-pill);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid var(--border-light) !important;
}

.section-header p {
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    font-size: 16px;
    margin-top: 10px;
    font-weight: 600;
}

/* -------------------------------------------------------------
   BOTONES
------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.btn-primary {
    background: #6b21a8;
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(107, 33, 168, 0.25);
}

.btn-primary:hover {
    background: #581c87;
    transform: translateY(-2px);
}

.btn-accent {
    background: #f59e0b;
    color: #ffffff;
}

.btn-accent:hover {
    background: #d97706;
}

.btn-whatsapp {
    background: #25d366 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    padding: 12px 20px !important;
    border-radius: 12px !important;
    text-decoration: none !important;
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.3) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.btn-whatsapp:hover {
    background: #1ebd59 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 22px rgba(37, 211, 102, 0.4) !important;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 13px;
    border-radius: 8px;
}

.btn-outline {
    background: #ffffff;
    border: 1px solid var(--border-light);
    color: var(--text-dark);
}

.btn-outline:hover {
    background: #f8fafc;
}

.btn-danger {
    background: #fee2e2;
    color: #dc2626;
}

.btn-secondary {
    background: #e2e8f0;
    color: #334155;
}

/* -------------------------------------------------------------
   HERO SLIDER (Tarjeta Blanca Limpia)
------------------------------------------------------------- */
.hero-slider-card {
    background: #ffffff !important;
    border-radius: var(--radius-card) !important;
    padding: 12px !important;
    box-shadow: var(--shadow-soft) !important;
    border: 1px solid var(--border-light) !important;
    margin-bottom: 36px;
}

.hero-slider {
    position: relative;
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
    background: #0f172a;
}

.slider-container {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

.slide {
    min-width: 100%;
}

.slide img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    display: block;
}

.slider-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 14px;
    pointer-events: none;
}

.slider-btn {
    pointer-events: auto;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.75);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-btn:hover {
    background: #6b21a8;
}

.slider-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
}

.dot.active {
    background: #fde047;
    width: 28px;
    border-radius: 6px;
}

/* -------------------------------------------------------------
   NOSOTROS (4 Tarjetas Blancas Espaciosas con Sombras)
------------------------------------------------------------- */
.features-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
    gap: 24px !important;
    margin-bottom: 44px !important;
}

.feature-card {
    background: #ffffff !important;
    border-radius: var(--radius-card) !important;
    padding: 28px 22px !important;
    box-shadow: var(--shadow-soft) !important;
    border: 1px solid var(--border-light) !important;
    text-align: center !important;
    transition: all 0.25s ease !important;
}

.feature-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: var(--shadow-hover) !important;
    border-color: #c084fc !important;
}

.feature-icon {
    font-size: 38px !important;
    margin-bottom: 12px !important;
    display: inline-block !important;
    background: #f3e8ff !important;
    width: 70px !important;
    height: 70px !important;
    line-height: 70px !important;
    border-radius: 50% !important;
}

.feature-card h3 {
    font-size: 18px !important;
    font-weight: 800 !important;
    color: #4c1d95 !important;
    margin-bottom: 8px !important;
}

.feature-card p {
    font-size: 14px !important;
    color: var(--text-slate) !important;
    line-height: 1.6 !important;
}

/* -------------------------------------------------------------
   FILTROS (Tarjeta Blanca Limpia)
------------------------------------------------------------- */
.filter-box {
    background: #ffffff !important;
    border-radius: var(--radius-card) !important;
    padding: 18px 24px !important;
    border: 1px solid var(--border-light) !important;
    box-shadow: var(--shadow-soft) !important;
    margin-bottom: 32px !important;
}

.toolbar {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.toolbar input,
.toolbar select,
.form-group input,
.form-group select,
.form-group textarea {
    padding: 11px 16px;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    font-size: 14px;
    color: var(--text-dark);
    background-color: #ffffff;
}

.toolbar input:focus,
.toolbar select:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #6b21a8;
    box-shadow: 0 0 0 3px rgba(107, 33, 168, 0.12);
}

/* -------------------------------------------------------------
   GRID DE CURSOS (Tarjetas Blancas Elegantes)
------------------------------------------------------------- */
.courses-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)) !important;
    gap: 28px !important;
    margin-bottom: 48px !important;
}

.course-card {
    background: #ffffff !important;
    border-radius: var(--radius-card) !important;
    overflow: hidden !important;
    box-shadow: var(--shadow-soft) !important;
    border: 1px solid var(--border-light) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    transition: all 0.25s ease !important;
}

.course-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: var(--shadow-hover) !important;
    border-color: #a855f7 !important;
}

.course-img-thumb {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    border-bottom: 1px solid var(--border-light);
}

.course-card-body {
    padding: 24px !important;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.course-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.course-category {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    color: #6b21a8;
    background: #f3e8ff;
    padding: 4px 12px;
    border-radius: 20px;
}

.course-code {
    font-size: 12px;
    color: var(--text-muted);
    font-family: monospace;
    font-weight: 700;
}

.course-title {
    font-size: 19px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
    line-height: 1.35;
}

.course-desc {
    font-size: 14px;
    color: var(--text-slate);
    margin-bottom: 20px;
    line-height: 1.55;
    flex-grow: 1;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
    margin-bottom: 18px;
}

.course-price {
    font-size: 26px;
    font-weight: 800;
    color: #4c1d95;
}

.course-spots {
    font-size: 13px;
    font-weight: 700;
}

/* -------------------------------------------------------------
   CONTACTO (Tarjetas Blancas)
------------------------------------------------------------- */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 28px;
    margin-bottom: 48px;
}

.contact-subbox {
    background: #ffffff !important;
    border-radius: var(--radius-card) !important;
    padding: 32px !important;
    border: 1px solid var(--border-light) !important;
    box-shadow: var(--shadow-soft) !important;
}

/* -------------------------------------------------------------
   ADMIN DASHBOARD & FORMULARIOS
------------------------------------------------------------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: #ffffff !important;
    border-radius: var(--radius-card) !important;
    padding: 24px !important;
    box-shadow: var(--shadow-soft) !important;
    border: 1px solid var(--border-light) !important;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 800;
}

.stat-val {
    font-size: 32px;
    font-weight: 800;
    margin-top: 6px;
    color: #4c1d95;
}

.panel {
    background: #ffffff !important;
    border-radius: var(--radius-card) !important;
    overflow: hidden;
    box-shadow: var(--shadow-soft) !important;
    border: 1px solid var(--border-light) !important;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: #ffffff;
}

th {
    background: #f8fafc;
    padding: 16px 20px;
    text-align: left;
    font-weight: 800;
    color: #475569;
    border-bottom: 2px solid var(--border-light);
    text-transform: uppercase;
    font-size: 12px;
}

td {
    padding: 18px 20px;
    border-bottom: 1px solid #f1f5f9;
}

tr:hover td {
    background: #f8fafc;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 800;
}

.badge-activo { background: #dcfce7; color: #15803d; }
.badge-inactivo { background: #f1f5f9; color: #64748b; }
.badge-agotado { background: #fee2e2; color: #b91c1c; }

.card {
    max-width: 650px;
    margin: 30px auto;
    background: #ffffff !important;
    padding: 36px !important;
    border-radius: var(--radius-card) !important;
    box-shadow: var(--shadow-soft) !important;
    border: 1px solid var(--border-light) !important;
}

.alert-error { background: #fee2e2; border-left: 4px solid #ef4444; color: #991b1b; padding: 14px; border-radius: 10px; margin-bottom: 20px; }
.alert-success { background: #dcfce7; border-left: 4px solid #22c55e; color: #166534; padding: 14px; border-radius: 10px; margin-bottom: 20px; }

footer {
    text-align: center;
    padding: 30px 0 10px 0;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    font-size: 14px;
    font-weight: 600;
}
