/* styles.css */

:root {
  --primary: #24796C;
  --white: #ffffff;
  --dark: #333333;
  --complem: #d81b60;
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Body */
body {
  font-family: 'Trebuchet MS', Arial, sans-serif;
  color: var(--dark);
  line-height: 1.5;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

#intro {
  text-align: center;
  border-radius: .5rem;
  margin: 5rem auto;
  max-width: 1000px;
}

#intro h2 {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

#intro p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--dark);
  max-width: 800px;
  margin: 0 auto;
}

.section-separator {
  width: 80%;
  max-width: 300px;
  margin: 1rem auto;
  border: 0;
  border-top: 2px solid var(--primary);
}


/* Header */
header {
  position: fixed;
  top: 0;
  width: 100%;
  background: transparent;
  border-bottom: none;
  z-index: 1000;
  transition: background .3s ease, border-bottom .3s ease;
}

header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 2px solid var(--primary);
}

.header-inner {
  margin: 0;
  min-width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .5rem 2rem;
  gap: 1rem;
}

@media (max-width: 1024px) {
  .header-inner {
    padding: .5rem 1rem;
    /* menos relleno para ganar espacio */
  }
}


.logo {
  display: flex;
  align-items: center;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--white);
  transition: color .3s ease;
}

header.scrolled .logo {
  color: var(--dark);
}

.logo i {
  margin-right: .5rem;
  color: var(--primary);
}

/* Nav toggle (hamburger) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--white);
  cursor: pointer;
  transition: color .3s ease;
}

header.scrolled .nav-toggle {
  color: var(--dark);
}

/* Navigation */
nav {
  position: relative;
}



nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

nav a {
  position: relative;
  padding: .5rem;
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  transition: color .3s ease;
}

header.scrolled nav a {
  color: var(--dark);
}

nav a:hover {
  color: var(--primary);
}

nav a.active::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--primary);
}

/* Selector de idiomas en el header */
.navigator_ul {
  display: flex;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
  align-items: center;
  order: 0;
}

.flag-icon {
  display: block;
  width: 30px;
  height: auto;
  border-radius: 3px;
  transition: opacity .2s ease, transform .2s ease;
}

.flag-icon:hover {
  opacity: 0.8;
  transform: scale(1.1);
}

/* En desktop, queremos que el nav quede al final */
@media (min-width: 769px) {
  .navigator_ul {
    margin-left: auto;
  }

  nav {
    margin-left: 1rem;
  }
}

/* En mobile, reordenamos si hace falta */
@media (max-width: 768px) {
  .navigator_ul {
    order: 0;
  }

  .nav-toggle {
    order: 1;
  }

  nav a.active::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary);
  }

  nav {
    order: 2;
  }
}

@media (max-width: 1024px) {
  nav ul {
    gap: 1rem;
    /* en vez de 1.5rem */
  }
  nav a {
    font-size: .9rem;
    /* un pelín más pequeño si hiciera falta */
  }
}


@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  nav {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, .95);
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
    z-index: 999;
  }

  nav.open {
    max-height: 300px;
  }

  nav ul {
    flex-direction: column;
    gap: 0;
  }

  nav li + li {
    border-top: 1px solid #eee;
  }

  nav a {
    display: block;
    padding: .75rem 1.5rem;
    color: var(--dark);
    /* asegurar texto negro */
    transition: color .3s ease;
  }

  /* cuando esté abierto, estado hover/active */
  nav.open a:hover {
    color: var(--primary);
  }
}

/* === ROOM CAROUSEL === */
.room-carousel {
  margin: 4rem auto;
}

.carousel-container {
  position: relative;
  width: 70%;
  max-width: 1200px;
  height: 450px;
  margin: 0 auto;
  overflow: hidden;
}

.carousel-slides {
  height: 100%;
  position: relative;
}

.carousel-slides .slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

.carousel-slides .slide.active {
  opacity: 1;
}

/* NAVIGATION */
.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary);
  border: none;
  color: #fff;
  padding: .75rem;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
}

.carousel-nav.prev {
  left: 1rem;
}

.carousel-nav.next {
  right: 1rem;
}

.carousel-nav i {
  font-size: 1rem;
}

