/* ===== RESET Y BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
}

/* ===== UTILIDADES ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.magazines-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  padding: 20px 0;
}

.magazine-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.magazine-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.magazine-cover {
  position: relative;
  width: 100%;
  height: 350px;
  overflow: hidden;
}

.magazine-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.magazine-card:hover .magazine-cover img {
  transform: scale(1.05);
}

.magazine-info {
  padding: 20px;
  text-align: center;
}

.magazine-title {
  font-size: 16px;
  font-weight: bold;
  color: #333;
  margin-bottom: 15px;
  text-transform: uppercase;
}

.btn-ver-mas {
  background: linear-gradient(135deg, #1e5a96, #2874c7);
  color: white;
  padding: 10px 25px;
  border: none;
  border-radius: 5px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-ver-mas:hover {
  background: linear-gradient(135deg, #164a7e, #1f5fa3);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 90, 150, 0.3);
}

.btn-ver-mas::before {
  content: "📖 ";
  margin-right: 5px;
}

/* Estilos específicos para cada revista */
.cover-1 {
  background: linear-gradient(135deg, #8B4513, #D2691E);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  text-align: center;
  padding: 20px;
}

.cover-2 {
  background: linear-gradient(135deg, #1e5a96, #4682b4);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  text-align: center;
  padding: 20px;
}

.cover-3 {
  background: linear-gradient(135deg, #8B0000, #B22222);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  text-align: center;
  padding: 20px;
}

.cover-4 {
  background: linear-gradient(135deg, #800000, #DC143C);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  text-align: center;
  padding: 20px;
}

.cover-5 {
  background: linear-gradient(135deg, #4B0000, #8B0000);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  text-align: center;
  padding: 20px;
}

.cover-6 {
  background: linear-gradient(135deg, #B22222, #DC143C);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  text-align: center;
  padding: 20px;
}

.cover-title {
  font-size: 32px;
  font-weight: bold;
  font-style: italic;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.cover-subtitle {
  font-size: 16px;
  margin-bottom: 15px;
  opacity: 0.9;
}

.university-logo {
  width: 60px;
  height: 60px;
  background: white;
  border-radius: 50%;
  margin: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #333;
  font-size: 12px;
}

.issue-number {
  background: rgba(255, 255, 255, 0.2);
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 12px;
  margin-top: 10px;
}

.cover-image {
  width: 80px;
  height: 50px;
  background: rgba(255, 255, 255, 0.3);
  margin: 15px auto;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.group-photo {
  width: 100%;
  height: 60px;
  background: rgba(0, 0, 0, 0.3);
  margin-top: 20px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

@media (max-width: 768px) {
  .magazines-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
  }

  .magazine-cover {
    height: 300px;
  }

  .cover-title {
    font-size: 28px;
  }
}

@media (max-width: 480px) {
  .magazines-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .magazine-cover {
    height: 280px;
  }

  .cover-title {
    font-size: 24px;
  }
}

.parra {
  margin: 0 auto;
  padding: 0 5rem;
  align-items: center;
}

/* Títulos de sección consolidados */
.section-title,
.section-titles {
  text-align: center;
  margin-bottom: 3rem;
  color: #1e3c72;
  text-decoration: underline;
  text-decoration-color: #42A5F5;
  text-underline-offset: 10px;
  animation: fadeInUp 0.8s ease-out;
}

.section-title {
  font-size: 2rem;
}

.section-titles {
  font-size: 5rem;
}

/* ===== HEADER Y NAVEGACIÓN ===== */
.header {
  background: rgba(0, 0, 0, 0.2);
  padding: 1rem 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.header.scrolled {
  background: rgba(30, 60, 114, 0.95);
  padding: 0.5rem 0;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
}

.menu-link {
  text-decoration: none;
  padding: 10px;
  color: #fff;
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.arrow {
  font-size: 0.7rem;
  transition: transform 0.3s ease;
}

.dropdown:hover .arrow,
.arrow.rotated {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  /* Alineado a la derecha del elemento padre */
  background: #fff;
  list-style: none;
  display: none;
  min-width: 180px;
  padding: 0;
  margin: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-radius: 6px;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  white-space: nowrap;
  /* Evita que el texto se corte */
}

/* Asegurar que el dropdown se mantenga dentro de la pantalla */
.dropdown-menu::before {
  content: '';
  position: absolute;
  top: -8px;
  right: 20px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid #fff;
  filter: drop-shadow(0 -2px 2px rgba(0, 0, 0, 0.1));
}

.dropdown:hover .dropdown-menu {
  display: block;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li {
  margin: 0;
}

.dropdown-menu a {
  display: block;
  padding: 12px 20px;
  color: #333;
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  white-space: nowrap;
}

.dropdown-menu a:hover {
  background: #f8f9fa;
  color: #007bff;
  border-left-color: #007bff;
  padding-left: 25px;
}

/* Alinear el item "Convocatorias" con el resto */
.nav-menu li {
  display: flex;
  align-items: center;
}

.nav-menu .dropdown-toggle {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  /* Igual al resto de items */
  line-height: 1.2;
}

/* ===== SECCIONES DE cursos ===== */
.fila-3-columnas {
    display: flex;
    justify-content: space-between; /* espacio entre columnas */
    align-items: center;           /* centra verticalmente */
    gap: 20px;                     /* separación entre columnas */
    margin-top: 20px;
}

.fila-3-columnas .col {
    flex: 1; /* todas las columnas toman el mismo ancho */
}

.fila-3-columnas .texto {
    text-align: center;
    padding: 0 20px;
}

/* ===== SECCIONES DE PÁGINA ===== */
.page-section {
  display: none;
  min-height: 100vh;
  padding-top: 80px;
}

.page-section.active {
  display: block;
}

/* ===== HERO SECTION ===== */
.hero {
  height: 100vh;
  background:
    linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
    url('../img/portada.jpg') no-repeat center center / cover;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(30, 60, 114, 0.8), rgba(42, 82, 152, 0.8));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 2rem;
  animation: fadeInUp 1s ease-out;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  animation: slideInFromLeft 1s ease-out 0.3s both;
}

.hero h2,
.hero h3 {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  animation: slideInFromRight 1s ease-out 0.6s both;
}

.hero h2 {
  font-weight: 300;
}

.hero h3 {
  font-weight: 100;
}

/* ===== COURSES SECTION ===== */
.courses {
  padding: 5rem 0;
  background: white;
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.course-card {
  background: linear-gradient(135deg, #42A5F5, #1976D2);
  color: white;
  padding: 2rem;
  border-radius: 15px;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.course-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: rotate(45deg);
  transition: all 0.6s ease;
  opacity: 0;
}

.course-card:hover::before {
  animation: shine 0.6s ease-in-out;
}

.course-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.course-title {
  font-size: 1.8rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.course-description {
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* Consolidación de estilos de imagen */
.img-code,
.img1-code {
  width: 200px;
  height: 200px;
  background: white;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #333;
  transition: transform 0.3s ease;
}

.img-code {
  margin: 0 auto 1rem;
}

.img1-code {
  margin: 0.5rem 3rem;
}

.course-card:hover .img-code,
.course-card:hover .img1-code {
  transform: rotate(5deg) scale(1.1);
}

/* ===== UNIVERSITY SECTION ===== */
.university {
  padding: 5rem 0;
  background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
}

.university-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  align-items: center;
}

/* Consolidación de estilos de texto de universidad */
.university-info,
.university-info p {
  margin-bottom: 1.5rem;
  text-align: justify;
  line-height: 1.8;
}

.university-info h3 {
  font-size: 2rem;
  color: #1e3c72;
  margin-bottom: 1.5rem;
}

.university-logo {
  text-align: center;
  animation: float 3s ease-in-out infinite;
}



.logo-circle::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: rotate 4s linear infinite;
}

.logo-text {
  font-size: 2rem;
  font-weight: bold;
  color: white;
  text-align: center;
  z-index: 1;
  position: relative;
}

.university-list {
  list-style: none;
  padding-left: 0;
}

.university-list li {
  margin-bottom: 1rem;
  padding-left: 2rem;
  position: relative;
  transition: all 0.3s ease;
}

.university-list li:hover {
  transform: translateX(10px);
  color: #1e3c72;
}

.university-list li::before {
  content: '▶';
  position: absolute;
  left: 0;
  color: #42A5F5;
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.university-list li:hover::before {
  transform: scale(1.3);
}

/* ===== INSTITUTE SECTION ===== */
.institute {
  padding: 5rem 0;
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  color: white;
}

.institute-header {
  text-align: center;
  margin-bottom: 3rem;
}

.institute-title {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  animation: fadeInUp 0.8s ease-out;
  color: white;
}

.expandable-section {
  background: rgba(255, 255, 255, 0.1);
  margin-bottom: 1rem;
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.expandable-header {
  padding: 1.5rem;
  cursor: pointer;
  font-size: 1.3rem;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.3s ease;
}

.expandable-header:hover {
  background: rgba(255, 255, 255, 0.1);
}

.expandable-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
}

.expandable-content.active {
  max-height: 200px;
}

.expandable-inner {
  padding: 0 1.5rem 1.5rem;
  line-height: 1.6;
}

/* ===== RESEARCH SECTION ===== */
.research {
  padding: 5rem 0;
  background: white;
}

.research-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  margin-bottom: 3rem;
}

.research-text {
  padding: 2rem;
}

.research-text p {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 2rem;
  text-align: justify;
}

.research-document {
  text-align: justify;
  animation: fadeInRight 1s ease-out;
}

/* ===== DERCONTENT SECTION ===== */
.dercontent {
  padding: 5rem 0;
  background: white;
}

.dercontent-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
  align-items: center;
  margin-bottom: 3rem;
}

.dercontent-text {
  padding: 2rem;
  text-align: justify;
  border-radius: 10px;
}

/* ===== DOCUMENT PREVIEW ===== */
.document-preview {
  background: white;
  border: 2px solid #ddd;
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  max-width: 400px;
  margin: 0 auto;
}

.document-preview:hover {
  transform: scale(1.05);
}

.document-header {
  background: linear-gradient(135deg, #1e3c72, #42A5F5);
  color: white;
  padding: 1rem;
  margin: -1rem -1rem 1rem -1rem;
  border-radius: 8px 8px 0 0;
}

.document-content {
  font-size: 0.9rem;
  line-height: 1.4;
  text-align: left;
}

.pdf-embed {
  flex: 1;
  border: none;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  min-height: 500px;
  min-width: 400px;
  background: white;
}

/* ===== CONVOCATORIAS SECTION ===== */
.convocatorias {
  padding: 2rem 0 5rem 0;
  background: linear-gradient(135deg, #E8F4FD 0%, #D1E9FC 100%);
}

/* Consolidación de headers similares */
.convocatorias-header,
.publicaciones-header {
  text-align: center;
  margin-bottom: 4rem;
  padding: 2rem 0;
  background: linear-gradient(135deg, #1e3c72, #2a5298);
  color: white;
  border-radius: 15px;
  animation: fadeInUp 0.8s ease-out;
}

.convocatorias-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.convocatoria-card {
  background: white;
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  border: 3px solid transparent;
}

.convocatoria-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 50px rgba(30, 60, 114, 0.2);
  border-color: #42A5F5;
}

.convocatoria-status {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: bold;
}

.status-abierta {
  background: #4CAF50;
  color: white;
}

.status-proximamente {
  background: #FF9800;
  color: white;
}

.status-cerrada {
  background: #F44336;
  color: white;
}

.convocatoria-title {
  font-size: 1.5rem;
  color: #1e3c72;
  margin-bottom: 1rem;
  font-weight: bold;
}

.convocatoria-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.meta-icon {
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, #42A5F5, #1976D2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.8rem;
}

.convocatoria-description {
  line-height: 1.6;
  margin-bottom: 1.5rem;
  color: #555;
}

.convocatoria-btn {
  background: linear-gradient(135deg, #42A5F5, #1976D2);
  color: white;
  padding: 0.8rem 2rem;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  width: 100%;
}

.convocatoria-btn:hover {
  background: linear-gradient(135deg, #1976D2, #0D47A1);
  transform: translateY(-2px);
}

.convocatoria-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

/* ===== PUBLICACIONES SECTION ===== */
.publicaciones {
  padding: 2rem 0 5rem 0;
  background: linear-gradient(135deg, #F8FBFF 0%, #E3F2FD 100%);
}

.publicaciones-filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: white;
  color: #1e3c72;
  border: 2px solid #42A5F5;
  padding: 0.8rem 1.5rem;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
  background: #42A5F5;
  color: white;
  transform: translateY(-2px);
}

.publicaciones-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.publicacion-card {
  background: white;
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border-left: 5px solid #42A5F5;
}

.publicacion-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 50px rgba(30, 60, 114, 0.15);
}

.publicacion-type {
  display: inline-block;
  background: linear-gradient(135deg, #42A5F5, #1976D2);
  color: white;
  padding: 0.3rem 1rem;
  border-radius: 15px;
  font-size: 0.8rem;
  margin-bottom: 1rem;
}

.publicacion-title {
  font-size: 1.3rem;
  color: #1e3c72;
  margin-bottom: 1rem;
  font-weight: bold;
  line-height: 1.3;
}

.publicacion-authors {
  color: #666;
  font-style: italic;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.publicacion-abstract {
  line-height: 1.6;
  margin-bottom: 1.5rem;
  color: #555;
  font-size: 0.95rem;
}

.publicacion-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: #666;
}

.publicacion-actions {
  display: flex;
  gap: 1rem;
}

.action-btn {
  padding: 0.5rem 1rem;
  border: 1px solid #42A5F5;
  background: transparent;
  color: #42A5F5;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.action-btn:hover {
  background: #42A5F5;
  color: white;
}

.action-btn.primary {
  background: #42A5F5;
  color: white;
}

.action-btn.primary:hover {
  background: #1976D2;
}

/* ===== BOTONES GENERALES ===== */
.discover-btn {
  background: linear-gradient(135deg, #42A5F5, #1976D2);
  color: white;
  padding: 1rem 2rem;
  border: none;
  border-radius: 50px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.discover-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* ===== FOOTER ===== */
.footer {
  background: #0D47A1;
  color: white;
  text-align: center;
  padding: 3rem 0;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.footer h3 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.footer p {
  opacity: 0.8;
  line-height: 1.6;
}

/* ===== ANIMACIONES ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-100px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInFromRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-20px);
  }
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes shine {
  0% {
    opacity: 0;
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}

/* ===== SCROLL ANIMATIONS ===== */
.scroll-animate {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s ease-out;
}

.scroll-animate.active {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav {
    flex-direction: column;
    padding: 0 1rem;
  }

  .nav-menu {
    margin-top: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
    display: none;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero h2 {
    font-size: 1.2rem;
  }

  .university-content,
  .research-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .dercontent-content {
    grid-template-columns: 1fr;
    text-align: justify;
  }

  .logo-circle {
    width: 200px;
    height: 200px;
  }

  .courses-grid,
  .convocatorias-grid,
  .publicaciones-grid {
    grid-template-columns: 1fr;
  }

  .convocatoria-meta {
    grid-template-columns: 1fr;
  }

  .publicaciones-filters {
    justify-content: center;
  }

  .publicacion-actions {
    flex-direction: column;
  }

  .dropdown-menu {
    left: 50%;
    transform: translateX(-50%) translateY(10px);
  }

  .dropdown:hover .dropdown-menu {
    transform: translateX(-50%) translateY(0);
  }

  .revista-pdf {
    width: 100%;
    height: 400px;
  }
}

/* ===== FIX: CLASES QUE USA EL JS ===== */

/* Menú hamburguesa activo (muestra menú en móviles) */
.nav-menu-active {
  display: flex !important;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
  animation: fadeInUp 0.5s ease-out;
}

/* Icono hamburguesa cuando está activo */
.hamburger-active {
  transform: rotate(90deg);
  transition: transform 0.3s ease;
}

/* Dropdown cuando el JS lo abre */
.dropdown-menu-active {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
}

/* Header al hacer scroll */
.header-scrolled {
  background: rgba(30, 60, 114, 0.95) !important;
  padding: 0.5rem 0 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}


@media (max-width: 480px) {
  .revista-pdf {
    width: 100%;
    height: 300px;
  }
}