/* ============================================================
   Howard Johnson Hotel Calle Real Morelia — hjmorelia.com
   ============================================================ */

:root {
  --azul: #1e3a75;
  --azul-oscuro: #14264d;
  --naranja: #e8541d;
  --naranja-hover: #c9440f;
  --crema: #faf6f0;
  --gris: #5a5a5a;
  --blanco: #ffffff;
  --sombra: 0 4px 18px rgba(20, 38, 77, 0.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Montserrat', Arial, sans-serif;
  color: #333;
  background: var(--blanco);
  line-height: 1.65;
}

h1, h2, h3, h4 { font-family: 'Playfair Display', Georgia, serif; color: var(--azul); line-height: 1.25; }

img { max-width: 100%; display: block; }

a { color: var(--azul); }

.contenedor { width: min(1180px, 92%); margin: 0 auto; }

/* ---------- Barra superior ---------- */
.barra-superior {
  background: var(--azul-oscuro);
  color: #fff;
  font-size: 0.82rem;
  padding: 6px 0;
}
.barra-superior .contenedor {
  display: flex; flex-wrap: wrap; gap: 6px 22px; justify-content: flex-end;
}
.barra-superior a { color: #fff; text-decoration: none; }
.barra-superior a:hover { color: #ffb08a; }

/* ---------- Encabezado / navegación ---------- */
header.principal {
  background: var(--blanco);
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  position: sticky; top: 0; z-index: 500;
}
.nav-flex {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; gap: 16px;
}
.logo img { height: 62px; width: auto; }

nav.menu ul { list-style: none; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
nav.menu a {
  text-decoration: none; color: var(--azul); font-weight: 600;
  font-size: 0.86rem; padding: 8px 10px; border-radius: 4px;
  text-transform: uppercase; letter-spacing: 0.02em;
}
nav.menu a:hover { background: var(--crema); color: var(--naranja); }
nav.menu a.activo { color: var(--naranja); }

.btn-reservar {
  background: var(--naranja) !important; color: #fff !important;
  padding: 10px 18px !important; border-radius: 6px;
}
.btn-reservar:hover { background: var(--naranja-hover) !important; }

.hamburguesa {
  display: none; background: none; border: none; cursor: pointer;
  font-size: 1.8rem; color: var(--azul); line-height: 1;
}

/* ---------- Héroe ---------- */
.heroe {
  position: relative; min-height: 72vh;
  display: flex; align-items: center; justify-content: center;
  background-size: cover; background-position: center;
  text-align: center; color: #fff;
}
.heroe::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(rgba(20,38,77,0.55), rgba(20,38,77,0.55));
}
.heroe > .contenido { position: relative; z-index: 1; padding: 70px 20px; }
.heroe h1 { color: #fff; font-size: clamp(1.9rem, 4.5vw, 3.3rem); margin-bottom: 14px; text-shadow: 0 2px 8px rgba(0,0,0,0.45); }
.heroe p { font-size: clamp(1rem, 2vw, 1.25rem); max-width: 640px; margin: 0 auto 28px; text-shadow: 0 1px 6px rgba(0,0,0,0.5); }

.heroe-interior { min-height: 40vh; }

.botones-heroe { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.boton {
  display: inline-block; text-decoration: none; font-weight: 700;
  padding: 13px 28px; border-radius: 6px; font-size: 0.95rem;
  transition: background 0.2s, transform 0.15s;
}
.boton:hover { transform: translateY(-2px); }
.boton-naranja { background: var(--naranja); color: #fff; }
.boton-naranja:hover { background: var(--naranja-hover); }
.boton-blanco { background: #fff; color: var(--azul); }
.boton-blanco:hover { background: var(--crema); }
.boton-azul { background: var(--azul); color: #fff; }
.boton-azul:hover { background: var(--azul-oscuro); }
.boton-whatsapp { background: #25d366; color: #fff; }
.boton-whatsapp:hover { background: #1eb455; }

/* ---------- Secciones ---------- */
.seccion { padding: 70px 0; }
.seccion-crema { background: var(--crema); }
.seccion-azul { background: var(--azul); color: #fff; }
.seccion-azul h2, .seccion-azul h3 { color: #fff; }

.titulo-seccion { text-align: center; margin-bottom: 44px; }
.titulo-seccion h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
.titulo-seccion .linea {
  width: 70px; height: 3px; background: var(--naranja);
  margin: 14px auto 0; border-radius: 2px;
}
.titulo-seccion p { color: var(--gris); max-width: 720px; margin: 14px auto 0; }
.seccion-azul .titulo-seccion p { color: #dfe6f5; }

/* ---------- Tarjetas ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.tarjeta {
  background: #fff; border-radius: 10px; overflow: hidden;
  box-shadow: var(--sombra); display: flex; flex-direction: column;
  transition: transform 0.2s;
}
.tarjeta:hover { transform: translateY(-5px); }
.tarjeta img { height: 230px; width: 100%; object-fit: cover; }
.tarjeta .cuerpo { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.tarjeta h3 { margin-bottom: 10px; font-size: 1.25rem; }
.tarjeta p { color: var(--gris); font-size: 0.93rem; flex: 1; }
.tarjeta .cuerpo .boton { margin-top: 16px; align-self: flex-start; padding: 10px 20px; font-size: 0.85rem; }

/* ---------- Habitaciones / salones (fila alternada) ---------- */
.ficha {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 34px;
  align-items: center; margin-bottom: 64px;
}
.ficha:last-child { margin-bottom: 0; }
.ficha.invertida .ficha-fotos { order: 2; }
.ficha h3 { font-size: 1.6rem; margin-bottom: 12px; }
.ficha p { color: var(--gris); margin-bottom: 14px; }

.ficha-fotos { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 110px; gap: 8px; }
.ficha-fotos a { border-radius: 8px; overflow: hidden; display: block; }
.ficha-fotos a:first-child { grid-column: 1 / -1; grid-row: span 2; }
.ficha-fotos img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.25s; }
.ficha-fotos a:hover img { transform: scale(1.06); }

.lista-amenidades { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0 0 18px; padding: 0; }
.lista-amenidades li { font-size: 0.88rem; color: var(--azul); background: var(--crema); padding: 6px 12px; border-radius: 20px; }

.etiqueta-capacidad {
  display: inline-block; background: var(--azul); color: #fff;
  font-size: 0.8rem; padding: 4px 12px; border-radius: 20px; margin-bottom: 12px;
}

/* ---------- Galerías ---------- */
.galeria { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.galeria a { position: relative; display: block; border-radius: 8px; overflow: hidden; box-shadow: var(--sombra); }
.galeria img { width: 100%; height: 220px; object-fit: cover; transition: transform 0.3s; }
.galeria a:hover img { transform: scale(1.07); }
.galeria .pie {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(transparent, rgba(20,38,77,0.85));
  color: #fff; font-size: 0.82rem; padding: 26px 12px 10px; pointer-events: none;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; background: rgba(10, 18, 38, 0.94);
  display: none; align-items: center; justify-content: center; z-index: 1000;
}
.lightbox.abierto { display: flex; }
.lightbox img { max-width: 90vw; max-height: 84vh; border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,0.6); }
.lightbox .pie-lb { position: absolute; bottom: 22px; left: 0; right: 0; text-align: center; color: #fff; font-size: 0.95rem; }
.lightbox button {
  position: absolute; background: rgba(255,255,255,0.12); color: #fff;
  border: none; cursor: pointer; font-size: 1.7rem; width: 52px; height: 52px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.lightbox button:hover { background: var(--naranja); }
.lightbox .lb-cerrar { top: 18px; right: 18px; }
.lightbox .lb-ant { left: 14px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-sig { right: 14px; top: 50%; transform: translateY(-50%); }

/* ---------- Servicios ---------- */
.servicios { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; text-align: center; }
.servicio { background: #fff; border-radius: 10px; padding: 28px 18px; box-shadow: var(--sombra); }
.servicio .icono { font-size: 2.1rem; margin-bottom: 10px; }
.servicio h4 { font-size: 1.02rem; margin-bottom: 6px; }
.servicio p { font-size: 0.85rem; color: var(--gris); }

/* ---------- CTA ---------- */
.cta {
  background: linear-gradient(rgba(20,38,77,0.82), rgba(20,38,77,0.82)), url('../img/patio-colonial.jpg') center/cover;
  color: #fff; text-align: center; padding: 80px 0;
}
.cta h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.3rem); margin-bottom: 12px; }
.cta p { max-width: 620px; margin: 0 auto 28px; color: #e8edf8; }

/* ---------- Contacto ---------- */
.tarjeta-contacto {
  background: #fff; border-radius: 10px; box-shadow: var(--sombra);
  padding: 26px; text-align: center;
}
.tarjeta-contacto .icono { font-size: 2rem; margin-bottom: 8px; }
.tarjeta-contacto h3 { font-size: 1.05rem; margin-bottom: 6px; }
.tarjeta-contacto p, .tarjeta-contacto a { font-size: 0.92rem; color: var(--gris); text-decoration: none; }
.tarjeta-contacto a:hover { color: var(--naranja); }

form.formulario { background: #fff; border-radius: 10px; box-shadow: var(--sombra); padding: 32px; }
form.formulario label { display: block; font-weight: 600; font-size: 0.88rem; color: var(--azul); margin-bottom: 6px; }
form.formulario input, form.formulario select, form.formulario textarea {
  width: 100%; padding: 12px 14px; border: 1px solid #d5d9e4; border-radius: 6px;
  font-family: inherit; font-size: 0.95rem; margin-bottom: 18px; background: #fbfcfe;
}
form.formulario input:focus, form.formulario select:focus, form.formulario textarea:focus {
  outline: 2px solid var(--naranja); border-color: transparent;
}
.campos-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }

.mapa { border-radius: 10px; overflow: hidden; box-shadow: var(--sombra); }
.mapa iframe { width: 100%; height: 320px; border: 0; display: block; }
.mapa h3 { background: var(--azul); color: #fff; padding: 14px 18px; font-size: 1.02rem; }
.mapa .pie-mapa { padding: 14px 18px; background: #fff; font-size: 0.88rem; color: var(--gris); }
.mapa .pie-mapa a { color: var(--naranja); font-weight: 600; text-decoration: none; }

/* ---------- Pie de página ---------- */
footer.principal { background: var(--azul-oscuro); color: #c9d3e8; font-size: 0.9rem; }
.footer-grid {
  display: grid; grid-template-columns: 1.3fr 1fr 1.3fr; gap: 40px; padding: 54px 0 36px;
}
.footer-grid h4 { color: #fff; font-family: 'Montserrat', sans-serif; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 16px; }
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: #c9d3e8; text-decoration: none; }
.footer-grid a:hover { color: #ffb08a; }
.footer-logo { background: #fff; border-radius: 8px; padding: 10px 14px; display: inline-block; margin-bottom: 14px; }
.footer-logo img { height: 52px; }
.footer-bajo { border-top: 1px solid rgba(255,255,255,0.14); padding: 16px 0; text-align: center; font-size: 0.8rem; color: #8fa0c4; }

/* ---------- Botón flotante WhatsApp ---------- */
.whatsapp-flotante {
  position: fixed; bottom: 22px; right: 22px; z-index: 600;
  background: #25d366; color: #fff; width: 58px; height: 58px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.3); text-decoration: none;
}
.whatsapp-flotante svg { width: 32px; height: 32px; fill: #fff; }
.whatsapp-flotante:hover { background: #1eb455; }

/* ---------- Nota / aviso ---------- */
.nota { font-size: 0.82rem; color: #999; font-style: italic; }

/* ---------- Responsivo ---------- */
@media (max-width: 1024px) {
  .grid-4, .servicios { grid-template-columns: repeat(2, 1fr); }
  .galeria { grid-template-columns: repeat(3, 1fr); }
  nav.menu a { font-size: 0.78rem; padding: 6px 7px; }
}

@media (max-width: 820px) {
  .hamburguesa { display: block; }
  nav.menu {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; box-shadow: 0 10px 20px rgba(0,0,0,0.15);
  }
  nav.menu.abierto { display: block; }
  nav.menu ul { flex-direction: column; align-items: stretch; gap: 0; padding: 10px 0; }
  nav.menu a { display: block; padding: 13px 24px; border-radius: 0; }
  .btn-reservar { margin: 10px 24px; text-align: center; }

  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .ficha { grid-template-columns: 1fr; }
  .ficha.invertida .ficha-fotos { order: 0; }
  .campos-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .galeria { grid-template-columns: repeat(2, 1fr); }
  .galeria img { height: 160px; }
  .barra-superior .contenedor { justify-content: center; }
}

@media (max-width: 480px) {
  .galeria { grid-template-columns: 1fr; }
  .galeria img { height: 210px; }
  .servicios { grid-template-columns: 1fr; }
  .logo img { height: 48px; }
}
