/* =========================================
   ACADEMIA - MUEBLES BELLEZA
   academia.css
   ========================================= */

/* ── Hero Banner ─────────────────────────────── */
.academia-hero {
    position: relative;
    width: 100%;
    min-height: 520px;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.academia-hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.academia-hero-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.academia-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        100deg,
        rgba(26,35,126,0.82) 0%,
        rgba(26,35,126,0.55) 55%,
        rgba(217,48,167,0.35) 100%
    );
}

.academia-hero-content {
    position: relative;
    z-index: 2;
    max-width: 680px;
    padding: 5rem 3rem 5rem 5rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.academia-hero-tag {
    display: inline-block;
    background: rgba(255,255,255,0.18);
    border: 1.5px solid rgba(255,255,255,0.35);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.35rem 1rem;
    border-radius: 50px;
    letter-spacing: 0.5px;
    backdrop-filter: blur(4px);
    width: fit-content;
}

.academia-hero-titulo {
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    font-weight: 900;
    color: #fff;
    margin: 0;
    line-height: 1.15;
    letter-spacing: -0.5px;
}

.academia-hero-titulo span {
    color: #ffd700;
}

.academia-hero-sub {
    color: rgba(255,255,255,0.88);
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0;
    max-width: 520px;
}

.academia-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(90deg, #ffd700, #ffaa00);
    color: #1a237e;
    font-size: 1rem;
    font-weight: 800;
    padding: 0.85rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    width: fit-content;
    box-shadow: 0 6px 20px rgba(255,215,0,0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    letter-spacing: 0.3px;
    margin-top: 0.4rem;
}

.academia-hero-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(255,215,0,0.55);
}

/* ── Stats ───────────────────────────────────── */
.academia-stats {
    display: flex;
    justify-content: center;
    gap: 0;
    background: linear-gradient(90deg, #1a237e 0%, #d930a7 100%);
    padding: 0;
    flex-wrap: wrap;
}

.stat-item {
    flex: 1 1 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 1.6rem 1.5rem;
    color: #fff;
    border-right: 1px solid rgba(255,255,255,0.15);
    transition: background 0.2s;
}

.stat-item:last-child {
    border-right: none;
}

.stat-item:hover {
    background: rgba(255,255,255,0.08);
}

.stat-num {
    font-size: 2.2rem;
    font-weight: 900;
    color: #ffd700;
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    opacity: 0.85;
    letter-spacing: 0.3px;
    text-align: center;
}

/* ── Main ────────────────────────────────────── */
.academia-main {
    max-width: 1320px;
    margin: 0 auto;
    padding: 4rem 1.5rem 5rem;
}

.academia-main-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.academia-main-header h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    font-weight: 900;
    color: #1a237e;
    margin: 0 0 0.8rem;
    letter-spacing: -0.5px;
}

.academia-main-header h2 span {
    color: #d930a7;
}

.academia-main-header p {
    color: #666;
    font-size: 1.1rem;
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ── Loading / Estados ───────────────────────── */
.ac-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 4rem;
    color: #888;
    font-size: 1.05rem;
}

.ac-spinner {
    width: 52px;
    height: 52px;
    border: 5px solid #e7eaf6;
    border-top: 5px solid #1a237e;
    border-right: 5px solid #d930a7;
    border-radius: 50%;
    animation: ac-spin 0.85s linear infinite;
}

@keyframes ac-spin {
    to { transform: rotate(360deg); }
}

.ac-error {
    text-align: center;
    padding: 3rem;
    background: #fff3f3;
    border-radius: 16px;
    color: #c00;
}

.ac-error button {
    margin-top: 1rem;
    padding: 0.6rem 1.5rem;
    background: #1a237e;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-family: inherit;
}

.ac-sin-datos {
    text-align: center;
    padding: 4rem;
    color: #aaa;
    font-size: 1.1rem;
}

/* ── Grid de cursos ──────────────────────────── */
.cursos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.2rem;
}

