:root {
  --azul: rgb(19, 29, 57);
  --rojo: rgb(199, 12, 0);
  --blanco: #ffffff;
  --gris-fondo: #f5f5f5;
  --sombra: 0 6px 18px rgba(0,0,0,0.15);
}



/* Título principal */
.title {
  margin: 8vh auto 4vh;
  text-align: center;
  font-weight: 700;
  color: var(--azul) !important;
}

.title h1 {
  font-size: 2.4rem;
  border-bottom: 3px solid var(--rojo);
  display: inline-block;
  padding-bottom: 0.5rem;
}

/* Contenedor principal */
.page {
  display: flex;
  gap: 2rem;
  max-width: 1200px;
  width: calc(100% - 4rem);
  margin: 5vh auto;
  flex-wrap: nowrap;
  height: 60vh;
  transition: all 0.3s ease;
}

/* Cards */
.history-container,
.blog-container {
  flex: 1 1 50%;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--sombra);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.img-history,
.img-blog {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  filter: brightness(0.55);
  transition: filter 0.4s ease;
}

/* Overlay degradado */
.history-container::before,
.blog-container::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom right, rgba(19,29,57,0.7), rgba(199,12,0,0.7));
  opacity: 0.6;
  transition: opacity 0.4s ease;
}

.history-content,
.blog-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
  color: var(--blanco);
}

.history-content h1,
.blog-content h1 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.history-content p,
.blog-content p {
  font-size: 1rem;
}

/* Hover */
.history-container:hover,
.blog-container:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 28px rgba(0,0,0,0.25);
}

.history-container:hover::before,
.blog-container:hover::before {
  opacity: 0.85;
}

.history-container:hover img,
.blog-container:hover img {
  filter: brightness(0.7);
}

/* Animaciones de entrada */
.animate-on-scroll,
.animate-on-load {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s ease-out;
}

.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Tablet */
@media (min-width: 768px) and (max-width: 1024px) {
  .page {
    flex-wrap: wrap;
    gap: 1.5rem;
    height: auto;
  }

  .history-container,
  .blog-container {
    flex: 1 1 100%;
    height: 350px;
  }

  .title h1 {
    font-size: 2rem;
  }
}

/* Responsive Móvil */
@media (max-width: 767px) {
  .page {
    flex-direction: column;
    gap: 1.5rem;
    margin: 5vh auto;
    height: auto;
    width: 100%;
    padding: 0 1rem;
  }

  .history-container,
  .blog-container {
    height: 280px;
  }

  .title h1 {
    font-size: 1.8rem;
  }

  .history-content h1,
  .blog-content h1 {
    font-size: 1.4rem;
  }

  .history-content p,
  .blog-content p {
    font-size: 0.95rem;
  }
}