html, body {
  width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}
.main-header, .main-footer {
  width: 100%;
}
img, table, iframe, .video-container iframe {
  max-width: 100vw !important;
  box-sizing: border-box;
}
.container, .titulo-bg {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
  overflow-x: auto;
}

:root {
  --cafe: #003f27;
  --crema: #f8f5f1;
  --arena: #e9e5dd;
  --verde: #003f27;
  --verde2: #91aa9d;
  --borde: #d6c9b8;
  --primary-text: #2d2418;
}
html { font-size: 17px; scroll-behavior: smooth; background: var(--crema);}
body {
  font-family: Helvetica, Arial, sans-serif;
  background: var(--crema);
  color: var(--primary-text);
  margin: 0;
  padding: 0;
  padding-top: 58px;
}
.main-header {
  width: 100vw;
  height: 52px;
  background: var(--cafe);
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  left: 0; top: 0;
  z-index: 99;
  box-shadow: 0 3px 16px rgba(41,99,78,0.06);
  border-bottom: 2px solid #ede2d2;
}
ul, ol {
  text-align: center;
  list-style-position: inside;
  padding-left: 0;
}
.main-header h1 {
  color: #fff;
  font-size: 1.33rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-align: center;
  margin: 0;
  font-weight: 900;
  font-family: Helvetica, Arial, sans-serif;
  text-shadow: 0 2px 14px #0005, 0 1px 2px #fff2;
  flex: 1;
  user-select: none;
  pointer-events: none;
}
.container {
  max-width: 1200px;
  margin: 0 auto 44px auto;
  padding: 22px 8px 44px 8px;
  background: var(--arena);
  border-radius: 15px;
  box-shadow: 0 4px 20px 0 rgba(70,50,20,0.08);
  z-index: 0;
  text-align: center;
}
.titulo-bg {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 550px;
  max-height: 220px;
  margin: 0 auto 24px auto;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 24px 0 rgba(70,50,20,0.08);
  background: var(--arena);
  width: 100%;
  max-width: 1200px;
}
.titulo-bg .bg-img {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover;
  z-index: 1;
  filter: brightness(0.54) blur(0.8px) saturate(1.10);
  transition: filter .22s;
}
.titulo-bg h2 {
  color: #ffffff;
  font-size: 3.2rem;
  z-index: 2;
  position: relative;
  width: 100%;
  padding: 24px 10px;
  font-family: Helvetica, Arial, sans-serif;
  font-weight: 900;
  letter-spacing: .9px;
  background: linear-gradient(180deg,rgba(0,0,0,.13) 0%,rgba(41,99,78,.06) 100%);
  border-radius: 16px;
  margin: 0;
  line-height: 1.12;
  box-shadow: 0 2px 14px #0002;
  border: 0;
  transition: font-size .18s;
  word-break: break-word;
}
.imagen-paso img, .video-container iframe {
  width: 100%;
  max-width: 100%;
  border-radius: 22px;
  box-shadow: 0 3px 20px rgba(41,99,78,0.09);
  border: 3px solid #003f27;
  margin: 10px 0 12px 0;
  object-fit: contain;
  background: #fff;
  display: block;
}
.video-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 18px 0 22px 0;
}
.video-container iframe {
  height: 620px;
  min-height: 140px;
}
h2, h3 { text-align: center; font-family: Helvetica, Arial, sans-serif; font-weight: 700;}
h2 { color: var(--cafe); font-size: 1.05rem; margin: 28px 0 12px 0; letter-spacing: 0.13px;}
h3 { color: var(--verde); font-size: 0.98rem; margin: 19px 0 9px 0;}
p, li, label, select, .calculadora .resultado, td, th, span, ul {
  font-size: 0.98rem;
  line-height: 1.60;
}
table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 18px 0;
  background: var(--crema);
  border-radius: 7px;
  overflow: hidden;
  box-shadow: 0 1px 8px rgba(41,99,78,0.03);
}
th, td {
  border: 1px solid var(--borde);
  padding: 7px 2px;
  text-align: center;
  font-size: 0.98rem;
}
th {
  background: #003f27;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
}
.agenda-cita-lista {
  text-align: center;
  list-style-position: inside;
  padding-left: 0;
}
.agenda-cita-lista > li {
  display: list-item;
  text-align: center;
  margin: 0 0 22px 0;
}
.agenda-cita-lista { counter-reset: my-list; padding-left: 1.1em; }
.agenda-cita-lista > li { margin-bottom: 22px; position: relative; font-size: 0.98rem; line-height: 1.55;}
.agenda-cita-lista > li a { word-break: break-all; }
.descarga-manifiesto {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 22px 0 26px 0;
}
.titulo-descarga {
  font-size: 1.13rem;
  font-weight: 800;
  color: var(--verde);
  margin-bottom: 12px;
  text-align: center;
  letter-spacing: 0.15px;
  display: block;
}
.descarga-manifiesto button {
  background: var(--verde);
  color: #fff;
  font-size: 1.01rem;
  font-family: Helvetica, Arial, sans-serif;
  padding: 13px 32px;
  border: none;
  border-radius: 11px;
  cursor: pointer;
  transition: background .16s, transform .09s, box-shadow .13s;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(41,99,78,0.09);
  margin-bottom: 10px;
  letter-spacing: 0.7px;
}
.descarga-manifiesto button:hover {
  background: var(--cafe);
  transform: scale(1.03);
  box-shadow: 0 4px 16px rgba(41,99,78,0.13);
}
.calculadora {
  background: var(--crema);
  border: 1.3px solid var(--borde);
  border-radius: 10px;
  padding: 18px 10px 15px 10px;
  max-width: 340px;
  margin: 36px auto 0 auto;
  box-shadow: 0 1px 8px 0 rgba(41,99,78,0.04);
  text-align: center;
  font-size: 0.98rem;
}
.calculadora label, .calculadora select {
  font-size: 0.97rem;
  margin-bottom: 8px;
  display: block;
  font-family: Helvetica, Arial, sans-serif;
}
.calculadora select {
  width: 97%;
  padding: 7px;
  border-radius: 6px;
  border: 1px solid var(--borde);
  margin: 10px auto 14px auto;
  background: #fff;
  font-size: 0.98rem;
  color: var(--cafe);
}
.calculadora .resultado {
  font-size: 1.04rem;
  color: var(--verde);
  font-weight: 700;
  margin-top: 10px;
}
.seo-tip {
  background: #e2f3e5;
  border-left: 5px solid #007d3c;
  padding: 16px 12px;
  border-radius: 8px;
  margin: 26px 0 22px 0;
  color: #204021;
  text-align: left;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}