/* OVERLAY */
.carousel-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  border-radius: .5rem;
  max-width: 500px;
  width: 90%;
  padding: 0;
  /* sin padding interno según especificación */
  text-align: center;
  opacity: 1;
  transition: opacity 0.5s ease;
  z-index: 5;
}

.carousel-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Overlay content */
.carousel-overlay h3 {
  margin: 1rem 0 .5rem;
  color: var(--primary);
  font-size: 1.5rem;
}

.carousel-overlay p {
  margin: 0 1rem 1rem;
  color: var(--dark);
  font-size: .95rem;
  line-height: 1.4;
}

.features-icons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.features-icons span {
  font-size: 1.2rem;
  background: var(--primary);
  color: #fff;
  padding: .5rem;
  border-radius: .25rem;
}

.btn-reserve {
  display: inline-block;
  width: 100%;
  margin-bottom: 1rem;
  background: #d5d817;
  color: #000000;
  border: none;
  padding: .6rem 1.2rem;
  border-radius: .25rem;
  cursor: pointer;
  font-weight: 600;
  transition: background .3s ease, transform .2s ease;
}

.btn-reserve:hover {
  transform: translateY(-2px);
}
/* Pulsación SOLO del texto dentro del botón de reserva */
@keyframes pulse-text {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.btn-reserve .reserve-text {
  display: inline-block;
  /* necesario para que transforme el span */
  animation: pulse-text 2s infinite ease-in-out;
}


/* TOGGLE OVERLAY BUTTON */
.toggle-overlay-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  /* eliminamos cualquier bottom */
  bottom: auto;
  /* resto de estilos igual */
  background: red;
  color: #fff;
  border: none;
  padding: .5rem 1rem;
  border-radius: .25rem;
  cursor: pointer;
  z-index: 10;
  transition: opacity .5s ease;
}

.toggle-overlay-btn.visible {
  opacity: 1;
}

/* PULSE ANIMATION */
@keyframes pulse-btn {

  0%,
  100% {
    transform: scale(1);
    filter: brightness(1);
    background-color: var(--primary);
    color: var(--white);
  }

  50% {
    transform: scale(1.1);
    filter: brightness(1.3);
    background-color: var(--complem);
    color: var(--white);
  }
}

@media (min-width: 769px) {
  .carousel-container {
    overflow: visible;
  }
}

/* RESPONSIVE */
/* @media (max-width: 768px) {
  .carousel-container {
    width: 90%;
    height: 300px;
  }

    .carousel-overlay {
    position: static;
    transform: none;
    margin-top: 1rem;
    width: 100%;
  }


  .carousel-nav {
    padding: .5rem;
  }

  .toggle-overlay-btn {
    bottom: .5rem;
    right: .5rem;
    padding: .4rem .8rem;
  }
} */

@media (max-width: 768px) {

  /* Desactiva el parallax en las slides */
  .carousel-slides .slide {
    background-attachment: scroll !important;
  }

  /* Asegura que el contenedor deje ver el overlay */
  .carousel-container {
    overflow: visible;
    height: 300px;
    /* o el valor que quieras para móvil */
  }

  /* Fuerza el overlay en posición absoluta centrada */
  .carousel-overlay {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 90%;
    max-width: 500px;
    margin: 0;
    pointer-events: auto;
  }

  /* Ajusta el botón toggle para que no quede fuera */
  .toggle-overlay-btn {
    top: .5rem;
    right: .8rem;
    bottom: auto;
    padding: .4rem .8rem;
  }

  /* Flecha izquierda */
  .carousel-nav.prev {
    left: 1px;
    /* p. ej. 10px desde el borde izquierdo */
  }

  /* Flecha derecha */
  .carousel-nav.next {
    right: 1px;
    /* p. ej. 10px desde el borde derecho */
  }
}


/*HERO RESERVA BUTTON*/
/* Botón animado de reserva */
.ibe {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  background: #e91e63;
  color: #fff;
  font-size: 1rem;
  font-weight: bold;
  text-decoration: none;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: background 0.6s ease-in-out, transform 0.3s ease, opacity 0.3s ease;
  animation: pulse 2s infinite;
  opacity: 1;
  transform: scale(1);
  z-index: 1000;
}

/* Animación de pulsación */
@keyframes pulse {
  0% {
    background: #e91e63;
  }
  50% {
    background: #ff4081;
  }
  100% {
    background: #e91e63;
  }
}

