/* --- GLOBAL STYLES & DESIGN SYSTEM --- */
@font-face {
  font-family: 'Futura';
  src: url('../font/FUTULT_0.ttf') format('truetype'); /* Adjusted path assuming font folder is one level up from css folder */
  /* Add other font weights/styles if available */
}

:root {
    --font-family: 'Poppins', 'Futura', sans-serif; /* Futura will be preferred if Poppins not found or if explicitly used */
  --accent-color: #0d47a1; /* Tu nuevo azul oscuro y profesional */
    --primary-button-text-color: #ffffff;
    --header-height: 90px; /* Height of the main header bar ONLY. Synced with .new-header-main height in elements3.js */
 --accent-color-dark-hover: #093170; /* Un tono ligeramente más oscuro para el hover */
  --accent-color-light: #e6eefc; /* Un tono muy claro para fondos o bordes sutiles */
  
    /* Light Mode (Default) */
    --bg-color: #F8F9FA;
    --text-color: #141414;
   --border-color: #e5e5e5;
  --card-bg-color: #ffffff;
    --header-bg: #FFFFFF;
    --header-text: #141414;
    --header-separator: #CCCCCC;
    --secondary-button-text-color: var(--text-color); /* Default for light mode */
}

body {
  font-family: 'Futura', sans-serif; /* Apply Futura globally */
  margin: 0;
  padding: 0; /* Ensure no default body padding */
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color 0.3s ease, color 0.3s ease;
  line-height: 1.6;
  overflow-x: hidden; /* Prevent horizontal scroll */
}

body.dark-mode {
    /* Dark Mode Overrides */
      --accent-color-dark: #3a7bd5; /* Un azul más brillante para que destaque en fondo oscuro */
 --text-color-dark: #dddddd;
  --background-color-dark: #0a0a0a;
  --border-color-dark: #333333;
  --card-bg-color: #1a1a1a;
    --bg-color: #121212;
    --text-color: #EAEAEA;
    --card-bg-color: #1E1E1E;
    --border-color: #333333;
    --header-bg: #1A1A1A; /* Dark header background */
    --header-text: #EAEAEA; /* Dark header text */
    --header-separator: #444444; /* Dark header separator */
    --secondary-button-text-color: #EAEAEA; /* Default for dark mode */
}



#theme-toggler {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1001; /* Ensure it's above most content but potentially below modals */
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: 1px solid var(--border-color);
}

#theme-toggler:hover {
    background-color: rgba(240, 240, 240, 0.9);
    transform: scale(1.1);
}

#theme-toggler span {
    font-size: 24px;
    line-height: 1; /* Ensure icons are centered vertically */
}

body.dark-mode #theme-toggler {
    background-color: rgba(50, 50, 50, 0.8);
    border-color: #555;
}

body.dark-mode #theme-toggler:hover {
    background-color: rgba(70, 70, 70, 0.9);
}

       .calendly-overlay {
            z-index: 9999 !important;
        }
        
        .calendly-popup {
            width: 90vw !important;
            max-width: 1200px !important;
            height: 95vh !important;
            max-height: 900px !important;
            overflow: hidden !important;
        }
        
        .calendly-popup .calendly-popup-content {
            width: 100% !important;
            height: 100% !important;
            overflow: hidden !important;
        }
        
        .calendly-popup iframe {
            width: 100% !important;
            height: 100% !important;
            border: none !important;
            overflow: hidden !important;
        }

        /* Badge widget personalizado */
        .calendly-badge-widget {
            bottom: 20px !important;
            right: 20px !important;
        }

/* JavaScript will handle toggling display of light/dark icons */
/* body.dark-mode .light-icon { display: none; } */
/* body.dark-mode .dark-icon { display: inline; } */
/* .light-icon { display: inline; } */
/* .dark-icon { display: none; } */


/* --- MODERN HEADER (mi-cabecera) --- */
mi-cabecera {
    display: block; /* Custom elements are inline by default */
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--header-bg);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

mi-cabecera .header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 2rem; /* Adjusted padding */
    max-width: 100%; /* Ensure it spans full width */
    box-sizing: border-box;
    height: var(--header-height);
}

mi-cabecera .header-left,
mi-cabecera .header-right {
    display: flex;
    align-items: center;
}

mi-cabecera .logo-container img {
    height: 40px; /* Adjust as needed */
    margin-right: 2rem; /* Space between logo and first nav item */
}

