/* =============================================================
   TELECENTROS COMUNITARIOS - PERSONALIZACION MOOVE 5.2.x
   Archivo independiente del codigo de Moodle y del tema Moove.
   Mantener en C:/Web/custom/telecentros/telecentros.css
   ============================================================= */

/* Carrusel: conservar imagenes completas y retirar fondos oscuros. */
#page-site-index.notloggedin #mooveslideshow .carousel-indicators {
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}
#page-site-index.notloggedin #mooveslideshow .carousel-caption {
    display: none !important;
}

/* Modo CLARO: Moove asigna data-bs-theme sobre BODY (no HTML).
   Sus variables y algunos fondos llevan !important. */
body[data-bs-theme="light"] {
    --moove-gray-bg: #edf3fa;
    --moove-bg-white: #ffffff;
    --bs-body-bg: #f2f6fc;
    --bs-border-color: #dce6f2;
}
body[data-bs-theme="light"],
body[data-bs-theme="light"] #page,
body[data-bs-theme="light"] #page.drawers,
body[data-bs-theme="light"] #page-wrapper {
    background-color: #f2f6fc !important;
}
body[data-bs-theme="light"] #page-site-index #page,
body[data-bs-theme="light"]#page-site-index #page {
    background-color: #f2f6fc !important;
}

/* Tarjetas y bloques, solo modo claro; conserva el modo oscuro nativo. */
body[data-bs-theme="light"] .card,
body[data-bs-theme="light"] .block.card,
body[data-bs-theme="light"] .dashboard-card,
body[data-bs-theme="light"] #feature .card {
    background-color: #ffffff !important;
    border: 1px solid #dce6f2 !important;
    border-radius: 14px !important;
    box-shadow: 0 6px 22px rgba(25, 58, 105, .09) !important;
}
body[data-bs-theme="light"] .dashboard-card,
body[data-bs-theme="light"] #feature .card {
    transition: transform .2s ease, box-shadow .2s ease;
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    body[data-bs-theme="light"] .dashboard-card:hover,
    body[data-bs-theme="light"] #feature .card:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 28px rgba(25, 58, 105, .15) !important;
    }
}
body[data-bs-theme="light"] .card .card-body,
body[data-bs-theme="light"] .block .card-body {
    color: #25364d;
}
body[data-bs-theme="light"] .btn-primary {
    background-color: #1265b4;
    border-color: #1265b4;
}
body[data-bs-theme="light"] .btn-primary:hover,
body[data-bs-theme="light"] .btn-primary:focus-visible {
    background-color: #094b89;
    border-color: #094b89;
}
body[data-bs-theme="light"] #page-header h1,
body[data-bs-theme="light"] .page-header-headings h1 {
    color: #1c3456;
}

/* PIE DE PAGINA: ocultar exclusivamente la franja de atribucion
   visual en Moove. No eliminar avisos de licencia del codigo fuente. */
body #page-footer > .copyright,
body #page-footer .copyright {
    display: none !important;
}

/* Facilitar lectura en pantallas pequenas sin afectar el carrusel. */
@media (max-width: 767.98px) {
    body[data-bs-theme="light"] .card,
    body[data-bs-theme="light"] .dashboard-card {
        border-radius: 12px !important;
    }
}


/* =============================================================
   TELECENTROS V2 - Area personal en modo claro
   Encabezados y bloques con contraste institucional.
   ============================================================= */
body:not([data-bs-theme="dark"])#page-my-index #page.drawers .main-inner {
    background-color: #f0f5fb !important;
    border-radius: 18px !important;
}
body:not([data-bs-theme="dark"])#page-my-index #region-main,
body:not([data-bs-theme="dark"])#page-my-index #block-region-content {
    background-color: transparent !important;
}
body:not([data-bs-theme="dark"])#page-my-index #block-region-content .block.card {
    background-color: #ffffff !important;
    border: 1px solid #cddff1 !important;
    border-left: 5px solid #1265b4 !important;
    border-radius: 16px !important;
    box-shadow: 0 9px 24px rgba(19, 65, 113, .10) !important;
    margin-bottom: 20px !important;
    overflow: hidden;
}
body:not([data-bs-theme="dark"])#page-my-index #block-region-content .block.card > .card-body {
    background-color: #ffffff !important;
    padding: 20px !important;
}
body:not([data-bs-theme="dark"])#page-my-index #block-region-content .block.card .card-title,
body:not([data-bs-theme="dark"])#page-my-index #block-region-content .block.card h3 {
    color: #143a62 !important;
    font-weight: 700;
}
body:not([data-bs-theme="dark"])#page-my-index .block_timeline .event-list-content,
body:not([data-bs-theme="dark"])#page-my-index .block_recentlyaccessedcourses .card-deck {
    border-radius: 12px;
}


/* =============================================================
   TELECENTROS V3 - PIE INSTITUCIONAL
   Se activa cuando telecentros-footer.js inserta el contenido.
   Conserva botones de ayuda y elementos funcionales de Moodle.
   ============================================================= */
