@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

/* --- Variables de Colores --- */
:root {
  --deepBlack: #0d1221;
  --prussianBlue: #1d2d44;
  --payneGrey: #3e5c76;
  --blueSilverLake: #748CAB;
  --eggShell: #f0ebd8;
  --deepSkyBlue: #008CBA;
  --darkGray: #333333;
  --headerBackground: #0E2954;
  /* Azul oscuro del header de la imagen */
  --menuLinkColor: #B4C0D4;
  /* Azul/gris claro de los links del menú */
  --heroGradientStart: #001f3f;
  /* Degradado del hero */
  --heroGradientEnd: #003366;
  /* Degradado del hero */
  --heroSubtitleColor: #ADD8E6;
  /* Azul claro para --CAPITT-- en el hero */
  --highlightYellow: #FFD700;
  /* Amarillo para "PROPIEDAD INTELECTUAL" */
  --subtituloColor: #E0E0E0;
  /* Color del subtítulo del hero */
  --sectionBackground: #1a3a60;
  /* Color de fondo para la sección de contenido (azul oscuro de la imagen 2) */
  --mainTextColor: #f0f0f0;
  /* Color de texto principal para esta sección (blanco/gris claro) */
  --secondaryTextColor: #ADD8E6;
  /* Color de texto secundario para destacar (azul claro) */
  --tertiaryTextColor: #cccccc;
  /* Color de texto para párrafos más claros */
  --imageBorderColor: #008CBA;
  /* Color del borde de la imagen en la sección de asesoramiento */
  --opinionCardBackground: #0E223D;
  /* Fondo del cuadro de opinión */
  --footerBackground: #0E223D;
  /* Fondo del footer (coincide con el de opinión) */
  --buttonPrimary: #007bff;
  /* Azul primario para botones */
  --buttonPrimaryHover: #0056b3;
  /* Azul oscuro para hover de botones */
  --bubbleBackground: #1d2d44;
  /* Fondo oscuro para las burbujas */
  --bubbleBorderHover: #008CBA;
  /* Color del borde de las burbujas al pasar el mouse */
  --legalBgLight: #e6f7f2;
}

/* --- Reseteo y Estilos Globales --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  text-decoration: none;
  border: none;
  outline: none;
  transition: .2s linear;
  color: var(--eggShell);
  font-size: 1rem;
}

body {
  margin: 0;
  font-family: 'Roboto', sans-serif;
  background-color: var(--sectionBackground);
  color: var(--eggShell);
}

/* --- Header Styles --- */
header {
  background-color: var(--headerBackground);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 5%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 1000;
  min-height: 80px;
  height: auto;
}

.logo-izquierdo {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-right: 60px;
}

