
/* ========================================== Lo básico ============================================= */

/* ------------------------------------------- Fuentes  --------------------------------------------- */

@font-face {
    font-family: 'EB Garamond';
    src: url('../fonts/EBGaramond-Regular.woff2') format('woff2'),
         url('../fonts/EBGaramond-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'EB Garamond';
    src: url('../fonts/EBGaramond-Italic.woff2') format('woff2'),
         url('../fonts/EBGaramond-Italic.woff') format('woff');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'EB Garamond';
    src: url('../fonts/EBGaramond-Bold.woff2') format('woff2'),
         url('../fonts/EBGaramond-Bold.woff') format('woff');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'EB Garamond';
    src: url('../fonts/EBGaramond-BoldItalic.woff2') format('woff2'),
         url('../fonts/EBGaramond-BoldItalic.woff') format('woff');
    font-weight: 800; 
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Orelega One';
    src: url('../fonts/OrelegaOne-Regular.woff2') format('woff2'),
         url('../fonts/OrelegaOne-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ------------------------------------ Lo que se aplica a todo ------------------------------------- */

* {
    box-sizing: border-box; /* ------ vamos a medir todos los elementos del diseño incluyendo el padding y el border */
}

/* ========================================== Para todas las páginas  =============================== */
body {
    font-family: "EB Garamond", serif;
    font-optical-sizing: auto;
    font-style: normal;
    background-color: #121212;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #F8F8F0;
}



h1 {
    font-family: "Orelega One", serif;
    font-weight: 400;
    font-style: normal;
    text-align: center;
    text-wrap: balance;
}

h2 {
    font-family: "Orelega One", serif;
    font-weight: 200;
    font-size: 22pt;
    font-style: normal;
    margin-bottom: -20px;
}

p {
    text-indent: 2em;
}

#main-content {
    transition: margin-top 0.6s 0.3s ease; /* para regresar cuando se despliega el menú */
}

.titulo-seccion {
    font-family: "Orelega One", serif;
    font-weight: 100;
    font-style: normal;
    font-size: clamp(20px, 20vw, 80px);
    margin-top: 60px;
    margin-bottom: 20px;
    padding: 0 0.32em; /* Añade un pequeño margen interno para evitar que el texto toque los bordes en pantallas pequeñas */
}


.readable-text {
    max-width: 84ch; /* Limita la longitud de las líneas a 65 caracteres */
    margin: 0 auto; /* Centra el texto horizontalmente */
    padding: 0 1em; /* Añade un pequeño margen interno para evitar que el texto toque los bordes en pantallas pequeñas */
    line-height: 1.55; /* Mejora la legibilidad aumentando el espaciado entre líneas */
    font-size: 1.5rem; /* Tamaño de fuente estándar */
    
}

.readable-text a {
    color: #fab96f;
    text-decoration: none;
}

.readable-text a:hover {
    color: #ff9b26;
}

.readable-text h1 {
    margin-top: 50px;
    margin-bottom: -10px;
}

.readable-text ul {
    padding-left: 20px;  /* Ajusta la indentación */
    margin: 0;           /* Elimina el margen superior e inferior */
}

.readable-text li {
    margin-bottom: -20px;  /* Ajusta el espaciado entre elementos */
    line-height: 1.3;    /* Define el espaciado entre líneas dentro de cada elemento */
}

.teaching .readable-text ul {
    padding-left: 20px;  /* Ajusta la indentación */
    margin: 0;           /* Elimina el margen superior e inferior */
}

.teaching .readable-text li {
    margin-top: 20px;  /* Ajusta el espaciado entre elementos */
    line-height: 1.3;    /* Define el espaciado entre líneas dentro de cada elemento */
}


@media (max-width: 600px) {
    .readable-text {
        line-height: 1.35;
    }
    .titulo-seccion {
        padding: 0 10px /* Añade un pequeño margen interno para evitar que el texto toque los bordes en pantallas pequeñas */
    }
}



@media (min-width: 768px) {
    .readable-text {
        padding: 0 2em; /* Aumenta el margen interno en pantallas más grandes */
    }
    .titulo-seccion {
        padding: 0 0.58em; /* Añade un pequeño margen interno para evitar que el texto toque los bordes en pantallas pequeñas */
    }
}

@media (min-width: 1024px) {
    .readable-text {
        padding: 0 3em; /* Más espacio en pantallas aún más grandes */
    }
    .titulo-seccion {
        padding: 0 0.9em; /* Añade un pequeño margen interno para evitar que el texto toque los bordes en pantallas pequeñas */
    }
}

.contenedor-imagen { /* Clase base para todos los contenedores */
    position: relative;
    margin: 0 auto;
    display: block;
    overflow: hidden;
    padding-top: 10px;
    padding-bottom: 10px;
}

.contenedor-imagen img { /* Estilos comunes para todas las imágenes */
    width: 100%;
    height: auto;
    display: block;
}

.ci-principal-vertical {
    max-width: 84ch;
}

.ci-principal-horizontal {
    max-width: 150ch;
}

.ci-vertical {
    max-width: 45ch;
}

.ci-horizontal {
    max-width: 60ch;
}

.pie-de-foto {
    position: absolute;
    bottom: 0; /* Inicialmente en la parte inferior, oculto */
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px;
    text-align: center;
    font-size: 18px;
    transition: transform 0.3s ease-in-out; /* Transición en transform para mejor rendimiento */
    transform: translateY(100%); /* Lo oculta moviéndolo hacia abajo */
    box-sizing: border-box; /* Incluir el padding en el tamaño */
}

.pie-de-foto a {
    color: #fab96f;
    text-decoration: none;
}

.contenedor-imagen:hover .pie-de-foto {
    transform: translateY(0); /* Lo muestra volviendo a su posición original */
}

::selection {
    background-color: #ff9b26; 
    color: #121212;
  }

/* --------------------------------------- Encabezado ---------------------------------------- */

/* -- encabezado en sí */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding-top:4px;
    padding-left: 15px;
    padding-right: 14px;
    background-color: #121212;
    font-family: "Orelega One", serif;
    font-weight: 400;
    font-size: 30px;
    height: auto;
    z-index: 1;
    overflow: hidden;
    transition: height 0.3s ease;
}


 /* -- tabla con los contenidos */
.tabla-menu-principal {
    width: 100%; 
    margin: 0;
    border-collapse: collapse;
}

/* -- espaciados de cada celda */
.tabla-menu-principal .izquierda {
    text-align: left;
    white-space: nowrap;
    padding: 0px;
}

.tabla-menu-principal .relleno-centro {
    width: 100%;
}

.tabla-menu-principal .derecha {
    text-align: right;
    white-space: nowrap;
    padding-right: 20px;
}

@keyframes flan-de-huevo {
    0% {
        transform: rotate(0deg) translateX(0);
    }
    25% {
        transform: rotate(2deg) translateX(2px);
    }
    50% {
        transform: rotate(0deg) translateX(0);
    }
    75% {
        transform: rotate(-2deg) translateX(-2px);
    }
    100% {
        transform: rotate(0deg) translateX(0);
    }
}

.tabla-menu-principal .icono-agitado-flan {
    transition: transform 0.3s ease; /* Suaviza el retorno al estado inicial */
    vertical-align: middle;
    text-align: center;
    white-space: nowrap;
    padding: 4px;
}

.tabla-menu-principal .icono-agitado-flan:hover {
    animation: flan-de-huevo 0.5s ease-in-out; /* Aplica la animación al pasar el ratón */
}

.tabla-menu-principal .icono {
    vertical-align: middle;
    text-align: center;
    white-space: nowrap;
    padding: 4px;
}

.icono-encabezado.hover {
    top: 0;
    left: 0;
    vertical-align: middle;
    display: none; /* Inicialmente oculta */
}

a:hover .icono-encabezado.base {
    display: none;
}

a:hover .icono-encabezado.hover {
    display: block;
}


/* -- propiedades de los enlaces */
.tabla-menu-principal a {
    color: #F8F8F0;
    text-decoration: none;
}

.tabla-menu-principal a:hover {
    color: #ff9b26;
}

/* -- submenú */
.submenu {
    opacity: 0;
    visibility: hidden;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.6s ease, visibility 0.6s , max-height 0.6s ease;
}

.submenu.show {
    opacity: 1;
    visibility: visible;
    max-height: 500px; 
    transition: opacity 0.6s 0.5s ease, visibility 0.6s 0.5s, max-height 0.6s 0.5s ease;
}

.submenu-table{
    padding: 0;
    margin-top: 0px;
    margin-bottom: 2px;
    float: right;
    margin-right: 155px; /* -- <-- margen a modificar cuando hay más secciones */
}

.submenu-table .cell{
    padding: 0 10px;
}


.submenu a {
    color: #fab96f;
    display: block;
    text-decoration: none;
}

.submenu a:hover {
    color: #ff9b26;
}


/* -- Ocultar elementos y mostrar ícono del menú en pantallas pequeñas */
@media (max-width: 790px) {
    .tabla-menu-principal .derecha,
    .tabla-menu-principal .icono,
    .tabla-menu-principal .icono-agitado-flan,
    .submenu {
        display: none; /* Ocultar los elementos existentes */
    }

    .menu-icon {
        display: table-cell; /* Mostrar el ícono del menú */
        text-align: right;
        padding-right: 0px;
    }
    .menu-icon a:hover {
        text-decoration: none;
    }

    .menu-res {
        opacity: 0;
        visibility: hidden;
        max-height: 0;
        overflow: hidden;
        transition: opacity 0.6s ease, visibility 0.6s , max-height 0.6s ease;
    }

    .menu-res.show {
        opacity: 1;
        visibility: visible;
        max-height: 700px; 
        transition: opacity 0.6s 0.5s ease, visibility 0.6s 0.5s, max-height 0.6s 0.5s ease;
    }

    .menu-res-table{
        padding: 0;
        margin-top: 0px;
        float: right;
    
    }

    .menu-res-table .cell-res{
        padding: 0px;
        text-align: right;
    }

    
    .cell-res img {
        vertical-align: middle;
    }

    .menu-res a {
        color: #F8F8F0;
        text-decoration: none;
    }

    .menu-res a:hover {
        color: #ff9b26;
    }
}
@media (min-width: 790px) {
    .menu-icon,
    .menu-res
    .menu-res-table {
        display: none; /* Ocultar los elementos existentes */
    }
}

/* Estilo del menú desplegable */
.menu-dropdown {
    display: none; /* Oculto por defecto */
    position: fixed;
    right: 0; /* Alineado a la derecha */
    background-color: #121212;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 10px;
    font-size: 22px;
}

/* Enlaces dentro del menú */
.menu-dropdown a {
    color: #F8F8F0;
    text-decoration: none;
    display: block;
    padding: 5px 10px;
}

.menu-dropdown a:hover {
    background-color: #333;
    border-radius: 3px;
}































/* ------------------------------------- Logos animados ---------------------------------------- */
.bluesky-flutter {
    display: inline-flex;
    gap: 0.5em;
    align-items: center;
  }
  
  .bluesky-flutter svg {
    width: 21px;
    height: 21px;
    transition: 200ms;
  }
  
  .bluesky-flutter .left {
    transform-origin: center;
  }
  .bluesky-flutter .right {
    transform-origin: center;
    transform: scale(-1, 1);
  }
  .bluesky-flutter:hover .left,
  .bluesky-flutter:focus .left {
    color: #ff9b26;
     animation: flutter 430ms ease-in-out;
     --flip: 1;
  }
  .bluesky-flutter:hover .right, 
  .bluesky-flutter:focus .right {
    color: #ff9b26;
     animation: flutter 500ms ease-in-out;
    --flip: -1;
  }
  .bluesky-flutter:hover svg,
  .bluesky-flutter:focus svg{
    transform: rotate(-5deg);
    transition: 500ms;
  }
  
  @media (prefers-reduced-motion) {
    .bluesky-flutter:hover .left,
    .bluesky-flutter:focus .left, 
    .bluesky-flutter:hover .right, 
    .bluesky-flutter:focus .right {
      animation: none;
    }
  }
  
  @keyframes flutter {
    10% {
      transform: scale(calc(var(--flip)*1), 0.9);
    }
    20% {
      transform: scale(calc(var(--flip)*0.5), 1) 
    }
    40% {
      transform: scale(calc(var(--flip)*0.9), 0.95);
    }
    60% {
      transform: scale(calc(var(--flip)*0.3), 1);
    }
    80% {
      transform: scale(calc(var(--flip)*0.9), 0.95);
    }
    100% {
      transform: scale(calc(var(--flip)*1), 1);
    }
  }


/* Overlay que cubrirá toda la pantalla */
#black-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #121212;
    opacity: 1; /* Visible por defecto */
    pointer-events: auto; /* Bloquea la interacción con el contenido */
    z-index: 9999;
    transition: opacity 0.4s ease-out;
}

#black-overlay.hidden {
    opacity: 0; /* Ocultar con transición */
    pointer-events: none;
}


/* Videos */
.video-container {
    margin: 15px auto; 
    text-align: center;
    position: relative;
    display: block;
    width: 100%;
    max-width: 60ch;
  }

  .video-container video {
    width: 100%;
    height: auto;
  }

  .video-title {
    color:#F8F8F0;
    font-style: italic;
    font-size: 20px;
    margin-top: -15px;
  }