/* ── Tarjeta de curso ────────────────────────── */
.curso-card-ac {
    background: #fff;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 6px 32px rgba(26,35,126,0.10);
    border: 1.5px solid #eeeff8;
    cursor: pointer;
    transition: transform 0.26s cubic-bezier(.4,0,.2,1),
                box-shadow 0.26s cubic-bezier(.4,0,.2,1),
                border-color 0.2s;
    display: flex;
    flex-direction: column;
    position: relative;
}

.curso-card-ac:hover {
    transform: translateY(-10px) scale(1.015);
    box-shadow: 0 20px 56px rgba(217,48,167,0.22);
    border-color: #d930a7;
}

/* Imagen */
.curso-card-ac-img {
    position: relative;
    height: 240px;
    overflow: hidden;
    background: linear-gradient(135deg, #f0f2ff, #fce4f6);
    flex-shrink: 0;
}

.curso-card-ac-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.curso-card-ac:hover .curso-card-ac-img img {
    transform: scale(1.08);
}

.curso-card-ac-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: #c5cae9;
}

.curso-card-ac-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: linear-gradient(90deg, #d930a7, #ff5e9e);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 0.3rem 0.85rem;
    border-radius: 50px;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 10px rgba(217,48,167,0.4);
    text-transform: uppercase;
}

.curso-card-ac-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(26,35,126,0.55) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.28s;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 1.4rem;
}

.curso-card-ac:hover .curso-card-ac-overlay {
    opacity: 1;
}

.curso-card-ac-overlay span {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    background: rgba(255,255,255,0.18);
    border: 1.5px solid rgba(255,255,255,0.5);
    border-radius: 50px;
    padding: 0.4rem 1.2rem;
    backdrop-filter: blur(4px);
    letter-spacing: 0.5px;
}

/* Cuerpo */
.curso-card-ac-body {
    padding: 1.6rem 1.6rem 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    flex: 1;
}

.curso-card-ac-nombre {
    font-size: 1.2rem;
    font-weight: 800;
    color: #1a237e;
    margin: 0;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.curso-card-ac-desc {
    font-size: 0.93rem;
    color: #666;
    line-height: 1.55;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.curso-card-ac-precio-row {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.curso-card-ac-precio {
    font-size: 1.5rem;
    font-weight: 900;
    color: #1a237e;
}

.curso-card-ac-precio-orig {
    font-size: 1rem;
    color: #bbb;
    text-decoration: line-through;
}

.curso-card-ac-desc-badge {
    background: #fff0fb;
    color: #d930a7;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
}

.curso-card-ac-footer {
    padding: 0 1.6rem 1.6rem;
}

.btn-ver-curso {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.9rem;
    background: linear-gradient(90deg, #1a237e 0%, #d930a7 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    letter-spacing: 0.3px;
    transition: opacity 0.2s, transform 0.15s;
}

.btn-ver-curso:hover {
    opacity: 0.88;
    transform: scale(1.02);
}

/* ── Modal Inscripción ───────────────────────── */
.ac-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 15, 40, 0.65);
    z-index: 299;
    backdrop-filter: blur(3px);
}

.ac-modal-overlay.activo {
    display: block;
}

.ac-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.94);
    width: min(960px, 96vw);
    max-height: 92vh;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 24px 80px rgba(26,35,126,0.30);
    z-index: 300;
    overflow: hidden;
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1),
                opacity 0.3s;
}

.ac-modal.abierto {
    display: flex;
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.ac-modal-inner {
    display: flex;
    width: 100%;
    max-height: 92vh;
    overflow: hidden;
}

/* Columna izquierda (info curso) */
.ac-modal-izq {
    width: 380px;
    min-width: 280px;
    flex-shrink: 0;
    background: linear-gradient(160deg, #1a237e 0%, #3949ab 60%, #d930a7 100%);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.ac-modal-izq-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    flex-shrink: 0;
    display: block;
}

.ac-modal-izq-img-placeholder {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    opacity: 0.35;
    flex-shrink: 0;
}

.ac-modal-izq-body {
    padding: 1.8rem 1.8rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
    flex: 1;
}

.ac-modal-izq-tag {
    display: inline-block;
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: fit-content;
}

.ac-modal-izq-nombre {
    font-size: 1.5rem;
    font-weight: 900;
    color: #fff;
    margin: 0;
    line-height: 1.2;
}

.ac-modal-izq-desc {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.82);
    line-height: 1.6;
    margin: 0;
}

.ac-modal-izq-precio {
    font-size: 2rem;
    font-weight: 900;
    color: #ffd700;
    margin: 0;
}

.ac-modal-izq-precio-orig {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.5);
    text-decoration: line-through;
}