/* Hover/Activo */
.ibe:hover {
  background: #d81b60;
  transform: scale(1.05);
}
.ibe:active {
  transform: scale(0.95);
}

/* Responsive: escritorio mediano */
@media (max-width: 1024px) {
  .ibe {
    padding: 0.7rem 1.4rem;
    font-size: 0.95rem;
    color: var(--white);
    text-decoration: none;
  }
}

/* Responsive: tablet */
@media (max-width: 768px) {
  .ibe {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    color: var(--white);
    text-decoration: none;
  }
}

/* Responsive: móvil */
/* Elimina las reglas que fijan posición y transforman en círculo */

/* Responsive: móvil */
@media (max-width: 600px) {
  .ibe {
    position: static;
    bottom: auto;
    right: auto;
    width: auto;
    height: auto;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    font-size: 0.9rem;
    animation: pulse 2s infinite;
    display: inline-block;
  }

  .ibe::before {
    content: none;
  }
}



/* 1) Inicio (sin scroll): underline blanco */
header:not(.scrolled) .nav-underline,
header:not(.scrolled) nav a.active::after {
  background: #fff;
}

/* 2) Con scroll: underline en color corporativo */
header.scrolled .nav-underline,
header.scrolled nav a.active::after {
  background: var(--primary);
}

/* 3) (opcional) transición suave del color */
.nav-underline,
nav a::after {
  transition: background-color .25s ease;
}




/* Hero */
#hero {
  position: relative;
  height: 90vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  padding-bottom: 220px;
  background-color: var(--primary);
}

/* Sólo cuando body tenga la clase page-contact */
.page-contact #hero {
  height: 50vh;
  padding-bottom: 0;
}

.page-gallery #hero {
  height: 50vh;
  padding-bottom: 0;
}

.page-location #hero {
  height: 50vh;
  padding-bottom: 0;
}




#hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.2);
  z-index: 1;
}

#hero .slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

#hero .slide.active {
  opacity: 1;
}

.hero-content {
  position: relative;
  padding-top: 150px;
  height: 300px;
  z-index: 2;
}

.hero-content h1 {
  font-size: 2rem;
  font-weight: 300;
  margin-bottom: .2rem;
}

.hero-slogan {
  font-size: 1.5rem;
  font-weight: 400;
}

/* Hero iframe placeholder */
.hero-iframe-placeholder {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: calc(100% - 4rem);
  max-width: 1000px;
  height: 200px;
  background: var(--white);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.2);
  border-radius: .5rem .5rem 0 0;
  z-index: 2;
  margin-bottom: 1rem;
}

/* .hero-iframe-placeholder2 {
  position: absolute;
  left: auto;
  right: 1.5rem;
  bottom: 0;
  transform: none;
  width: 17%;
  max-width: 1000px;
  height: 220px;
  background: var(--white);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.2);
  border-radius: .5rem .5rem 0 0;
  z-index: 2;
  margin-bottom: 1rem;
}

.hero-iframe-placeholder2 iframe {
  transform: scale(0.85);          
  transform-origin: top right;      
  width: calc(100%/0.85);         
  height: auto;
  font-size: 100%;
}
..ibe {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: flex-end; 
  text-align: right;   
} */

/* Services */
#services {
  padding: 1rem 0;
  background: var(--primary);
  text-align: center;
}

#services h2 {
  margin-bottom: 2rem;
  color: var(--white);
}



.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.card {
  background: transparent;
  text-align: center;
  border-radius: 5rem;
  padding: 1rem;
}

.card i {
  font-size: 2rem;
  color: var(--white);
  margin-bottom: 1rem;
}

.card h3 {
  color: var(--white);
  margin-bottom: .5rem;
}

.card p {
  color: var(--white);
  font-size: .95rem;
}

/* Sección “About” única */
.about-single {
  max-width: 1200px;
  /* ampliado */
  margin: 4rem auto;
  /* más altura con padding */
  text-align: center;
}

.about-single h2 {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: .75rem;
}

.about-single p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--dark);
}


/* estilos para sección alternativa */
.promo-alt {
  display: grid;
  gap: 3rem;
  margin: 4rem auto;
  max-width: 1200px;
}

