/* ==================================================================
   components.css — header, navegación, botones y footer compartidos
   ================================================================== */

/* ===== Botones compartidos ===== */
.cta-button,
.btn-primary,
.cta-button-newsletter,
.form-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 800;
  cursor: pointer;
  transition: background-color .3s ease, transform .2s ease, box-shadow .3s ease, border-color .3s ease;
}

.cta-button,
.cta-button.dendro-original,
.btn-primary,
.cta-button-newsletter,
.form-submit {
  background: linear-gradient(180deg, rgba(255, 138, 0, .95), rgba(200, 95, 0, .92));
  color: #111;
  border-color: rgba(255, 133, 0, .35);
}

.cta-button:hover,
.cta-button.dendro-original:hover,
.btn-primary:hover,
.cta-button-newsletter:hover,
.form-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 133, 0, 0.28);
  color: #111;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.03);
  color: #eef3fb;
  cursor: pointer;
  text-decoration: none;
}
.btn-ghost:hover {
  border-color: rgba(255,133,0,.35);
  box-shadow: 0 0 0 4px rgba(255,133,0,.08);
}

/* ===== Header / nav ===== */
header#header,
header.dendro-header {
  position: sticky;
  top: 0;
  z-index: 3000;
  background-color: rgba(26, 26, 26, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: none;
  box-shadow: none;
  padding: var(--spacing-md) 0;
  transition: background-color .25s ease, backdrop-filter .25s ease, box-shadow .25s ease;
}

header#header.scrolled,
header.dendro-header.scrolled,
header#header.menu-open,
header.dendro-header.menu-open {
  background-color: var(--dendro-base-dark);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: none;
  box-shadow: none;
}

.header-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--spacing-lg);
  position: relative;
  z-index: 3100;
  padding-block: 4px;
}

.logo-container .dendro-logo-text {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--dendro-primary);
  display: inline-block;
  line-height: 1.15;
  padding-top: 2px;
}

.logo-container a.dendro-logo-text:hover,
.logo-container a.dendro-logo-text:focus {
  color: var(--dendro-primary);
}

.logo-container .dendro-logo-text.is-pulsing {
  animation: dendroLogoPulse 30s infinite ease-in-out;
  transform-origin: center;
  will-change: transform, filter, background-position;
}

@supports (-webkit-background-clip: text) or (background-clip: text) {
  .logo-container .dendro-logo-text.is-pulsing {
    background-image: linear-gradient(90deg, #FF8500, #ffb155, #FF8500);
    background-size: 200% 100%;
    background-position: 0% 50%;
    background-repeat: no-repeat;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}

@keyframes dendroLogoPulse {
  0% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(255,133,0,0)); background-position: 0% 50%; }
  50% { transform: scale(1.01); filter: drop-shadow(0 0 10px rgba(255,133,0,.35)); background-position: 100% 50%; }
  100% { transform: scale(.99); filter: drop-shadow(0 0 0 rgba(255,133,0,0)); background-position: 0% 50%; }
}

.main-nav { position: relative; }
.main-nav .nav-list {
  list-style: none;
  display: flex;
  gap: var(--spacing-lg);
  margin: 0;
  padding: 0;
}
.main-nav .nav-link {
  color: var(--dendro-neutral-light);
  font-weight: 500;
  font-size: 1rem;
  padding: 6px 2px;
  transition: color .25s ease;
  position: relative;
  display: inline-block;
}
.main-nav .nav-link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--dendro-primary);
  transition: width .25s ease;
}
.main-nav .nav-link:hover::after,
.main-nav .nav-link:focus::after,
.nav-link.is-active::after { width: 100%; }
.main-nav .nav-link:hover,
.main-nav .nav-link:focus,
.nav-link.is-active { color: var(--dendro-primary) !important; }
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--dendro-neutral-light);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  position: relative;
  z-index: 3200;
}
.menu-overlay {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  top: var(--header-h, 76px);
  bottom: 0;
  z-index: 2500;
  background: var(--dendro-base-dark);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 44px 24px 48px;
}
.menu-overlay.is-open { display: block; }
html.menu-open, body.menu-open { overflow: hidden !important; }

@media (max-width: 768px) {
  .menu-toggle { display: block; }
  header#header, header.dendro-header {
    padding-top: calc(var(--spacing-md) + 10px + env(safe-area-inset-top));
    padding-bottom: calc(var(--spacing-md) + 6px);
  }
  header#header .main-nav .nav-list,
  header.dendro-header .main-nav .nav-list { display: none; }
  .menu-overlay.is-open .nav-list {
    display: flex;
    flex-direction: column;
    gap: 34px;
    margin: 0;
    padding: 18px 0 0;
    list-style: none;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    min-height: calc(100vh - var(--header-h, 76px));
  }
  .menu-overlay.is-open .nav-list li { width: 100%; }
  .menu-overlay.is-open .nav-link {
    display: inline-block;
    padding: 10px 0;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--dendro-neutral-light);
  }
  .menu-overlay.is-open .nav-link::after { display: none; }
  .menu-overlay.is-open a,
  .menu-overlay.is-open .nav-link {
    text-decoration: none !important;
    border-bottom: none !important;
    outline: none;
  }
}

