/* Reset y Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Paleta de colores adaptada */
    --primary-color: #004D7A; /* Azul oscuro - Header, títulos importantes */
    --secondary-color: #D4AF37; /* Dorado - Acentos, elementos interactivos, progreso */
    --accent-color: #007BFF; /* Azul brillante - Links, botones secundarios */
    --success-color: #10b981; /* Verde para éxito */
    --warning-color: #f59e0b; /* Naranja para advertencia */
    --danger-color: #ef4444; /* Rojo para peligro/error */
    --dark-color: #1a233d; /* Azul oscuro para secciones oscuras */
    --light-color: #F0F2F5; /* Gris claro - Fondo general de la página */
    --text-primary: #333333; /* Gris oscuro - Texto principal */
    --text-secondary: #555555; /* Gris medio - Texto secunduras, descripciones */
    --border-color: #E0E0E0; /* Gris muy claro - Bordes generales, separadores */
    --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 10px 25px rgba(0, 0, 0, 0.15);
    --gradient-primary: linear-gradient(135deg, #004D7A 0%, #007BFF 100%); /* Nuevo gradiente con primary y accent */
    --gradient-secondary: linear-gradient(135deg, #D4AF37 0%, #F5CE62 100%); /* Nuevo gradiente con secondary */
    --gradient-accent: linear-gradient(135deg, #007BFF 0%, #4FACFE 100%); /* Nuevo gradiente para acentos */
}

body {
    font-family: 'Inter', -apple-system, BlinkMacMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    overflow-x: hidden;
}

/* Utilidades */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    /* Adiciones para el efecto de luz */
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300%;
    height: 300%;
    background: rgba(255, 255, 255, 0.15); /* Efecto de luz blanco semitransparente */
    border-radius: 50%;
    transition: all 0.75s ease-out;
    transform: translate(-50%, -50%) scale(0);
    z-index: -1;
}

.btn:hover::before {
    transform: translate(-50%, -50%) scale(1);
}


.btn-primary {
    background: var(--gradient-primary);
    color: white; /* Color blanco para el texto del botón primario */
    box-shadow: var(--shadow-medium);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
}

.btn-secondary {
    background: transparent;
    color: white; /* Color blanco para el texto del botón secundario en secciones oscuras */
    border: 2px solid white; /* Borde blanco para el botón secundario */
}

.btn-secondary:hover {
    background: white;
    color: var(--primary-color); /* Color del texto a primary-color cuando se hace hover */
}

.btn-game {
    background: var(--gradient-secondary);
    color: white;
    padding: 16px 32px;
    font-size: 18px;
    font-weight: 600;
    box-shadow: var(--shadow-heavy);
}

.btn-game:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.gradient-text {
    color: #D4AF37; /* Color dorado para el texto en secciones oscuras */
}

.highlight {
    color: #D4AF37; /* Dorado para mejor contraste en el hero */
    font-weight: 600;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: #004D7A; /* Color azul solicitado */
    backdrop-filter: blur(10px); /* Mantener si deseas el efecto de desenfoque */
    z-index: 1000;
    box-shadow: var(--shadow-light);
    /* Añadido para la animación de ocultamiento/revelación */
    transition: transform 0.3s ease-out;
}

.header-hidden {
    transform: translateY(-100%);
}

.navbar {
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px; /* Puedes ajustar este gap si la imagen necesita más o menos espacio */
    /* Las siguientes propiedades de texto (.font-size, .font-weight, .color)
        ya no son directamente aplicables a la imagen, pero no causan daño.
        Se pueden eliminar si quieres un CSS más limpio y sabes que solo habrá una imagen. */
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color); /* Este color no se aplicará al logo, ya que es una imagen */
}

/* Estilos para el nuevo logo en el header */
.nav-logo .logo-header {
    height: 90px; /* Ajusta la altura según sea necesario para tu logo, reducido de 120px */
    width: auto; /* Mantiene la proporción de la imagen */
    transition: transform 0.3s ease-in-out; /* Transición para el hover */
}

