* {
    font-family: "Red Hat Display", sans-serif;
}

html {
  margin: 0;
  padding: 0;
  background-color: #ffffff;
}

body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth; /* Permite el desplazamiento suave al hacer clic en enlaces de anclaje */
}

header {
  top: 0;
    width: 100%;
    position: fixed;
    z-index: 1000;
    background-color: transparent;
    color: inherit;
    box-sizing: border-box;
    transition: background-color 0.3s ease;
}

header.scrolled {
    background-color: #ffffffc5;
    backdrop-filter: blur(50px);
    color: black;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: 70px;
}

.menu {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 40px;
  flex-wrap: wrap;
  background: transparent;
}

.logoContainer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.logoContainer a {
  text-decoration: none;
  color: inherit;
  gap: 5px;
}

.logo {
  height: 40px;
  width: auto;
}

.logoLink {
  display: flex;
  align-items: center;
}

.citicName {
  font-size: 1.5rem;
  font-weight: 400;
}

.optionContainer {
  display: flex;
  gap: 32px;
}

.optionContainer > a {
  position: relative;
  color: inherit;
  text-decoration: none;
  font-size: 1.1rem;
  transition: color 0.2s;
}

.optionContainer > a::after { /* Línea subrayada del header en las opciones del nav a */
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1.5px;
  background: #ffc107;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(.4,0,.2,1);
  border-radius: 2px;
  pointer-events: none;
}

.optionContainer > a:hover::after,
.optionContainer > a:focus::after {
  transform: scaleX(1);
}

/* Menú desplegable para Revista */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-toggle {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 1.1rem;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 170px;
  background: #fff;
  box-shadow: 0 8px 24px #0002;
  border-radius: 8px;
  z-index: 100;
  flex-direction: column;
  padding: 8px 0;
}

.dropdown-menu a {
  color: #222;
  padding: 10px 18px;
  text-decoration: none;
  display: block;
  transition: background 0.2s;
  font-size: 1.1rem;
}

.dropdown-menu a:hover {
  background: #f5f5f5;
  color: #FFBE00;
}

/* Mostrar menú en hover/focus (escritorio) o con clase .open (móvil) */
.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu,
.dropdown.open .dropdown-menu {
  display: flex;
}
/*----*/

.menuButton {
  margin-left: 30px;
}

.portalButton {
  border: 2px solid #FFB526;
  background: transparent;
  color: #ffc107;
  padding: 8px 24px;
  border-radius: 8px;
  font-size: 1rem;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.portalButton:hover {
  background: linear-gradient(to left, #FFB526, #ffaa00);
  color: #fff;
}
.hamburger {
  background-color: transparent;
  border: none;
}

/* Responsive del header (menú) */
@media (max-width: 900px) {
  .menu {
    flex-direction: row; /* Mantiene logo y hamburguesa en línea */
    align-items: center;
    justify-content: space-between; /* Espacia logo a la izquierda y hamburguesa a la derecha */
  }
  .logoContainer{
    cursor: pointer;
  }
  .hamburger {
    margin-left: 0; 
    margin-right: 0; 
    align-self: flex-end; /* Alinea verticalmente al centro */
  }
  .optionContainer {
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin-top: 10px;
    position: absolute;
    top: 70px;
    left: 0;
    background: rgba(34,34,34,0.98);
    align-items: flex-start;
    gap: 0;
    padding: 20px 0 10px 30px;
    display: none;
    z-index: 1000;
  }
  .optionContainer.active {
    display: flex;
  }
  .menuButton {
    width: 100%;
    margin: 10px 0 0 0;
    display: flex;
    justify-content: flex-end;
  }
}

@media (max-width: 600px) {
  .logo {
    height: 32px;
  }
  .citicName {
    font-size: 1.1rem;
  }
  .optionContainer a {
    font-size: 1rem;
  }
  .portalButton {
    width: 100%;
    padding: 10px 0;
    font-size: 1rem;
  }
}

/* Responsive menú */
@media (max-width: 900px) {
  .optionContainer {
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(34,34,34,0.98);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 20px 0 10px 30px;
    display: none;
    z-index: 1000;
  }
  .optionContainer.active {
    display: flex;
  }
  .hamburger {
    display: flex;
  }
  .menuButton.desktop {
    display: none;
  }
  .portalButton.mobile {
    display: block;
    margin-top: 16px;
  }
}
@media (min-width: 901px) {
  .portalButton.mobile {
    display: none;
  }
  .hamburger {
    display: none !important;
  }
}

/* Sidebar menú hamburguesa desplegable */
.sidebar {
  position: fixed;
  top: 0;
  left: -420px;
  width: 320px;
  height: 95vh;
  background: #fff;
  box-shadow: 2px 0 16px rgba(0,0,0,0.08);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  padding: 32px 0 15px 0;
  transition: left 0.3s;
  border-top-right-radius: 40px;
  border-bottom-right-radius: 40px;
}
.sidebar.active {
  left: 0;
}
.sidebar-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 0 10px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 16px;
}
.sidebar-citic-logo {
    width: 200px;
    height: auto;
    object-fit: contain;
    margin-bottom: 10px;
}
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 0 32px;
  margin-bottom: auto;
}
.sidebar-nav a {
  display: flex;
  align-items: center;
  color: #222;
  text-decoration: none;
  font-size: 1.08rem;
  gap: 14px;
  padding: 6px 0;
  transition: color 0.2s;
}
.sidebar-nav a:hover {
  color: #FFA300;
}
.sidebar-login {
  display: flex;
  align-items: center;
  color: #222;
  text-decoration: none;
  font-size: 1.08rem;
  gap: 14px;
  padding: 16px 32px 10px 32px;
  border-top: 1px solid #eee;
  margin-top: 16px;
  transition: color 0.2s;
}
.sidebar-login:hover {
  color: #007bff;
}
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.25);
  z-index: 1999;
}
.sidebar.active ~ .sidebar-overlay {
  display: block;
}
/* Responsive del sidebar */
@media (max-width: 400px) {
  .sidebar { width: 90vw; }
  .sidebar-profile, .sidebar-nav, .sidebar-logout { padding-left: 16px; padding-right: 16px; }
}
/* ---------------------------------------- */