mi-cabecera nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

mi-cabecera nav ul li {
    display: flex; /* For vertical alignment of link and potential separator */
    align-items: center;
}

mi-cabecera nav ul li a {
    text-decoration: none;
    color: var(--header-text);
    padding: 0.5em 0.8em;
    font-size: 0.95rem; /* Slightly smaller font for nav */
    font-weight: 500; /* Medium weight for Futura */
    transition: color 0.3s ease;
    white-space: nowrap; /* Prevent wrapping */
}

mi-cabecera nav ul li a:hover {
    color: var(--accent-color);
}

/* Separator for nav links */
mi-cabecera nav ul li + li::before {
    content: '|';
    color: var(--header-separator);
    padding: 0 0.75rem; /* Space around separator */
    font-size: 0.9rem;
}

/* --- HERO SECTION (#inicio) --- */
#inicio {
    background: linear-gradient(-45deg, #0b121c, #1a2a40, #2a7fff, #1a2a40, #0b121c);
    background-size: 400% 400%;
    animation: gradientAnimation 15s ease infinite;
    color: #ffffff;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 40px; /* Aumentamos el padding horizontal para que no esté tan pegado a los bordes */
    box-sizing: border-box;
}

#neural-network-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.hero-content-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1600px; /* Aumentamos el ancho máximo para pantallas grandes */
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 140px; /* Espacio para la cabecera flotante */
    padding-bottom: 60px;
}

#inicio h1.main-hero-title {
    font-family: 'Futura', sans-serif;
    /* CAMBIO: Hacemos el crecimiento del texto un poco menos agresivo en pantallas anchas (5.2vw en lugar de 5.5vw) */
    font-size: clamp(2.8rem, 5.2vw, 4.2rem); 
    font-weight: bold;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.6);
    color: #fff;
    margin: 0;
    line-height: 1.3; /* Aumentamos el interlineado para que las 3 líneas respiren */
    margin-bottom: 2rem; /* Añadimos espacio entre el título y el párrafo */
}

.hero-main-content-columns {
    display: flex;
    width: 100%;
    align-items: center; /* <<< CLAVE: Alinea verticalmente el texto y el vídeo */
    gap: 4rem; /* CAMBIO: Reducimos un poco el espacio para dar más anchura a las columnas */
    /* Se elimina el margin-top porque el espaciado ahora está dentro de la columna */
}

.hero-text-column {
    flex: 1 1 65%; /* CAMBIO: Damos un 65% del espacio a la columna de texto */
    text-align: left; 
    display: flex; 
    flex-direction: column;
    justify-content: center; /* Centra el contenido del texto verticalmente en su propia caja */
}

.hero-text-column p {
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    line-height: 1.7;
    color: #f0f0f0;
    margin-top: 0; /* Reseteamos el margen superior que ya no es necesario */
    margin-bottom: 2.5rem; /* Aumentamos el espacio antes de los botones */
    max-width: 650px; 
}

.hero-text-column .cta-buttons {
   justify-content: flex-start; /* Alinea los botones a la izquierda */
   align-self: flex-start; /* Asegura que el contenedor de botones no se estire */
}