.nav-logo .logo-header:hover {
    transform: scale(1.05); /* Ligeramente más grande al pasar el mouse */
}

.nav-logo i {
    /* Esta regla ya no es necesaria si se reemplaza el <i> por un <img> en el HTML.
        Se puede eliminar o dejar si hay otros íconos que aún la usen en el futuro. */
    font-size: 2rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #FFFFFF; /* Color blanco para los enlaces, sobrescribiendo var(--text-primary) */
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: lightgray; /* Un gris claro para el hover, para mejor contraste con el fondo azul */
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #FFFFFF; /* Cambiado a blanco para que combine con los links */
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #FFFFFF; /* Cambiado a blanco para que sea visible en el fondo azul oscuro */
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); /* Restaurado el degradado original del hero */
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
}

.hero-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 200, 255, 0.3) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
    padding: 0 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: white; /* Asegura que el título sea blanco en el fondo azul */
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Modificaciones para los hero-buttons */
.hero-buttons {
    display: flex; /* Utiliza flexbox para alinear los botones */
    flex-wrap: wrap; /* Permite que los botones se envuelvan a la siguiente línea en pantallas pequeñas */
    justify-content: center; /* Centra los botones horizontalmente */
    gap: 15px; /* Añade espacio entre los botones */
    margin-top: 30px; /* Espacio superior para separar de la descripción */
    /* Animación de aparición con retraso */
    animation: fadeInUp 0.8s ease-out 0.5s forwards;
    opacity: 0; /* Empieza invisible */
}

.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 600px; /* Increased height to provide more vertical space for cards */
    width: 600px; /* Increased width to provide more horizontal space for cards */
    margin-left: 2rem; /* Optional: adjust margin if needed to center the increased area */
}

.floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: floatCard 8s ease-in-out infinite; /* Increased animation duration for smoother, wider movement */
    top: auto; /* Reset top */
    left: auto; /* Reset left */
    right: auto; /* Reset right */
    bottom: auto; /* Reset bottom */
}

/* Specific positions for each card (adjust these to fit your visual preference) */
/* These values are relative to the *new, larger* .hero-image container */
.floating-card:nth-child(1) { /* Protección Digital */
    top: 10%;
    left: 8%;
    animation-delay: 0s;
}

.floating-card:nth-child(2) { /* Seguridad Avanzada */
    top: 25%;
    right: 5%;
    animation-delay: 1s;
}

.floating-card:nth-child(3) { /* Factor Humano */
    bottom: 15%;
    left: 10%;
    animation-delay: 2s;
}

.floating-card:nth-child(4) { /* Auditorías de Seguridad */
    top: 5%;
    right: 20%;
    animation-delay: 3s;
}

.floating-card:nth-child(5) { /* Formación Continua (was Recuperación ante Desastres) */
    bottom: 5%;
    left: 30%;
    animation-delay: 4s;
}

.floating-card:nth-child(6) { /* Cifrado de Datos */
    top: 50%;
    left: 5%;
    animation-delay: 5s;
}

.floating-card:nth-child(7) { /* Gestión de Riesgos (was Protección de Endpoints) */
    bottom: 25%;
    right: 15%;
    animation-delay: 6s;
}

.floating-card:nth-child(8) { /* Planes de Continuidad */
    top: 35%;
    left: 20%;
    animation-delay: 7s;
}

/* Note: There were originally 10 cards, now 8. Removed extra nth-child rules for clarity */
/* If you want to use up to 10 or more, you'll need to re-evaluate positions */


@keyframes floatCard {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-20px) scale(1.02); } /* Increased float distance slightly */
}

/* Sections */
.section {
    padding: 5rem 0;
}

.section-dark {
    background: var(--dark-color);
    color: white;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary); /* Este es el color general del subtítulo, que es gris/negro */
    max-width: 600px;
    margin: 0 auto;
}

