/*
Theme Name: Solbega Child
Theme URI: https://solbega.es
Description: Child theme de Hello Elementor para Solbega Energía Solar
Author: Solbega
Template: hello-elementor
Version: 1.0.0
Text Domain: solbega-child
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ============================================
   VARIABLES Y COLORES GLOBALES
   ============================================ */
:root {
  --primary: #064e3b;
  --secondary: #10b981;
  --accent: #fde047;
  --bg: #dcffdb;
  --transition: all 0.3s ease;
  --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-realistic: 0 8px 24px rgba(0, 0, 0, 0.15);
  --border-radius-soft: 16px;
}

/* ============================================
   RESET Y ESTILOS BASE
   ============================================ */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", system-ui;
  background: linear-gradient(135deg, #ecfdf5 0%, #dcffdb 40%, #bbf7d0 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Animaciones de entrada */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.section {
  animation: fadeIn 0.8s ease-out;
}

/* ============================================
   ACCESIBILIDAD
   ============================================ */
.skip-link {
  position: absolute;
  left: -999px;
}
.skip-link:focus {
  left: 10px;
  top: 10px;
  background: black;
  color: white;
  padding: 10px;
  z-index: 9999;
}

/* ============================================
   LAYOUT GENERAL
   ============================================ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: auto;
}

/* ============================================
   SECCIONES
   ============================================ */
.section {
  margin: 2%;
  padding: 50px 0 30px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  border: 3px solid rgba(6, 78, 59, 0.20);
  border-radius: var(--border-radius-soft);
  box-shadow: var(--shadow-realistic);
}

h1, h2 {
  font-size: 2.5rem;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h3 {
  color: #000000;
  text-align: center;
  font-weight: 500;
  line-height: 1.3;
}

.soluciones {
  text-align: center;
}

p, li, ul {
  padding: 10px 8%;
  line-height: 1.6;
}

li {
  list-style-type: none;
}

/* ============================================
   HEADER Y NAVEGACIÓN
   ============================================ */
.anuncio {
  width: 100%;
  background: var(--primary);
  color: var(--accent);
  padding: 8px;
  font-size: 16px;
  text-align: center;
  font-family: sans-serif;
  border-bottom: 2px solid rgba(255,255,255,0.1);
}
.anuncio p {
  padding: 0;
  margin: 0;
}
header {
  position: fixed;
  width: 100%;
  background: rgba(220, 255, 219, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.2);
  z-index: 1000;
}

.container.nav {
  height: 100px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}

.desktop-menu {
  display: none;
  gap: 20px;
}
.desktop-menu a {
  text-decoration: none;
  color: var(--primary);
  font-weight: 600;
}

#menu-toggle {
  background: none;
  border: none;
  font-size: 26px;
  cursor: pointer;
}
.bg-menu {
  width: 25px;
  height: 3px;
  background: #000;
  display: block;
  margin: 5px;
}

.mobile-menu {
  display: flex;
  flex-direction: column;
  padding: 20px;
  text-align: center;
  margin: 0;
  font-size: 20px;
  height: 70vh;
  background: rgba(220, 255, 219, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.2);
}
.mobile-menu a {
  font-size: 1.5rem;
  text-decoration: none;
  color: var(--primary);
  font-weight: 600;
  margin: 15px;
}

.hidden {
  display: none !important;
}

.logo img {
  width: 200px;
  height: auto;
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  color: white;
  overflow: hidden;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 78, 59, 0.5);
}
.hero-content {
  position: relative;
  z-index: 1;
}
.hero span {
  color: var(--accent);
}
.hero-p {
  width: 90%;
  padding: 2%;
  text-align: left;
}
.textos {
  padding: 2%;
  text-align: center;
}

/* ============================================
   DETAILS / ACORDEÓN
   ============================================ */
details {
  background: rgba(255, 255, 255, 0.7);
  border: 2px solid rgba(6, 78, 59, 0.15);
  border-radius: var(--border-radius-soft);
  margin: 10px 8%;
  padding: 10px 15px;
  transition: var(--transition);
  backdrop-filter: blur(8px);
}
details:hover {
  transform: translateY(-2px);
  border-color: rgba(16, 185, 129, 0.4);
}
summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--primary);
  font-size: 1.1rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 5px;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--secondary);
  transition: var(--transition);
}
details[open] summary::after {
  content: "−";
  transform: rotate(180deg);
}
details p {
  margin: 10px 0 5px;
  padding: 10px;
  background: rgba(220, 255, 219, 0.4);
  border-radius: 10px;
  line-height: 1.5;
  color: #0f172a;
  animation: fadeIn 0.3s ease-in-out;
}

/* ============================================
   SECCIÓN NOSOTROS
   ============================================ */