.hero-video-column {
    flex: 1 1 35%; /* CAMBIO: La columna del vídeo toma el 35% restante */
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-avatar-video {
    width: 100%; /* El vídeo ocupa todo el ancho de su columna */
    max-width: 450px; /* Un máximo para que no sea excesivo */
    height: clamp(450px, 70vh, 650px); /* <<< CLAVE: Vídeo mucho más alto */
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    object-fit: cover;
    object-position: center top; /* Mantiene la cara centrada si se recorta */
}


@keyframes gradientAnimation {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero-headline-container {
  width: 100%;
  max-width: 1500px; /* Constrain headline width for better readability */
  margin: 0 auto 0.5rem auto; /* Further reduced bottom margin to reduce height */
}

#inicio h1.main-hero-title {
  font-family: 'Futura', sans-serif;
  font-size: clamp(2.8rem, 6vw, 4.5rem); /* Responsive font size */
  font-weight: bold; /* Bold Futura for headline */
  text-shadow: 2px 2px 8px rgba(0,0,0,0.6);
  color: #fff;
  margin: 0;
  line-height: 1.2;
   margin-bottom: 2rem; 
}

.hero-main-content-columns {
  display: flex;
  flex-direction: row;
  width: 100%;
  max-width: 1300px; /* Max width for the two-column layout */
  align-items: center;
  gap: 3rem;
  margin-bottom: 1rem; /* Reduced bottom margin */
}

.hero-text-column {
  flex: 1;
  text-align: left; 
  padding-right: 1rem; 
  display: flex; 
  flex-direction: column; 
}

.hero-text-column p {
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    line-height: 1.7;
    color: #f0f0f0;
    margin-top: 0; /* Reseteamos el margen superior que ya no es necesario */
    margin-bottom: 2.5rem; /* Aumentamos el espacio antes de los botones */
    max-width: 750px; /* CAMBIO: Aumentado para que el párrafo ocupe más ancho */
}
.hero-text-column p:last-of-type {
  margin-bottom: 1.5rem; /* Space before buttons */
}

/* Styles for CTA buttons when they are INSIDE hero-text-column (assumed HTML change) */
.hero-text-column .cta-buttons {
  align-self: center; /* Center the button group horizontally within the text column */
  /* .cta-buttons (original rules lines 200-206) already defines display:flex and gap for its children */
}

.hero-video-column {
  flex: 0 0 auto; /* Video column takes space based on video width, doesn't grow/shrink as much */
  display: flex;
  justify-content: center;
  align-items: center;
  padding-left: 1rem;
}

.hero-avatar-video {
  width: auto;
  max-width: 300px; /* Max width for the video container */
  height: clamp(300px, 60vh, 500px); /* Responsive height */
  border-radius: 15px; /* Rounded corners */
  box-shadow: 0 10px 25px rgba(0,0,0,0.3); /* Softer shadow */
  object-fit: cover; /* Ensure video covers the area, might crop */
}

.cta-button {
  padding: 12px 28px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem; /* Space between buttons */
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

#inicio .cta-button {
  padding: 12px 30px;
  border-radius: 25px; /* Pill-shaped buttons */
  font-family: 'Futura', sans-serif;
  font-weight: bold;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  border: 2px solid transparent;
  font-size: 1rem;
}

#inicio .cta-button.primary {
  background-color: var(--accent-color);
  color: var(--primary-button-text-color);
  border-color: var(--accent-color);
}

#inicio .cta-button.primary:hover {
  background-color: var(--accent-color-dark-hover);
  border-color: var(--accent-color-dark-hover);
  transform: translateY(-2px);
}

body.dark-mode .cta-button.primary {
    background-color: var(--accent-color-dark);
    border-color: var(--accent-color-dark);
}
body.dark-mode .cta-button.primary:hover {
    background-color: #5a91e4; /* Un poco más claro para el hover en modo oscuro */
    border-color: #5a91e4;
}

#inicio .cta-button.secondary {
  background-color: transparent;
  color: var(--primary-button-text-color); /* White text for hero */
  border: 2px solid var(--primary-button-text-color); /* White border for hero */
}

#inicio .cta-button.secondary:hover {
  background-color: var(--primary-button-text-color);
  color: var(--accent-color); /* Accent color text on hover */
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(255, 255, 255, 0.2);
}

body.dark-mode .cta-button.secondary {
  color: var(--accent-color-dark);
  border-color: var(--accent-color-dark);
  background-color: transparent;
}
body.dark-mode .cta-button.secondary:hover {
  /* Al pasar el ratón, se rellena */
  background-color: var(--accent-color-dark);
  color: #ffffff;
}

/* --- GENERAL BUTTONS (can be used outside hero) --- */
.btn {
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600; /* Futura might need different weight, e.g., 500 or bold */
    font-family: 'Futura', sans-serif;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--primary-button-text-color);
    border-color: var(--accent-color);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(42, 127, 255, 0.4);
    background-color: #1e66d4; /* Slightly darker accent */
}

.btn-secondary {
    background-color: transparent;
    color: var(--secondary-button-text-color); /* Uses CSS variable */
    border-color: var(--accent-color);
}

.btn-secondary:hover {
    background-color: var(--accent-color);
    color: var(--primary-button-text-color);
}


/* --- SOLUTIONS SECTION (#soluciones) --- */
#soluciones {
    background-color: var(--bg-color);
    padding: 60px 20px;
}
#soluciones h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-color);
}
.solutions-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsive grid */
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}
.solution-card {
    background-color: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.solution-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.solution-card img {
    max-width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: contain; /* Use contain to see full image, or cover if cropping is ok */
    border-radius: 8px;
    margin-bottom: 1.5rem;
}
.solution-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}
.solution-card p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-color);
    flex-grow: 1; /* Allows p to take available space if cards have different text length */
    margin-bottom: 1.5rem;
}
.solution-card .btn {
    margin-top: auto; /* Pushes button to the bottom if card content varies */
}