.promo-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  border-radius: .5rem;
  overflow: hidden;
  border: 1px solid var(--primary);
}

.promo-card.reverse {
  grid-template-columns: 1fr 1fr;
}

.promo-card.reverse .promo-img {
  order: 2;
  clip-path: polygon(20% 0, 100% 0, 100% 100%, 0 100%);
}

.promo-img {
  height: 250px;
  background-size: cover;
  background-position: center;
  clip-path: polygon(0 0, 100% 0, 80% 100%, 0% 100%);
}


.promo-text {
  padding: 2rem;
  background: #fff;
}

.promo-text h3 {
  margin-bottom: .5rem;
  color: var(--primary);
  font-size: 1.75rem;
}

.promo-text p {
  margin-bottom: 1.25rem;
  color: var(--dark);
  line-height: 1.6;
}

.promo-action {
  background: var(--primary);
  color: var(--white);
  border: none;
  padding: .75rem 1.5rem;
  border-radius: .25rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .3s ease, transform .2s ease;
}

.promo-action:hover {
  background: #1f6858;
  transform: translateY(-2px);
}

/* responsive */
@media (max-width: 768px) {
  .promo-card {
    grid-template-columns: 1fr;
  }

  .promo-card.reverse .promo-img {
    order: F0;
  }

  .promo-img {
    clip-path: none;
    height: 200px;
  }
}


/* ===============================
   Nearby: Tarjetas por categoría
   =============================== */

.nearby-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  align-items: stretch;
  /* Clave */
}
.nearby-section {
  margin-top: 4rem;
  margin-bottom: 4rem;
}


/* Y, si quieres mantener 1 columna en móvil: */
@media (max-width: 767px) {
  .nearby-grid {
    grid-template-columns: 1fr;
  }
}


/* Tarjeta */
.nearby-card {
  background: #fff;
  border: 1px solid rgb(36, 121, 108);
  border-radius: .5rem;
  padding: 1rem;

}

.nearby-card h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  margin-bottom: .75rem;
}

.nearby-card h4 i {
  margin-right: .5rem;
}

/* Lista dentro de la tarjeta */
.nearby-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nearby-card li {
  margin-bottom: .5rem;
}

.nearby-card li:last-child {
  margin-bottom: 0;
}

/* Enlaces */
.nearby-card a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-decoration: none;
  color: var(--dark);
  font-size: .9rem;
}

.nearby-card .item-name {
  flex: 1;
}

.nearby-card .item-dist {
  margin: 0 .5rem;
  white-space: nowrap;
  font-weight: 500;
}

.nearby-card i.fa-map-marker-alt {
  color: var(--primary);
  opacity: .7;
  transition: none;
  /* Sin animación */
}

/* Sólo el icono de mapa oscurece al hacer hover en el enlace */
.nearby-card a:hover i.fa-map-marker-alt {
  opacity: 1;
}

/* estilos footer completo */
.footer-columns {
  background: var(--primary);
  color: var(--white);
  padding-top: 2rem;
  padding-right: 0px;
  padding-bottom: 1rem;
  padding-left: 0px;
}

.footer-columns__inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.footer-col h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--white);
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: .5rem;
  font-size: .95rem;
}

.footer-col ul li a {
  text-decoration: none;
  color: var(--white);
  transition: color .3s ease;
}

.footer-col ul li a:hover {
  color: var(--dark);
}

/* copyright */
.footer-columns__copyright {
  text-align: center;
  margin-top: 2rem;
  font-size: .85rem;
  color: rgba(255, 255, 255, .8);
}

.footer-col--iframe iframe {
  width: 100%;
  height: 200px;
  height: 250px;
  border: 0;
  border-radius: .5rem;
}

/* Links básicos en el footer */
.footer-columns .footer-col ul li a {
  text-decoration: none;
  color: inherit;
  /* hereda el color actual */
  transition: none;
  /* sin transición de color */
}

/* Efecto de subrayado al pasar el ratón */
.footer-columns .footer-col ul li a:hover {
  text-decoration: underline;
  color: #000000;
}

/* ----------------------------
   Footer – Redes sociales
   ---------------------------- */