.section-dark .section-subtitle {
    color: rgba(255, 255, 255, 0.8);
}

/* Para la sección de entrenamiento específicamente */
.game-section .section-subtitle {
    color: white;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.text-block {
    margin-bottom: 2rem;
}

.text-block h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.text-block p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.feature-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: var(--shadow-heavy);
}

.content-image {
    position: relative;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 77, 122, 0.8); /* Adaptado al nuevo primary color */
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.content-image:hover .image-overlay {
    opacity: 1;
}

.overlay-content {
    text-align: center;
    color: white;
}

.overlay-content i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.stat-card {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Formation Section */
.formation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.formation-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s ease;
}

.formation-card:hover {
    transform: translateY(-5px);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: white;
}

.formation-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.formation-image-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.formation-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 12px;
}

.benefits-list {
    list-style: none;
}

.benefits-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
}

.benefits-list i {
    color: var(--success-color);
}

/* Human Factor Section */
.risk-analysis {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

/* Adjusted margin for risk-image */
.risk-image {
    margin-top: 0; /* Changed from 4rem to 0 to align with previous styling */
}

.risk-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: var(--shadow-heavy);
}

.risk-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ACORDION STYLES */
.accordion-item {
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background-color: white;
    box-shadow: var(--shadow-light);
}

.accordion-header {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Alinea los elementos al inicio */
    gap: 1rem;
    padding: 1.5rem;
    width: 100%;
    background-color: white;
    border: none;
    cursor: pointer;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    transition: background-color 0.3s ease;
    position: relative; /* Para posicionar el icono */
}

.accordion-header:hover {
    background-color: var(--light-color);
}

.accordion-header h4 {
    margin: 0;
    flex-grow: 1; /* Permite que el título ocupe el espacio restante */
}

.accordion-icon {
    font-size: 1.2em;
    color: var(--accent-color);
    transition: transform 0.3s ease;
    margin-left: auto; /* Empuja el icono a la derecha */
}

.accordion-header.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
    padding: 0 1.5rem; /* Padding horizontal inicial */
    color: var(--text-secondary);
}

.accordion-content p {
    padding-bottom: 1.5rem; /* Padding inferior para el contenido */
    margin: 0;
    line-height: 1.7;
}

.accordion-content.active {
    max-height: 500px; /* Increased max-height for accordion content */
    padding-top: 0.5rem; /* Pequeño padding superior cuando está abierto */
}

/* Styles for risk-icon remain the same, as they are part of accordion-header now */
.risk-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.risk-content h4 { /* Esto ahora está dentro de accordion-header, no se aplica directamente aquí */
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

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

.strategy-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
    text-align: center;
    transition: transform 0.3s ease;
}

.strategy-card:hover {
    transform: translateY(-5px);
}

.strategy-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.strategy-card h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

/* Carousel Section Styles */
.carousel-container {
    position: relative;
    width: 100%;
    max-width: 100%; /* Max width of the overall carousel area */
    margin: 0 auto;
    overflow: hidden; /* Hides content outside the current slide */
    height: 550px; /* Increased height for better content fit, adjust as needed */
    display: flex; /* Helps align content vertically */
    align-items: center; /* Centers content vertically if there's extra space */
    border-radius: 12px; /* Consistent with other sections */
    box-shadow: var(--shadow-heavy); /* Add a shadow for emphasis */
    background-color: var(--dark-color); /* Background for the carousel slides area */
}

.carousel-slides {
    display: flex; /* Arranges slides horizontally */
    transition: transform 0.5s ease-in-out; /* Smooth sliding animation */
    height: 100%; /* Take full height of carousel-container */
    width: 100%; /* Take full width of carousel-container initially */
}