/* ===== Footer compartido ===== */
.site-footer *, .site-footer *::before, .site-footer *::after { box-sizing: border-box; }
.site-footer {
  background-color: var(--dendro-base-dark);
  color: var(--dendro-neutral-light);
  padding-top: 80px;
  border-top: none;
}
.site-footer .container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer a { text-decoration: none; }
.site-footer .footer-content {
  display: flex;
  justify-content: space-between;
  gap: 50px;
  padding-bottom: 50px;
}
.site-footer .footer-section { flex-grow: 1; min-width: 180px; flex-shrink: 1; }
.site-footer .footer-section.footer-newsletter { flex-basis: 300px; flex-grow: 0; flex-shrink: 0; }
.site-footer .footer-section.footer-links { flex-basis: 200px; flex-grow: 1; }
.site-footer .footer-section h4 {
  color: var(--dendro-primary);
  font-size: 1.2rem;
  margin-bottom: 20px;
  font-family: var(--font-heading);
}
.site-footer .footer-section ul li { margin-bottom: 10px; }
.site-footer .footer-section ul li a {
  color: var(--dendro-neutral-light);
  font-size: .9rem;
  transition: color .3s ease, transform .3s ease;
  display: inline-block;
  position: relative;
}
.site-footer .footer-section ul li a:hover { color: var(--dendro-primary); transform: translateX(8px); }
.site-footer .footer-newsletter p { margin-bottom: 5px; }
.site-footer .footer-newsletter span {
  font-size: .85rem;
  color: #aaa;
  display: block;
  margin-bottom: 30px;
}
.site-footer .newsletter-input { display: flex; gap: 10px; align-items: stretch; }
.site-footer .hp-field { display: none !important; }
.site-footer .newsletter-input input[type="email"] {
  flex-grow: 1;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(0,0,0,.22);
  color: rgba(255,255,255,.92);
  font-size: .95rem;
  outline: none;
}
.site-footer .newsletter-input input[type="email"]::placeholder { color: rgba(255,255,255,.55); }
.site-footer .newsletter-input input[type="email"]:focus {
  border-color: rgba(255,133,0,.75);
  box-shadow: 0 0 0 4px rgba(255,133,0,.16);
}
.site-footer .cta-button-newsletter {
  height: 44px;
  padding: 0 20px;
  border-radius: 12px;
  border: 1px solid rgba(255,133,0,.35);
  background: linear-gradient(180deg, rgba(255,138,0,.95), rgba(200,95,0,.92));
  color: #111;
  font-weight: 800;
  font-size: .92rem;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.site-footer .cta-button-newsletter:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 4px rgba(255,133,0,.12);
}
.site-footer .footer-logo-small { max-width: 100px; margin-bottom: 15px; }
.site-footer .footer-bottom {
  background-color: var(--dendro-base-dark);
  padding: 20px 0;
  margin-top: 50px;
}
.site-footer .footer-bottom-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}
.site-footer .legal-info { font-size: .85rem; color: #aaa; }
.site-footer .social-icons { display: flex; gap: 15px; }
.site-footer .social-icons a { color: #aaa; font-size: 1.3rem; transition: color .3s ease; }
.site-footer .social-icons a:hover { color: var(--dendro-primary); }
.site-footer .language-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #aaa;
  font-size: .9rem;
  cursor: pointer;
}
.site-footer .language-selector i { font-size: 1rem; }

@media (max-width: 992px) {
  .site-footer .footer-content { flex-wrap: wrap; gap: 24px; }
  .site-footer .footer-section { flex-basis: 150px; }
  .site-footer .footer-section.footer-newsletter { flex-basis: 250px; }
}

@media (max-width: 768px) {
  .site-footer .footer-section.footer-links { display: none !important; }
  .site-footer .footer-section.footer-newsletter {
    width: 100%;
    text-align: center;
    margin: 0 auto 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .site-footer .footer-section.footer-newsletter p,
  .site-footer .footer-section.footer-newsletter span { max-width: 80%; margin: 0 auto 8px; }
  .site-footer .footer-section.footer-newsletter .newsletter-input {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
  }
  .site-footer .footer-section.footer-newsletter input[type="email"] { width: 100%; max-width: 360px; text-align: center; }
  .site-footer .footer-section.footer-newsletter button.cta-button-newsletter { width: 80%; max-width: 360px; }
  .site-footer .footer-bottom .footer-bottom-content {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
    text-align: center;
  }
}
