:root {
  --color-primary: #2B3A5D;        /* Azul oscuro - Principal */
  --color-secondary: #A74B33;      /* Terracota - Secundario */
  --color-accent: #B69161;         /* Dorado - Acento */
  --color-light: #DCCA9E;          /* Beige claro */
  --color-background: #E4E0DD;     /* Gris muy claro - Fondo */
}

@font-face {
  font-family: 'GG';
  font-style: normal;
  font-weight: 100 300 400 700 900;
  font-display: swap;
  src: url('fonts/GeistVariableVF.woff2');
}

html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
abbr, address, cite, code,
del, dfn, em, img, ins, kbd, q, samp,
small, strong, sub, sup, var,
b, i,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section, summary,
time, mark, audio, video {
    margin:0;
    padding:0;
    border:0;
    outline:0;
    font-size:100%;
    vertical-align:baseline;
    background:transparent;
}

body {
    line-height:1.50;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-smooth: auto;
    overflow-x: hidden;
    color: #474747;
    font-family: 'GG', sans-serif;
    background-color: #fff;
    font-weight: 300;
    
    /*#EEEFE9*/
}   
body main {
  animation: fadeIn 250ms ease-in forwards;
  background-size: 100% auto;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}


article,aside,details,figcaption,figure,
footer,header,hgroup,menu,nav,section { 
    display:block;
}

nav ul {
    list-style:none;
}

blockquote, q {
    quotes:none;
}

blockquote:before, blockquote:after,
q:before, q:after {
    content:'';
    content:none;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  -webkit-clip-path: inset(50%);
  clip-path: inset(50%);
  border: 0;
}
a {
    margin:0;
    padding:0;
    font-size:100%;
    vertical-align:baseline;
    background:transparent;
}

/* change colours to suit your needs */
ins {
    background-color:#ff9;
    text-decoration:none;
}

/* change colours to suit your needs */
mark {
    background-color:#ff9;
    font-style:italic;
    font-weight:bold;
}

del {
    text-decoration: line-through;
}

abbr[title], dfn[title] {
    border-bottom:1px dotted;
    cursor:help;
}

table {
    border-collapse:collapse;
    border-spacing:0;
}

/* change border colour to suit your needs */
hr {
    display:block;
    height:1px;
    border:0;   
    border-top:1px solid #f1f1f1;
    margin:2em 0;
    padding:0;
}

input, select {
    vertical-align:middle;
}

/* container */
.container {
  padding: 0 1rem;
  margin: auto;
  max-width:  998px;
}

main::after {
  display: block;
  content: ' ';
  clear: both;
}
img.logo-munazam {
    width: 100%;
    max-width: 380px;
    filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.1));
}
#menu a {
    color: initial;
    text-decoration: none;
    color: #fff;
  }
.main_header a {
  color: inherit;
  text-decoration: none;
}
nav.lang-selector-desktop ul {
    display: flex;
    gap: 1rem;
}

  header.site-header {
    position: relative;
    /* background-image: url(../img/banner1.jpg); */
    background: linear-gradient(135deg, #32384e 0%, #2B3A5D 100%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
  }

  /* header.site-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(19, 39, 86, 0.67);
    pointer-events: none;
    z-index: 1;
  } */

  header.site-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url(../img/mosaicotest.png) repeat center;
    background-size: auto;
    background-position: center;
    opacity: 1;
    pointer-events: none;
    transform: scale(1.2);
    z-index: 2;
    animation: floatPattern 12s ease-in-out 0.2s infinite;
    /* animation: zoomFadeIn 0.2s ease-in-out forwards, pulsePattern 6s ease-in-out 0.2s infinite; */
  }

  @keyframes zoomFadeIn {
    to {
      opacity: 0.5;
      transform: scale(1);
    }
  }

  @keyframes floatPattern {
    0%, 100% {
      transform: scale(1) translate(0, 0);
    }
    50% {
      transform: scale(1) translate(10px, -10px);
    }
  }

  @keyframes pulsePattern {
    0%, 100% {
      opacity: 0.5;
      transform: scale(1);
    }
    50% {
      opacity: 0.6;
      transform: scale(1.02);
    }
  }

