/* css/styles.css - Identidad Visual Sakura para Flores de Cerezo */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
    --sakura-bg: #fff9fb;
    --sakura-surface: #ffffff;
    --sakura-petal: #ffe4ec;
    --sakura-soft: #ffd1df;
    --sakura-medium: #f48fb1;
    --sakura-deep: #d85a7f;
    --sakura-darker: #b53d61;
    --text-main: #432832;
    --text-muted: #7d5c68;
    --border-pink: #f8cbd9;
    --success: #2e8b57;
    --danger: #d9435f;
    --shadow-soft: 0 10px 30px rgba(216, 90, 127, 0.10);
    --shadow-hover: 0 16px 36px rgba(216, 90, 127, 0.18);
    --radius-lg: 20px;
    --radius-md: 12px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--sakura-bg);
    color: var(--text-main);
    font-family: 'Plus Jakarta Sans', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, .logo-title {
    font-family: 'Cormorant Garamond', serif;
    letter-spacing: 0.3px;
}

/* HEADER & NAVBAR */
header {
    background: rgba(255, 249, 251, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-pink);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: var(--sakura-darker);
}

.brand-icon {
    font-size: 1.8rem;
}

.logo-title {
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--sakura-darker);
}

nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

nav a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

nav a:hover {
    color: var(--sakura-deep);
}

.auth-actions {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
}

/* BOTONES */
.btn {
    background: linear-gradient(135deg, var(--sakura-deep), var(--sakura-darker));
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
    box-shadow: 0 6px 18px rgba(216, 90, 127, 0.25);
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(216, 90, 127, 0.35);
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.btn-outline {
    background: var(--sakura-surface);
    color: var(--sakura-darker);
    border: 1.5px solid var(--sakura-medium);
    box-shadow: none;
}

.btn-outline:hover:not(:disabled) {
    background: var(--sakura-petal);
}

.btn-sm {
    padding: 0.48rem 1rem;
    font-size: 0.84rem;
}

.btn-danger {
    background: var(--danger);
    box-shadow: none;
}

.w-full {
    width: 100%;
}

/* HERO */
.hero {
    position: relative;
    padding: 5.5rem 1.5rem 4.5rem;
    text-align: center;
    background: radial-gradient(circle at top, #ffe0eb 0%, #fff5f8 55%, var(--sakura-bg) 100%);
    border-bottom: 1px solid var(--border-pink);
}

.hero-badge {
    display: inline-block;
    background: var(--sakura-petal);
    color: var(--sakura-darker);
    padding: 0.4rem 1.1rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
    border: 1px solid var(--border-pink);
}

.hero h1 {
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    color: var(--sakura-darker);
    line-height: 1.15;
    max-width: 780px;
    margin: 0 auto 1.1rem;
}

.hero p {
    font-size: 1.12rem;
    color: var(--text-muted);
    max-width: 630px;
    margin: 0 auto 2rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* SECCIONES */
section {
    max-width: 1180px;
    margin: 0 auto;
    padding: 4.5rem 1.5rem;
}

.section-header {
    text-align: center;
    margin-bottom: 2.8rem;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 2.7rem);
    color: var(--sakura-darker);
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* GRILLAS Y TARJETAS */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.75rem;
}

.card {
    background: var(--sakura-surface);
    border: 1px solid var(--border-pink);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.25s, box-shadow 0.25s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.card-cover {
    width: 100%;
    height: 195px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--sakura-petal), var(--sakura-soft));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.card-body {
    padding: 1.6rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
    gap: 1.2rem;
}

.card h3 {
    font-size: 1.55rem;
    color: var(--sakura-darker);
    margin-bottom: 0.45rem;
}

.card p {
    color: var(--text-muted);
    font-size: 0.94rem;
}

.badge-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.65rem;
}

.badge {
    font-size: 0.76rem;
    font-weight: 600;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    background: var(--sakura-petal);
    color: var(--sakura-darker);
}

.price-tag {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--sakura-deep);
    margin-bottom: 0.85rem;
}

/* CALENDARIO DE TURNOS INTERACTIVO */
.booking-wrapper {
    background: var(--sakura-surface);
    border: 1px solid var(--border-pink);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 2rem;
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 2.2rem;
}

.calendar-box {
    background: var(--sakura-bg);
    border: 1px solid var(--border-pink);
    border-radius: var(--radius-md);
    padding: 1.4rem;
}

.cal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.cal-header h3 {
    font-size: 1.4rem;
    color: var(--sakura-darker);
    text-transform: capitalize;
}