.ac-modal-izq-info {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.9rem;
    background: rgba(255,255,255,0.10);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.15);
}

.ac-modal-izq-info-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    color: rgba(255,255,255,0.85);
}

/* Columna derecha (formulario) */
.ac-modal-der {
    flex: 1;
    overflow-y: auto;
    padding: 2rem 2.2rem 2.2rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    min-width: 0;
}

.ac-modal-form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.ac-modal-form-header h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: #1a237e;
    margin: 0;
}

.ac-modal-cerrar {
    background: #f5f5f5;
    border: none;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s;
    color: #777;
}

.ac-modal-cerrar:hover {
    background: #d930a7;
    color: #fff;
}

#form-inscripcion {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    flex: 1;
}

.fi-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.fi-fila {
    display: flex;
    gap: 0.8rem;
}

.fi-fila .fi-group {
    flex: 1;
    min-width: 0;
}

.fi-group label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #555;
}

.fi-group input,
.fi-group textarea {
    padding: 0.7rem 0.95rem;
    border: 1.8px solid #e7eaf6;
    border-radius: 10px;
    font-size: 0.97rem;
    font-family: inherit;
    outline: none;
    background: #fafbff;
    color: #3d2c29;
    transition: border 0.2s, background 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.fi-group input:focus,
.fi-group textarea:focus {
    border-color: #1a237e;
    background: #fff;
}

.fi-group textarea {
    resize: vertical;
    min-height: 72px;
}

/* Mensaje de estado del formulario */
.fi-msg {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.93rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fi-msg.ok {
    background: #e8faf0;
    color: #1a7a4a;
    border: 1.5px solid #a0e0b0;
}

.fi-msg.error {
    background: #fff3f3;
    color: #c00;
    border: 1.5px solid #ffaaaa;
}

/* Botón inscribirse */
.btn-inscribirse {
    padding: 1rem;
    background: linear-gradient(90deg, #1a237e 0%, #d930a7 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    letter-spacing: 0.5px;
    transition: opacity 0.2s, transform 0.15s;
    margin-top: 0.3rem;
}

.btn-inscribirse:hover:not(:disabled) {
    opacity: 0.88;
    transform: scale(1.02);
}

.btn-inscribirse:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* ── Toast ───────────────────────────────────── */
.ac-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(90px);
    background: linear-gradient(90deg, #1a237e, #d930a7);
    color: #fff;
    padding: 0.85rem 1.8rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 6px 24px rgba(26,35,126,0.3);
    z-index: 500;
    transition: transform 0.32s cubic-bezier(0.4,0,0.2,1), opacity 0.32s;
    opacity: 0;
    white-space: nowrap;
    max-width: 92vw;
}

.ac-toast.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ── Responsive ──────────────────────────────── */
@media (max-width: 900px) {
    .academia-hero-content {
        padding: 3rem 2rem 3rem 2rem;
    }

    .academia-hero {
        min-height: 400px;
    }

    .cursos-grid {
        grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
        gap: 1.5rem;
    }

    .ac-modal-inner {
        flex-direction: column;
    }

    .ac-modal-izq {
        width: 100%;
        min-width: unset;
    }

    .ac-modal-izq-img {
        height: 180px;
    }

    .ac-modal-der {
        padding: 1.5rem 1.5rem;
    }

    .fi-fila {
        flex-direction: column;
        gap: 0.9rem;
    }
}

@media (max-width: 600px) {
    .academia-hero-content {
        padding: 2.5rem 1.2rem;
    }

    .academia-hero-titulo {
        font-size: 1.8rem;
    }

    .academia-stats {
        grid-template-columns: 1fr 1fr;
        display: grid;
    }

    .stat-item {
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.15);
    }

    .cursos-grid {
        grid-template-columns: 1fr;
    }

    .ac-modal {
        width: 98vw;
        max-height: 97vh;
    }
}