.footer-col--social .social-links {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.footer-col--social .social-links a {
  color: var(--white);
  font-size: 1.25rem;
  transition: opacity .3s ease;
}

.footer-col--social .social-links a:hover {
  opacity: 0.7;
  text-decoration: none;
  /* sin subrayado */
}




/* responsive */
@media (max-width: 768px) {
  .footer-columns__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-col--iframe iframe {
    height: 150px;
  }
}


/* Go Up Button */
#goUpBtn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3rem;
  height: 3rem;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10000;
  opacity: 0;
  transform: translateY(100px);
  pointer-events: none;
  transition: transform .4s ease, opacity .4s ease;
}

#goUpBtn.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

#goUpBtn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

/* Reserve Button */
.reserve-btn {
  position: fixed;
  top: 3.5rem;
  right: 1.5rem;
  background: var(--primary);
  color: var(--white);
  border: none;
  font-weight: 600;
  padding: .75rem 1.25rem;
  border-radius: .5rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s ease;
  z-index: 10000;
}

.reserve-btn.visible {
  opacity: 1;
  pointer-events: auto;
  animation: pulse-btn 2s infinite;
}

.reserve-btn:hover {
  filter: brightness(1.1);
}

/* Footer minimalista */
.footer-minimal {
  background: var(--primary);
  color: var(--white);
  padding: 1.5rem 0;
}

.footer-minimal .footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-minimal p {
  margin: 0;
  font-size: .9rem;
}

.footer-nav {
  display: flex;
  gap: 1rem;
}

.footer-nav a {
  color: var(--white);
  text-decoration: none;
  font-size: .9rem;
  transition: opacity .3s ease;
}

.footer-nav a:hover {
  opacity: .7;
}

.footer-social a {
  color: var(--white);
  margin-left: .5rem;
  font-size: 1rem;
  transition: opacity .3s ease;
}

.footer-social a:hover {
  opacity: .7;
}

/* Responsivo */
@media (max-width: 600px) {
  .footer-minimal .footer-row {
    flex-direction: column;
    text-align: center;
  }

  .footer-social {
    margin-top: .5rem;
  }
}

/* ——————————————————————
   Sección de Servicios
   —————————————————————— */

/* Grid contenedor */
#services-grid {
  margin: 4rem auto;
  max-width: 1200px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

/* Tarjeta de servicio */
.service-card {
  background: var(--white);
  border-radius: .5rem;
  padding: 2rem 1rem;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform .2s ease, box-shadow .2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.service-card i {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: .75rem;
}

.service-card span {
  font-weight: 600;
  color: var(--dark);
  line-height: 1.3;
}

/* Hover */
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Responsive spacing */
@media (max-width: 768px) {
  #services-grid {
    padding: 0 1rem;
  }
}

/* Timeline con imágenes */
.timeline {
  position: relative;
  margin: 4rem auto;
  padding: 2rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background: var(--primary);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  width: calc(50% - 2rem);
  padding: 1rem 2rem;
  box-sizing: border-box;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s forwards;
}

.timeline-item.left {
  left: 0;
}

.timeline-item.right {
  left: 50%;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.timeline-marker {
  position: absolute;
  top: 1.5rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.05);
}

.timeline-item.left .timeline-marker {
  right: -9px;
}

.timeline-item.right .timeline-marker {
  left: -9px;
}

.timeline-content {
  background: #fff;
  border-radius: .5rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
  padding: 1.5rem;
  text-align: center;
  transition: transform .3s ease;
}

.timeline-content:hover {
  transform: translateY(-4px);
}

.timeline-img {
  width: 100%;
  height: auto;
  border-radius: .5rem;
  margin-bottom: 1rem;
  object-fit: cover;
}

.timeline-content h3 {
  margin-bottom: .5rem;
  color: var(--primary);
}

.timeline-content p {
  margin-bottom: 1rem;
  color: var(--dark);
  font-size: .95rem;
  line-height: 1.4;
}

.btn-maps {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--primary);
  color: #fff;
  padding: .5rem 1rem;
  border-radius: .25rem;
  text-decoration: none;
  font-weight: 600;
  transition: background .3s ease, transform .2s ease;
}

.btn-maps i {
  font-size: 1rem;
}

.btn-maps:hover {
  transform: translateY(-2px);
}