@media (max-width: 997px) {
  .lang-selector {
    display: block;
  }
  .lang-selector-desktop {
    display: none;
  }
  
  /* Logo en el centro del header móvil */
  .mobile-logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    display: block;
    transition: opacity 0.3s ease;
  }
  .mobile-logo img.logo-munazam {
      height: 113px;
      width: auto;
      margin-top: 8px;
  }
  body > main {
    min-height: calc(100vh - 204px);
  }
  body > header {
    background-color: #ffffff;
    padding: 1rem 0;
    min-height: 100px;
  }
  .main_header {
    position: absolute;
    left: 70px;
    width: calc(100% - 70px);
    overflow: hidden;
    z-index: 2;
    height: 50px;
  }
  .site-header {
    box-shadow: rgba(33, 35, 38, 0.1) 0px 10px 10px -10px;
    border-bottom: 1px solid #efefef;
    position: relative;
    height: 100px;
  }
  .main_header .title {
    display: block;
    font-size: 1.5rem;
  }
  .main_header .subtitle {
    display: block;
    margin-top: -6px;
    font-size: 0.8rem;
  }
  .ugrlogo {
    display: none;
  }
  #menuToggle
  {
    display: block;
    position: relative;  
    z-index: 1;
    -webkit-user-select: none;
    user-select: none;
    padding: 0.5rem 0 0 1.4rem;
  }

  #menuToggle a
  {
    text-decoration: none;
    color: #232323;
    font-size: 1.1rem;
    font-weight: 600;
    transition: background-color 0.2s ease;
    display: block;
    padding: 1.2rem 1rem;
    border-bottom: 1px solid #e0e0e0;
    position: relative;
  }

  #menuToggle a::after {
    content: '\ea6e';
    font-family: 'remixicon' !important;
    position: absolute;
    right: 1rem;
    font-size: 1.5rem;
    color: #999;
    font-weight: normal;
    top: 15px;
  }

  #menuToggle a:hover {
    background-color: #f5f5f5;
  }



  #menuToggle input
  {
    display: block;
    width: 45px;
    height: 33px;
    position: absolute;
    top: 5px;
    left: 0.4rem;
    cursor: pointer;
    opacity: 0;
    z-index: 2;
    -webkit-touch-callout: none;
  }


  #menuToggle span
  {
    display: block;
    width: 33px;
    height: 4px;
    margin-bottom: 5px;
    position: relative;
    
    background: #fff;
    border-radius: 3px;
    
    z-index: 1;
    
    transform-origin: 4px 0px;
    
    transition: transform 0.5s cubic-bezier(0.77,0.2,0.05,1.0),
                background 0.5s cubic-bezier(0.77,0.2,0.05,1.0),
                opacity 0.55s ease;
  }

  #menuToggle span:first-child
  {
    transform-origin: 0% 0%;
  }

  #menuToggle span:nth-last-child(2)
  {
    transform-origin: 0% 100%;
  }


  /* Hacer el input fixed cuando el menú está abierto */
  #menuToggle input:checked
  {
    position: fixed;
    top: 5px;
    left: 0.4rem;
    z-index: 21;
  }

  #menuToggle input:checked ~ span
  {
    opacity: 1;
    transform: rotate(45deg) translate(-2px, -1px);
    background: #232323;
    position: fixed;
    top: 1.75rem;
    left: 1.3rem;
    z-index: 20;
  }


  #menuToggle input:checked ~ span:nth-last-child(3)
  {
    opacity: 0;
    transform: rotate(0deg) scale(0.2, 0.2);
    position: fixed;
    top: 1.25rem;
    left: 1rem;
  }


  #menuToggle input:checked ~ span:nth-last-child(2)
  {
    transform: rotate(-45deg) translate(0, -1px);
    position: fixed;
    top: 2.85rem;
    left: 1.4rem;
  }

  #menu .main_menu
  {
    position: fixed;
    width: 100vw;
    left: 0;
    top: 0;
    margin: 0;
    padding: 0;
    background: #ffffff;
    list-style-type: none;
    -webkit-font-smoothing: antialiased;
    height: 100vh;
    overflow-y: auto;
    transform-origin: 0% 0%;
    transform: translate(-100%, 0);
    transition: transform 0.5s cubic-bezier(0.77,0.2,0.05,1.0);
    box-sizing: border-box;
    z-index: 10;
  }
   
  #menuToggle input:checked ~ div.main_menu
  {
    transform: none;
  }

  /* Título del menú */
  .main_menu::before {
    content: 'Menú';
    display: block;
    font-size: 1rem;
    font-weight: 400;
    color: #666;
    text-align: center;
    padding: 1.5rem 1rem;
    border-bottom: 1px solid #e0e0e0;
    background: #fff;
  }
  
  .main_menu > ul {
    padding-top: 0;
    margin: 0;
  }

  .main_menu > ul > li {
    margin: 0;
  }

  .main_menu > ul > li:first-child > a {
    border-top: none;
  }
  #menuToggle .has-sub-category > a {
    cursor: default;
  }
  #menuToggle .has-sub-category > a:hover {
    background-color: transparent;
  }
  .has-sub-category > ul {
    padding-left: 2rem;
  }

  /* Selector de idiomas en menú móvil */
  .main_menu .lang-selector {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
  }

  .main_menu .lang-selector li a {
    font-weight: 400;
    font-size: 1rem;
    color: #666;
  }

  .main_menu .lang-selector li a::after {
    content: none;
  }
  .main_header {
    position: relative;
    z-index: 5;
  }

  /* Asegurar que el header no interfiera con el menú */
  .site-header {
    position: relative;
    z-index: 50;
  }
  img.logo-munazam {
    width: auto;
    height: 54px;
  }
  /* Menú móvil */
  nav#menu {
    position: relative;
    z-index: 50;
    transition: all 0.3s ease-in-out;
    height: 100%;
  }

  nav#menu.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #3C404F;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  }

  /* Espaciado cuando el menú es sticky */
  body.menu-sticky header.site-header {
    padding-bottom: 60px; /* Ajusta según la altura de tu menú */
  }

  nav#menu.sticky {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  }



}