/* --- BOT EXAMPLES SECTION (#ejemplos-bots) --- */
#ejemplos-bots {
    background-color: var(--card-bg-color); /* Or var(--bg-color) depending on design */
    padding: 60px 20px;
    max-width: 1200px; /* ADDED: Constrain width and center */
    margin: 0 auto 60px auto; /* ADDED: Center block and add bottom margin */
}
#ejemplos-bots h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-color);
}
.bot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}
.bot-card-example {
    background-color: var(--bg-color); /* Or var(--card-bg-color) */
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    /* Add more styles for bot card examples */
}
.bot-card-example h4 {
    margin-top: 0;
    color: var(--text-color);
}

/* --- MODAL --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10002;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s, visibility 0.4s;
}
.modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}
.modal-content {
    position: relative;
    background: var(--card-bg-color); /* Use CSS var */
    width: 80%;
    height: auto; /* Adjust height based on content */
    max-width: 800px; /* Max width for modal */
    max-height: 80vh; /* Max height */
    padding: 2rem;
    border-radius: 10px;
    overflow-y: auto; /* Scroll if content overflows */
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.close-button {
    position: absolute;
    top: 10px; /* Adjusted position */
    right: 10px; /* Adjusted position */
    background: transparent; /* Cleaner look */
    border: none;
    font-size: 1.8rem; /* Larger close icon */
    color: var(--text-color);
    cursor: pointer;
    line-height: 1;
    padding: 0.5rem;
}
.close-button:hover {
    color: var(--accent-color);
}


/* --- PLANS SECTION STYLES ARE NOW IN elements3.js --- */


/* Reset top margin for first h1 in the first section of main */
main > section:first-of-type h1:first-of-type {
    margin-top: 0;
}

/* --- Responsive Hero Section (Mobile/Tablet) --- */
/* --- FOOTER --- */
footer {
    background-color: var(--bg-color); /* MODIFICADO: Usar variable para modo oscuro/claro */
    color: var(--text-color); /* MODIFICADO: Usar variable */
    padding: 40px 20px;
    text-align: center;
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color); /* MODIFICADO: Usar variable */
    transition: background-color 0.3s ease, color 0.3s ease; /* Añadido para transiciones suaves */
}

/* ... (el resto de tus estilos de footer que ya tienes están bien) ... */

.footer-links {
    margin-top: 10px;
    margin-bottom: 10px;
}

footer .copyright {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

footer .copyright img {
    max-height: 25px; /* Control the size of the copyright image */
    width: auto;
}


/* =================================================================== */
/* ============= INICIO DE ESTILOS RESPONSIVE CORREGIDOS ============= */
/* =================================================================== */


@media (max-width: 992px) {
    /* SOLUCIÓN: Reducción de altura y padding */
    #inicio {
        padding: 20px 15px 40px 15px; /* Padding superior mínimo, un poco más en el inferior */
        min-height: auto;
    }

    /* Reducimos drásticamente el espacio superior que sobraba */
    .hero-content-wrapper {
        padding-top: 80px !important; /* !important para asegurar que sobreescribe la regla general */
    }

    .hero-main-content-columns {
        flex-direction: column;
        gap: 1.5rem; /* Espacio entre el texto y el vídeo */
    }

    /* CORREGIDO: El texto va primero */
    .hero-text-column {
        text-align: center;
        padding-right: 0;
        order: 1; /* El bloque de texto aparece arriba */
    }

    /* CORREGIDO: El vídeo va después */
    .hero-video-column {
        order: 2; /* El bloque de vídeo aparece abajo */
        padding-left: 0;
        width: 100%;
        display: flex;
        justify-content: center;
    }

    #inicio h1.main-hero-title {
        font-size: clamp(2rem, 7.5vw, 2.6rem); /* Ligeramente más pequeño para asegurar que no se corta */
        line-height: 1.25;
        margin-bottom: 1rem; /* Menos espacio bajo el título */
    }

    .hero-text-column p {
        font-size: clamp(0.9rem, 3.5vw, 1rem);
        margin-bottom: 1.5rem; /* Espacio antes de los botones */
        line-height: 1.5;
    }
    
    /* CORREGIDO: Restauramos la altura controlada del vídeo */
    .hero-avatar-video {
    width: 65%;
    max-width: 230px; 
   max-height: 280px; /* <--- La solución */
    object-fit: cover;
    object-position: top;
}
}




