﻿/* ==== THEME (marca) ==== */
:root{
  --brand:#4FB068;
  --brand-dark:#3E9153;
  --brand-soft:#EAF6EE;
  --bg-alt:#F5F5F5;
  --text:#1E1E1E;
  --muted:#555;
  --border:#E6E6E6;
  --header-height: 150px !important;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ---- Header unificado ---- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(6px);
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  padding: 0 8%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  z-index: 1200;
}

/* logo */
.logo a {
  text-decoration: none;
  font-weight: 600;
  font-size: 1.25rem;
  color: #222;
  letter-spacing: 1px;
  display: inline-flex;
  align-items: center;
  height: 100%;
}

.logo img {
  width: min(300px, 30vw);
  max-height: 104px;
  object-fit: contain;
}

/* nav base */
.nav {
  display: flex;
  align-items: stretch;
  gap: clamp(0.35rem, 1vw, 1.1rem);
  height: 100%;
  flex-shrink: 0;
  white-space: nowrap;
}

/* links */
.nav a {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  padding: 0 1.05rem;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  min-height: 100%;
  white-space: nowrap;
  transition: background .22s, color .22s, transform .12s;
}

/* Efecto hover y activo */
.nav a:hover,
.nav a.active {
  background-color: var(--brand);
  color: #fff;
  font-weight: 700;
}

/* ===== DROPDOWN ===== */
.dropdown { position: relative; display: inline-block; }
.nav > .dropdown { height: 100%; }

.dropbtn {
  background: transparent;
  border: none;
  color: #444;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  height: 100%;
  padding: 0 1.05rem;
  border-radius: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  white-space: nowrap;
  transition: background 0.22s ease, color 0.22s ease;
}

/* caret */
.caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(79, 176, 104, 0.12);
  color: var(--brand-dark);
  font-size: 0.72rem;
  line-height: 1;
  transition: transform 0.22s ease, background 0.22s ease, color 0.22s ease;
}

/* hover */
.dropbtn:hover { background: var(--brand); color: #fff; }
.dropbtn.active { background: var(--brand); color: #fff; font-weight: 700; }
.dropbtn:hover .caret,
.dropbtn.active .caret,
.dropdown.open .caret {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.dropdown.open .caret {
  transform: rotate(180deg);
}

/* panel */
.dropdown-content {
  display: none;
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  min-width: 240px;
  background: #fff;
  border: 1px solid rgba(47, 44, 42, 0.08);
  box-shadow: 0 18px 42px rgba(35, 28, 20, 0.14);
  border-radius: 8px;
  padding: 10px;
  z-index: 1500;
}

.dropdown-content::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 26px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-left: 1px solid rgba(47, 44, 42, 0.08);
  border-top: 1px solid rgba(47, 44, 42, 0.08);
  transform: rotate(45deg);
}

/* items */
.dropdown-content a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 12px 14px 12px 22px;
  color: #333;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 700;
}

.dropdown-content a::before {
  content: "";
  position: absolute;
  left: 8px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--brand);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.dropdown-content a:hover,
.dropdown-content a.active {
  background: #edf3e9;
  color: #253126;
}

.dropdown-content a:hover::before,
.dropdown-content a.active::before {
  opacity: 1;
}

/* class usada por JS */
.dropdown.open .dropdown-content { display: block; }

/* keyboard focus */
.dropbtn:focus, .dropdown-content a:focus {
  outline: 2px solid rgba(79,176,104,0.45);
  outline-offset: 2px;
}

/* ====== HAMBURGER MENU ====== */
.hamburger-menu {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(47, 44, 42, 0.12);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(35, 28, 20, 0.08);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  margin-left: auto;
  transition: background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.hamburger-menu span {
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: #253126;
  transition: transform 0.22s ease, opacity 0.22s ease, background 0.22s ease;
}

.hamburger-menu:hover,
.hamburger-menu.is-open {
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 10px 24px rgba(53, 110, 69, 0.18);
}

.hamburger-menu:hover span,
.hamburger-menu.is-open span {
  background: #fff;
}

.hamburger-menu.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger-menu.is-open span:nth-child(2) {
  opacity: 0;
}

.hamburger-menu.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ====== RESPONSIVE MENU ====== */
@media (max-width: 860px) {
  :root {
    --header-height: 70px !important;
  }

  .header {
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100vw;
    min-width: 0;
    padding: 0 1rem;
  }

  .logo {
    min-width: 0;
  }

  .logo img {
    width: min(190px, 48vw);
    max-height: 56px;
  }

  .hamburger-menu {
    position: fixed;
    top: 12px;
    right: 16px;
    display: inline-flex !important;
    flex: 0 0 46px;
    z-index: 1300;
  }

  .nav {
    position: fixed;
    top: var(--header-height);
    right: 0;
    background: rgba(255,255,255,0.98);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    height: auto;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    border-top: 1px solid rgba(47, 44, 42, 0.08);
    box-shadow: 0 14px 30px rgba(35, 28, 20, 0.12);
    transition: max-height 0.32s ease;
  }

  .nav.nav-open{
    max-height: calc(100vh - var(--header-height)); /* ocupa toda la pantalla menos el header */
    overflow-y: auto;              /* si hay muchas opciones, scroll */
  }  

  .nav a,
  .dropbtn {
    min-height: auto;
    height: auto;
    width: 100%;
    text-align: left;
    padding: 1rem 6%;
    border-radius: 0;
    background: transparent;
    justify-content: space-between;
  }

  .nav a:hover,
  .dropbtn:hover { background: var(--brand); color: #fff; }

  /* DROPDOWN en móvil */
  .dropdown {
    width: 100%;
  }

  .dropdown-content {
    position: static;
    box-shadow: none;
    border: none;
    border-radius: 0;
    background: #f3f6f1;
    padding: 6px 0;
    width: 100%;
    min-width: 0;
  }

  .dropdown-content::before {
    content: none;
  }

  /* ✅ MISMO padding que el resto */
  .dropdown-content a {
    min-height: 46px;
    padding: 0.85rem 6% 0.85rem calc(6% + 18px);
    border-radius: 0;
    color: #253126;
  }

  .dropdown-content a:hover,
  .dropdown-content a.active {
    background: #e5efe7;
    color: #253126;
  }
  /* Cuando el dropdown está abierto, que el botón se vea “activo” */
.dropdown.open .dropbtn{
  background: #253126;
  color: #fff;
  font-weight: 700;
}

/* Estilo de submenú (sin desalinear) */
.dropdown.open .dropdown-content{
  background: #f3f6f1;
  border-left: 4px solid var(--brand);
  width: 100%;
}

/* Links del submenú: mismo padding base, pero con detalle visual */
.dropdown-content a{
  padding: 0.85rem 6% 0.85rem calc(6% + 18px);
  font-weight: 600;
}

.dropdown.open .dropdown-content a{
  padding: 0.85rem 6% 0.85rem calc(6% + 18px);
}

}

/* ===== IMAGE LIGHTBOX ===== */
.zoomable-media {
  cursor: zoom-in;
}

body.lightbox-open {
  overflow: hidden;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.88);
  padding: 24px;
  z-index: 3000;
}

.image-lightbox.open {
  display: flex;
}

.image-lightbox-content {
  max-width: min(1200px, 92vw);
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.45);
}

.image-lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.image-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ===== SHARED CTA ===== */
.page-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 86px 8%;
  text-align: center;
  background: #253126;
  color: #fff;
}