nav.lang-selector-desktop a {
  background-color: rgb(255, 255, 255, 0.8);
  padding: 8px;
  border-radius: 4px;
}

.home img {
  width: auto;
  max-width: calc(100% - 16px);
  height: auto;
  box-shadow: 3px 2px 18px rgba(0,0,0,.08);
  margin-bottom: 2rem;
  border: 8px solid #fff;
  border-radius: 4px;
}
.image-right, .image-left {
  display: block;
  margin: auto;
  text-align: center;
}
.image-right > img, .image-left > img{
  box-shadow: 3px 2px 18px rgba(0,0,0,.08);
  border: 8px solid #fff;
  border-radius: 4px;
}

@media (min-width: 998px)  {
  .main_menu > ul > li > a {
      display: block;
      white-space: nowrap;
      text-overflow: ellipsis;
      padding: 1.2rem 0.4rem;
  }
}
@media (max-width: 1325px)  {
  .main_menu > ul > li > a {
      display: block;
      white-space: nowrap;
      text-overflow: ellipsis;
      padding: 1.2rem 0.2rem;
      overflow: hidden;
  }
}

@media (min-width: 998px) {

 .image-left {
  float: left;
  text-align: inherit;
  margin-bottom: 1.5rem;
  }
  .image-right {
    float: right;
    text-align: inherit;
    margin-bottom: 1.5rem;
    margin-left: 1.5rem;
  }
  .image-right > img, .image-left img {
    display: block;
    float: none;
  }


  body > main {
    min-height: calc(100vh - 330px);
  }
  .home {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 4rem;
    font-size: 1.2rem;
  }
 
  #menu {
    background-color: #f8f8f621;
  }
  .main_header a {
    color: inherit;
    text-decoration: none;
  }
  .main_header .title {
    display: block;
    font-size: 2.5rem;
  }
  .subtitle {
    font-size: 1.4rem;
  }
  .main_header {
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1rem;
    max-width:  998px;
  }
  .ugrlogo {
    padding-right: 1rem;
  }
  #menuToggle input, #menuToggle span {
    display: none;
  }
  .main_menu {
    margin: auto;
    display: flex;
    justify-content: space-between;
    max-width: 998px;
  }
  .main_menu ul {
    list-style: none;
    display: flex;
    gap: 1rem;
  }

   

  .main_menu > ul.lang-selector > li {
    margin-right: 0;
  }
  .main_menu > ul > li > a {
    padding: 1.2rem 0.5rem;
    display: block;
    border-bottom: 2px solid transparent;
  }

  .main_menu > ul > li:hover > a, .main_menu > ul > li.active:not(.has-sub-category) > a {
    border-bottom: 2px solid #ffffff; 
    transition: all 0.2s ease-in-out;
  }
  .main_menu > ul:hover > li > a.active {
    background-color: #F8F8F6;

  }


  .main_menu ul li > ul {
    height: 0;
    overflow: hidden;
    display: block;
    position: absolute;
    max-width: 300px;
 }
  .main_menu ul li:hover > ul {
    background-color: #fff;
    box-shadow: 3px 18px 29px rgba(0,0,0,.29);
    border-radius: 10px;
    height: auto;
    transition: all 0.2s ease;
    margin-top: 0rem;
    z-index: 1;
  }
  .main_menu ul li:hover > ul li {
    display: block;
  }
  .main_menu ul li:hover > ul li a {
    padding: 10px 15px;
    display: block;
    border-bottom: 1px solid #f0f0f0;
  }


}