.carousel-slide {
    min-width: 100%; /* Each slide takes full width of its container */
    flex-shrink: 0; /* Prevents slides from shrinking */
    padding: 1.5rem; /* Reduced padding for more content space */
    display: flex; /* Use flexbox to center content horizontally/vertically */
    justify-content: center; /* Center content horizontally */
    align-items: flex-start; /* Align content to top for better space usage */
    height: 100%; /* Ensure slide takes full height */
    overflow-y: auto; /* Allow vertical scrolling if content exceeds height */
    box-sizing: border-box; /* Crucial: Ensure padding is included in height calculation */
}

/* Specific styling for the grid layout in carousel slides */
.phishing-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr; /* More space for text, less for image */
    gap: 2rem; /* Reduced gap for better space usage */
    align-items: flex-start; /* Default alignment for most slides */
    height: 100%; /* Make sure the grid fills its container */
}

/* Center images vertically for slides 3 and 4 */
.carousel-slide:nth-child(3) .phishing-grid,
.carousel-slide:nth-child(4) .phishing-grid {
    align-items: center; /* Center alignment for slides 3 and 4 */
}

.phishing-grid > * {
    padding: 0 10px; /* Inner padding for the grid */
    max-width: 900px; /* Max width of content inside the slide */
    margin: auto; /* Center the grid content */
    color: white; /* Ensure text inside the grid is white */
}

.phishing-info {
    height: 100%; /* Take full height of slide */
    display: flex; /* Use flexbox to organize content */
    flex-direction: column; /* Stack children vertically */
}

/* Phishing headers - Now general carousel headers */
.phishing-header h2 {
    color: var(--secondary-color); /* Yellow color */
    margin-bottom: 1rem;
}

/* Styles for h3 in phishing-info (and other slides) */
.phishing-info h3 {
    color: white; /* Default color for other slides */
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.8rem; /* Slightly larger for main topic */
}

/* Specific style for the first slide title */
.carousel-slide:first-child .phishing-info h3 {
    color: #D4AF37; /* Golden color for "¿Qué es el Phishing?" */
}

/* Smaller titles for slides 3 and 4 to prevent scroll down */
.carousel-slide:nth-child(3) .phishing-info h3,
.carousel-slide:nth-child(4) .phishing-info h3 {
    font-size: 1.5rem; /* Reduced from 1.8rem to 1.5rem */
}

.phishing-info p {
    flex-grow: 1; /* Allow paragraphs to grow and fill space */
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem; /* Reduced margin for better space usage */
    line-height: 1.6; /* Slightly reduced line height */
    font-size: 0.95rem; /* Slightly smaller font size */
}

.phishing-types h4 {
    color: var(--secondary-color); /* Yellow color for "Tipos de Phishing" */
    margin-bottom: 1rem;
}

.phishing-types ul {
    list-style: none;
}

.phishing-types li {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.5rem; /* Reduced margin for better space usage */
    padding-left: 1rem;
    position: relative;
    font-size: 0.9rem; /* Slightly smaller font size */
}

.phishing-types li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

.phishing-types li strong {
    color: var(--secondary-color); /* Yellow color for strong tags in phishing types */
}

.phishing-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%; /* Important: Ensure image container takes full height */
    padding-top: 0;
}

/* Container for first slide image and warning signs */
.carousel-slide:first-child .phishing-image-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Container for second slide image and additional malware types */
.carousel-slide:nth-child(2) .malware-image-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.carousel-slide-image { /* Apply to the image itself within the slide */
    width: 100%;
    height: 100%; /* Make the image take 100% of its parent's height */
    object-fit: contain; /* Ensure the entire image is visible, scaling it down if necessary */
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
}


/* Warning signs styles - ONLY for first slide */
.carousel-slide:first-child .warning-signs {
    margin-top: 1rem; /* Reduced margin for first slide since it's below the image */
}

.carousel-slide:first-child .warning-signs h4 {
    color: white;
    margin-bottom: 1rem;
}

.carousel-slide:first-child .signs-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.carousel-slide:first-child .sign-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.carousel-slide:first-child .sign-item i {
    color: var(--warning-color);
}