/* Responsive: vertical timeline */
@media (max-width: 768px) {
  .timeline::before {
    left: 1rem;
  }

  .timeline-item {
    width: 100%;
    padding-left: 3rem;
    padding-right: 1rem;
    margin-bottom: 2rem;
  }

  .timeline-item.left,
  .timeline-item.right {
    left: 0;
  }

  .timeline-item .timeline-marker {
    left: 0;
    right: auto;
  }
}



/* Hero contacto */
#contact-hero {
  position: relative;
  height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#contact-hero .hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.7);
}

#contact-hero .hero-overlay {
  position: absolute;
  inset: 0;
  backdrop-filter: blur(4px);
  background: rgba(0, 0, 0, 0.2);
}

#contact-hero .hero-content {
  position: relative;
  color: var(--white);
  text-align: center;
  z-index: 2;
}

#contact-hero .hero-content h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

#contact-hero .btn-scroll {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: .75rem 1.5rem;
  border-radius: .25rem;
  cursor: pointer;
  font-weight: 600;
  transition: background .3s ease, transform .2s ease;
}

#contact-hero .btn-scroll:hover {
  transform: translateY(-2px);
}

/* Grid tarjetas de contacto */
#contact-cards {
  margin: 4rem auto;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.contact-card {
  background: #fff;
  border-radius: .5rem;
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform .2s ease, box-shadow .2s ease;
}

.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.contact-card i {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: .75rem;
}

.contact-card h3 {
  margin-bottom: 1rem;
  color: var(--dark);
}

.contact-card p,
.contact-card a {
  margin-bottom: .5rem;
  font-size: .95rem;
  color: var(--dark);
}

.contact-card a {
  text-decoration: none;
  color: var(--primary);
  transition: text-decoration .2s ease;
}

.contact-card a:hover {
  text-decoration: underline;
}

.social-links {
  margin-top: .75rem;
}

.social-links a {
  margin: 0 .5rem;
  font-size: 1.25rem;
  color: var(--dark);
  transition: opacity .3s ease;
}

.social-links a:hover {
  opacity: .7;
}

/* Responsive */
@media (max-width: 768px) {
  #contact-hero {
    height: 40vh;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }
}



/* ——— Galería ——— */
.gallery-page {
  /* limita el ancho para que auto-fit no quepa más de 4 */
  max-width: calc(4 * 220px + 3 * 1rem);
  /* 4 tarjetas + 3 gaps */
  margin: 35px auto;
}

.gallery-filters {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

/* Flecha: triángulo apuntando hacia arriba */
.filter-arrow {
  position: absolute;
  bottom: -0.5rem;
  /* separación bajo los botones */
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: none;
  border-bottom: 8px solid var(--primary);

  transition: left 0.3s ease;
  /* anima el desplazamiento horizontal */
  /* inicialmente la ubicamos bajo el botón activo en el centro */
  left: 50%;
  transform: translateX(-50%);
}

.filter-btn {
  background: var(--primary);
  color: var(--white);
  border: none;
  padding: .5rem 1rem;
  border-radius: .25rem;
  cursor: pointer;
  transition: background .3s ease;
  white-space: nowrap;
}

/* Botón activo */
.filter-btn.active {
  background: #30a78d;
}

/* Hover */
.filter-btn:hover {
  background: #30a78d;
}

.gallery-grid {
  display: grid;
  gap: 1rem;
  /* sigue siendo auto-fit, pero el contenedor más pequeño impide >4 */
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.gallery-item {
  transition: opacity 0.3s ease;
  overflow: hidden;
  opacity: 1;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform .3s ease;
}

.gallery-item img:hover {
  transform: scale(1.05);
}

@media (max-width: 768px) {
  /* oculta la flecha en tablet y móviles */
  .filter-arrow {
    display: none;
  }
}


/* — Responsive — */
@media (max-width: 600px) {

  /* Apilar y hacer full-width en móvil */
  .gallery-filters {
    flex-direction: column;
    gap: 0.5rem;
    align-items: stretch;
  }

  .filter-btn {
    width: 100%;
    text-align: center;
  }
}



@media (min-width: 601px) and (max-width: 1024px) {

  /* En tablet, permitir máximo 2 por fila */
  .gallery-filters {
    justify-content: space-between;
  }

  .filter-btn {
    flex: 1 1 calc(50% - 1rem);
  }
}