/* contenidos */

.subtitulo, main h2 {
  font-weight: 300;
  margin: 2rem 0;
}

/* text style */
h6, h5, h4, h3, h2, h1 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-weight: 300;
  line-height: 1.4;
  color: var(--color-primary);
}
.main_content {
  font-size: 1.125rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.main_content img {
  max-width: 100%;
  height: auto;
}

h1 {
    margin: 2rem 0;
    font-size: clamp(1.75rem, 0.625rem + 3.6vw, 2.875rem);
    max-width: 600px;
    text-wrap: balance;
    line-height: 1em;
    letter-spacing: -0.02em;
    
}

h2 {
  font-size: clamp(1.5rem, 1rem + 1.6vw, 2rem);
}

h3 {
  font-size: clamp(1.5rem, 1rem + 1.6vw, 2rem);
  font-weight: 300;
}

h4 {
  font-size: 1.5rem;
}


h5 {
  font-size: 1.25rem;
}

h6 {
  font-size: 1rem;
}

main a {
    text-decoration: none;
    display: inline-block;
    color: var(--color-primary);
    font-weight: 400;
}
main a::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width .3s;
}
main a:hover::after {
    width: 100%;
    transition: width .3s;
}
.row-video h3 {
    font-size: 1.25rem;
    text-wrap: balance;
}
.row-video video, .row-video iframe {
    aspect-ratio: 16 / 9;
    width: 100%;
  }
@media (min-width: 58rem) {
  .row {
      display: flex;
      gap: 3rem;
  }
  .row > .col-25 {
    flex: 33%;
  }
  .row > .col-75 {
    flex: 66%;
  }
  .row > .col-main {
    padding-right: 3rem;
    border-right: 1px solid #f1f1f1;
  }
  .row-base {
    align-items: flex-end;
  }
  .row-video {
    display: flex;
    flex-wrap: wrap;
    margin: -1rem; /* Ajuste para el gap */
    align-items: flex-end;
  }
  
  

  .col-50 {
    flex: 0 0 50%; /* 50% del ancho menos el espacio */
    gap: 2rem;
    box-sizing: border-box; /* Incluye padding y border en el ancho y alto */
  }

}
.text-small {
  font-size: 1rem;
}


@media (max-width: 600px) {
  .col-50 {
    flex-basis: 100%; /* En pantallas pequeñas, cada elemento ocupa el 100% */
  }
}
body > main ul, body > main ol {
  margin: 2rem 0;
  padding-left: 1rem;
}