/* Carousel Controls */
.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 1.5rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    z-index: 10;
}

.carousel-control:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

.carousel-control.prev {
    left: 10px;
}

.carousel-control.next {
    right: 10px;
}

.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.carousel-indicators .dot {
    height: 12px;
    width: 12px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.carousel-indicators .dot.active {
    background-color: var(--secondary-color); /* Active dot color */
    transform: scale(1.2);
}

/* Responsive adjustments for carousel */
@media (max-width: 768px) {
    .carousel-container {
        height: auto; /* Allow height to adjust on smaller screens */
        min-height: 500px; /* Ensure minimum height */
    }
    .phishing-grid {
        grid-template-columns: 1fr; /* Stack columns on smaller screens */
        text-align: center;
        gap: 2rem;
    }
    .phishing-image {
        padding-top: 1rem; /* Add some spacing above image when stacked */
    }
    .carousel-control {
        padding: 8px 12px;
        font-size: 1.2rem;
    }
    .carousel-indicators {
        bottom: 10px;
    }
}
@media (max-width: 480px) {
    .phishing-info h3 {
        font-size: 1.5rem;
    }
    .phishing-types li {
        font-size: 0.9rem;
    }
    .sign-item span {
        font-size: 0.85rem;
    }
    .carousel-container {
        height: auto;
        min-height: 400px; /* Asegura una altura mínima */
    }
    .carousel-slide {
        padding: 1rem; /* Padding reducido para pantallas muy pequeñas */
    }
    .phishing-grid {
        gap: 1.5rem;
    }
    .carousel-slide-image { /* Adjusted from .phishing-image img */
        max-width: 90%; /* Adjust image size for very small screens */
    }
}


/* Game Section */
.game-section {
    background: var(--gradient-primary); /* Adaptado al nuevo gradiente */
    color: white; /* Asegura que el texto general de la sección sea blanco */
}

.game-section .section-title { /* Specific style for Game Section title */
    color: var(--secondary-color); /* Apply yellow color to the game section title */
}

.game-section .section-subtitle { /* Specific style for Game Section subtitle */
    text-align: center; /* Center align the game section subtitle */
}

.game-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 4rem; /* Añadido un margin-top para separación */
    margin-bottom: 4rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
}

.game-preview {
    margin-bottom: 3rem;
}

.game-image-placeholder { /* Agregado para el placeholder de la imagen del juego */
    width: 100%;
    max-width: 600px;
    height: auto;
    display: block;
    margin: 0 auto 2rem auto;
    border-radius: 12px;
    box-shadow: var(--shadow-heavy);
}