.nosotros-layout {
  display: flex;
  flex-direction: column;
  gap: 30px;
  align-items: center;
  justify-content: center;
}
.nosotros-img-box { width: 100%; }
.nosotros-img {
  width: 100%;
  max-width: 450px;
  margin: 0 auto;
  display: block;
  border-radius: var(--border-radius-soft);
  border: 4px solid var(--secondary);
  object-fit: cover;
}
.nosotros-intro {
  max-width: 800px;
  margin: auto;
  padding: 0;
  width: 100%;
}
.nosotros-btn {
  margin-top: 5%;
  text-align: center;
}
.nosotros-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 5%;
}
.nosotros-cards .cards {
  background: var(--secondary);
  padding: 20px;
  border-radius: var(--border-radius-soft);
  transition: var(--transition);
  box-shadow: var(--shadow-soft);
}
.nosotros-cards .cards:hover { transform: translateY(-3px); }
.nosotros-extra { margin-top: 40px; }
.nosotros-extra p {
  padding: 0 10%;
  font-size: 16px;
}

/* ============================================
   TÍTULOS ESPECIALES
   ============================================ */
.img-title {
  width: 100%;
  background: var(--primary);
  color: var(--accent);
  padding: 12px;
  font-size: 2rem;
  text-align: center;
  font-family: sans-serif;
  border-radius: 30px;
}
.fa-solid { margin: 0 10px; }

/* ============================================
   SECCIÓN SERVICIOS
   ============================================ */
.servicios-layout { margin: 0; }
.servicios-texto { flex: 1; }
.servicios-texto p {
  line-height: 1.6;
  color: #334155;
  text-align: center;
  padding: 3% 6%;
}

/* ============================================
   BOTONES
   ============================================ */
.btn {
  padding: 12px 18px;
  border-radius: var(--border-radius-soft);
  text-decoration: none;
  display: inline-block;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.primary {
  background: var(--accent);
  color: black;
  font-weight: bold;
  box-shadow: 0 4px 15px rgba(253, 224, 71, 0.4);
}
.primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(253, 224, 71, 0.6);
}
.primary:active { transform: scale(0.96); }

/* ============================================
   GRID DE TARJETAS
   ============================================ */
.grid {
  display: grid;
  gap: 20px;
}
.card {
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  background: var(--secondary);
  padding: 20px;
  border-radius: var(--border-radius-soft);
  box-shadow: var(--shadow-soft);
}
.card:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: var(--shadow-realistic);
}
.card::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 4px;
}
.card:hover::after { width: 100%; }
.card h2, .card p { transition: transform 0.3s ease, color 0.3s ease; }
.card:hover h2 { transform: translateX(5px); }
.card:hover p  { transform: translateX(5px); }
.highlight {
  background: var(--primary);
  color: white;
}

/* ============================================
   GALERÍA Y CARRUSEL
   ============================================ */
.gallery-header p { color: #334155; margin-bottom: 20px; }
.gallery-wrapper { position: relative; overflow: hidden; width: 100%; }
.gallery-track {
  display: flex;
  gap: 20px;
  transition: transform 0.6s ease;
  will-change: transform;
}
.gallery-track img {
  width: 320px;
  height: 220px;
  object-fit: cover;
  border-radius: var(--border-radius-soft);
  cursor: pointer;
  transition: var(--transition);
}
.gallery-track img:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-realistic);
}
.galeria-p { text-align: center; font-size: 1.3em; padding: 1%; margin: 0; }
.navimg {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(6, 78, 59, 0.8);
  color: white;
  border: none;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
}
.prev { left: 10px; }
.next { right: 10px; }

