/* ==== VARIABLES PARA LAS TOPOGRAFÍAS ==== */
:root {
  /* Escala tipográfica fluida */
  --fs-base: clamp(1rem, 0.95rem + 0.5vw, 1.125rem);
  --fs-sm: clamp(0.95rem, 0.9rem + 0.4vw, 1.05rem);
  --fs-md: clamp(1.05rem, 1rem + 0.5vw, 1.2rem);
  --fs-lg: clamp(1.25rem, 1.1rem + 1vw, 1.5rem);
  --fs-h6: clamp(1.05rem, 1rem + 0.6vw, 1.2rem);
  --fs-h5: clamp(1.15rem, 1.05rem + 0.8vw, 1.35rem);
  --fs-h4: clamp(1.25rem, 1.1rem + 1vw, 1.6rem);
  --fs-h3: clamp(1.4rem, 1.2rem + 1.4vw, 1.8rem);
  --fs-h2: clamp(1.6rem, 1.3rem + 2vw, 2.2rem);
  --fs-h1: clamp(1.9rem, 1.4rem + 3vw, 2.7rem);

  /* Altura de línea y espaciado */
  --lh-tight: 1.2;
  --lh-base:  1.5;
  --lh-relax: 1.65;

  --space-1: 0.5rem;
  --space-2: 0.75rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;

  /* Alturas en layout*/
  --contact-block-height: 10.25rem;
  --tapbar-height: 3.5rem;
}

/* Base general */
html { 
  font-size: 16px; 
  scroll-behavior: smooth;
}
body {
  font-family: Arial, Helvetica, sans-serif;
  color:#333;
  background:#fff;
  font-size: var(--fs-base);
  line-height: var(--lh-base);
}

/* Encabezados globales */
h1 { 
  font-size: var(--fs-h1); 
  line-height: var(--lh-tight); 
  margin: 0 0 var(--space-4); 
}
h2 { 
  font-size: var(--fs-h2); 
  line-height: var(--lh-tight); 
  margin: 0 0 var(--space-3); 
}
h3 { 
  font-size: var(--fs-h3); 
  line-height: var(--lh-tight); 
  margin: 0 0 var(--space-2); 
}
h4 { 
  font-size: var(--fs-h4); 
  line-height: var(--lh-tight); 
  margin: 0 0 var(--space-2); 
}
h5 { 
  font-size: var(--fs-h5); 
  line-height: var(--lh-tight); 
  margin: 0 0 var(--space-1); 
}
h6 { 
  font-size: var(--fs-h6); 
  line-height: var(--lh-tight); 
  margin: 0 0 var(--space-1); 
}

/* Párrafos globales */
p { 
  font-size: var(--fs-md); 
  line-height: var(--lh-relax); 
  margin: 0 0 var(--space-3); 
}

/* Utilidades */
.text-sm { 
  font-size: var(--fs-sm); 
}
.text-md { 
  font-size: var(--fs-md); 
}
.text-lg { 
  font-size: var(--fs-lg); 
}


/* ============ BASE GENERAL ============ */
* { 
  margin:0; 
  padding:0; 
  box-sizing:border-box; 
}
html, body {
  min-width: 320px;
}


/* ============ TOP BAR ============ */
.top-bar { background:#2e7d32; color:white; text-align:center; font-size:0.9rem; padding:0.5rem; }

/* ============ BLOQUE DE CONTACTO (CABECERA) ============ */
.contact-block {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:1rem 2rem;
  flex-wrap:wrap;
  border-bottom:1px solid #ccc;
}

/* Agrupación del logo + menú hamburguesa */
.contact-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo img {
  max-width:190px;
  height:auto;
}

/* Botón menú hamburguesa (visible solo en móvil) */
.menu-toggle {
  margin-left: auto; /* empuja el botón al borde derecho */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background:none;
  border:none;
  color:#2e7d32;
  cursor: pointer;
  padding: 6px 20px;
  border-radius: 6px;
  transition: transform 0.15s ease, color 0.15s ease;
}

.menu-toggle:hover { 
  color:#256628; 
  transform: scale(1.1);
}
.menu-toggle:focus {
  outline: 2px solid rgba(46,125,50,0.15);
  outline-offset: 2px; 
}

/* Parte derecha de la cabecera */
.contact-right {
  display:flex;
  align-items:center;
  gap:1.5rem;
  flex-wrap:wrap;
}

.contact-info {
  display: flex;
  gap: 60px;
  font-size: 18px;
  color: #444;
  align-items: center;
}
.contact-actions button {
  font-size: 1.2rem; 
}
.contact-info > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.contact-info svg {
  width: 32px;
  height: 32px;
  fill: #2e7d32;
  flex-shrink: 0;
  transition: fill 0.2s;
}

.contact-info svg:hover {
  fill: #1b5e20;
}
.phone-numbers, .address-main { 
  font-size: 1.05rem;
}
.phone-numbers { 
  display:flex; 
  flex-direction:column; 
  font-weight:bold; 
}
.phone-primary { 
  color:#2e7d32; 
}
.address-main { 
  font-weight:bold;
}

/* Botón de contacto */
.contact-actions button {
  background:#2e7d32;
  color:white; 
  border:none;
  padding:0.7rem 1.2rem;
  cursor:pointer;
  border-radius:4px;
  font-size:1.2rem;
  transition:background 0.3s;
}
.contact-actions button:hover { background:#256628; }

.contact-actions:hover {
  animation: shake 0.4s ease-in-out;
  background: #1b5e20;
}

@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  50% { transform: translateX(3px); }
  75% { transform: translateX(-2px); }
  100% { transform: translateX(0); }
}

/* ============ TAPBAR (MENÚ DE NAVEGACIÓN DESKTOP) ============ */
.tapbar-container {
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  position: relative;
  overflow: visible;
  z-index: 9999;  
}

.tapbar {
  display:flex;
  justify-content:center;
  align-items:center;
  padding:0.8rem;
  flex-wrap:wrap;
  gap: 0.75rem;  
}

.tapbar a {
  position: relative;
  letter-spacing: 0.4px;
  text-decoration: none;
  display: inline-block;
  line-height: 1.6;
  color: #333;
  font-weight: bold;
  font-size: 1rem;
  padding: 0.5rem 0;
  transition: color 0.25s ease, transform 0.25s ease;
}

.tapbar a:hover {
  transform: translateY(-2px);
}
.tapbar a.active {
  color: #2e7d32;
}
.tapbar a::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 0%;
  height: 1.5px;
  background-color: #2e7d32;
  transition: width 0.3s ease;
}
.tapbar a,
.tapbar .tapbar-sep,
.tapbar .tapbar-dropdown {
  flex: 0 0 auto;
}