body main ul li > ul {
  margin: 1rem 0 0 0;
}
main ol li {
  margin-bottom: 1rem;
}
main ol li ol {
  margin-top: 1rem;
}


p {
  margin-top: 0;
  margin-bottom: 1em;
  line-height: 160%;
}



/* paginas */
.col2 {
  column-count: 2;
  gap: 3rem;
  margin-bottom: 3rem;
}
.main_content a[href^="mailto:"]::before {
  content: "\eef6";
  font-family: 'remixicon' !important;
  font-style: normal;
  -webkit-font-smoothing: antialiased;
  display: inline-block;
   display: inline-block;
  margin-right: 0.5rem;
  color: inherit;
}

.main_content a[href^="https://www.instagram.com"]::before {
  content: "\ee66";
  font-family: 'remixicon' !important;
  font-style: normal;
  -webkit-font-smoothing: antialiased;
  display: inline-block;
   display: inline-block;
  margin-right: 0.5rem;
  color: inherit;
}
.main_content a[href^="https://x.com"]::before {
  content: "\f3e6";
  font-family: 'remixicon' !important;
  font-style: normal;
  -webkit-font-smoothing: antialiased;
  display: inline-block;
   display: inline-block;
  margin-right: 0.5rem;
  color: inherit;
}
.main_content a[href$=".pdf"]::before {
  content: "\ea7e";
  font-family: 'remixicon' !important;
  font-style: normal;
  -webkit-font-smoothing: antialiased;
  display: inline-block;
   display: inline-block;
  margin-right: 0.5rem;
  color: inherit;
}