.cal-weekdays, .cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.4rem;
    text-align: center;
}

.cal-weekdays div {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    padding-bottom: 0.4rem;
}

.cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    background: #fff;
    color: var(--text-main);
    transition: all 0.18s;
}

.cal-day:hover:not(.disabled):not(.empty) {
    border-color: var(--sakura-deep);
    background: var(--sakura-petal);
}

.cal-day.selected {
    background: var(--sakura-deep);
    color: #fff;
}

.cal-day.disabled {
    background: #f5eef0;
    color: #c2aeb5;
    cursor: not-allowed;
    text-decoration: line-through;
}

.cal-day.empty {
    background: transparent;
    cursor: default;
}

.slots-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.8rem;
}

.slot-btn {
    padding: 0.55rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--border-pink);
    background: #fff;
    color: var(--text-main);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s;
}

.slot-btn:hover:not(:disabled) {
    background: var(--sakura-petal);
    border-color: var(--sakura-deep);
}

.slot-btn.selected {
    background: var(--sakura-deep);
    color: #fff;
    border-color: var(--sakura-deep);
}

.slot-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    text-decoration: line-through;
}

/* FORMULARIOS */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 0.72rem 0.95rem;
    border: 1px solid var(--border-pink);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    background: #fff;
    color: var(--text-main);
}

.form-control:focus {
    outline: none;
    border-color: var(--sakura-deep);
    box-shadow: 0 0 0 3px rgba(216, 90, 127, 0.15);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}

/* PANELES OCULTOS / VISTAS (MIS COMPRAS, AULA VIRTUAL, SUPER ADMIN) */
.hidden {
    display: none !important;
}

.panel-box {
    background: var(--sakura-surface);
    border: 1px solid var(--border-pink);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-soft);
    margin-bottom: 2rem;
}

.tabs {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 1.8rem;
    border-bottom: 1px solid var(--border-pink);
    padding-bottom: 1rem;
}

.tab-btn {
    padding: 0.6rem 1.2rem;
    border-radius: 999px;
    border: 1px solid var(--border-pink);
    background: var(--sakura-bg);
    color: var(--text-main);
    font-weight: 600;
    cursor: pointer;
}

.tab-btn.active {
    background: var(--sakura-deep);
    color: #fff;
    border-color: var(--sakura-deep);
}

/* AULA VIRTUAL DE CURSOS */
.classroom-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 1.5rem;
}

.module-list {
    background: var(--sakura-bg);
    border: 1px solid var(--border-pink);
    border-radius: var(--radius-md);
    padding: 1rem;
    max-height: 600px;
    overflow-y: auto;
}

.module-block {
    margin-bottom: 1rem;
}

.module-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--sakura-darker);
    margin-bottom: 0.45rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px dashed var(--border-pink);
}

.chapter-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-main);
    font-size: 0.88rem;
    cursor: pointer;
    margin-bottom: 0.25rem;
}

.chapter-item:hover, .chapter-item.active {
    background: var(--sakura-petal);
    color: var(--sakura-darker);
    font-weight: 600;
}

.video-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #1f1418;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 1rem;
}

.video-container iframe, .video-container video {
    width: 100%;
    height: 100%;
    border: none;
}

/* TABLAS ADMIN */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

th, td {
    padding: 0.85rem;
    text-align: left;
    border-bottom: 1px solid var(--border-pink);
}

th {
    background: var(--sakura-petal);
    color: var(--sakura-darker);
    font-weight: 700;
}

/* MODALES */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(67, 40, 50, 0.45);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 999;
}

.modal-card {
    background: var(--sakura-surface);
    border: 1px solid var(--border-pink);
    border-radius: var(--radius-lg);
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    box-shadow: var(--shadow-hover);
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.2rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
}

/* ALERTAS / NOTIFICACIONES */
.toast-banner {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: var(--sakura-darker);
    color: #fff;
    padding: 1rem 1.4rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-hover);
    z-index: 1200;
    max-width: 380px;
    font-size: 0.92rem;
}

/* FOOTER */
footer {
    background: linear-gradient(180deg, var(--sakura-petal) 0%, #ffd6e3 100%);
    border-top: 1px solid var(--border-pink);
    padding: 3.5rem 1.5rem 2.5rem;
    text-align: center;
    color: var(--text-main);
    margin-top: 3rem;
}

footer a {
    color: var(--sakura-darker);
    font-weight: 600;
    text-decoration: none;
}

@media (max-width: 860px) {
    .booking-wrapper, .classroom-layout {
        grid-template-columns: 1fr;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
}
