/* comun.css - BefEnergy */

/* ==============================
   ESTILOS BASE
============================== */
body {
  margin: 0;
  font-family: 'Montserrat', Arial, sans-serif;
  background: #f6f6f6;
  color: #222;
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  padding-left: 0;
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Colores utilitarios */
.amarillo { color: #ffd932; }
.naranja  { color: #ff8c32; }

.amarillo-bg {
  background: #ffd932;
  color: #23272f;
}

/* ==============================
   NAV (uso general)
============================== */
nav ul li.active a {
  background: #ecc101;
  color: #000000;
}

nav ul li a {
  color: #333;
  padding: 10px 15px;
  transition: color 0.3s ease;
}

nav ul li a:hover { color: #ff8c32; }

.active-pre a {
  background: #ff8c32;
  color: #000000;
}

/* ==============================
   TÍTULOS
============================== */
.titulo-centrado {
  text-align: center;
  font-size: 2.5rem;
  color: #ffffff;
  font-weight: 700;
  margin: 0 auto 20px auto;
  max-width: 600px;
  padding: 0 20px;
}

/* ==============================
   SELECTOR DE IDIOMA FLOTANTE
============================== */
.idioma-float {
  position: fixed;
  bottom: 24px;
  right: 18px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.idioma-float-btn {
  background: #fff;
  border: none;
  border-radius: 50%;
  box-shadow: 0 2px 12px rgba(0,0,0,0.13);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.18s;
  outline: none;
}

.idioma-float-btn:hover,
.idioma-float-btn:focus {
  box-shadow: 0 4px 18px rgba(0,0,0,0.18);
  transform: scale(1.08);
}

.idioma-float-bandera {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  background: #fff;
  border: 1px solid #eee;
  transition: box-shadow 0.2s, transform 0.2s;
  cursor: pointer;
  transform: scale(1);
}

.idioma-float-menu {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.13);
  padding: 10px 8px;
  margin-bottom: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px) scale(0.95);
  transition: opacity 0.25s, transform 0.25s;
  min-width: 52px;
  position: absolute;
  bottom: 60px;
  right: 0;
}

.idioma-float-menu.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.idioma-float-opcion {
  background: none;
  border: none;
  padding: 6px 0;
  margin: 0;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.18s;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.idioma-float-opcion.selected,
.idioma-float-opcion:focus { background: #f5f5f5; }

.idioma-float-opcion:not(:last-child) { margin-bottom: 6px; }

/* ==============================
   BANNER COOKIES
============================== */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #23272f;
  color: #fff;
  padding: 18px 10px;
  z-index: 99999;
  display: none;
  justify-content: center;
  align-items: center;
  font-size: 1rem;
}

.cookie-banner-content {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: center;
}

.cookie-btn {
  background: #ffd932;
  color: #23272f;
  border: none;
  border-radius: 22px;
  padding: 8px 22px;
  font-weight: bold;
  cursor: pointer;
  margin-left: 10px;
  transition: background 0.2s;
}

.cookie-btn:hover { background: #ff8c32; }

/* ==============================
   ANIMACIONES Y EFECTOS
============================== */
/* Fade-in */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Slide-in */
.slide-in-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.slide-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Zoom-in */
.zoom-in {
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.zoom-in.visible {
  opacity: 1;
  transform: scale(1);
}

/* Scroll suave */
html { scroll-behavior: smooth; }

/* Hover servicios */
.service-item:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* ==============================
   FAQ
============================== */
.faq .faq-question {
  background-color: #f9f9f9;
  border: 1px solid #e0e0e0;
  padding: 15px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-weight: 600;
  color: #333;
  border-radius: 8px;
  margin-bottom: 5px;
}

.faq .faq-question:hover { background-color: #fff3cd; }

.faq .faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  padding: 0 15px;
  background-color: #fff;
  border-left: 2px solid #ffda6a;
  color: #444;
  font-size: 15px;
  margin-bottom: 10px;
  border-radius: 0 0 8px 8px;
}

.faq .faq-answer.open {
  padding-top: 10px;
  padding-bottom: 15px;
}

/* ==============================
   CONTACTO Y PRESUPUESTO
============================== */
.contacto .card,
.presupuesto .opcion {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  padding: 20px;
  margin: 15px 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contacto .card:hover,
.presupuesto .opcion:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* ==============================
   SLIDER
============================== */
.slider-scroll {
  height: 600px;
  overflow: hidden;
  position: relative;
}

.slider-img {
  width: 100%;
  transform: translateX(0);
  transition: transform 0.1s linear;
  will-change: transform;
}

/* ==============================
   SUBMENÚ PRESUPUESTO
============================== */
.presupuesto-dropdown { position: relative; }

.btn-presupuesto {
  background: linear-gradient(90deg, #FFD932 0%, #E8C200 100%);
  color: #23272f;
  font-weight: 700;
  font-size: 1em;
  padding: 10px 22px;
  border-radius: 30px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(255, 217, 50, 0.4);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.btn-presupuesto, .presupuesto {
  font-family: 'Montserrat', Arial, sans-serif;
}

.btn-presupuesto:hover,
.btn-presupuesto:focus {
  background: linear-gradient(90deg, #E8C200 0%, #FFD932 100%);
  box-shadow: 0 6px 14px rgba(255, 217, 50, 0.7);
  outline: none;
}

.submenu-correo {
  display: none;
  position: absolute;
  top: 110%;
  left: 0;
  padding: 14px 16px;
  border-radius: 14px;
  z-index: 1000;
  flex-direction: column;
  gap: 10px;
  min-width: 200px;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  font-family: 'Montserrat', Arial, sans-serif;
}

.submenu-correo.show {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.submenu-correo button {
  background: transparent;
  border: 2px solid #FFD932;
  color: #000000;
  padding: 10px;
  font-weight: 600;
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
  text-align: center;
  font-family: 'Montserrat', Arial, sans-serif;
  background-color: #ecc101;
}

.submenu-correo button:hover,
.submenu-correo button:focus {
  background: #FFD932;
  color: #23272f;
  outline: none;
}

/* ==============================
   MEDIA QUERIES
============================== */
/* Tablets */
@media (max-width: 1024px) {
  body { font-size: 1rem; padding: 0 10px; }
  .titulo-centrado { font-size: 2.2rem; max-width: 90vw; padding: 0 10px; }
  nav ul { flex-direction: row; gap: 10px; }
}

/* Móviles grandes */
@media (max-width: 768px) {
  body { font-size: 0.95rem; padding: 0 5px; }
  .titulo-centrado { font-size: 1.8rem; max-width: 98vw; padding: 0 5px; }
  nav ul { flex-direction: column; gap: 5px; align-items: flex-start; }
  nav ul li a {
    padding: 8px 12px;
    font-size: 1rem;
    display: block;
    width: 100%;
  }

  /* Submenú presupuesto en móvil */
  .submenu-correo {
    position: static;
    box-shadow: none;
    background: transparent;
    padding: 0;
    gap: 12px;
    margin-top: 8px;
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }
  .submenu-correo.show {
    display: flex !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
  }
  .submenu-correo button {
    border-color: #ecc101;
    color: #000000;
  }
  .submenu-correo button:hover,
  .submenu-correo button:focus {
    background: #ecc101;
    color: #000000;
  }
}

/* Móviles pequeños */
@media (max-width: 480px) {
  body { font-size: 0.9rem; padding: 0 2px; }
  .titulo-centrado { font-size: 1.5rem; max-width: 100vw; padding: 0 2px; }
  nav ul { flex-direction: column; gap: 3px; align-items: flex-start; }
  nav ul li a { padding: 6px 10px; font-size: 0.9rem; width: 100%; }
  img { max-width: 100vw; height: auto; }
}

/* Idioma flotante responsivo */
@media (max-width: 600px) {
  .idioma-float { bottom: 12px; right: 6px; }
  .idioma-float-btn { width: 38px; height: 38px; }
  .idioma-float-bandera { width: 22px; height: 22px; }
  .idioma-float-menu {
    min-width: 34px;
    padding: 8px 4px;
    bottom: 44px;
  }
}