.game-screen {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 12px;
    padding: 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.screen-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.screen-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.screen-score {
    color: var(--success-color);
    font-weight: 600;
}

.preview-scenario {
    margin-bottom: 2rem;
}

.preview-scenario h4 {
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.preview-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.option-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.option-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.option-btn.correct {
    border-color: var(--success-color);
    background: rgba(16, 185, 129, 0.2);
}

.game-launch {
    text-align: center;
    margin-top: 50px; /* Ajusta este valor según cuánto quieras bajar el botón */
}

.game-description {
    margin-top: 1rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: var(--shadow-heavy);
}

.modal-header {
    background: var(--gradient-primary);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
}

.close {
    color: white;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.close:hover {
    opacity: 0.7;
}

.modal-body {
    padding: 2rem;
    max-height: 60vh;
    overflow-y: auto;
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--accent-color);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* MODIFICACION: Ajustar el tamaño del logo en el footer */
.footer-logo img {
    height: 120px; /* Tamaño más pequeño para el footer */
    width: auto; /* Mantener la proporción */
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
}

.contact-info i {
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px; /* Ajusta esto si la altura de tu header cambia */
        flex-direction: column;
        background-color: #004D7A; /* Mismo color del header para el menú desplegable en móvil */
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-medium);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    /* Asegurar que los links se vean bien en el menú móvil cuando está desplegado */
    .nav-menu .nav-link {
        color: white; /* Asegura el color blanco para los enlaces en el menú móvil */
        padding: 0.8rem 20px; /* Ajusta el padding para elementos de menú en móvil */
    }

    /* Quitar el hover effect del after para el menú móvil si no se desea */
    .nav-menu .nav-link::after {
        background: transparent; /* O puedes poner un color que contraste */
    }
    .nav-menu .nav-link:hover::after {
        width: 0;
    }
    /* Si quieres mantener un hover diferente en móvil, puedes ajustarlo */
    .nav-menu .nav-link:hover {
        color: lightgray;
    }


    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
        padding: 0 15px; /* Ajuste para pantallas pequeñas */
    }

    .hero-title {
        font-size: 2.5rem;
    }

    /* Media Queries para responsividad de los hero-buttons */
    .hero-buttons {
        flex-direction: column; /* Apila los botones verticalmente en pantallas pequeñas */
        align-items: center; /* Centra los botones apilados */
    }

    .btn {
        width: 80%; /* Ancho de los botones en pantallas pequeñas */
        max-width: 300px; /* Ancho máximo para evitar que sean demasiado anchos */
        margin-bottom: 10px; /* Espacio entre botones apilados */
    }

    .content-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .formation-grid {
        grid-template-columns: 1fr;
    }

    .formation-image-section {
        grid-template-columns: 1fr;
    }

    .risk-analysis {
        grid-template-columns: 1fr;
    }

    /* Adjusted phishing-grid for mobile */
    .phishing-grid {
        grid-template-columns: 1fr; /* Stack content on small screens */
        text-align: center;
        gap: 2rem;
    }

    .game-features {
        grid-template-columns: 1fr;
    }

    .signs-list {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .strategies-grid {
        grid-template-columns: 1fr;
    }
}

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

    .section-title {
        font-size: 2rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    /* Further adjust carousel for very small screens */
    .carousel-container {
        height: auto;
        min-height: 400px; /* Ensure minimum height */
    }
    .carousel-slide {
        padding: 1rem; /* Reduced padding for very small screens */
    }
    .phishing-grid {
        gap: 1.5rem;
    }
    .carousel-slide-image { /* Adjusted from .phishing-image img */
        max-width: 90%; /* Adjust image size for very small screens */
    }
}

/* Animaciones adicionales */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Estilos para el entrenamiento integrado */
#game-container {
    min-height: 400px;
    background: #f8fafc;
    border-radius: 8px;
    padding: 2rem;
}

.game-interface {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-medium);
}

.game-header-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.game-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.game-stats {
    display: flex;
    gap: 2rem;
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.challenge-container {
    margin-bottom: 2rem;
}

.challenge-question {
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.challenge-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.challenge-option {
    background: var(--light-color);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.challenge-option:hover {
    border-color: var(--primary-color);
    background: rgba(0, 77, 122, 0.05); /* Adaptado al nuevo primary color */
}

.challenge-option.selected {
    border-color: var(--primary-color);
    background: rgba(0, 77, 122, 0.1); /* Adaptado al nuevo primary color */
}

.challenge-option.correct {
    border-color: var(--success-color);
    background: rgba(16, 185, 129, 0.1);
}

.challenge-option.incorrect {
    border-color: var(--danger-color);
    background: rgba(239, 68, 68, 0.1);
}

.game-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
}

.progress-bar {
    background: var(--border-color);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    flex: 1;
    margin: 0 1rem;
}

.progress-fill {
    background: var(--gradient-primary);
    height: 100%;
    transition: width 0.3s ease;
}

.game-result {
    text-align: center;
    padding: 2rem;
}

.result-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.result-icon.success {
    color: var(--success-color);
}

.result-icon.error {
    color: var(--danger-color);
}

.result-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.result-message {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* --- ESTILOS AÑADIDOS PARA LA SECCIÓN DE DIAGNÓSTICO --- */
#diagnostico {
    padding: 80px 0; /* Espaciado superior e inferior */
    background-color: var(--light-color); /* Color de fondo para esta sección */
}

#diagnostico .section-header {
    margin-bottom: 60px;
}

/* Reutilizando .content-grid de otras secciones, pero ajustando para esta sub-sección */
#diagnostico .content-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: center;
    margin-bottom: 60px; /* Espacio antes del siguiente sub-encabezado */
}

