/* ======== CONFIGURACIÓN GENERAL Y VARIABLES ======== */
:root {
    --primary-color: #0d47a1;
    --secondary-color: #ffc107;
    --whatsapp-color: #25D366;
    --dark-color: #212529;
    --text-muted: #6c757d;
    --light-color: #f8f9fa;
    --white-color: #ffffff;
    --border-color: #dee2e6;
    --font-family: 'Poppins', sans-serif;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --border-radius: 8px;
}

/* ======== ESTILOS BASE ======== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font-family); color: var(--dark-color); line-height: 1.7; background-color: var(--white-color); }
.container { max-width: 1140px; margin: 0 auto; padding: 0 1.5rem; }
h1, h2, h3, h4 { line-height: 1.3; font-weight: 600; }
h2.section-title { font-size: clamp(1.8rem, 5vw, 2.5rem); text-align: center; color: var(--primary-color); margin-bottom: 1rem; }
.section-subtitle { text-align: center; max-width: 700px; margin: 0 auto 3.5rem auto; color: var(--text-muted); }
.light-bg { background-color: var(--light-color); }

/* ======== HERO HÍBRIDO (IMAGEN DE FONDO + PANTALLA DIVIDIDA) ======== */
.hero-section-split {
    position: relative; /* Necesario para la capa de superposición */
    display: flex;
    align-items: center;
    min-height: 90vh;
    padding: 4rem 0;
    /* Usamos la imagen como fondo */
    background: url('hero-placas-solares.jpg') no-repeat center center/cover;
}
/* Capa oscura para asegurar la legibilidad de todos los elementos */
.hero-section-split::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 21, 51, 0.7); /* Capa azul oscuro semitransparente */
    z-index: 1;
}
/* El contenedor de contenido se posiciona sobre la capa oscura */
.hero-container {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
}
.hero-text-content {
    flex: 1 1 40%; /* Reducimos el espacio para el texto */
    text-align: left;
    color: var(--white-color); /* Cambiamos el color del texto a blanco */
    animation: fadeIn 1s ease-in-out;
}
.hero-video-content {
    flex: 1 1 55%; /* Aumentamos el espacio para el vídeo */
    max-width: 750px; /* Aumentamos el tamaño máximo del vídeo */
    animation: fadeIn 1s ease-in-out 0.2s;
    animation-fill-mode: both;
}
.hero-title { font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 700; margin-bottom: 1.5rem; color: var(--white-color); }
.hero-subtitle { font-size: clamp(1rem, 2.5vw, 1.1rem); margin-bottom: 2.5rem; font-weight: 400; opacity: 0.9; }
.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-buttons .cta-button { background-color: var(--secondary-color); color: var(--dark-color); border-color: var(--secondary-color); }
.hero-buttons .cta-button-secondary { background-color: transparent; color: var(--white-color); border-color: var(--white-color); }
.hero-buttons .cta-button-secondary:hover { background-color: var(--white-color); color: var(--dark-color); }

.video-aspect-ratio-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: var(--border-radius); box-shadow: var(--box-shadow); }
.video-aspect-ratio-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ======== BOTONES ======== */
.cta-button, .cta-button-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 0.8rem; padding: 14px 28px; border-radius: 50px; font-weight: 600; font-size: 1rem; text-transform: uppercase; transition: all 0.3s ease; border: 2px solid transparent; cursor: pointer; }
.cta-button:hover { transform: translateY(-3px); box-shadow: 0 8px 15px rgba(0,0,0,0.1); }