.footer p {
  padding: 0;
  margin:  0;
}
.footer {
  padding: 2rem 0;
  background-color: #ffffff;
  border-top: 3px solid #872323;
  max-width: 998px;
  margin: 3rem auto 0;
}
.footer-wrapper {
    display: flex;
    align-items: center;
    gap: 3rem;
    font-size: 0.8rem;
    margin: auto;
    justify-content: space-between;
}
.logos {
    display: flex;
    gap: 3rem;
}
.logos img {
  height: 70px;
  width: auto;
  mix-blend-mode: darken;
}
@media (max-width: 58rem) {
  .col2 {
    column-count: 1;
  }
  .footer-wrapper {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  .logos {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }
  .logos img {
    height: 50px;
  }
}

@media(max-width: 600px) {
  .index_content img {
    float: none !important;
    clear: both;
    margin: 20px 0; 
    display: block;
  }
}

/* Estilos para entradas de blog */
.blog-entries {
  margin: 3rem 0;
}

.blog-entry {
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid #f1f1f1;
}

.blog-entry:last-child {
  border-bottom: none;
}

.blog-entry h2 {
  margin-bottom: 0.5rem;
  font-size: clamp(1.5rem, 1rem + 1.6vw, 2rem);
  color: var(--color-primary);
}

.entry-meta {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: #666;
  flex-wrap: wrap;
}

.entry-meta i {
  margin-right: 0.25rem;
}

.entry-date, .entry-category, .entry-categories {
  display: flex;
  align-items: center;
}

.entry-categories a {
  color: var(--color-secondary);
  text-decoration: none;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  transition: all 0.2s ease;
  display: inline-block;
}

.entry-categories a:hover {
  background-color: var(--color-secondary);
  color: #fff;
}

.entry-categories a::after {
  display: none;
}

.entry-content {
  margin-top: 1rem;
}

.entry-content p:last-child {
  margin-bottom: 0;
}

/* Estilos para páginas de categorías */
.categoria-archive {
  margin-top: 2rem;
}

@media (max-width: 600px) {
  .entry-meta {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* ============================================
   ESTILOS ADICIONALES PARA HEADER HORIZONTAL
   ============================================ */

/* Logo UGR siempre visible en esquina */
a.ugrlogo {
  position: fixed;
  top: 30px;
  right: 30px;
  z-index: 100;
}

a.ugrlogo img {
  height: 60px;
  width: auto;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

/* Ocultar menú desktop en móvil */
.desktop-header {
  display: none;
}

/* Menú móvil visible por defecto */
.mobile-menu {
  display: block;
}

/* ===================================
   MEDIA QUERY PARA ESCRITORIO (> 998px)
   =================================== */
@media (min-width: 998px) {
  
  /* Ocultar menú móvil en desktop */
  .mobile-menu {
    display: none;
  }
  
  /* Ocultar logo móvil en desktop */
  .mobile-logo {
    display: none;
  }

  /* Mostrar menú desktop */
  .desktop-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    gap: 2rem;
    position: relative;
    z-index: 10;
  }

  /* Menú izquierdo */
  .menu-left {
    flex: 0 1 auto;
    display: flex;
    justify-content: flex-end;
  }

  .menu-left ul {
    list-style: none;
    display: flex;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
  }

  .menu-left ul li a {
    color: #fff;
    text-decoration: none;
    padding: 0.8rem 1rem;
    display: block;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease-in-out;
    white-space: nowrap;
  }

  .menu-left ul li a:hover {
    border-bottom: 2px solid #ffffff;
  }

  /* Logo central */
  .logo-center {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .logo-center img.logo-munazam {
    width: 100%;
    max-width: 320px;
    height: auto;
    filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.1));
  }

  /* Menú derecho */
  .menu-right {
    flex: 0 1 auto;
    display: flex;
    align-items: center;
    gap: 2rem;
  }

  .menu-right ul {
    list-style: none;
    display: flex;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
  }

  .menu-right ul:not(.lang-selector) {
    flex: 1;
  }

  .menu-right ul li a {
    color: #fff;
    text-decoration: none;
    padding: 0.8rem 1rem;
    display: block;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease-in-out;
    white-space: nowrap;
  }

  .menu-right ul li a:hover {
    border-bottom: 2px solid #ffffff;
  }

  /* Selector de idioma */
  .menu-right .lang-selector {
    margin-left: auto;
  }

  .menu-right .lang-selector li a {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    border-bottom: none;
  }

  .menu-right .lang-selector li a:hover {
    background-color: rgba(255, 255, 255, 0.3);
    border-bottom: none;
  }

  /* Ajustar logo UGR en desktop */
  a.ugrlogo {
    top: 30px;
    right: 30px;
  }

  a.ugrlogo img {
    height: 70px;
  }

  /* Ajustar altura mínima del body */
  body > main {
    min-height: calc(100vh - 280px);
  }

  /* Estados de carga y accesibilidad */
  .miembro:focus {
    outline: 1px solid lightgray;
    outline-offset: 2px;
  }
}

/* ============================================
   ESTILOS PARA PÁGINA DE MIEMBROS
   ============================================ */

/* Contenedor principal de miembros */
.miembros_content {
  padding: 0;
}

/* Categorías de miembros */
.categoria {
  margin-bottom: 4rem;
}

.categoria h2 {
  font-size: clamp(1.75rem, 1.25rem + 1.6vw, 2.25rem);
  margin-bottom: 2rem;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid;
  position: relative;
}

/* Colores distintivos por categoría */
.investigadora-principal h2 {
  border-bottom-color: var(--color-secondary);
  color: var(--color-secondary);
}

.categoria {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.categoria > h2 {
  grid-column: 1 / -1;
}

/* Tarjeta de miembro */
.miembro {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  background: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  position: relative;
}

.miembro:hover {
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

/* Borde de color según categoría */
.investigadora-principal .miembro {
  border-left: 2px solid var(--color-secondary);
}

.equipo-investigador .miembro, .equipo-trabajo .miembro {
  border-left: 2px solid var(--color-primary);
}

/* Indicador de expandible */
.miembro::after {
  content: '\eb6d'; /* remix icon arrow-down-s-line */
  font-family: 'remixicon' !important;
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 1.5rem;
  color: #999;
  transition: transform 0.3s ease;
}

/* Estado expandido */
.miembro.expanded {
  padding: 2em 0 0;
  box-shadow: none;
  border-left: 2px solid transparent; /* Eliminar el border-left cuando está expandido */
}

.miembro.expanded::after {
  transform: rotate(180deg);
  color: var(--color-primary);
  top: 0;
}

/* Focus solo para desktop y cuando NO está expandido */
@media (min-width: 768px) {
  .miembro:not(.expanded):focus {
    outline: none;
    border: 2px solid transparent;
  }
}

/* Estado NO expandido (asegurar que recupera los estilos) */
.miembro:not(.expanded) {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.investigadora-principal .miembro:not(.expanded) {
  border-left: 2px solid var(--color-secondary);
}

.equipo-investigador .miembro:not(.expanded), 
.equipo-trabajo .miembro:not(.expanded) {
  border-left: 2px solid var(--color-primary);
}

/* Foto del miembro */
.miembro-foto {
  flex-shrink: 0;
}

.miembro-foto figure {
  margin: 0;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.miembro-foto img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  aspect-ratio: 1;
}

/* Información del miembro */
.miembro-info {
  min-width: 0; /* Importante para que el texto se trunque correctamente en grid */
}

.miembro-info h3 {
  font-size: 1.25rem;
  margin: 0 0 0.5rem 0;
  color: var(--color-primary);
  font-weight: 400;
}

.miembro-info .cargo {
  font-size: 0.95rem;
  color: #666;
  margin: 0 0 1rem 0;
  line-height: 1.4;
  font-style: italic;
}

/* Descripción - oculta por defecto */
.miembro-info .descripcion {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
}

.miembro.expanded .descripcion {
  max-height: 5000px; /* Valor alto para cubrir cualquier contenido */
  opacity: 1;
  margin-top: 1rem;
}

.miembro-info .descripcion p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  text-align: justify;
}

.miembro-info .descripcion p:last-child {
  margin-bottom: 0;
}

/* Enlaces - ocultos por defecto */
.miembro-info .enlaces {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
}

.miembro.expanded .enlaces {
  max-height: 500px;
  opacity: 1;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e0e0e0;
}

.miembro-info .enlaces p {
  margin: 0 0 0.75rem 0;
}

.miembro-info .enlaces ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.miembro-info .enlaces li {
  margin: 0;
}

.miembro-info .enlaces a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #f5f5f5;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.miembro-info .enlaces a:hover {
  background: var(--color-primary);
  color: #fff;
}

.miembro-info .enlaces a::after {
  display: none; /* Quitar la línea animada de los enlaces */
}

/* Responsive breakpoints */
@media (min-width: 768px) {
  .miembro {
    grid-template-columns: 180px 1fr;
    gap: 2rem;
    padding: 2rem;
  }

  .miembro:focus {
    outline: none;
    border: none;
  }
}

/* Animación suave para el contenido expandido */
@media (prefers-reduced-motion: reduce) {
  .miembro,
  .miembro::after,
  .descripcion,
  .enlaces {
    transition: none;
  }
}

/* Media queries progresivos para ajustar el header */

/* Entre 998px y 1200px: reducir padding de links */
@media (min-width: 998px) and (max-width: 1200px) {
  .menu-left ul li a, 
  .menu-right ul li a {
    padding: 0.6rem 0.7rem;
    font-size: 0.95rem;
  }
  .desktop-header {
    gap: 1.5rem;
  }
}

/* Entre 998px y 1100px: reducir logo agresivamente */
@media (min-width: 998px) and (max-width: 1100px) {
  .logo-center img.logo-munazam {
    max-width: 120px;
  }
  .menu-left ul li a, 
  .menu-right ul li a {
    padding: 0.5rem 0.5rem;
    font-size: 0.9rem;
  }
  .desktop-header {
    gap: 0.8rem;
  }
  .menu-right ul, .menu-left ul {
    gap: 0.1rem;
  }
}

/* el menu no cabe en este pixel, reducimos logo y gaps de menu */
@media (min-width: 998px) and (max-width: 1392px) {
  .desktop-header {
    gap: 1rem;
  }
  .menu-right ul, .menu-left ul {
    gap: 0.2rem;
  }
  .menu-left ul li a, 
  .menu-right ul li a {
    padding: 0.6rem 0.5rem;
  }
  .logo-center img.logo-munazam {
    max-width: 180px;
  }
}


/**Botón subir arriba**/
#scrollTopBtn {
  position: fixed;
  bottom: 20px;
  right: 30px;
  opacity: 0;
  transition: all 0.3s ease;
  width: 50px;
  height: 50px;
  font-size: 24px;
  border-radius: 50px;
  border: none;
  background-color: #fff;
  box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
  cursor: pointer;
}

#scrollTopBtn.show {
  opacity: 1;
  transition: all 0.3s ease;
}

/* ============================================
   ESTILOS BREADCRUMB
   ============================================ */
.page-breadcrumb {
  background-color: #f8f9fa;
  border-bottom: 1px solid #e0e0e0;
  padding: 1rem 0;
}

.page-breadcrumb .container {
  display: flex;
  align-items: center;
}

.page-breadcrumb h1 {
  font-size: 1rem;
  color: var(--color-primary);
  margin: 0;
  padding: 0;
  line-height: 1.2;
}

/* Ocultar breadcrumb en la portada */
body.index .page-breadcrumb {
  display: none;
}

/* Desktop: fuente un poco más grande */
@media (max-width: 997px) {
  .page-breadcrumb {
    padding: 0.75rem 0;
  }
  
  .page-breadcrumb h1 {
    font-size: 1.15rem;
  }
}

/* ============================================
   ESTILOS PARA VÍDEOS DE YOUTUBE RESPONSIVOS
   ============================================ */

/* Forzar que TODOS los iframes no se salgan del contenedor */
iframe {
  max-width: 100% !important;
}

/* Contenedor responsivo para iframes de YouTube */
.entry-content iframe[src*="youtube.com"],
.entry-content iframe[src*="youtu.be"],
main iframe[src*="youtube.com"],
main iframe[src*="youtu.be"],
article iframe[src*="youtube.com"],
article iframe[src*="youtu.be"],
.blog-entry iframe[src*="youtube.com"],
.blog-entry iframe[src*="youtu.be"] {
  max-width: 100% !important;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 16 / 9;
  margin: 1.5rem 0;
  border: none;
  border-radius: 0.25rem;
  display: block;
}

/* Wrapper responsivo general para cualquier iframe */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* Ratio 16:9 */
  height: 0;
  overflow: hidden;
  margin: 1.5rem 0;
  max-width: 100%;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 0.25rem;
}