.news-empty {
  text-align: center;
}

/* Estilos de la noticia principal */
.main-content {
    margin-top: 80px; /* Espacio para el header */
    padding: 0 30px 30px 30px;
}
.main-news-container {
    max-width: 1300px;
    margin: 0 auto 0 auto;
    border-radius: 28px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 8px 32px 0 rgba(31,38,135,0.18);
}
.main-news-image {
    position: relative;
    width: 100%;
    display: flex;
    align-items: stretch;
    min-height: 340px;
}
.main-news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 0;
    min-height: 100%;
}
.main-news-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(30,30,30,0.65) 55%, rgba(30,30,30,0.15) 100%);
    z-index: 1;
    pointer-events: none;
}
.main-news-content {
    position: relative;
    z-index: 2;
    color: #fff;
    padding: 48px 48px 32px 48px;
    max-width: 700px;
    min-height: 340px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.main-news-featured {
    font-size: 1.1em;
    font-weight: 600;
    color: #fff;
    opacity: 0.85;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
    display: block;
}
.main-news-title {
    font-size: 2.5em;
    font-weight: 900;
    margin: 0 0 18px 0;
    line-height: 1.1;
    letter-spacing: -1px;
}
.main-news-desc {
    font-size: 1.1em;
    color: #f3f3f3;
    margin: 0 0 12px 0;
    max-width: 90%;
    font-weight: 400;
}
@media (max-width: 900px) {
    .main-news-content {
        padding: 32px 18px 24px 18px;
        max-width: 100%;
        min-height: 180px;
    }
    .main-news-title {
        font-size: 1.5em;
    }
    .main-news-image {
        min-height: 180px;
    }
}
/*----------------------------*/

/* Estilos de las noticias secundarias */
.blog-list-section {
    max-width: 1300px;
    margin: 48px auto 30px auto;
    padding: 0 16px;
    height: auto;
}
.blog-list-title {
    font-size: 1.4em;
    font-weight: 700;
    margin-bottom: 28px;
    padding-top: 30px;
    color: #222;
    letter-spacing: -0.5px;
}
.blog-list-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}
/* Ocupa todo el contenedor con la imagen */
.blog-card {
    position: relative;
    overflow: hidden;
    height: 300px;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    box-shadow: 0 2px 12px 0 rgba(31,38,135,0.07);
    transition: box-shadow 0.2s, transform 0.2s;
    min-width: 0;
    cursor: pointer;
    background: #000; /* fallback */
}
.blog-card:hover {
    box-shadow: 0 8px 32px 0 rgba(31,38,135,0.13);
    transform: translateY(-4px) scale(1.02);
}
.blog-card-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}
.blog-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(90%);
}
/* Fondo transparente y texto blanco en el body */
.blog-card-body {
    position: relative;
    z-index: 2;
    background: rgba(0,0,0,0.35); /* fondo semitransparente */
    color: #fff;
    padding: 22px 20px 18px 20px;
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: flex-end;
    height: 100px;
    overflow: hidden;
}
.blog-card-title,
.blog-card-meta {
    color: #fff;
}
.blog-card-title {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.449);
    font-size: 1.18em;
    font-weight: 800;
    margin: 0 0 10px 0;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Número de líneas visibles */
    -webkit-box-orient: vertical;
    white-space: normal;
}
.blog-card-meta {
    font-size: 0.98em;
    display: flex;
    gap: 8px;
    align-items: center;
}
.blog-list-footer {
    display: flex;
    justify-content: center;
    margin: 32px 0 0 0;
}
.pagination {
    display: flex;
    gap: 12px;
    align-items: center;
}