.tapbar a:hover::after,
.tapbar a.active::after {
  width: 100%;
}

.tapbar-sep {
  display: inline-block;
  opacity: 0.9;
  color: #555;
}
.tapbar a {
  margin: 0 1rem;
}
.tapbar .tapbar-dropbtn i {
  margin-right: .35rem;
  font-size: .95em;
  vertical-align: -1px;
}
.tapbar-dropdown { position:relative; }
.tapbar-dropdown-content {
  display:none;
  position:absolute;
  background:#fff;
  box-shadow:0 2px 6px rgba(0,0,0,0.15);
  z-index:10;
  flex-direction:column;
}
.tapbar-dropdown-content a {
  display:block;
  padding:0.5rem 1rem;
  color:#333;
  text-align:left;
  white-space:nowrap;
}
.tapbar-dropdown-content a:hover {
  background:#f1f1f1;
  color:#2e7d32;
}
.tapbar-dropdown:hover .tapbar-dropdown-content { display:flex; }
.tapbar-dropdown.open .tapbar-dropdown-content { display:flex; }

/* ============ MENÚ LATERAL (DESLIZANTE) ============ */

.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  cursor: pointer;
}
.menu-overlay.open { 
  opacity: 1; 
  visibility: visible;
  pointer-events: auto;
}

.side-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  height: 100%;
  background: #fff;
  box-shadow: -2px 0 12px rgba(0,0,0,.25);
  transition: right .25s ease;
  z-index: 10010;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.side-menu.open { 
  right: 0;
}

.menu-close {
  position: absolute;
  top: 0.75rem;
  right: 1.25rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 3rem;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  z-index: 10020;
  padding: 0.5rem;
  transition: transform 0.2s ease, color 0.2s ease;
}
.menu-close:hover {
  transform: scale(1.1);
  color: #e0f2f1;
}

.menu-header {
  background-color: #2e7d32;
  padding: 1.5rem 0;
  text-align: center;
  position: relative; 
  padding: 1.5rem 0;
}
.menu-header img {
  width: 250px;
  height: auto;
  display: inline-block;
}

.side-menu ul { list-style: none; padding: 0; margin: 0; }
.side-menu ul li { border-bottom: 1px solid #eee; }

.side-menu ul li a {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem 1.2rem;
  text-decoration: none;
  color: #333;
  font-size: 1.2rem;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}

.side-menu ul li a:hover,
.side-menu ul li a.active {
  background-color: #e8f5e9;
  color: #2e7d32;
  font-weight: 600;
}

.has-submenu > a {
  cursor: pointer;
}

.submenu {
  display: none;
  background-color: #f9f9f9;
}

.submenu li a {
  padding-left: 1.2rem;
  font-size: 1rem;
  color: #444;
  justify-content: center;
}

.submenu li a:hover,
.submenu li a.active {
  background-color: #e0f2f1;
  color: #2e7d32;
  font-weight: 600;
}

.has-submenu:hover .submenu {
  display: block;
}

/* ============ CONTENIDO PRINCIPAL Y FOOTER ============ */
#main-content {
  padding: 2rem;
  min-height: 400px;
  opacity: 1;
  transition: none;
}
#main-content.visible { opacity: 1; }

