:root {
    /* Paleta Oscura Premium */
    --color-base-bg: #121212;
    /* Gris muy oscuro (casi negro) para el fondo principal */
    --color-base-text: #E0E0E0;
    /* Blanco hueso para texto legible sin cansar la vista */
    --color-dark-bg: #000000;
    /* Negro puro para contrastes fuertes (footer, contacto) */
    --color-accent: #D4AF37;
    /* Dorado original, brilla más en modo oscuro */
    --color-light-gray-bg: #1E1E1E;
    /* Gris oscuro medio para separar secciones */
    --font-headings: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-base-bg);
    color: var(--color-base-text);
    line-height: 1.7;
    font-size: 18px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- COMPONENTES GENERALES --- */
.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-headings);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
}

h2 {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--color-accent);
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 20px;
}

section {
    padding: 100px 0;
    border-bottom: 1px solid #333;
}

section:last-of-type {
    border-bottom: none;
}

.introduccion {
    text-align: center;
    max-width: 800px;
    margin: -20px auto 60px auto;
    font-size: 1.1rem;
    color: #555;
}

.cta-button {
    display: inline-block;
    background-color: var(--color-accent);
    color: #000;
    padding: 15px 35px;
    font-family: var(--font-body);
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 5px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    background-color: #f0c94a;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

/* --- BARRA DE NAVEGACIÓN --- */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: var(--font-headings);
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--color-base-text);
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

.main-nav ul a {
    text-decoration: none;
    color: var(--color-base-text);
    font-weight: 700;
    transition: color 0.3s ease;
}

.main-nav ul a:hover {
    color: var(--color-accent);
}

/* --- SECCIÓN 1: HÉROE --- */
#heroe {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 80px 0;
    position: relative;
    color: var(--color-base-bg);
    border-bottom: none;
    overflow: hidden;
    /* Importante para que la imagen no se salga al hacer zoom */
}

/* Capa de imagen de fondo animada - PROPUESTA 2: FLUIDEZ EJECUTIVA */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Fondo base oscuro con gradientes dorados y grises en movimiento */
    background: radial-gradient(circle at 50% 50%, rgba(212, 175, 55, 0.15), transparent 60%),
        linear-gradient(125deg, #000000 0%, #1a1a1a 40%, #000000 100%);
    background-size: 200% 200%;
    z-index: 0;
    animation: executiveFlow 15s ease infinite;
}

/* Capa de Imagen Estática (Restaurada con Opacidad) */
.hero-image-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('images/header-narsaul.jpg') no-repeat center center;
    background-size: cover;
    opacity: 0.5;
    /* Opacidad solicitada por el usuario */
    z-index: 0;
    /* Al mismo nivel que el fondo, se mezcla visualmente */
    mix-blend-mode: luminosity;
    /* Opcional: para que se integre mejor con el color dorado/negro */
}

/* Capa de superposición - Ajustada para Mesh Gradient */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Ruido sutil para textura */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
    z-index: 1;
    opacity: 0.6;
}

/* Animación Gradient Flow */
@keyframes executiveFlow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* --- ESTILOS DEL CONTENIDO DEL HEADER (Restaurados) --- */
.header-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    text-align: center;
    position: relative;
    z-index: 2;
    /* CRÍTICO: Debe estar por encima del overlay (z-index: 1) */
}

.header-image {
    order: 1;
    margin-bottom: 20px;
}

.header-image img {
    width: 300px;
    height: 300px;
    max-width: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid var(--color-accent);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.header-text {
    order: 2;
    max-width: 800px;
}

#heroe .subtitulo {
    font-size: 1.25rem;
    margin: 0 auto 40px auto;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.9);
}

#heroe h1 {
    color: #FFFFFF;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    font-size: 2.8rem;
    margin-bottom: 30px;
}

/* --- SECCIÓN 2: PROBLEMA --- */
#problema {
    background-color: var(--color-light-gray-bg);
}

.problem-image-container {
    max-width: 900px;
    margin: -30px auto 50px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
    border: 5px solid var(--color-accent);
    /* Borde estilo header (color y grosor) */
}

