/* 
 Theme Name:   AdM hijo
 Theme URI:    
 Description:  
 Author:       sentomn87@gmail.com
 Author URI:   http://apuntesdemedicina.es
 Template:     hello-elementor
 Version:      1.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html

 /* == Add your own styles below this line ==
--------------------------------------------*/

@import url('css/monavi-asignaturas-hero.css');

.mnv-sidebar-nav {
    font-family: 'Manrope', sans-serif;
    font-size: 16px;
}

/* Cabecera asignatura */
.mnv-asignatura-header {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #1a5c45;
    color: #fff;
    padding: 12px 14px;
    border-radius: 8px 8px 0 0;
    margin-bottom: 4px;
}
.mnv-asignatura-icon {
    font-size: 1.1rem;
}
.mnv-asignatura-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: rgba(255,255,255,0.6);
    margin-bottom: 2px;
}
.mnv-asignatura-name {
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.25;
    color: #fff;
}

/* Bloque acordeón */
.mnv-bloque {
    margin-bottom: 8px;
}

.mnv-bloque-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: #fdf0eb;
    border: 1px solid #f0d5c8;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s, border-color 0.15s;
}
.mnv-bloque--open .mnv-bloque-header {
    border-radius: 8px 8px 0 0;
    border-bottom-color: transparent;
}
.mnv-bloque-header:hover {
    background: #fae3d9;
}
.mnv-bloque-nombre {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.mnv-bloque-chevron {
    font-size: 0.8rem;
    color: #888;
    transition: transform 0.25s ease;
}
.mnv-bloque--open .mnv-bloque-chevron {
    transform: rotate(180deg);
}

/* Lista de temas — animación suave */
.mnv-tema-list {
    list-style: none;
    padding: 4px 0;
    margin: 0;
    background: #fff;
    border: 1px solid #f0d5c8;
    border-top: none;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.25s ease;
}
.mnv-bloque--open .mnv-tema-list {
    max-height: 600px;
    opacity: 1;
}

.mnv-tema-list li a {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 7px 14px;
    font-size: 0.83rem;
    color: #555;
    text-decoration: none;
    transition: background 0.1s, color 0.1s;
}
.mnv-tema-list li a:hover {
    background: #f5f7f6;
    color: #1a5c45;
}

/* Tema activo */
.mnv-tema--active a {
    background: #e8f5f0 !important;
    color: #1a5c45 !important;
    font-weight: 600;
}
.mnv-tema-num {
    font-size: 0.75rem;
    color: #aaa;
    min-width: 18px;
    flex-shrink: 0;
}
.mnv-tema--active .mnv-tema-num {
    color: #2e7d60;
}

.mnv-bloque,
.mnv-bloque-header,
.mnv-tema-list {
    width: 100%;
    box-sizing: border-box;
}

/* ============================================================
   SIDEBAR IZQUIERDA — [mnv_sidebar_nav]
   Cabecera de asignatura + contenedor para índice del tema
   ============================================================ */

.mnv-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Cabecera-enlace de asignatura */
.mnv-asignatura-header {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #185FA5;
    color: #fff;
    padding: 12px 14px;
    border-radius: 8px 8px 0 0;
    text-decoration: none;
    transition: background 0.15s;
}

.mnv-asignatura-header:hover {
    background: #134d88;
    color: #fff;
}

.mnv-asignatura-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.mnv-asignatura-label {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.8;
    line-height: 1;
}

.mnv-asignatura-name {
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.2;
    margin-top: 2px;
}

/* ============================================================
   GRID ASIGNATURAS — shortcodes separados
   [monavi_asignaturas_grid] + [monavi_asignaturas_filters]
   ============================================================ */


/* =========================
   CONTENEDOR GENERAL OPCIONAL
   (pon esta clase al contenedor padre en Elementor)
========================= */

.monavi-asignaturas-shell{
  align-items: start;
}

/* =========================
   GRID DE ASIGNATURAS
========================= */

.monavi-asignaturas-main{
  min-width: 0;
}

.monavi-asignaturas-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

/* =========================
   TARJETAS DE ASIGNATURA
========================= */

.monavi-card-asignatura{
  min-width: 0;
}

.monavi-card-link{
  position: relative;
  display: flex;
  min-height: 190px;
  height: 100%;
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  box-shadow:
    0 10px 30px rgba(20, 32, 28, 0.08),
    0 2px 8px rgba(20, 32, 28, 0.04);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.monavi-card-link:hover{
  transform: translateY(-4px);
  box-shadow:
    0 18px 38px rgba(20, 32, 28, 0.12),
    0 4px 12px rgba(20, 32, 28, 0.06);
}

.monavi-card-accent{
  width: 6px;
  flex: 0 0 6px;
  background: #0f6a67;
}

.monavi-card-body{
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 22px 22px 18px;
}

.monavi-card-body h3{
  margin: 0 0 12px;
  color: #111111;
  font-size: clamp(1.5rem, 1.2rem + 0.8vw, 2.1rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.monavi-card-body p{
  margin: 0 0 18px;
  color: #2d2d2d;
  font-size: 1rem;
  line-height: 1.45;
  max-width: 34ch;
}

.monavi-chip{
  margin-top: auto;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #f1f2f3;
  color: #2b2b2b;
  font-size: 0.92rem;
  line-height: 1;
  font-weight: 500;
  white-space: nowrap;
}

/* =========================
   SIDEBAR / FILTROS
========================= */

.monavi-sidebar-tools{
  position: sticky;
  top: 110px;
  padding-top: 2px;
}

.monavi-filter-group{
  margin-bottom: 22px;
}

.monavi-filter-group h4{
  margin: 0;
  color: #2b2b2b;
  font-size: 1.05rem;
  line-height: 1.2;
  font-weight: 700;
}

.monavi-filter-group label{
  display: block;
  margin: 0 0 8px;
  color: #2f2f2f;
  font-size: 0.96rem;
  font-weight: 500;
}

.monavi-filter-group input[type="search"],
.monavi-filter-group select,
.monavi-filter-reset{
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid #d8dcde;
  border-radius: 12px;
  background: #ffffff;
  color: #1f1f1f;
  font-size: 0.96rem;
  line-height: 1.2;
  box-shadow: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.monavi-filter-group input[type="search"]::placeholder{
  color: #7c858b;
}

.monavi-filter-group input[type="search"]:focus,
.monavi-filter-group select:focus{
  outline: none;
  border-color: #0f6a67;
  box-shadow: 0 0 0 3px rgba(15, 106, 103, 0.12);
}

.monavi-filter-reset{
  cursor: pointer;
}

.monavi-filter-reset:hover{
  background: #f6f8f8;
}

/* =========================
   ESTADO VACÍO
========================= */

.monavi-empty-state{
  margin-top: 24px;
  padding: 26px 22px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow:
    0 10px 30px rgba(20, 32, 28, 0.08),
    0 2px 8px rgba(20, 32, 28, 0.04);
  color: #2b2b2b;
  font-size: 1rem;
  line-height: 1.5;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1180px){
  .monavi-asignaturas-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1024px){
  .monavi-sidebar-tools{
    position: static;
  }
}

@media (max-width: 767px){
  .monavi-asignaturas-grid{
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .monavi-card-link{
    min-height: 170px;
    border-radius: 14px;
  }

  .monavi-card-body{
    padding: 18px 18px 16px;
  }

  .monavi-card-body p{
    font-size: 0.97rem;
    max-width: none;
  }

  .monavi-filter-group{
    margin-bottom: 18px;
  }
}

/* ================================================
   adm-badge — Sistema de badges/etiquetas inline
   apuntesdemedicina.es · Monavi
   ================================================ */

/* Base */
.adm-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.6;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

/* ------------------------------------------------
   Variantes de color
   ------------------------------------------------ */

/* Azul — proteínas, sodio, elementos estructurales */
.adm-badge.adm-prot {
    background: #DBEAFE;
    color: #1E40AF;
}

/* Teal — fosfolípidos, canales iónicos */
.adm-badge.adm-fosfo {
    background: #CCFBF1;
    color: #0F766E;
}

/* Ámbar — colesterol, energía, ATP */
.adm-badge.adm-col {
    background: #FEF3C7;
    color: #92400E;
}

/* Morado — otros, señalización */
.adm-badge.adm-otro {
    background: #EDE9FE;
    color: #5B21B6;
}

/* Verde — glucosa, metabolismo */
.adm-badge.adm-gluc {
    background: #DCFCE7;
    color: #14532D;
}

/* Índigo — referencia cruzada */
.adm-badge.adm-ref {
    background: #C5CBF066;
    color: #2A3A8C;
}