.whatsapp-fab {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #25d366;
  color: white;
  font-size: 28px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  cursor: pointer;
  text-decoration: none;
  z-index: 2000;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.whatsapp-fab:hover {
  transform: scale(1.1);
  background-color: #20ba5a;
}

/* ============ SCROLL-TO-TOP ============ */
.scroll-top-btn {
  position:fixed;
  bottom:20px;
  right:20px;
  background:#2e7d32;
  color:white;
  border:none;
  padding:0.6rem 0.8rem;
  font-size:1.2rem;
  border-radius:50%;
  cursor:pointer;
  display:none;
  z-index:999;
}
.scroll-top-btn.visible { display:block; }
/* === FOOTER GENERAL === */
.footer {
  font-family: 'Poppins', sans-serif;
  color: #f1f1f1;
}

/* === PRE-FOOTER OSCURO === */
.pre-footer {
  background-color: #434141;
  padding: 3rem 1.5rem;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2.5rem;
  justify-items: center;
}

.footer-column {
  text-align: center;
}

.footer-column h4 {
  color: #fff;
  margin-bottom: 1rem;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #777;
  display: inline-block;
  padding-bottom: 4px;
}

.footer-column h4 i {
  margin-right: 8px;
  color: #b4b4b4;
}

.footer-column p,
.footer-column a,
.footer-column li {
  font-size: 0.95rem;
  line-height: 1.7;
}

.footer-column a {
  color: #ddd;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-column a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-column i {
  margin-right: 6px;
  color: #aaa;
}

.footer-links-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links-list li {
  margin-bottom: 0.5rem;
}

/* === FOOTER-BOTTOM CLARO === */
.footer-bottom {
  color: #333333;
  text-align: center;
  padding: 15px 10px;
  font-size: 0.85rem;
  border-top: 1px solid #222;
  background-color: #f7f7f7;
}

.footer-bottom-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.footer-bottom p, .footer-column p {
  margin: 0;
}

@media (min-width: 768px) {
  .footer-bottom-container {
    flex-direction: row;
    justify-content: space-between;
    max-width: 1100px;
    margin: 0 auto;
  }
}

.footer-bottom a {
  color: #333333;
  text-decoration: none;
  margin: 0 4px;
  transition: all 0.2s ease;
}

.footer-bottom a:hover {
  color: #000;
  transform: translateY(-2px);
}

.footer-bottom span {
  color: #333333;
}

/* === Bloque legal dentro del menú lateral === */
.side-menu-legal {
  margin-top: auto;
  padding: 1rem 1rem 0 1rem;
  text-align: center;
  border-top: 1px solid #e0e0e0;
  font-size: 0.9rem;
  color: #555;
  background: #f9f9f9;
}

.side-menu-legal a {
  display: block;
  color: #2e7d32;
  text-decoration: none;
  margin: 4px 0;
  font-weight: 500;
  transition: color 0.2s;
}

.side-menu-legal a:hover {
  color: #1b5e20;
}

.side-menu-legal p {
  margin-top: 8px;
  font-size: 0.8rem;
  color: #777;
}


/* =================== RESPONSIVE =================== */
@media (max-width:1024px) {
  .contact-block { flex-wrap:wrap; justify-content:space-between; padding:0.8rem 1.5rem; }
  .contact-right { display:flex; align-items:center; gap:1.5rem; flex-wrap:wrap; }
}

@media (max-width:768px) {
  .contact-right { display: none !important; }
  .tapbar-container { display: none; }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
  }

  .contact-block { padding: 0.5rem 1rem; }
  body.menu-open { overflow: hidden; }
}

@media (max-width:480px) {
  .logo img { max-width: 120px; }
}

/* Ocultar menú en desktop */
@media (min-width:769px) {
  .menu-toggle { display: none; }
  .side-menu, .side-menu-overlay { display: none !important; }
}

/* === HEADER FIJO EN MÓVIL === */
@media (max-width: 768px) {
  .contact-block {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #fff;
    z-index: 2000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    padding: 0.5rem 1rem;
    transition: transform 0.3s ease-in-out;
  }

  .contact-block.hide-header {
    transform: translateY(-100%);
  }

  .tapbar-container {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    z-index: 1900;
    display: none;
  }

  body.menu-open #main-content {
    overflow: hidden;
    position: fixed; 
    width: 100%;
  }
}
:root {
  --contact-block-height: 10.25rem;
  --tapbar-height: 3.5rem;
}

/*==== FOOTER Y PRE-FOOTER DESACTIVADO EN MOVIL ====*/
@media (max-width: 768px) {
  .pre-footer,
  .footer-bottom {
    display: none !important;
  }
}
/* ===== HEADER FIJO EN ESCRITORIO ===== */
@media (min-width: 769px) {
  .top-bar {
    position: relative;
    width: 100%;
    z-index: 2900;
  }

  .contact-block {
    position: relative;
    width: 100%;
    background: #fff;
    z-index: 2950;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  }

 .tapbar-container {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    z-index: 3000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }

  
}