.problem-image-container img {
    width: 100%;
    height: auto;
    display: block;
}

#problema .container>p {
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

#problema .pregunta {
    font-family: var(--font-headings);
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 40px;
}

/* --- SECCIÓN 3: MÉTODO --- */
#solucion {
    background-color: var(--color-base-bg);
}

.method-flow {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
}

.method-flow::before {
    content: '';
    position: absolute;
    left: 35px;
    top: 20px;
    bottom: 20px;
    width: 3px;
    background-color: #333;
    z-index: 1;
}

.phase-title {
    text-align: center;
    margin: 50px 0 30px;
}

.phase-title h3 {
    display: inline-block;
    background: var(--color-base-bg);
    padding: 0 20px;
    position: relative;
    z-index: 2;
    color: var(--color-accent);
}

.method-step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
    position: relative;
    z-index: 2;
}

.step-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-accent);
    background: var(--color-base-bg);
    padding-right: 20px;
    width: 75px;
    text-align: center;
}

.step-content {
    padding-left: 20px;
    border-left: 3px solid #333;
}

.step-content h4 {
    margin-bottom: 5px;
}

.step-content p {
    margin: 0;
}

/* --- SECCIÓN TESTIMONIOS --- */
#testimonios {
    background-color: var(--color-light-gray-bg);
}

.testimonial-carousel-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.testimonial-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.testimonial-carousel::-webkit-scrollbar {
    display: none;
}

.testimonial-slide {
    flex: 0 0 100%;
    width: 100%;
    scroll-snap-align: start;
    padding: 40px 20px;
    box-sizing: border-box;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.testimonial-photo {
    width: 150px;
    /* Aumentado de 100px para "buen tamaño" */
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 5px solid var(--color-accent);
    /* 5px para igualar el estilo del header */
}

.testimonial-slide blockquote {
    font-family: var(--font-headings);
    font-size: 1.4rem;
    font-style: italic;
    line-height: 1.4;
    margin: 0 auto 20px auto;
    max-width: 650px;
    border: none;
}

.testimonial-slide cite {
    font-family: var(--font-body);
    font-weight: 700;
    font-style: normal;
}

.testimonial-slide cite span {
    display: block;
    font-size: 0.9rem;
    font-weight: 400;
    color: #555;
    margin-top: 4px;
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.7);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
}

.carousel-button:hover {
    background-color: var(--color-accent);
    color: var(--color-base-text);
}

.carousel-button.prev {
    left: -25px;
}

.carousel-button.next {
    right: -25px;
}

/* --- SECCIÓN 6: BIOGRAFÍA --- */
#sobre-mi {
    background-color: var(--color-base-bg);
}

.about-container {
    display: flex;
    align-items: center;
    gap: 60px;
}

.about-image {
    flex-basis: 40%;
    flex-shrink: 0;
}

.about-image img {
    width: 100%;
    height: auto;
    box-shadow: -15px 15px 0px var(--color-accent);
}

.about-text {
    flex-basis: 60%;
}

.about-text h2 {
    text-align: left;
}

.about-text h2::after {
    display: none;
}

.about-text p {
    text-align: justify;
}

/* --- SECCIÓN 7: CONTACTO --- */
#contacto {
    background-color: var(--color-dark-bg);
    color: var(--color-base-text);
    border-bottom: none;
}

#contacto h2 {
    color: var(--color-base-text);
}

#contacto h2::after {
    background-color: var(--color-accent);
}

#contacto .introduccion {
    color: #888;
}

.contact-form {
    max-width: 700px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 700;
    color: #ccc;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #555;
    background-color: #333;
    color: #fff;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.3);
}

.contact-form .cta-button {
    width: 100%;
    font-size: 1.2rem;
}

