/* ===== RESET Y VARIABLES (Tema Energía Profesional) ===== */
:root {
    --primary: #1D387A; /* Azul oscuro - Fondos principales, confianza */
    --primary-electric: #2A619E; /* Azul medio - Acentos, links */
    --primary-dark: #1D387A; /* Azul oscuro para profundidad */
    --accent-orange: #EC9E51; /* Naranja - Llamadas a acción, energía */
    --accent-green: #6CA96E; /* Verde - Éxito, crecimiento */
    --gray: #666666; /* Gris - Texto neutral */
    --white: #FFFFFF; /* Blanco - Claridad, texto en fondos oscuros */
    --glass-bg: rgba(255, 255, 255, 0.5); /* Semitransparente para overlays */
    --glass-border: rgba(255, 255, 255, 0.8);
    --shadow-soft: 0 4px 16px rgba(29, 56, 122, 0.15); /* Sombra azul suave */
    --shadow-lift: 0 8px 24px rgba(236, 158, 81, 0.2); /* Sombra naranja para hover */
    --radius: 12px; /* Bordes redondeados modernos */
    --transition: all 0.3s ease-out; /* Transición rápida y suave */
    --bg-gradient: linear-gradient(135deg, var(--primary) 0%, #2A619E 50%, var(--accent-orange) 100%); /* Gradiente energético */
    --text-primary: var(--white); /* Texto en fondos oscuros */
    --text-secondary: var(--gray); /* Texto en fondos claros */
    --primary-blue-light: #2A619E; /* Para compatibilidad con snippet */
    --primary-blue-dark: #1D387A; /* Para compatibilidad con snippet */
    --text-light: var(--white); /* Para compatibilidad con snippet */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-secondary);
    background: var(--bg-gradient);
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Círculos de fondo flotantes */
.background-circle {
    position: fixed;
    border-radius: 50%;
    z-index: -1;
    opacity: 0.1;
    filter: blur(20px);
}

.circle-1 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--accent-green) 0%, transparent 70%);
    top: 10%;
    left: 10%;
    animation: float 15s infinite ease-in-out;
}

.circle-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-orange) 0%, transparent 70%);
    bottom: 20%;
    right: 10%;
    animation: float 20s infinite ease-in-out reverse;
}

.circle-3 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--white) 0%, transparent 70%);
    top: 60%;
    left: 80%;
    animation: float 12s infinite ease-in-out;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
}

/* ===== LAYOUT GENERAL ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

section {
    padding: 80px 0;
    position: relative;
}

.section-title {
    font-size: 2.8rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 50px;
    color: var(--accent-green); /* Títulos principales ahora en verde */
    position: relative;
}

.section-title span {
    color: var(--accent-orange); /* El texto de acento en el título se mantiene en naranja */
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--accent-green);
    border-radius: 2px;
    animation: expand 1s ease-out;
}

@keyframes expand {
    from { width: 0; }
    to { width: 80px; }
}

/* ===== BOTONES (Ripple effect con naranja) ===== */
.btn {
    display: inline-block;
    padding: 14px 32px;
    background: var(--accent-orange);
    border: none;
    color: var(--primary);
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lift);
    background: var(--accent-green);
    color: var(--white);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--accent-orange);
    color: var(--accent-orange);
}

.btn-secondary:hover {
    background: var(--accent-orange);
    color: var(--white);
    border-color: var(--accent-orange);
}

/* ===== HEADER (Barra sólida con gradiente) ===== */
#header {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--primary);
    z-index: 1000;
    transition: var(--transition);
    box-shadow: var(--shadow-soft);
}

#header.scrolled {
    background: rgba(29, 56, 122, 0.95);
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--white);
    font-weight: 700;
    font-size: 1.6rem;
}

.logo-icon {
    width: 65px; /* Tamaño del contenedor */
    height: 65px; /* Tamaño del contenedor */
    background: var(--accent-orange); /* Se mantiene el fondo naranja si lo deseas */
    border-radius: 50%; /* Se mantiene el círculo */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.6s ease; /* Transición para la animación */
}