.pagination a {
    text-decoration: none;
}

.pagination-btn {
    background: #f6f8fc;
    color: #222;
    border: none;
    border-radius: 10px;
    padding: 7px 20px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    min-width: unset;
    min-height: unset;
    box-shadow: 0 1px 4px 0 #0001;
    outline: none;
}

.pagination-btn.active {
    background: #72a3fa;
    color: #fff;
    font-weight: 600;
}

.pagination-btn.next {
    padding-right: 26px;
    padding-left: 18px;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.blog-list-more:hover {
    background: #16315E;
}
@media (max-width: 1000px) {
    .blog-list-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}
@media (max-width: 700px) {
    .blog-list-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .blog-card-body {
        padding: 16px 12px 14px 12px;
    }
}
/* ------------------------------------------- */


/* -------------------------------------- Footer  */
footer {
  clip-path: polygon(25% 0, 100% 5%, 100% 100%, 0 100%, 0 5%); /* Forma de rectángulo con punta triangular */
}

.main-footer {
  background: #ECEDEF;
  color: #3A3839;
  padding: 60px 30px 30px 30px;
  padding-top: 80px;
  font-size: 1rem;
  font-weight: 400;
  justify-items: center;
}
.footer-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 55px;
  box-sizing: border-box;
}

.footer-col {
  min-width: 100px;
  width: 100%;
  max-width: 265px;
  margin-bottom: 32px;
}
.footer-col iframe {
  width: 100%;
  height: 180px;
  border-radius: 12px;
}
.footer-logo-col {
  min-width: 180px;
  width: 100%;
  max-width: 210px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-logo {
  height: 200px;
  width: auto;
  max-width: 90vw;
}

.footer-title {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 10px;
}

.footer-links,
.footer-social {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li,
.footer-social li {
  margin-bottom: 10px;
}

.footer-links a,
.footer-social a {
  color: #3A3839;
  text-decoration: none;
  opacity: 0.85;
  transition: color 0.2s, opacity 0.2s;
  display: flex;
  align-items: baseline; /* Alinea el icono y el texto */
  gap: 8px;
  font-size: 1.08rem;
}

.footer-links a:hover,
.footer-social a:hover {
  color: #000000;
  font-weight: 500;
  opacity: 1;
}

.footer-links span i {
  font-size: 1.2rem;
}

.footer-bottom {
  text-align: center;
  color: #a1a1a1;
  font-size: 0.9rem;
  border-top: 1px solid #ffffff;
  width: 100%;
  padding-top: 30px;
}

.footer-bottom span {
  font-style:italic;
}

.footer-bottom a {
  color: #8c8c8c;
}
.footer-bottom a:hover {
  color: #477099;
}

/* Responsive */
@media (max-width: 1220px) {
  .footer-container {
    justify-content: space-evenly;
  }
  .map {
    width: 100%;
    max-width: 1000px;
  }
}
/* Tablet */
@media (max-width: 900px) {
  footer {
  clip-path: polygon(25% 0, 100% 5%, 100% 100%, 0 100%, 0 5%); /* Forma de rectángulo con punta triangular */
}
  .footer-container {
    display: flex;
    align-items: flex-start;
    justify-items: flex-start;
    justify-content: space-around;
    padding: 60px 20px 30px 20px;
    gap: 15px;
  }
  .footer-col,
  .footer-logo-col {
    max-width: 100%;
    align-items: flex-start;
  }
  .footer-col {
    margin-bottom: 0;
  }
  .footer-links, .footer-social {
    display: flex;
    flex-direction: column;
  }
  .footer-logo-col {
    align-items: flex-start;
    text-align: left;
  }
  .footer-logo {
    height: 200px;
    margin-bottom: 10px;
  }
}

/* Móvil */
@media (max-width: 600px) {
  .footer-col,
  .footer-logo-col {
    max-width: 100%;
    min-width: 0;
    align-items: flex-start;
  }
  .footer-title {
    font-size: 1rem;
  }
  .footer-bottom {
    font-size: 0.92rem;
    margin-top: 12px;
  }
}