@media (max-width: 768px) {
    /* SOLUCIÓN 1 (Continuación): Reducción de botones */
    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem; /* Espacio entre botones reducido */
        width: 100%;
    }
    #inicio .cta-button {
        padding: 10px 20px; /* Botones un poco más pequeños */
        font-size: 0.9rem; /* Texto de botones un poco más pequeño */
        width: 90%;
        max-width: 300px; /* Reducido */
        text-align: center;
        box-sizing: border-box;
    }

    /* Ajustes generales de títulos que ya tenías */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.8rem; }

    .modal-content {
        width: 90%;
        padding: 1.5rem;
    }

      #inicio h1.main-hero-title {
        font-size: clamp(1.7rem, 6.5vw, 2.3rem); /* Ligeramente más pequeño para asegurar que no se corta */
        line-height: 1.1;
        margin-bottom: 1rem; /* Menos espacio bajo el título */
    }
}

/* --- Títulos y subtítulos de sección --- */
.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.section-subtitle {
  text-align: center;
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto 3rem auto;
  color: var(--text-color);
  opacity: 0.8;
}
.section-subtitle a {
  color: var(--accent-color);
  text-decoration: underline;
}

.section-cta {
  text-align: center;
  margin-top: 2.5rem;
}


/* --- Sección Galería Home --- */
#galeria-home {
  padding: 60px 20px;
  background-color: var(--background-color-light, #f8f8f8);
}
body.dark-mode #galeria-home {
    background-color: var(--background-color-dark-secondary, #111);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-card {
  background-color: var(--card-bg-color);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border-color);
}
.gallery-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.gallery-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  object-position: center top; /* Enfoca la cara */
}

.gallery-card .card-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.gallery-card h3 {
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 1.5rem;
  color: var(--text-color);
}

.gallery-card p {
  margin-bottom: 20px;
  flex-grow: 1;
  color: var(--text-color);
  opacity: 0.9;
}

.gallery-card .btn {
  margin-top: auto;
  width: 100%;
}


/* --- Sección Ejemplos de Bots (Grid Completa) --- */
#ejemplos-bots {
  padding: 60px 20px;
}

.bot-grid-full {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.bot-card-example {
  background-color: var(--card-bg-color);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  font-size: 1rem;
  transition: background-color 0.3s, border-color 0.3s, color 0.3s;
}

.bot-card-example:hover {
  background-color: var(--accent-color);
  color: #fff;
  border-color: var(--accent-color);
}


/* --- Estilos para el Modal de Demo --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  position: relative;
  background: #111;
  width: 375px; /* Ancho típico de móvil para el iframe */
  height: 812px; /* Alto típico de móvil */
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  overflow: hidden;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}
.modal-overlay.visible .modal-content {
    transform: scale(1);
}

.modal-content iframe {
  border-radius: 20px;
}

.close-button {
  position: absolute;
  top: 10px;
  right: 15px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  font-size: 24px;
  line-height: 35px;
  text-align: center;
  cursor: pointer;
  z-index: 10;
  transition: background-color 0.2s;
}
.close-button:hover {
  background: rgba(0,0,0,0.8);
}

/* =================================================================== */
/* === AJUSTES MÍNIMOS DE BOTONES Y FOOTER (MODO CLARO Y HOVER) === */
/* =================================================================== */

/* --- 1. Botones Secundarios y Outline --- */
/* Estilos base para MODO CLARO para que no desaparezcan */

/* Botón "Ir al Creador" y "Más Información" de Trayectoria */
.solution-card .btn-secondary,
#trayectoria-component .btn-secondary {
    color: var(--text-color, #333);
    border-color: #ccc;
    background-color: transparent;
}