.page-cta span {
  display: inline-block;
  align-self: center;
  margin-bottom: 14px;
  color: #8ee09e;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.page-cta h2 {
  display: block;
  max-width: 14ch;
  margin: 0 auto 18px;
  color: #fff;
  font-size: clamp(2rem, 3.4vw, 3.6rem);
  font-weight: 800;
  line-height: 1.08;
}

.page-cta h2::after {
  content: "";
  display: block;
  width: 64px;
  height: 3px;
  margin: 18px auto 0;
  border-radius: 999px;
  background: var(--brand);
}

.page-cta p {
  max-width: 620px;
  margin: 0 auto 28px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.04rem;
  line-height: 1.75;
}

.page-cta a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 6px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.24s ease, background 0.24s ease;
}

.page-cta a:hover,
.page-cta a:focus {
  background: var(--brand-dark);
  transform: translateY(-2px);
}

/* ===== SITE FOOTER ===== */
.site-footer {
  background: #2f2c2a;
  color: #fff;
  padding: 48px 8% 22px;
}

.site-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1.1fr 0.9fr 0.9fr 1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

.site-footer-brand a {
  display: inline-flex;
  align-items: center;
}

.site-footer-brand img {
  width: min(260px, 100%);
  object-fit: contain;
  object-position: left center;
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

.site-footer-text p {
  max-width: 280px;
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.05rem;
  line-height: 1.65;
  font-weight: 500;
}

.site-footer-contact {
  display: grid;
  gap: 7px;
  margin-top: 18px;
}

.site-footer-contact a,
.site-footer-contact span {
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.94rem;
  line-height: 1.45;
  text-decoration: none;
}

.site-footer-contact a:hover,
.site-footer-contact a:focus {
  color: var(--brand);
}

.site-footer-links {
  display: grid;
  gap: 8px;
}

.site-footer-links strong,
.site-footer-hours strong {
  display: block;
  margin-bottom: 6px;
  color: #fff;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-footer-links a {
  width: fit-content;
  color: #fff;
  text-decoration: none;
  font-size: 1.02rem;
  line-height: 1.35;
  font-weight: 500;
  transition: color 0.2s ease, transform 0.2s ease;
}

.site-footer-links a:hover,
.site-footer-links a:focus {
  color: var(--brand);
  transform: translateX(3px);
}

.site-footer-hours p {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.96rem;
  line-height: 1.6;
}

.footer-hours-list {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
  padding: 0 0 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.footer-hours-list span {
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.92rem;
  line-height: 1.45;
}

.site-footer-hours a {
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
}

.site-footer-hours a:hover,
.site-footer-hours a:focus {
  color: #fff;
}

.site-footer-bottom {
  max-width: 1280px;
  margin: 38px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.site-footer-bottom p {
  margin: 0;
  font-size: 0.9rem;
  text-align: center;
}

@media (max-width: 980px) {
  .site-footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .site-footer {
    padding: 40px 24px 22px;
  }

  .site-footer-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .site-footer-brand img {
    width: 210px;
  }

  .site-footer-text p,
  .site-footer-links a,
  .site-footer-contact a,
  .site-footer-contact span,
  .site-footer-hours p {
    font-size: 0.98rem;
  }

  .site-footer-bottom {
    margin-top: 30px;
  }

}