/* En móviles, asegurar que no rompa el layout */
@media (max-width: 767px) {
  iframe[src*="youtube.com"],
  iframe[src*="youtu.be"] {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
    margin: 1rem 0;
  }
  
  /* Asegurar que el contenedor principal no tenga overflow */
  .container {
    overflow-x: hidden;
  }
  
  main {
    overflow-x: hidden;
  }
}

/* ============================================
   ESTILOS PARA IMÁGENES PERSONALIZADAS
   ============================================ */

/* Estilos base para imágenes */
img.custom-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1rem 0;
}

/* Tamaños de imagen */
img.size-small {
    max-width: 300px;
}

img.size-medium {
    max-width: 600px;
}

img.size-large {
    max-width: 100%;
}

img.size-full {
    max-width: none;
    width: auto;
}

/* Alineaciones */
img.align-left {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
    clear: left;
}

img.align-right {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    clear: right;
}

img.align-center {
    margin-left: auto;
    margin-right: auto;
    float: none;
    display: block;
}

img.align-none {
    float: none;
    display: block;
}

/* Clearfix para contenido con imágenes flotantes */
.entry-content::after,
.blog-entry::after {
    content: "";
    display: table;
    clear: both;
}

/* Responsive: en móviles, cancelar floats */
@media (max-width: 767px) {
    img.align-left,
    img.align-right {
        float: none;
        margin-left: 0;
        margin-right: 0;
        max-width: 100%;
    }
    
    img.size-small,
    img.size-medium {
        max-width: 100%;
    }
}