body {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  background-image: url('img/fondo.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: #192C4C;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 50px;
  position: relative;
  z-index: 10;
}

.logo img {
  height: 60px;
}

nav {
  display: flex;
  gap: 20px;
}

nav a.enlace {
  position: relative;
  color: #192C4C;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  padding: 5px 0;
  transition: all 0.3s ease;
}

nav a.enlace:hover {
  color: #AD803C;
}

nav a.enlace::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #AD803C;
  transition: width 0.4s ease;
}

nav a.enlace:hover::after {
  width: 100%;
}

.timeline-container {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  padding: 50px 0;
}

.timeline {
  display: flex;
  gap: 60px;
  padding: 40px 80px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.timeline::-webkit-scrollbar {
  display: none;
}

.decade {
  position: relative;
  flex: 0 0 auto;
  width: 300px;
  height: auto;
  overflow: hidden;
  cursor: pointer;
  background-color: white;
  border-radius: 10px;
  transition: transform 0.3s ease, height 0.5s ease;
}
img[alt="Modernización y auge del ron"] {
  object-position: 20% center; /* Mueve el contenido de la imagen hacia la derecha */
}
.decade img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  filter: brightness(60%);
  transition: transform 0.3s ease, filter 0.3s ease;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

.decade:hover img {
  transform: scale(1.05);
  filter: brightness(40%);
}

.decade img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  filter: brightness(60%);
  transition: transform 0.3s ease, filter 0.3s ease;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}


.overlay {
  position: absolute;
  bottom: 20px;
  width: 100%;
  text-align: center;
  color: #b5c6ff;
  font-size: 1.5rem;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.decade:hover .overlay {
  opacity: 1;
}

.scroll-zone {
  position: absolute;
  top: 0;
  width: 100px;
  height: 100%;
  z-index: 10;
  cursor: pointer;
  transition: all 0.3s ease;
  background: linear-gradient(to right, rgba(25,44,76,0.1), transparent);
}

.right-zone {
  right: 0;
  background: linear-gradient(to left, rgba(25,44,76,0.1), transparent);
}

.scroll-zone:hover {
  background: linear-gradient(to right, rgba(25,44,76,0.3), transparent);
  width: 120px;
}

.right-zone:hover {
  background: linear-gradient(to left, rgba(25,44,76,0.3), transparent);
}

.scroll-zone::after {
  content: "→";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
  color: #AD803C;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.left-zone::after {
  content: "←";
  left: 20px;
}

.right-zone::after {
  right: 20px;
}

.scroll-zone:hover::after {
  opacity: 0.7;
}

/* Modifica estos estilos en tu CSS */
.decade {
  position: relative;
  flex: 0 0 auto;
  width: 300px;
  height: 450px; /* Altura inicial de la tarjeta */
  overflow: hidden;
  cursor: pointer;
  border-radius: 10px;
  transition: transform 0.3s ease, height 0.5s ease;
  background-color: transparent; /* Fondo transparente por defecto */
}

.historia1, .historia2, .historia3, 
.historia4, .historia5, .historia6 {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: all 0.5s ease;
  padding: 0 15px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 0 0 10px 10px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.decade.active {
  z-index: 10; /* Asegura que esté por encima de otros elementos */
}

.decade.active .historia1,
.decade.active .historia2,
.decade.active .historia3,
.decade.active .historia4,
.decade.active .historia5,
.decade.active .historia6 {
  max-height: 300px; /* Altura máxima aproximada para el texto */
  opacity: 1;
  padding: 20px 15px;
  overflow-y: auto; /* Permite el desplazamiento si el contenido es demasiado largo */
}

.decade img {
  width: 100%;
  height: 500px; /* Altura inicial de la imagen */
  object-fit: cover;
  transition: height 0.3s ease; /* Transición suave para la imagen */
}

.decade.active img {
  height: 100px; /* Reduce la altura de la imagen cuando está activa */
}

.overlay {
  transition: opacity 0.3s ease;
}

.decade.active .overlay {
  opacity: 0;
}

/* Añade esto para mejorar la transición */
.decade {
  display: flex;
  flex-direction: column;
}
.enlace.activo {
  color: #AD803C;
}

.enlace.activo::after {
  width: 100%;
  background-color: #AD803C;
}
/* Estilos del footer */
.site-footer {
  background-color: #192C4C;
  color: white;
  padding: 50px 0 0;
  font-family: 'Montserrat', sans-serif;
  position: relative;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  gap: 30px;
}

.footer-section {
  flex: 1;
  min-width: 200px;
  margin-bottom: 30px;
}

.footer-logo img {
  max-width: 100%;
  height: auto;
  margin-bottom: 15px;
}

.footer-description {
  font-size: 0.9rem;
  line-height: 1.5;
  opacity: 0.8;
}

.footer-title {
  color: #DFCA66;
  font-size: 1.1rem;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.footer-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 2px;
  background-color: #AD803C;
}

.footer-links li, .footer-contact li {
  margin-bottom: 12px;
  list-style: none;
}

.footer-links a, .footer-contact a {
  color: white;
  text-decoration: none;
  transition: color 0.3s;
  font-size: 0.9rem;
}

.footer-links a:hover, .footer-contact a:hover {
  color: #DFCA66;
}

.footer-contact i {
  margin-right: 10px;
  color: #DFCA66;
  width: 18px;
  text-align: center;
}

.social-icons {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(255,255,255,0.1);
  color: white;
  transition: all 0.3s;
}

.social-icons a:hover {
  background-color: #DFCA66;
  color: #192C4C;
  transform: translateY(-3px);
}

.back-to-top {
  background-color: transparent;
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 5px;
}

.back-to-top:hover {
  background-color: rgba(255,255,255,0.1);
  border-color: #DFCA66;
  color: #DFCA66;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
  text-align: center;
  font-size: 0.8rem;
  background-color: rgba(0,0,0,0.1);
}

.copyright {
  margin-bottom: 10px;
}

.legal-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.legal-links a {
  color: white;
  text-decoration: none;
  transition: color 0.3s;
  font-size: 0.8rem;
}

.legal-links a:hover {
  color: #DFCA66;
  text-decoration: underline;
}

.legal-links span {
  opacity: 0.5;
}

@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    gap: 30px;
  }
  
  .footer-section {
    min-width: 100%;
  }
  
  .footer-links, .footer-contact {
    padding-left: 0;
  }
}