/* ======== FORMULARIO DE CONTACTO ======== */
.contact-section { padding: 5rem 0; background: var(--white-color); }
.form-container { max-width: 700px; margin: 0 auto; padding: 2.5rem; background-color: var(--light-color); border-radius: var(--border-radius); text-align: center; }
.form-title { font-size: 2rem; color: var(--primary-color); }
.form-subtitle { color: var(--text-muted); margin-bottom: 2rem; }
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; text-align: left; }
.form-group { display: flex; flex-direction: column; }
.full-width { grid-column: 1 / -1; }
.form-group label { margin-bottom: 0.5rem; font-weight: 600; font-size: 0.9rem; }
.form-group input { width: 100%; padding: 12px 15px; border-radius: var(--border-radius); border: 1px solid var(--border-color); font-family: var(--font-family); font-size: 1rem; transition: border-color 0.3s, box-shadow 0.3s; }
.form-group input:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(13, 71, 161, 0.2); }
.checkbox-group { flex-direction: row; align-items: center; gap: 0.5rem; font-size: 0.9rem; }
.checkbox-group input { width: auto; }
.checkbox-group a { color: var(--primary-color); text-decoration: underline; }
.form-button { width: 100%; font-size: 1.1rem; }
.form-message-hidden { display: none; grid-column: 1/-1; margin-top: 1rem; padding: 1rem; border-radius: 5px; }

/* ======== SECCIONES DE INFORMACIÓN ======== */
.info-section { padding: 6rem 0; }

/* ======== WHY CANARIAS STATS ======== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; text-align: center; }
.stat-card { background-color: var(--white-color); padding: 2rem; border-radius: var(--border-radius); box-shadow: var(--box-shadow); }
.stat-number { font-size: 3.5rem; font-weight: 700; color: var(--primary-color); display: block; line-height: 1; margin-bottom: 0.5rem; }
.stat-card h3 { font-size: 1.3rem; margin-bottom: 0.5rem; }

/* ======== PASOS / OBJECIONES / AYUDAS (REJILLAS) ======== */
.steps-grid, .objections-grid-6, .ayudas-grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2rem; }
.step, .objection-card, .ayuda-card { background: var(--white-color); padding: 2.5rem 2rem; border-radius: var(--border-radius); text-align: center; border: 1px solid var(--border-color); transition: transform 0.3s, box-shadow 0.3s; display: flex; flex-direction: column; }
.step:hover, .objection-card:hover, .ayuda-card:hover { transform: translateY(-8px); box-shadow: var(--box-shadow); }
.step-icon { width: 60px; height: 60px; background-color: var(--primary-color); color: var(--white-color); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 700; margin: 0 auto 1.5rem auto; }
.step h3, .objection-card h3 { font-size: 1.5rem; color: var(--primary-color); margin-bottom: 1rem; }
.objection-card i { font-size: 3rem; color: var(--primary-color); margin-bottom: 1.5rem; }

/* ======== SECCIÓN SOBRE MÍ ======== */
.about-me-container { display: flex; align-items: center; gap: 3rem; }
.about-me-photo { flex-basis: 300px; flex-shrink: 0; }
.about-me-photo img { width: 100%; height: auto; border-radius: 50%; box-shadow: var(--box-shadow); }
.about-me-text { flex: 1; }
h2.section-title-left { text-align: left; margin-bottom: 1.5rem; }
.about-me-text p { margin-bottom: 1rem; }
.about-me-text .highlight-text { font-weight: 600; color: var(--primary-color); border-left: 3px solid var(--secondary-color); padding-left: 1.5rem; font-style: italic; }

/* ======== SECCIÓN AYUDAS (ESTILOS ESPECÍFICOS) ======== */
.ayuda-card { 
    padding: 2rem; 
    text-align: left; 
    border-top: 4px solid var(--secondary-color); 
}
.ayuda-header { 
    font-weight: 700; 
    color: var(--primary-color); 
    margin-bottom: 1rem; 
}
.ayuda-card h4 { 
    font-size: 1.3rem; 
    margin-bottom: 1.5rem; /* Un poco más de espacio */
}
.ayuda-card ul { 
    list-style: none; 
    padding: 0; 
    margin: 0; 
    flex-grow: 1; 
}