.logo:hover .logo-icon {
    transform: rotate(360deg); /* La animación de rotación */
}

.company-logo {
    max-width: 100%; /* La imagen no se sale del ancho de su contenedor */
    max-height: 100%; /* La imagen no se sale del alto de su contenedor */
    object-fit: contain; /* Ajusta la imagen para que quepa y no se distorsione */
}

nav {
    display: flex;
    gap: 2rem;
}

nav a {
    text-decoration: none;
    color: var(--white);
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
}

nav a:hover {
    color: var(--accent-orange);
    background: rgba(236, 158, 81, 0.1);
}

.mobile-menu-btn {
    display: none !important;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.mobile-menu-btn:hover {
    color: var(--accent-orange);
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: var(--primary);
    padding: 5rem 2rem;
    transition: right 0.3s ease;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu a {
    color: var(--white);
    text-decoration: none;
    font-size: 1.1rem;
    padding: 1rem;
    border-radius: var(--radius);
    transition: var(--transition);
}

.mobile-menu a:hover {
    background: var(--accent-orange);
    color: var(--primary);
}

/* ===== HERO (Centrado vertical y horizontal) ===== */
.dynamic-hero {
    position: relative;
    min-height: 90vh; /* Ocupa al menos el 90% de la altura de la pantalla */
    color: var(--white);
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-image: url('imagen/ejecutivos-de-negocios-que-participan-en-una-reunion-de-negocios.jpg');
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(29, 56, 122, 0.6);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
    margin: 0 auto; /* Centra el bloque .hero-content horizontalmente */
    text-align: center; /* Centra el texto */
    
    /* Propiedades clave para el centrado vertical */
    display: flex; 
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%; /* Asegura que ocupe toda la altura disponible */

    transform: translateY(200px);

}

.hero-content h1 {
    font-size: 4.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--accent-green);
    text-align: center;
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center; /* Esto ya centra los botones entre sí */
    flex-wrap: wrap;
}

.gradient-text {
    background: linear-gradient(120deg, var(--accent-green), var(--accent-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== ABOUT (Card simple con quiz en acordeón) ===== */
.about {
    background: var(--white);
    color: var(--text-secondary);
}

.about-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem; /* Opcional, para mantener la separación si añades otro elemento */
    flex-wrap: wrap; /* Para que funcione bien en pantallas pequeñas */
}

.energy-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
}

.energy-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lift);
}

.about-text {
    font-size: 1.5rem;
    line-height: 1.7;
}

.quiz-simple {
    padding: 1.5rem;
    background: var(--primary);
    border-radius: var(--radius);
    color: var(--white);
    box-shadow: var(--shadow-soft);
}

.quiz-options {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.quiz-btn {
    padding: 10px 20px;
    background: transparent;
    border: 2px solid var(--accent-green);
    color: var(--accent-green);
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.quiz-btn:hover, .quiz-btn.active {
    background: var(--accent-green);
    color: var(--white);
}

.quiz-result {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--accent-orange);
    border-radius: var(--radius);
    display: none;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== SERVICES/JOURNEY (Grid de cards energéticas) ===== */
.services {
    background: var(--white);
    color: var(--text-secondary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
}

.service-card:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lift);
}

.service-card i {
    font-size: 2.5rem;
    color: var(--accent-orange);
    margin-bottom: 1rem;
    display: block;
}

.service-card h3 {
    font-size: 1.6rem;
    color: var(--accent-orange); /* Títulos de las tarjetas de servicio en naranja */
    margin-bottom: 1rem;
}

.service-card ul {
    list-style: none;
    text-align: left;
}

.service-card li {
    font-size: 1.1rem; /* Aumenta el tamaño del texto */
    color: var(--gray); /* Mantiene el color del texto */
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.5;
}

.service-card li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent-green);
    font-weight: bold;
}