.logo-izquierdo img {
  height: 5rem;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.logo-mobile {
  display: none;
}

.logo-desktop {
  display: block;
}

.logo-capitt {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  padding: 5px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.inicio {
  font-size: 0.7rem;
}

.logo-capitt img {
  height: 5rem;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

nav {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding-left: 60px;
}

.menu-opciones {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 30px;
}

.menu-opciones li {
  margin-left: 0;
  position: relative;
}

.menu-opciones li a {
  color: var(--menuLinkColor);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 5px 0px;
  display: block;
  transition: color 0.3s ease;
}

.menu-opciones li a:hover {
  color: var(--eggShell);
}

.menu-icon {
  display: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--menuLinkColor);
}

.fullscreen-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.fullscreen-menu ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
  text-align: center;
}

.fullscreen-menu li {
  margin: 25px 0;
}

.fullscreen-menu a {
  color: var(--eggShell);
  font-size: 2rem;
  text-decoration: none;
  transition: color 0.3s ease;
}

.fullscreen-menu a:hover {
  color: var(--highlightYellow);
}

.menu-close-icon {
  position: absolute;
  top: 30px;
  right: 30px;
  font-size: 3rem;
  color: var(--eggShell);
  cursor: pointer;
  transition: color 0.3s ease;
  z-index: 99999;
}

/* --- Hero Section Styles --- */
.hero {
  background: linear-gradient(to right, var(--heroGradientStart), var(--heroGradientEnd));
  color: var(--eggShell);
  text-align: center;
  padding: 100px 20px;
  position: relative;
  overflow: hidden;
  min-height: 400px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero .contenedor {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  padding: 0;
  background-color: transparent;
}

.titulo_principal {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  text-transform: uppercase;
  color: var(--highlightYellow);
}

.linea {
  width: 200px;
  height: 1px;
  background-color: var(--eggShell);
  margin: 0px auto 30px auto;
}

.subtitulo {
  font-size: 1.3rem;
  margin-bottom: 40px;
  line-height: 1.5;
  color: var(--subtituloColor);
  text-align: justify;
}

/* --- Filtro de Noticias Flotante Universal (PC & Móvil) --- */
.filter-toggle-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 65px;
  height: 65px;
  background: linear-gradient(135deg, var(--deepSkyBlue), #0056b3);
  color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.8rem;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  z-index: 1002;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.filter-toggle-btn:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 12px 30px rgba(0, 140, 186, 0.5);
}

.filter-container {
  position: fixed;
  bottom: 110px;
  right: 30px;
  width: 350px;
  padding: 25px;
  background-color: rgba(29, 45, 68, 0.85);
  /* Transparencia */
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-radius: 1.5rem;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
  z-index: 1001;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(30px) scale(0.95);
}

.filter-container.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.filter-header-mobile {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.filter-header-mobile span {
  font-weight: 700;
  color: var(--highlightYellow);
  font-size: 1.1rem;
  text-transform: uppercase;
}

#filter-close {
  background: rgba(255, 255, 255, 0.1);
  color: var(--eggShell);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.filter-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-group label {
  font-size: 0.8rem;
  color: var(--blueSilverLake);
  font-weight: 700;
  letter-spacing: 1px;
}

.filter-group input {
  padding: 12px;
  border-radius: 10px;
  background: rgba(13, 18, 33, 0.5);
  border: 1px solid rgba(116, 140, 171, 0.3);
  color: var(--eggShell);
  font-size: 1rem;
  width: 100%;
}

.filter-actions {
  display: flex;
  gap: 10px;
}

.btn-filter {
  flex: 2;
  background: var(--deepSkyBlue);
  color: white;
  padding: 12px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-clear {
  flex: 1;
  background: rgba(255, 255, 255, 0.1);
  color: var(--eggShell);
  padding: 12px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- NOTICIAS: Contenido principal --- */
.container {
  background-color: var(--sectionBackground);
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
}

.post-card {
  background-color: var(--prussianBlue);
  border-radius: 1rem;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  margin-bottom: 0;
  overflow: hidden;
  height: min-content;
  border: 1px solid rgba(116, 140, 171, 0.1);
  display: flex;
  flex-direction: column;
}

.post-header {
  display: flex;
  align-items: center;
  padding: 1rem;
  gap: 0.75rem;
}

.profile-pic {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--deepSkyBlue);
}

.username {
  font-weight: 600;
  color: var(--mainTextColor);
}

.post-image {
  width: 100%;
  max-height: 450px;
  display: block;
  object-fit: contain;
  background-color: rgba(0, 0, 0, 0.2);
}

.post-video {
  width: 80%;
  /* Más pequeño y centrado */
  max-height: 420px;
  background: #000;
  display: block;
  object-fit: contain;
  /* Letterboxing lateral */
  margin: 10px auto;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.post-body {
  margin-top: 1rem;
  padding: 0 1rem 1rem 1rem;
}

.post-caption {
  font-size: 1.2rem;
  line-height: 1.4;
  color: var(--eggShell);
  text-align: justify;
}

.post-title-premium {
  font-size: 1.2rem;
  color: var(--highlightYellow);
  border-left: 6px solid var(--deepSkyBlue);
  padding-left: 15px;
  margin: 15px 0;
  font-weight: bold;
  text-transform: uppercase;
  display: block;
}

.caption-username {
  font-weight: 600;
  margin-right: 0.25rem;
  color: var(--secondaryTextColor);
}

/* --- Carrusel styles --- */
.carousel-container {
  position: relative;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.carousel-slide {
  flex-shrink: 0;
  width: 100%;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: var(--eggShell);
  border: none;
  cursor: pointer;
  z-index: 10;
  width: 40px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  border-radius: 50%;
}

.carousel-btn.prev {
  left: 10px;
}

.carousel-btn.next {
  right: 10px;
}

.carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.dot {
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
}

.dot.active {
  background: var(--eggShell);
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 1rem;
}

.pagination button {
  padding: 10px 15px;
  border: 1px solid var(--eggShell);
  background-color: var(--eggShell);
  cursor: pointer;
  border-radius: 5px;
  transition: 0.3s;
  color: var(--deepBlack);
}

.pagination button.active {
  background-color: var(--buttonPrimary);
  color: var(--eggShell);
  border-color: var(--buttonPrimary);
}

/* --- Footer Styles --- */
.contenedor_footer {
  background-color: var(--footerBackground);
  color: var(--eggShell);
  padding: 30px 20px;
  text-align: center;
}

.contenedor_footer .titulo_footer {
  font-size: 1.3rem;
  margin-bottom: 15px;
  line-height: 1.4;
  color: var(--eggShell);
}

.contenedor_footer .info_contacto {
  font-size: 1rem;
  margin-bottom: 20px;
  line-height: 1.6;
  color: var(--tertiaryTextColor);
}

.contenedor_footer .logo_footer img {
  max-width: 80px;
  height: auto;
}

.contenedor_footer .linea_footer {
  width: 80%;
  height: 1px;
  background-color: var(--deepSkyBlue);
  margin: 20px auto;
}

.contenedor_footer .copyright {
  font-size: 0.8rem;
  color: var(--deepSkyBlue);
}

@media(min-width: 1025px) {
  header {
    padding: 5px 2% !important;
    /* Optimización de espacio lateral */
    height: 85px !important;
  }

  .logo-izquierdo {
    padding-right: 20px !important;
  }

  nav {
    padding-left: 20px !important;
  }

  .logo-izquierdo img,
  .logo-capitt img {
    height: 3.5rem !important;
    /* Reducción para acomodar zoom */
  }

  .logo-desktop {
    display: block !important;
  }

  .logo-mobile {
    display: none !important;
  }

  .hero {
    padding: 40px 15px !important;
    min-height: 200px !important;
  }

  .menu-opciones {
    gap: 15px !important;
    /* Reducción de gap entre elementos */
  }

  .menu-opciones li a {
    color: var(--menuLinkColor);
    text-decoration: none;
    font-size: 0.75rem;
    padding: 5px 0px;
    display: block;
    transition: color 0.3s ease;
  }

  .hero .contenedor {
    padding: 0 10px;
  }

  .titulo_principal {
    font-size: 1.4rem !important;
    line-height: 1.3;
  }

  .subtitulo {
    font-size: 1rem !important;
    margin-bottom: 0rem;
    line-height: 1.4;
  }

  .filter-container {
    position: fixed;
    bottom: 110px;
    right: 30px;
    left: auto;
    width: 350px;
    border-radius: 1.5rem;
    transform: translateY(30px) scale(0.95);
    padding: 30px 25px 40px 25px;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6);
  }

  .filter-container.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
  }

  .filter-toggle-btn {
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
  }

  .post-caption {
    font-size: 1rem;
  }

  .publisher-info {
    font-size: 1rem;
  }

  .post-video {
    width: 90%;
  }

  .contenedor_footer {
    padding: 30px 15px !important;
  }

  .contenedor_footer .titulo_footer {
    font-size: 1.1rem !important;
  }

  .contenedor_footer .info_contacto {
    font-size: 0.95rem !important;
  }

  .contenedor_footer .logo_footer img {
    max-width: 60px;
  }

  .contenedor_footer .copyright {
    font-size: 0.8rem;
  }
}

@media (max-width: 1150px) {
  nav .menu-opciones {
    display: none !important;
  }

  .menu-icon {
    display: block !important;
  }

  .fullscreen-menu {
    display: none;
  }
}

@media (max-width: 1024px) {
  header {
    padding: 5px 3%;
    height: 85px;
  }

  .logo-izquierdo {
    padding-right: 20px;
  }

  nav {
    padding-left: 20px;
  }

  .logo-izquierdo img,
  .logo-capitt img {
    height: 3.5rem;
  }

  .logo-desktop {
    display: none !important;
  }

  .logo-mobile {
    display: block !important;
  }

  nav .menu-opciones {
    display: none !important;
  }

  .menu-icon {
    display: block !important;
  }

  .hero {
    padding: 80px 15px;
    min-height: 200px;
  }

  .titulo_principal {
    font-size: 1.4rem !important;
  }

  .subtitulo {
    font-size: 1rem !important;
    text-align: center;
  }

  .filter-container {
    position: fixed;
    bottom: 110px;
    right: 30px;
    left: auto;
    width: 350px;
    border-radius: 1.5rem;
    transform: translateY(30px) scale(0.95);
    padding: 30px 25px 40px 25px;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6);
  }

  .filter-container.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
  }

  .filter-toggle-btn {
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
  }

  .post-caption {
    font-size: 1rem;
  }

  .post-video {
    width: 90%;
  }

  .publisher-info {
    font-size: 1rem;
  }

  .contenedor_footer {
    padding: 25px 15px;
  }

  .contenedor_footer .titulo_footer {
    font-size: 1rem !important;
  }

  .contenedor_footer .info_contacto {
    font-size: 0.8rem !important;
  }
}

@media (max-width: 768px) {
  header {
    padding: 5px 3% !important;
    height: 85px !important;
  }

  .logo-izquierdo {
    padding-right: 20px !important;
  }

  nav {
    padding-left: 20px !important;
  }

  .logo-izquierdo img,
  .logo-capitt img {
    height: 3.5rem !important;
  }

  .logo-desktop {
    display: none !important;
  }

  .logo-mobile {
    display: block !important;
  }

  nav .menu-opciones {
    display: none !important;
  }

  .fullscreen-menu a {
    font-size: 1.5rem;
  }

  .menu-close-icon {
    top: 15px;
    right: 10px;
    font-size: 3rem;
  }

  .menu-icon {
    display: block !important;
  }

  .hero {
    padding: 20px 15px !important;
    min-height: 200px !important;
  }

  .hero .contenedor {
    padding: 0 10px;
  }

  .titulo_principal {
    font-size: 1.2rem !important;
    line-height: 1.3;
  }

  .subtitulo {
    font-size: 1rem !important;
    margin-bottom: 0rem;
    line-height: 1.4;
    text-align: justify;
  }

  .container {
    padding: 1rem;
    grid-template-columns: 1fr !important;
    gap: 20px;
  }

  .post-card {
    border-radius: 0.85rem;
    margin-bottom: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }

  .post-image,
  .post-video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    max-height: 450px !important;
    object-fit: contain !important;
  }

  .burbujas-contenedor,
  .lista-principios {
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    gap: 15px !important;
  }

  .burbuja-servicio,
  .lista-principios li {
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
    padding: 20px !important;
  }

  .filter-toggle-btn {
    width: 58px;
    height: 58px;
    bottom: 20px;
    right: 20px;
    font-size: 1.5rem;
  }

  .filter-container {
    padding: 25px 15px;
    border-radius: 1.5rem 1.5rem 0 0;
  }

  .username {
    font-size: 1rem;
  }

  .post-header {
    padding: 0.95rem;
  }

  .post-body {
    padding: 1rem;
    margin-top: 0rem;
  }

  .post-caption {
    font-size: 1rem;
  }

  .publisher-info {
    font-size: 0.95rem;
  }

  .contenedor_footer {
    padding: 30px 15px !important;
  }

  .contenedor_footer .titulo_footer {
    font-size: 1.1rem !important;
  }

  .contenedor_footer .info_contacto {
    font-size: 0.95rem !important;
  }

  .contenedor_footer .logo_footer img {
    max-width: 60px;
  }

  .contenedor_footer .copyright {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  header {
    padding: 5px 3% !important;
    height: 85px !important;
  }

  .logo-izquierdo {
    padding-right: 20px !important;
  }

  nav {
    padding-left: 20px !important;
  }

  .logo-izquierdo img,
  .logo-capitt img {
    height: 3.5rem !important;
  }

  .logo-desktop {
    display: none !important;
  }

  .logo-mobile {
    display: block !important;
  }

  nav .menu-opciones {
    display: none !important;
  }

  .fullscreen-menu a {
    font-size: 1.5rem;
  }

  .menu-close-icon {
    top: 15px;
    right: 10px;
    font-size: 3rem;
  }

  .menu-icon {
    display: block !important;
  }

  .hero {
    padding: 20px 15px !important;
    min-height: 200px !important;
  }

  .hero .contenedor {
    padding: 0 10px;
  }

  .titulo_principal {
    font-size: 1.2rem !important;
    line-height: 1.3;
  }

  .subtitulo {
    font-size: 1rem !important;
    margin-bottom: 0rem;
    line-height: 1.4;
    text-align: justify;
  }

  .container {
    padding: 1rem;
    grid-template-columns: 1fr !important;
    gap: 20px;
  }

  .post-card {
    border-radius: 0.85rem;
    margin-bottom: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }

  .post-image,
  .post-video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    max-height: 450px !important;
    object-fit: contain !important;
  }

  .burbujas-contenedor,
  .lista-principios {
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    gap: 15px !important;
  }

  .burbuja-servicio,
  .lista-principios li {
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
    padding: 20px !important;
  }

  .filter-toggle-btn {
    width: 58px;
    height: 58px;
    bottom: 20px;
    right: 20px;
    font-size: 1.5rem;
  }

  .filter-container {
    padding: 25px 15px;
    border-radius: 1.5rem 1.5rem 0 0;
  }

  .username {
    font-size: 1rem;
  }

  .post-header {
    padding: 0.95rem;
  }

  .post-body {
    padding: 1rem;
    margin-top: 0rem;
  }

  .post-caption {
    font-size: 1rem;
  }

  .publisher-info {
    font-size: 0.95rem;
  }

  .contenedor_footer {
    padding: 30px 15px !important;
  }

  .contenedor_footer .titulo_footer {
    font-size: 1.1rem !important;
  }

  .contenedor_footer .info_contacto {
    font-size: 0.95rem !important;
  }

  .contenedor_footer .logo_footer img {
    max-width: 60px;
  }

  .contenedor_footer .copyright {
    font-size: 0.8rem;
  }
}