/* Modern theme overrides for legacy Helios template.
   Goal: cleaner typography, better spacing, modern buttons, improved nav. */

:root {
  --bd-bg: #fbfaf8;
  --bd-surface: #ffffff;
  --bd-text: #2b2b2b;
  --bd-muted: #6b6b6b;
  --bd-border: rgba(20, 20, 20, 0.10);

  --bd-accent: #b83280; /* frambuesa */
  --bd-accent-2: #f2b705; /* dorado suave */
  --bd-accent-ink: #ffffff;

  --bd-radius: 16px;
  --bd-shadow: 0 12px 30px rgba(10, 10, 10, 0.10);
  --bd-shadow-soft: 0 6px 18px rgba(10, 10, 10, 0.08);

  --bd-max: 1280px;
}

html {
  color-scheme: light;
}

body {
  background: radial-gradient(1200px 600px at 50% -200px, rgba(184, 50, 128, 0.10), transparent 60%),
    radial-gradient(900px 500px at 85% 0, rgba(242, 183, 5, 0.12), transparent 55%),
    var(--bd-bg);
  color: var(--bd-text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji",
    "Segoe UI Emoji";
  letter-spacing: 0.2px;
}

/* Improve overall container rhythm */
.container {
  max-width: var(--bd-max);
}

/* Header
   - Homepage: hero overlay + nicer fade.
   - Inner pages: keep original Helios header image, just ensure contrast. */
#header {
  color: #fff;
}

body.homepage #header {
  background-image:
    linear-gradient(
      to bottom,
      rgba(28, 9, 32, 0.70),
      rgba(28, 9, 32, 0.35) 55%,
      rgba(28, 9, 32, 0.15)
    ),
    url(../../images/header.jpg);
  background-size: cover;
  background-position: center center;
  background-attachment: scroll; /* fixed can look glitchy on mobile */
}

/* Inner pages: subtle overlay to avoid washed headers */
body:not(.homepage) #header {
  background-image:
    linear-gradient(to bottom, rgba(28, 9, 32, 0.45), rgba(28, 9, 32, 0.15)),
    url(../../images/header.jpg);
  background-size: cover;
  background-position: center center;
  background-attachment: scroll;
}

/* Reduce vertical space on inner pages (Helios header padding is huge) */
body.homepage #header .inner {
  padding-top: 5.5em;
  padding-bottom: 3em;
}

body:not(.homepage) #header {
  padding: 4.25em 0 1em; /* smaller than original 7.5em */
}

body:not(.homepage) #header .inner {
  padding-top: 2.5em;
  padding-bottom: 1.25em;
}

/* Inner pages: stack the two .inner blocks (avoid weird gaps) */
body:not(.homepage) #header:before {
  display: none;
}

body:not(.homepage) #header .inner {
  display: block;
  width: 100%;
  max-width: var(--bd-max);
  margin-left: auto;
  margin-right: auto;
}

body:not(.homepage) #header .inner + .inner {
  padding-top: 0;
  margin-top: 0.25em;
}

#logo,
#header h1 a {
  font-weight: 800;
  letter-spacing: 0.4px;
}

#header header p {
  color: rgba(255, 255, 255, 0.90);
}

/* Keep Helios preload fade, but never fade to “white” */
body.homepage #header:after {
  opacity: 0.25;
}
body.homepage.is-preload #header:after {
  opacity: 0.55;
}

/* Nav: modern pill bar */
#nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  left: 0;
  right: 0;
  width: 100%;
  display: block;
  /* Solid bar so header color never “bleeds” through */
  backdrop-filter: none;
  background: #fbfaf8;
  border-bottom: 1px solid var(--bd-border);
}

#nav > ul {
  max-width: var(--bd-max);
  margin: 0 auto;
  padding: 0.18em 0.80em;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35em;
}

/* Reset legacy Helios nav decorations that can show header color */
#nav > ul {
  height: auto;
  line-height: normal;
  border: 0;
}

#nav > ul:before,
#nav > ul:after {
  display: none !important;
  content: none !important;
}

#nav > ul > li {
  padding: 0;
}

#nav > ul > li > a {
  border-radius: 999px;
  padding: 0.33em 0.68em;
  font-weight: 700;
  color: var(--bd-text);
  background: transparent;
  border: 1px solid transparent;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}

#nav > ul > li > a:hover {
  transform: translateY(-1px);
  background: rgba(184, 50, 128, 0.08);
  border-color: rgba(184, 50, 128, 0.25);
}

/* Buttons: unify (template has multiple variants) */
.button,
button,
input[type="button"],
input[type="submit"] {
  border-radius: 999px !important;
  box-shadow: none;
}