.form-feedback {
    padding: 15px;
    margin-bottom: 25px;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.form-feedback.success {
    background-color: #28a745;
    color: #fff;
}

.form-feedback.error {
    background-color: #dc3545;
    color: #fff;
}

/* --- FEEDBACK DEL FORMULARIO --- */
.form-feedback {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    font-weight: 700;
    text-align: center;
}

.form-feedback.success {
    background-color: rgba(76, 175, 80, 0.2);
    border: 1px solid #4CAF50;
    color: #4CAF50;
}

.form-feedback.error {
    background-color: rgba(244, 67, 54, 0.2);
    border: 1px solid #F44336;
    color: #F44336;
}

/* --- FOOTER REDISEÑADO (PREMIUM) --- */
#footer-main {
    background-color: var(--color-dark-bg);
    /* Negro puro */
    color: #aaa;
    padding: 80px 0 0 0;
    border-top: 1px solid #222;
    font-size: 14px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 60px;
}

.footer-col h3 {
    color: #fff;
    font-family: var(--font-headings);
    font-size: 1.5rem;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.footer-col h4 {
    color: var(--color-accent);
    font-size: 1.1rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-col p {
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Columna de Navegación */
.links-col ul {
    list-style: none;
    padding: 0;
}

.links-col ul li {
    margin-bottom: 12px;
}

.links-col ul li a {
    color: #aaa;
    text-decoration: none;
    transition: color 0.3s ease;
}

.links-col ul li a:hover {
    color: #fff;
    padding-left: 5px;
    /* Pequeño desplazamiento al hover */
}

/* Columna de Contacto */
.footer-email {
    display: block;
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 25px;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-email:hover {
    color: var(--color-accent);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-icon {
    width: 40px;
    height: 40px;
    border: 1px solid #444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.social-icon:hover {
    border-color: var(--color-accent);
    background-color: var(--color-accent);
    color: #000;
    transform: translateY(-3px);
}

/* Barra Inferior */
.footer-bottom {
    background-color: #0a0a0a;
    padding: 25px 0;
    text-align: center;
    border-top: 1px solid #1a1a1a;
    font-size: 0.85rem;
}

.footer-bottom a {
    color: #ccc;
    text-decoration: none;
    font-weight: 600;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 50px;
    }

    .social-links {
        justify-content: center;
    }
}

/* --- BOTÓN VOLVER ARRIBA --- */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--color-accent);
    color: var(--color-base-text);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    text-decoration: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* --- Media Queries --- */
@media (max-width: 992px) {
    .main-nav ul {
        display: none;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2.5rem;
    }

    section {
        padding: 80px 0;
    }

    #heroe {
        min-height: auto;
    }

    .carousel-button {
        display: none;
    }

    .about-container {
        flex-direction: column;
    }

    .about-image {
        margin-bottom: 40px;
    }

    .about-text h2 {
        text-align: center;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    body {
        font-size: 16px;
    }

    .method-flow::before {
        left: 25px;
    }

    .step-number {
        width: 60px;
        font-size: 1.5rem;
    }
}

/* --- ANIMACIONES Y DINAMISMO (NUEVO) --- */

/* Clases de utilidad para "Scroll Reveal" */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
    will-change: opacity, transform;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Variación: Entrada desde la izquierda (Imagen Problema) */
.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 1s ease-out;
}

.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Variación: Entrada desde la derecha (Texto Problema) */
.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 1s ease-out;
}

.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* --- INTERACCIONES DEL MÉTODO (HOVER) --- */
.method-step {
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.method-step:hover {
    transform: translateY(-5px);
    background-color: rgba(255, 255, 255, 0.05);
    /* Brillo sutil */
    border-left-color: var(--color-accent);
}

/* --- INTERACCIONES DE FORMULARIO --- */
.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
    outline: none;
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

.form-group label {
    transition: color 0.3s ease, transform 0.3s ease;
}

.form-group input:focus+label,
.form-group textarea:focus+label {
    color: var(--color-accent);
}

/* --- EFECTO CASCADA (STAGGERED) PARA MÉTODO --- */
/* Se aplicará dinámicamente con JS, pero preparamos la transición base */
.method-step.reveal {
    transition-delay: 0s;
    /* El JS modificará esto */
}