.main-footer {
  width: 100vw;
  background: var(--verde, #003f27);
  color: #fff;
  font-size: 1.18rem;
  letter-spacing: 0.3px;
  text-align: center;
  box-shadow: 0 -3px 18px rgba(41,99,78,0.08);
  border-top: 2px solid #e9e5dd;
  padding: 38px 0 24px 0;
  margin-top: 60px;
  position: relative;
  bottom: 0;
  left: 0;
}
.main-footer nav ul {
  list-style: none;
  margin: 0 0 13px 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 44px;
}
.main-footer nav ul li {
  display: inline;
}
.main-footer nav ul li a {
  color: #fff;
  text-decoration: underline;
  font-weight: 700;
  font-size: 1.19rem;
  transition: color 0.18s, background 0.15s;
  padding: 5px 18px;
  border-radius: 7px;
}
.main-footer nav ul li a:hover {
  color: #91aa9d;
  background: rgba(255,255,255,0.11);
}
.main-footer .copyright {
  font-size: 1.09rem;
  color: #e9e5dd;
  margin-top: 5px;
}

/* -- MOBILE IMPROVEMENTS -- */
@media (max-width: 600px) {
  html {font-size: 16px;}
  body {padding-top: 44px;}
  .main-header {height: 42px;}
  .main-header h1 {font-size: 1rem;}
  .container, .titulo-bg {max-width: 100vw; padding-left: 2vw; padding-right: 2vw;}
  .titulo-bg {
    min-height: 170px;
    max-height: none;
    flex-direction: column;
    padding: 0;
  }
  .titulo-bg h2 {
    font-size: 1.45rem;
    padding: 17px 2vw;
    line-height: 1.15;
    background: linear-gradient(180deg,rgba(0,0,0,.13) 0%,rgba(41,99,78,.11) 100%);
  }
  .titulo-bg .bg-img {
    object-fit: cover;
    min-height: 130px;
    max-height: 190px;
    filter: brightness(0.52) blur(0.6px) saturate(1.1);
  }
  .imagen-paso img {
    border-radius: 14px;
    margin: 7px 0 12px 0;
    max-width: 99vw;
    height: auto;
  }
  .video-container {
    margin: 12px 0 19px 0;
  }
  .video-container iframe {
    width: 100vw !important;
    min-width: 100vw !important;
    min-height: 220px !important;
    max-width: 100vw !important;
    height: 36vw !important;
    border-radius: 12px;
  }
  h2 {font-size: 1.12rem;}
  h3 {font-size: 1rem;}
  .seo-tip {font-size: 0.99rem;}
  .main-footer {
    font-size: 1rem;
    padding: 20px 0 10px 0;
  }
  .main-footer nav ul {
    gap: 10px;
    flex-wrap: wrap;
  }
  .main-footer nav ul li a {font-size: 1rem;}
}
@media (max-width:600px){
  .main-footer {
    font-size: 1.02rem;
    padding: 20px 0 14px 0;
  }
  .main-footer nav ul {
    gap: 16px;
  }
  .main-footer nav ul li a {font-size: 1.06rem;}
}

/* Cookies pop animation + card style */
@keyframes cookiesPop {
  0% {opacity:0; transform:translateX(-50%) scale(0.8);}
  70% {opacity:0.95; transform:translateX(-50%) scale(1.05);}
  100% {opacity:1; transform:translateX(-50%) scale(1);}
}
#cookies-card {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) scale(0.98);
  min-width: 290px; max-width: 450px; width: 95vw;
  background: linear-gradient(125deg,#e9e5dd 80%, #f8f5f1 100%);
  color: #003f27;
  font-family: Helvetica, Arial, sans-serif;
  z-index: 99999;
  border-radius: 22px;
  box-shadow: 0 10px 40px 0 rgba(41,99,78,0.12), 0 2px 6px 0 rgba(41,99,78,0.10);
  padding: 27px 27px 18px 27px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  border: 2px solid #d6c9b8;
  animation: cookiesPop .6s cubic-bezier(.35,1.7,.63,1) 1;
}
#aceptar-cookies {
  background: linear-gradient(90deg, #24553a 75%, #91aa9d 100%);
  color: #fff;
  font-weight: 800;
  border: none;
  border-radius: 8px;
  padding: 10px 36px;
  font-size: 1.04rem;
  box-shadow: 0 2px 8px rgba(41,99,78,0.08);
  cursor: pointer;
  letter-spacing: .5px;
  transition: background .18s, transform .13s, box-shadow .18s;
}
#aceptar-cookies:hover {
  background: #003f27;
}
#cerrar-cookies {
  background: #fff;
  color: #003f27;
  border: 2px solid #003f27;
  border-radius: 8px;
  padding: 10px 22px;
  font-size: 1.03rem;
  cursor: pointer;
  font-weight: 600;
  transition: background .18s, color .18s, border .18s, transform .13s;
}
#cerrar-cookies:hover {
  background: #e9e5dd;
}
@media (max-width:520px) {
  #cookies-card {
    padding: 17px 6vw 11px 6vw !important;
    min-width: 90vw !important;
  }
  #barra-cookies {
    left: 0 !important;
  }
}