dialog {
  border: none;
  background: rgba(0,0,0,0.4);
  padding: 10px;
}
#close-modal {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0,0,0,0.6);
  color: var(--bg);
  border: none;
  font-size: 28px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s;
}
#modal-img {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: 12px;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: #0f172a;
  color: #e2e8f0;
  padding: 40px 20px 20px;
  box-shadow: 0 -5px 20px rgba(0,0,0,0.2);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
}
.footer h3, .footer h4 { margin-bottom: 10px; color: #ffffff; }
.sello { width: 100%; max-width: 200px; }
.footer-contact ul { list-style: none; padding: 0; margin: 0; }
.footer-contact li { margin-bottom: 8px; font-size: 14px; color: #cbd5e1; }
.footer p { font-size: 14px; color: #cbd5e1; }
.footer a { color: #cbd5e1; text-decoration: none; transition: color 0.3s; }
.footer a:hover { color: #22c55e; }
.footer-links a { display: block; margin-bottom: 6px; }
.footer-bottom {
  border-top: 1px solid #1e293b;
  margin-top: 30px;
  padding-top: 15px;
  text-align: center;
  font-size: 13px;
  color: #94a3b8;
}

/* ============================================
   BANNER
   ============================================ */
.banner { background: #f8fafc; width: 100%; padding: 10px 0; }
.banner-container { max-width: 1200px; margin: 0 auto; padding: 0 10px; }
.banner img { width: 100%; height: auto; display: block; }

/* ============================================
   UBICACIÓN
   ============================================ */
.map-container { width: 100%; max-width: 1000px; margin: auto; }
.map-container iframe { width: 100%; height: 400px; border: 0; border-radius: 10px; }

/* ============================================
   CONTACTO Y FORMULARIO
   ============================================ */
.accent { background: var(--primary); color: white; }
.contact { display: grid; gap: 30px; }
.contact p { padding: 0; }
.logo-v2c { width: 50%; height: auto; border-radius: 10px; margin: 2%; }

input, textarea {
  font-family: sans-serif;
  width: 100%;
  padding: 12px;
  margin-bottom: 10px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
}
textarea { height: 150px; }
.error { color: #ef4444; font-size: 14px; display: block; margin-bottom: 15px; }
label { color: white; font-weight: 500; display: block; margin-bottom: 5px; }
.form-mensaje { padding: 12px; border-radius: 8px; text-align: center; font-weight: 600; margin-top: 10px; }
.form-mensaje.ok  { background: rgba(34, 197, 94, 0.2); color: #22c55e; border: 1px solid #22c55e; }
.form-mensaje.error { background: rgba(239, 68, 68, 0.2); color: #ef4444; border: 1px solid #ef4444; }
.privacy-check { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 14px; line-height: 1.2; }
.privacy-check input { width: 16px; height: 16px; margin: 1%; flex-shrink: 0; }
.privacy-text { user-select: none; padding: 5px 0 0 0; margin: 3%; }

/* ============================================
   WHATSAPP FLOTANTE
   ============================================ */
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background: rgba(37, 211, 102, 0.6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  z-index: 1000;
  transition: 0.3s;
  text-decoration: none;
}
.whatsapp-float img { width: 32px; height: 32px; }
.whatsapp-tooltip {
  position: absolute;
  right: 70px;
  background: rgba(37, 211, 102);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(10px);
  transition: 0.3s;
  pointer-events: none;
}
.whatsapp-tooltip::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -6px;
  transform: translateY(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: transparent transparent transparent #111;
}
.whatsapp-float:hover .whatsapp-tooltip { opacity: 1; transform: translateX(0); }

/* ============================================
   AVISO DE PRIVACIDAD
   ============================================ */
#aviso {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: radial-gradient(circle, #064e3b, #10b981);
  color: #ffffff;
  padding: 10px;
  display: block;
  z-index: 9999;
}
.privacidad-aviso {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  text-align: center;
  margin: auto;
  border-radius: 50px 50px 0 0;
}
.link-privacidad { text-decoration: none; color: var(--accent); display: inline-block; transition: transform 0.2s ease, color 0.2s ease; }
.link-privacidad:hover { transform: scale(1.05); color: var(--bg); }

/* ============================================
   RESPONSIVE - DESKTOP
   ============================================ */
@media (min-width: 768px) {
  .desktop-menu { display: flex; }
  #menu-toggle { display: none; }
  .grid { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .contact { grid-template-columns: 1fr 1fr; }
  .mobile-menu { display: none; }
  .servicios-layout { flex-direction: column; }
  .img-title { font-size: 2.5rem; }
  .nosotros-layout { flex-direction: row; }
  .nosotros-intro { width: 50%; }
  .nosotros-img-box { width: 50%; }
  .nosotros-img { margin-left: 5%; }
}

@media (max-width: 900px) {
  h1, h2 { font-size: 2rem; }
}

@media (max-width: 768px) {
  .desktop-menu { display: none !important; }
  #menu-toggle { display: block; }
  .grid { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; }
  .img-title { font-size: 1.5rem; }
  h1, h2 { font-size: 1.8rem; }
  .section { margin: 5%; padding: 30px 0 20px; }
  .nosotros-layout { flex-direction: column; }
  .nosotros-img-box, .nosotros-intro { width: 100%; }
  .nosotros-img { margin-left: 0; max-width: 100%; }
  p, li, ul { padding: 5px 5%; }
  .nosotros-extra p { padding: 0 5%; }
  .servicios-texto p { padding: 3% 3%; }
  .map-container iframe { height: 300px; }
  .whatsapp-float { bottom: 80px; }
  #aviso { padding: 15px; }
}

@media (max-width: 600px) {
  .logo img { width: 150px; }
  .container.nav { height: 80px; padding: 10px 0; }
  h1, h2 { font-size: 1.5rem; }
  .img-title { font-size: 1.3rem; padding: 8px; }
  .gallery-track img { width: 250px; height: 180px; }
  .navimg { width: 35px; height: 35px; font-size: 18px; }
  .prev { left: 5px; }
  .next { right: 5px; }
  .footer-grid { grid-template-columns: 1fr; }
  .whatsapp-tooltip { font-size: 12px; padding: 6px 10px; }
  .anuncio p { font-size: 13px; }
}