/* Botones debajo de la tabla de precios */
.pricing-actions .btn-secondary,
.pricing-actions .btn-outline {
    color: var(--text-color, #333);
    border-color: #ccc;
    background-color: transparent;
}


/* --- 2. Unificación de Efecto HOVER --- */
/* Se aplica a todos los botones secundarios y outline para que se comporten como los de precios */

.solution-card .btn-secondary:hover,
#trayectoria-component .btn-secondary:hover,
.pricing-actions .btn-secondary:hover,
.pricing-actions .btn-outline:hover {
    color: #FFFFFF !important; /* Texto blanco en hover */
    background-color: var(--accent-color, #B01830) !important; /* Fondo de color acento */
    border-color: var(--accent-color, #B01830) !important; /* Borde de color acento */
}

/* --- 3. Corrección de Enlaces del Footer --- */
/* Unifica el color de los enlaces y su hover para evitar los "dos azules" */

footer .footer-links a,
footer .footer-links a:visited {
    color: #ccc; /* Un único color gris claro para el estado normal y visitado */
    text-decoration: none; /* Quitamos el subrayado por defecto */
    transition: color 0.2s ease;
}

footer .footer-links a:hover {
    color: #FFFFFF; /* El texto se pone blanco al pasar el ratón */
    text-decoration: underline; /* Añadimos el subrayado SOLO en el hover */
}
/* =================================== */
/* === ESTILOS PARA VIDEOS EN GALERÍA === */
/* =================================== */

/* El contenedor que será el marco cuadrado para el video */
.video-container {
  position: relative; /* Necesario para posicionar elementos hijos (video y botón) */
  width: 100%;
  aspect-ratio: 1 / 1; /* Esto crea un cuadrado perfecto que se adapta al ancho */
  overflow: hidden; /* La magia: oculta todo lo que se salga del cuadrado */
  background-color: #000; /* Un fondo por si el video tarda en cargar */
}

/* El video vertical que está dentro del contenedor cuadrado */
.video-container video {
  position: absolute;
  top: 0;
  left: 50%; /* Centramos el video horizontalmente */
  transform: translateX(-50%);
  height: 100%; /* El video ocupa el 100% del ALTO del cuadrado */
  width: auto; /* El ancho se ajusta automáticamente para mantener la proporción */
  /* Con esto, los lados del video vertical se saldrán y quedarán ocultos */
}

/* El botón de play superpuesto */
.play-icon-overlay {
  position: absolute;
  bottom: 15px;
  right: 15px;
  width: 50px;
  height: 50px;
  background-color: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  transition: transform 0.2s ease, background-color 0.2s ease;
  border: 2px solid rgba(255, 255, 255, 0.8);
}

.play-icon-overlay:hover {
  transform: scale(1.1);
  background-color: rgba(0, 0, 0, 0.8);
}

.play-icon-overlay svg {
  width: 24px;
  height: 24px;
  fill: #fff;
  margin-left: 3px; /* Pequeño ajuste para centrar visualmente el triángulo */
}

/* Eliminamos la imagen de la tarjeta ya que ahora usamos el video-container */
.gallery-card img {
  display: none;
}
/* ============================================= */
/* === ESTILOS PARA EL MODAL DE AUTENTICACIÓN === */
/* ============================================= */

.auth-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 3000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.auth-modal-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.auth-modal-content {
  position: relative;
  width: 90%;
  height: 90%;
  max-width: 1000px;
  max-height: 550px; /* Un poco menos de altura */
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  transform: scale(0.95);
  transition: transform 0.3s ease;
  overflow: hidden; /* Oculta los bordes del iframe */
}

.auth-modal-overlay.visible .auth-modal-content {
  transform: scale(1);
}


.auth-modal-content--tall {
  max-width: 1200px;  /* Más estrecho */
  max-height: 98vh; /* Mucho más alto, hasta el 90% de la altura de la ventana */
}

/* Y ajustamos el iframe para que no tenga fondo por defecto */
#auth-iframe {
  width: 100%;
  height: 100%;
  background: transparent; /* Quitamos el fondo para que lo gestione la página hija */
}

.auth-modal-close-button {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 30px;
  height: 30px;
  background: rgba(0, 0, 0, 0.3); /* Fondo semitransparente para que siempre contraste */
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  font-size: 20px;
  line-height: 28px; /* Ajuste para centrar la 'x' */
  text-align: center;
  font-weight: 300;
  cursor: pointer;
  z-index: 100; /* Aseguramos que esté por encima de todo */
  transition: transform 0.2s, background-color 0.2s;
}
.auth-modal-close-button:hover {
  transform: scale(1.1);
  background-color: rgba(0, 0, 0, 0.5);
}

#auth-iframe {
  width: 100%;
  height: 100%;
  background: #111; /* Color de fondo mientras carga */
}

.fade-in-element {
  opacity: 0;
  transform: translateY(200px);
  transition: opacity 0.6s ease-out, transform 0.9s ease-out;
}

/* Estado final cuando el elemento se hace visible */
.fade-in-element.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================================== */
/* === ESTILOS DE LA MODAL DE AVATARES (CORREGIDOS Y MÁS GRANDES) === */
/* ========================================================== */

.avatar-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.avatar-modal-overlay.visible {
  visibility: visible;
  opacity: 1;
}

/* --- TAMAÑO CORREGIDO --- */
.avatar-modal-content {
  position: relative;
  /* La altura ahora es la principal referencia */
  height: 90vh; 
  /* El aspect-ratio calculará el ancho automáticamente */
  aspect-ratio: 9 / 16; 
  /* Ancho máximo para evitar que sea demasiado grande en pantallas muy altas y estrechas */
  max-width: 90vw; 
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.avatar-modal-overlay.visible .avatar-modal-content {
    transform: scale(1);
}

.avatar-modal-content iframe {
  width: 100%;
  height: 100%;
  border: none;
  /* Hacemos que el iframe sea invisible hasta que esté cargado para una transición más suave */
  opacity: 0;
  transition: opacity 0.4s ease;
}

.avatar-modal-content.is-loaded iframe {
    opacity: 1; /* Mostramos el iframe cuando todo está listo */
}

.avatar-modal-close-button {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 35px;
  height: 35px;
  background-color: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  font-size: 24px;
  line-height: 33px;
  text-align: center;
  cursor: pointer;
  z-index: 1002;
  transition: background-color 0.2s, transform 0.2s;
}

.avatar-modal-close-button:hover {
  background-color: rgba(255, 0, 0, 0.7);
  transform: scale(1.1);
}

/* --- SPINNER CORREGIDO --- */
.avatar-modal-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1001;
    transition: opacity 0.3s ease;
}

/* El spinner se oculta cuando el CONTENEDOR tiene la clase 'is-loaded' */
.avatar-modal-content.is-loaded .avatar-modal-loader {
    opacity: 0;
    pointer-events: none;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ========================================================== */
/* === SOLUCIÓN PARA BOTÓN PLAY EN VÍDEO CIRCULAR (LEONARDO) === */
/* ========================================================== */

.featured-solution-video .play-icon-overlay {
  /* Anulamos la posición en píxeles de la esquina */
  right: auto;
  bottom: auto;

  /* Lo posicionamos usando porcentajes desde el centro */
  left: 70%;
  top: 70%;
  transform: translate(-50%, -50%); /* Centramos el botón en ese punto */
}

/* ================================================== */
/* === CSS SEGURO PARA BOTONES DE PLAY EN EL INDEX === */
/* ================================================== */

/* Posicionamiento seguro para el botón de play del vídeo HERO */
.hero-video-column {
    position: relative;
}

.hero-video-column > .play-icon-overlay {
    top: 90%;
    left: 80%;
    right: auto;
    bottom: auto;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
}

.hero-video-column > .play-icon-overlay svg {
    width: 36px;
    height: 36px;
}


/* --- Estilos para la Llamada a la Acción Intermedia --- */
.mid-page-cta {
    padding: 60px 20px;
    background-color: var(--section-bg-light, #f8f8f8);
    text-align: center;
    border-top: 1px solid var(--border-color, #e5e5e5);
    border-bottom: 1px solid var(--border-color, #e5e5e5);
}
body.dark-mode .mid-page-cta {
    background-color: var(--section-bg-dark, #111);
}
.mid-page-cta-content {
    max-width: 700px;
    margin: auto;
}
.mid-page-cta h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}
.mid-page-cta p {
    font-size: 1.1rem;
    line-height: 1.7;
    opacity: 0.8;
    margin-bottom: 2rem;
}
.mid-page-cta .btn {
    width: auto; /* Para que el botón no ocupe el 100% */
    padding-left: 35px;
    padding-right: 35px;
    font-size: 1rem;
}

/* --- Ajuste para el botón del CTA en la Home --- */
.section-cta .btn {
    width: auto; /* Anula el width: 100% para que el botón se ajuste a su contenido */
    min-width: 300px; /* Le damos un tamaño mínimo para que no se vea demasiado pequeño */
    padding-left: 40px; /* Aseguramos un buen espacio interior */
    padding-right: 40px;
}