/* ===== CONTACT (Form con validación visual, mapa completo) ===== */
.contact {
    background: var(--primary);
    color: var(--white);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info h3 {
    font-size: 1.6rem;
    color: var(--accent-green); /* Títulos de contacto ahora en verde */
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-info p {
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    transition: var(--transition);
}

.contact-item:hover {
    background: rgba(236, 158, 81, 0.2);
}

.contact-item i {
    font-size: 1.4rem;
    color: var(--accent-green);
    width: 40px;
    text-align: center;
}

.contact-details h4 {
    color: var(--white);
    margin-bottom: 0.25rem;
}

.contact-details a {
    color: var(--accent-green);
    text-decoration: none;
    transition: var(--transition);
}

.contact-details a:hover {
    text-decoration: underline;
    color: var(--accent-orange);
}

.contact-form {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: var(--radius);
    backdrop-filter: blur(10px);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--white);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius);
    color: var(--white);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent-green);
    outline: none;
    box-shadow: 0 0 10px var(--accent-green);
}

.contact-form .btn {
    width: 100%;
    border: none;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--primary);
    padding: 2rem 0;
    text-align: center;
    color: var(--white);
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer a {
    color: var(--accent-green);
    text-decoration: none;
    transition: var(--transition);
}

.footer a:hover {
    text-decoration: underline;
    color: var(--accent-orange);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .about-content,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    nav {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .hero-cta {
        flex-direction: column;
    }

    .background-circle {
        width: 150px;
        height: 150px;
        filter: blur(10px);
    }
}

/* ===== CHAT BOT (CORREGIDO) ===== */
.chat-toggle-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--accent-green);
  color: var(--white);
  border: none;
  border-radius: 50%;
  width: 69px;
  height: 69px;
  font-size: 24px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  z-index: 9999;
  cursor: pointer;
  transition: transform 0.2s ease-in-out;
}

.chat-toggle-btn:hover {
  transform: scale(1.1);
}

#chatWidget {
  position: fixed;
  bottom: 100px;
  right: 20px;
  width: 350px;
  max-width: 90%;
  height: 500px;
  background: var(--white);
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  flex-direction: column;
  z-index: 9999;
  overflow: hidden;

  /* Animación */
  display: none;
  opacity: 0;
  transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out;
  transform: translateY(20px);
}

#chatWidget.show {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.chat-header {
  background: var(--accent-green);
  color: var(--white);
  padding: 15px;
  font-weight: 700;
  font-size: 1.1rem;
}

#chatLog {
  flex-grow: 1;
  overflow-y: auto;
  padding: 15px;
  background-color: #f9f9f9;
  font-size: 0.95rem;
  line-height: 1.5;
}

.chat-input-container {
  display: flex;
  border-top: 1px solid #ddd;
}

#chatInput {
  flex: 1;
  padding: 12px;
  border: none;
  outline: none;
}

.chat-input-container button {
  background: var(--accent-green);
  color: var(--white);
  border: none;
  padding: 0 18px;
  cursor: pointer;
  transition: background 0.2s ease-in-out;
}

.chat-input-container button:hover {
  background: #5a965d;
}

/* Animación de mensajes nuevos */
@keyframes fadeInSlideUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

#chatLog > div {
  animation: fadeInSlideUp 0.3s ease-in forwards;
  padding: 8px;
  border-radius: 8px;
  margin-bottom: 8px;
  background-color: var(--white);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

#chatLog > div strong {
  color: var(--primary);
}

/* ESTILOS PARA EL RECUADRO DE INFORMACIÓN */
.info-box {
    background: rgba(255, 255, 255, 0.1); /* Fondo semitransparente */
    border: 1px solid rgba(255, 255, 255, 0.2); /* Borde suave */
    backdrop-filter: blur(5px); /* Efecto de cristal esmerilado */
    padding: 2rem;
    border-radius: var(--radius);
    margin-top: 1.5rem; /* Espacio arriba del recuadro */
    margin-bottom: 2rem; /* Espacio abajo del recuadro */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    color: var(--white);
    line-height: 1.6;
}

.info-box p {
    font-size: 1.1rem; /* Aumenta el tamaño del texto para mejor legibilidad */
    opacity: 0.9;
}