#page-footer.tc-footer-ready {
    background: #243b56 !important;
    border-top: 4px solid #1872c7 !important;
    color: #eff5ff !important;
    padding: 0 !important;
}
#page-footer.tc-footer-ready > .footer-columns {
    display: none !important;
}
#page-footer.tc-footer-ready .tc-institutional-footer {
    max-width: 1220px;
    margin: 0 auto;
    padding: 36px 22px 23px;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr);
    gap: 38px;
}
#page-footer.tc-footer-ready .tc-footer-heading {
    color: #fff !important;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 12px;
}
#page-footer.tc-footer-ready .tc-institutional-footer p,
#page-footer.tc-footer-ready .tc-institutional-footer li {
    font-size: .95rem;
    color: #e0ebf7 !important;
    line-height: 1.65;
    margin: 0 0 9px;
}
#page-footer.tc-footer-ready .tc-footer-contact {
    list-style: none;
    margin: 0;
    padding: 0;
}
#page-footer.tc-footer-ready .tc-footer-contact a {
    color: #b9dfff !important;
    text-decoration: none;
    overflow-wrap: anywhere;
}
#page-footer.tc-footer-ready .tc-footer-contact a:hover,
#page-footer.tc-footer-ready .tc-footer-contact a:focus-visible {
    color: #fff !important;
    text-decoration: underline;
}
#page-footer.tc-footer-ready .tc-footer-bottom {
    grid-column: 1 / -1;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,.2);
    text-align: center;
    color: #c8d7e7;
    font-size: .84rem;
}
#page-footer.tc-footer-ready .footer-content-debugging {
    background: transparent !important;
}
/* Botones flotantes y ventana emergente de ayuda siguen disponibles. */
#page-footer.tc-footer-ready [data-region="footer-container-popover"],
#page-footer.tc-footer-ready [data-region="footer-content-popover"] {
    position: relative;
    z-index: 1;
}
@media (max-width: 680px) {
    #page-footer.tc-footer-ready .tc-institutional-footer {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 27px 18px 22px;
    }
}

/* =============================================================
   TELECENTROS V4 - PORTADA: TARJETAS DE CURSOS EN MODO CLARO
   Selectores verificados en Moove 5.2.1: coursecard.mustache.
   Mantener imagenes originales y modo oscuro sin cambios.
   ============================================================= */
body:not([data-bs-theme="dark"])#page-site-index .card.dashboard-card,
body:not([data-bs-theme="dark"])#page-course-index-category .card.dashboard-card {
    background: #eaf3ff !important;
    border: 1px solid #a9c8ea !important;
    border-bottom: 4px solid #2776bd !important;
    border-radius: 15px !important;
    box-shadow: 0 10px 26px rgba(26, 73, 125, .15) !important;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}
body:not([data-bs-theme="dark"])#page-site-index .card.dashboard-card .card-body.course-info-container,
body:not([data-bs-theme="dark"])#page-course-index-category .card.dashboard-card .card-body.course-info-container {
    background: #eaf3ff !important;
    color: #223b57 !important;
    padding: 17px 15px 21px !important;
}
body:not([data-bs-theme="dark"])#page-site-index .card.dashboard-card .coursename,
body:not([data-bs-theme="dark"])#page-course-index-category .card.dashboard-card .coursename {
    color: #0758a6 !important;
    font-weight: 700 !important;
}
body:not([data-bs-theme="dark"])#page-site-index .card.dashboard-card .course-summary,
body:not([data-bs-theme="dark"])#page-site-index .card.dashboard-card .course-summary *,
body:not([data-bs-theme="dark"])#page-course-index-category .card.dashboard-card .course-summary,
body:not([data-bs-theme="dark"])#page-course-index-category .card.dashboard-card .course-summary * {
    color: #263e59 !important;
}
body:not([data-bs-theme="dark"])#page-site-index .card.dashboard-card .card-img.dashboard-card-img,
body:not([data-bs-theme="dark"])#page-course-index-category .card.dashboard-card .card-img.dashboard-card-img {
    filter: none;
    opacity: 1;
    border-bottom: 1px solid #c0d7ed;
}
body:not([data-bs-theme="dark"])#page-site-index .card.dashboard-card .dashboard-card-footer,
body:not([data-bs-theme="dark"])#page-course-index-category .card.dashboard-card .dashboard-card-footer {
    background: #eaf3ff !important;
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    body:not([data-bs-theme="dark"])#page-site-index .card.dashboard-card:hover,
    body:not([data-bs-theme="dark"])#page-course-index-category .card.dashboard-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 15px 32px rgba(26, 73, 125, .21) !important;
    }
}


/* Ajuste puntual: marco exterior de la lista de cursos, solo modo claro.
   Mantener las medidas, el padding y las tarjetas originales. */
body#page-site-index:not([data-bs-theme="dark"]) #page.drawers #topofscroll.main-inner {
    background-color: #dee9f6 !important;
}

body#page-site-index:not([data-bs-theme="dark"]) #region-main-box,
body#page-site-index:not([data-bs-theme="dark"]) #region-main {
    background-color: #dee9f6 !important;
}

/* TELECENTROS - Ocultar estadísticas generales
   de Moodle en el panel de bienvenida */

body.pagelayout-login .login-layout-stats {
    display: none !important;
}