#diagnostico .content-grid .content-text {
    flex: 1;
    min-width: 300px;
    max-width: 60%; /* Ajusta el ancho para que la imagen tenga espacio */
}

#diagnostico .content-grid .content-image {
    flex: 1;
    min-width: 300px;
    max-width: 35%;
    position: relative; /* Para el overlay */
}

#diagnostico .content-grid .feature-image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
    transition: transform 0.3s ease-in-out;
}

#diagnostico .content-grid .feature-image:hover {
    transform: translateY(-5px);
}

/* Reutilizar .image-overlay y .overlay-content de la sección de Ciberseguridad */
#diagnostico .content-grid .image-overlay {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background-color: var(--primary-color); /* Usando primary-color de tus variables */
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-small); /* Usando shadow-small de tus variables */
    font-weight: 600;
    opacity: 1; /* Establecido a 1 para que sea siempre visible, si se desea. Si no, ajustar a 0 y añadir hover. */
}

#diagnostico .content-grid .image-overlay i {
    font-size: 1.2rem;
}

/* Divisor de Sección */
.section-divider {
    width: 100px; /* Ancho de la línea */
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color)); /* Un gradiente con tus colores */
    margin: 80px auto; /* Centrar y dar espacio */
    border-radius: 5px;
}

/* Estilos para los "Instrumentos y Técnicas" (Grid de Tarjetas de Información) */
.info-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
    margin-bottom: 60px; /* Espacio antes del siguiente sub-encabezado */
}

.info-card {
    background-color: var(--light-color); /* Fondo basado en tu light-color */
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-small);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.info-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-medium);
}

.info-card .card-icon {
    font-size: 3rem;
    color: var(--primary-color); /* Usando primary-color */
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: rgba(0, 77, 122, 0.1); /* Una versión más clara del primary-color */
    margin-left: auto;
    margin-right: auto;
}

.info-card h4 {
    font-size: 1.4rem;
    color: var(--text-primary); /* Usando text-primary */
    margin-bottom: 15px;
    font-weight: 600;
}

.info-card p {
    font-size: 1rem;
    color: var(--text-secondary); /* Usando text-secondary */
    line-height: 1.6;
}

.info-card .small-text {
    font-size: 0.85rem;
    color: var(--text-secondary); /* Usando text-secondary */
    margin-top: 15px;
}

/* Estilos para los "Criterios de Segmentación" (Grid de Tarjetas de Segmentación) */
.segmentation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.segmentation-card {
    background-color: var(--light-color); /* Fondo basado en tu light-color */
    padding: 25px;
    border-radius: 10px;
    box-shadow: var(--shadow-extra-small); /* Usando shadow-extra-small */
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.segmentation-card .card-icon {
    font-size: 2.5rem;
    color: var(--secondary-color); /* Usando secondary-color */
    margin-bottom: 15px;
    background-color: rgba(212, 175, 55, 0.1); /* Una versión más clara del secondary-color */
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.segmentation-card h4 {
    font-size: 1.25rem;
    color: var(--text-primary); /* Usando text-primary */
    margin-bottom: 10px;
    font-weight: 600;
}

.segmentation-card p {
    font-size: 0.95rem;
    color: var(--text-secondary); /* Usando text-secondary */
    line-height: 1.5;
}

/* --- FIN ESTILOS AÑADIDOS PARA LA SECCIÓN DE DIAGNÓSTICO --- */