.button {
  background: var(--bd-accent);
  color: var(--bd-accent-ink) !important;
  border: 1px solid rgba(0, 0, 0, 0.06);
  font-weight: 800;
  letter-spacing: 0.3px;
}

.button:hover {
  background: #a52b73;
}

.button.alt {
  background: rgba(43, 43, 43, 0.92);
}

/* Cards/images: subtle rounding and shadow */
.image.featured img,
.foto_productos {
  border-radius: var(--bd-radius);
}

.carousel article {
  border-radius: var(--bd-radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--bd-shadow-soft);
  border: 1px solid var(--bd-border);
  overflow: hidden;
  /* Overwrite template padding so all cards align */
  padding: 0 1em 1.25em;
  /* Force same card height (text lengths differ in HTML) */
  height: 420px;
  display: inline-flex;
  flex-direction: column;
}

.carousel article .image {
  /* Full-bleed image inside padded card (no white gutters) */
  position: relative;
  left: 0;
  top: 0;
  display: block;
  width: calc(100% + 2em);
  margin: 0 -1em 1em;
  height: 200px;
  overflow: hidden;
  background: rgba(20, 20, 20, 0.04);
}

.carousel article .image img {
  width: 100%;
  height: 100% !important;
  object-fit: cover;
  object-position: center;
  border-radius: 0; /* la card ya recorta */
}

.carousel article header {
  padding: 0 1.1em;
}

.carousel article p {
  padding: 0 1.1em;
  color: var(--bd-muted);
  margin-top: 0.4em;
  /* Keep all descriptions aligned even with <br> and varying length */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  overflow: hidden;
  flex: 1;
}

/* Footer: cleaner */
#footer {
  background: transparent;
}

#footer .container {
  background: rgba(255, 255, 255, 0.70);
  border: 1px solid var(--bd-border);
  border-radius: calc(var(--bd-radius) + 8px);
  box-shadow: var(--bd-shadow);
  color: var(--bd-text);
}

/* Fix legacy footer styles (original assumes dark background) */
#footer header,
#footer h2,
#footer h3,
#footer h4,
#footer h5,
#footer h6 {
  color: var(--bd-text);
}

#footer .icon.circled {
  background: rgba(184, 50, 128, 0.10);
  color: var(--bd-accent);
}

#footer .copyright {
  color: rgba(43, 43, 43, 0.65);
}

/* Footer links: keep clearly clickable */
#footer a {
  color: var(--bd-accent);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.08em;
}

#footer a:hover {
  color: #a52b73;
}

/* Footer map: bigger + responsive */
#footer iframe {
  display: block;
  /* leave a little breathing room on the right */
  width: calc(100% - 16px) !important;
  max-width: 100%;
  height: 520px;
  border: 0 !important;
  border-radius: calc(var(--bd-radius) + 4px);
  box-shadow: var(--bd-shadow-soft);
  margin-right: 16px;
}

@media (max-width: 736px) {
  #footer iframe {
    height: 380px;
    width: calc(100% - 10px) !important;
    margin-right: 10px;
  }
}

/* Cookie banner: match theme */
.cookie-consent {
  background: rgba(20, 20, 20, 0.92);
  padding: 14px 12px;
}

.cookie-consent p {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
}

.cookie-consent a {
  color: #fff;
  font-weight: 700;
}

.cookie-consent button {
  background: var(--bd-accent);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 800;
}

/* Modal: slightly more modern spacing */
.modal {
  border: 1px solid var(--bd-border);
  border-radius: calc(var(--bd-radius) + 4px);
  max-height: 85vh;
  overflow: auto;
}

@media (max-width: 736px) {
  #header .inner {
    padding-top: 4.2em;
    padding-bottom: 2.2em;
  }
  /* Mobile: use the Helios hamburger (navPanel) instead of showing the full nav bar */
  #nav {
    display: none;
  }

  .carousel article .image {
    height: 180px;
  }

  .carousel article {
    height: 400px;
  }

  /* Modal on mobile: readable + aligned CTAs */
  .modal {
    padding: 1.25em 1.1em 1.1em;
  }

  .modal h3 {
    font-size: 1.2em;
    line-height: 1.25em;
  }

  .modal .actions {
    flex-direction: column;
    gap: 0.75em;
  }

  .modal .actions li {
    margin: 0;
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .modal .button {
    width: min(320px, 100%);
    padding: 0.9em 1.25em;
    text-align: center;
    white-space: nowrap;
  }

  .modal-close {
    font-size: 1.4em;
    padding: 0.35em 0.6em;
  }
}