/* === INICIO DE LA CORRECCIÓN DE ALINEACIÓN === */
.ayuda-card ul li {
    position: relative; /* Necesario para posicionar el icono */
    padding-left: 1.8em; /* Crea espacio a la izquierda para el icono */
    margin-bottom: 1rem; /* Aumenta el espacio entre líneas */
    font-size: 0.95rem;
    text-align: left; /* Asegura la alineación del bloque de texto */
}

.ayuda-card ul li::before {
    content: '\f00c'; /* Código del icono de 'check' en Font Awesome */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 4px;
    color: var(--primary-color);
    font-size: 1em;
}

/* Se elimina la regla para 'i' ya que ahora se gestiona con ::before */
.ayuda-card ul i {
   display: none; 
}
/* === FIN DE LA CORRECCIÓN DE ALINEACIÓN === */

.gestion-text { 
    text-align: center; 
    margin-top: 3rem; 
    font-size: 1.1rem; 
    font-weight: 600; 
    max-width: 800px; 
    margin-left: auto; 
    margin-right: auto; 
}

/* ======== FAQ ACORDEÓN ======== */
.faq-accordion { max-width: 800px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border-color); }
.faq-item:first-child { border-top: 1px solid var(--border-color); }
.faq-question { display: flex; justify-content: space-between; align-items: center; width: 100%; text-align: left; padding: 1.5rem 0; background: none; border: none; cursor: pointer; font-family: var(--font-family); font-size: 1.2rem; font-weight: 600; color: var(--dark-color); }
.faq-question i { font-size: 1.2rem; color: var(--primary-color); transition: transform 0.3s ease; }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s ease-out; }
.faq-answer p { padding: 0 0 1.5rem 0; line-height: 1.8; }
.faq-item.active .faq-question i { transform: rotate(180deg); }
.faq-item.active .faq-answer { max-height: 300px; }

/* ======== FOOTER ======== */
.footer { background: var(--dark-color); color: var(--light-color); text-align: center; padding: 2.5rem 1.5rem; margin-top: 4rem; }
.footer .disclaimer { font-size: 0.8rem; color: var(--text-muted); max-width: 800px; margin: 1.5rem auto 0 auto; }

/* ======== BOTÓN WHATSAPP FLOTANTE ======== */
.whatsapp-float { position: fixed; bottom: 25px; right: 25px; background-color: var(--whatsapp-color); color: var(--white-color); width: 60px; height: 60px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 2.5rem; box-shadow: 0 4px 15px rgba(0,0,0,0.3); z-index: 9999; transition: transform 0.3s ease; }
.whatsapp-float:hover { transform: scale(1.1); }

/* ======== RESPONSIVE DESIGN ======== */
@media(max-width: 992px) {
    .hero-image-bg { height: auto; min-height: 90vh; padding: 6rem 0; }
}
@media(max-width: 768px) {
    .contact-form { grid-template-columns: 1fr; }
    .form-container { padding: 2rem 1.5rem; }
    .about-me-container { flex-direction: column; text-align: center; }
    h2.section-title-left { text-align: center; }
    .about-me-text .highlight-text { text-align: left; }
    .steps-grid, .objections-grid-6, .ayudas-grid-3, .stats-grid { grid-template-columns: 1fr; }
}

/* Estilos para el vídeo auto-alojado */
.hero-video-content video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Asegura que el vídeo cubra todo el espacio sin deformarse */
    border-radius: var(--border-radius); /* Mantiene las esquinas redondeadas */
}

/* Estado flotante: video pequeño fijo en esquina */
.floating-video {
  position: fixed !important;
  bottom: 24px;
  right: 24px;
  width: 340px !important;
  height: 190px !important;
  z-index: 9999;
  box-shadow: 0 6px 24px rgba(0,0,0,0.25);
  border-radius: 12px;
  background: #000;
  transition: width 0.3s, height 0.3s, bottom 0.3s, right 0.3s;
  pointer-events: auto;
}

@media (max-width: 500px) {
  .floating-video {
    width: 90vw !important;
    height: 25vw !important;
    right: 5vw;
    bottom: 5vw;
  }
}
