@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@700;800&display=swap");
:root {
    /* Colores de Branding */
    --brand-dark: #0E3049; /* Azul Medianoche (Fondo Logo) */
    --brand-light: #F5F5F5; /* Blanco Humo (Fondo Body) */
    --text-main: #333333;
    --text-light: #E0E0E0;
    --accent-silver: #C0C0C0;
    --whatsapp-green: #25D366;
    --whatsapp-dark: #128C7E;
}

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

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--brand-light);
    color: var(--text-main);
    line-height: 1.6;
}

h1, h2, h3 {
    font-family: 'Montserrat', sans-serif;
}

a {
    text-decoration: none;
}

/* --- HEADER & NAV --- */
header {
    background-color: var(--brand-dark);
    color: white;
    padding: 1rem 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px; /* <--- ESTE GAP CONTROLA EL ESPACIO */
}

.logo-img {
    height: 50px;
    width: auto;
    border-radius: 50%;
    padding: 2px;
    /* BORRA EL margin-right: 15px; SI LO HABÍAS PUESTO AQUÍ */
}

.brand-name {
    font-family: 'Nunito', sans-serif;
    font-size: 1.5rem;
    font-weight: 800; /* Extra negrita para darle peso de logo */
    color: var(--text-light); /* O el color que ya tuvieras */
    letter-spacing: -0.5px; /* Las fuentes de logo suelen estar más juntas */
}

nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

nav a {
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--accent-silver);
}

.cta-header {
    background-color: transparent;
    border: 1px solid var(--whatsapp-green);
    color: var(--whatsapp-green);
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s;
}

.cta-header:hover {
    background-color: var(--whatsapp-green);
    color: white;
}

/* --- HERO SECTION --- */
.hero {
            /* Fondo con gradiente oscuro y tu imagen local */
            /* Reemplaza 'mi_imagen_local.jpg' con la ruta real de tu archivo */
            background: linear-gradient(rgba(80, 55, 35, 0.85), rgba(80, 55, 35, 0.7)), url('../img/hero_bg.jpg');
            /* Esta es la clave: asegura que la imagen cubra todo el contenedor */
            background-size: cover;

            /* Centra la imagen para que el recorte sea equilibrado */
            background-position: center;

            /* Evita que se repita si la imagen es pequeña */
            background-repeat: no-repeat;

            height: 90vh;
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
            color: white;
            padding: 0 20px;
            margin-top: 60px;
        }

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 2rem auto;
    color: var(--accent-silver);
}

.btn-main {
    background-color: var(--whatsapp-green);
    color: white;
    padding: 15px 30px;
    font-size: 1.1rem;
    border-radius: 50px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    transition: transform 0.3s;
    display: inline-block;
}

.btn-main:hover {
    transform: translateY(-3px);
    background-color: var(--whatsapp-dark);
}

/* --- SECTIONS GENERAL --- */
.section {
    padding: 80px 10%;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.2rem;
    color: var(--brand-dark);
    margin-bottom: 10px;
}

.section-title .line {
    width: 80px;
    height: 4px;
    background-color: var(--brand-dark);
    margin: 0 auto;
}

/* --- NOSOTROS --- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text p {
    margin-bottom: 20px;
    color: #555;
    text-align: justify;
}

.stats {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--brand-dark);
}

/* --- SERVICIOS ---
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}*/

.service-card {
    background: white;
    padding: 40px 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s, border-bottom 0.3s;
    border-bottom: 4px solid transparent;
}

.service-card:hover {
    transform: translateY(-10px);
    border-bottom: 4px solid var(--brand-dark);
}

.icon-box {
    font-size: 2.5rem;
    color: var(--brand-dark);
    margin-bottom: 20px;
}

.service-card h3 {
    margin-bottom: 15px;
    color: var(--brand-dark);
}

.service-card ul {
    list-style: none;
    padding-left: 0;
}

.service-card li {
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #666;
    display: flex;
    align-items: center;
}

.service-card li::before {
    content: "\2022";
    color: var(--brand-dark);
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

/* --- CAPACITACION --- */
.training {
    background-color: #e9ecef; /* Un gris un poco más oscuro para diferenciar */
    text-align: center;
}

.course-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.course-badge {
    background: var(--brand-dark);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 500;
}

/* --- CONTACTO --- */
.contact-container {
    text-align: center;
    background: white;
    padding: 50px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    max-width: 800px;
    margin: 0 auto;
}

.contact-info {
    margin: 30px 0;
    font-size: 1.1rem;
}

/* --- FOOTER --- */
footer {
    background-color: var(--brand-dark);
    color: white;
    text-align: center;
    padding: 40px 0;
    margin-top: 50px;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 10px;
    display: block;
}

.social-links a {
    color: white;
    margin: 0 10px;
    font-size: 1.2rem;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--whatsapp-green);
}

/* --- FLOATING WHATSAPP --- */
.float-wa {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: var(--whatsapp-green);
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
}

.float-wa:hover {
    transform: scale(1.1);
    background-color: var(--whatsapp-dark);
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    nav ul {
        display: none; /* Simplificado para este demo. En producción usar JS toggle */
    }

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

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

.services-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 30px;
}

/* Adaptabilidad para pantallas medianas (Tablets) */
@media (max-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Adaptabilidad para móviles */
@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ==========================================================
   ESTILOS PARA PÁGINAS INTERNAS DE SERVICIOS (/services/)
   ========================================================== */

/* === DISEÑO INNOVADOR DEL HERO SECTION === */
.service-hero {
    position: relative;
    background: linear-gradient(135deg, var(--brand-dark, #1A1A2E) 0%, #2A2A5A 50%, #1F1F3A 100%);
    color: #ffffff;
    padding: 160px 20px 120px;
    text-align: center;
    overflow: hidden;
    z-index: 1;
}

.service-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -1;
    pointer-events: none;
}

.service-hero h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 25px;
    color: #ffffff;
    line-height: 1.2;
    text-shadow: 0px 4px 15px rgba(0,0,0,0.3);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.service-hero h1 span.highlight {
    color: var(--whatsapp-green, #25D366);
}

.service-hero p.subtitle {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
    color: #EAEAEA;
    font-weight: 300;
    line-height: 1.6;
}

/* Ola separadora */
.custom-shape-divider-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}
.custom-shape-divider-bottom svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 60px;
}
.custom-shape-divider-bottom .shape-fill {
    fill: #FFFFFF;
}

/* === CONTENEDORES Y SECCIONES === */
.service-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px 80px;
}

.service-section {
    margin-bottom: 50px;
}

.service-section h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    color: var(--brand-dark, #1A1A2E);
    margin-bottom: 20px;
    border-bottom: 3px solid var(--whatsapp-green, #25D366);
    display: inline-block;
    padding-bottom: 5px;
}

/* FIX: Justificado del texto principal */
.service-section p {
    line-height: 1.7;
    color: #555;
    margin-bottom: 15px;
    font-size: 1.05rem;
    text-align: justify;
}

/* === GRID DE FASES === */
.phase-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-top: 30px;
}

.phase-card {
    background: #fff;
    border-radius: 8px;
    padding: 30px 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.06);
    border-top: 4px solid var(--brand-dark, #1A1A2E);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.phase-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

.phase-card h3 {
    color: var(--brand-dark, #1A1A2E);
    font-size: 1.25rem;
    margin-bottom: 15px;
    min-height: 55px;
}

/* Clase para el texto introductorio de la tarjeta (no justificado para no verse raro en espacios estrechos) */
p.phase-intro {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 15px;
    text-align: left;
}

.phase-card ul {
    list-style: none;
    padding: 0;
}

/* FIX: Justificado del texto en las listas */
.phase-card ul li {
    margin-bottom: 15px;
    font-size: 0.95rem;
    color: #555;
    position: relative;
    padding-left: 20px;
    line-height: 1.6;
    text-align: justify;
}

.phase-card ul li::before {
    content: '\f0da';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: var(--whatsapp-green, #25D366);
}

/* === FLUJOGRAMA === */
.flow-step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    background: #f9f9fc;
    padding: 25px;
    border-radius: 8px;
    border-left: 4px solid var(--brand-dark, #1A1A2E);
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.flow-icon {
    font-size: 1.8rem;
    color: var(--brand-dark, #1A1A2E);
    margin-right: 25px;
    min-width: 40px;
    text-align: center;
}

.flow-content h4 {
    margin-bottom: 8px;
    color: var(--brand-dark, #1A1A2E);
    font-size: 1.2rem;
}

/* FIX: Párrafos dentro del flujograma (margen reseteado) */
.flow-content p {
    margin: 0;
    font-size: 1rem;
    text-align: justify;
}

/* === TOOL BANNER === */
.tool-banner {
    background: linear-gradient(135deg, var(--brand-dark, #1A1A2E) 0%, #2A2A4A 100%);
    color: white;
    padding: 50px 30px;
    border-radius: 12px;
    text-align: center;
    margin-top: 60px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.tool-banner h2 {
    color: white;
    border-bottom: none;
    margin-bottom: 20px;
}

/* FIX: Texto del banner (se mantiene centrado porque justificarlo aquí se ve mal) */
.tool-banner p {
    color: #eaeaea;
    max-width: 800px;
    margin: 0 auto 30px auto;
    font-size: 1.1rem;
    text-align: center;
}

.btn-tool {
    display: inline-block;
    background-color: var(--whatsapp-green, #25D366);
    color: #fff;
    padding: 16px 35px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}

.btn-tool:hover {
    background-color: #1ebe57;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
    color: #fff;
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
    .phase-grid { grid-template-columns: 1fr; }
    .service-hero h1 { font-size: 2.2rem; }
}

/* ==========================================================
   ESTILOS PARA EL CATÁLOGO DE SERVICIOS (/services/index.html)
   ========================================================== */

/* Encabezado del catálogo (Ajuste de espaciado) */
.catalog-header {
    background-color: var(--brand-light);
    text-align: center;
    /* Ajustamos el padding para centrar verticalmente el contenido */
    padding: 60px 20px 40px;
}

.catalog-subtitle {
    margin-top: 25px;
    color: #666;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Contenedor principal de la lista */
.catalog-container {
    max-width: 1000px;
    margin: 0 auto;
    padding-top: 40px; /* Separación con el header gris */
}

/* Tarjeta de detalle de servicio */
.service-detail-item {
    background: #fff;
    padding: 40px; /* Un poco más de espacio interno */
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 35px;
    display: flex;
    flex-direction: column;
}

.service-detail-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

/* Título de la tarjeta y su ícono */
.service-detail-title {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.service-detail-title .icon-box {
    margin: 0;
    font-size: 2.2rem;
    color: var(--brand-dark);
}

.service-detail-item h3 {
    margin: 0;
    font-size: 1.4rem;
    color: var(--brand-dark);
    line-height: 1.3;
}

/* FIX: Texto y listas justificadas */
.service-detail-item p,
.service-detail-item ul li {
    color: #555;
    font-size: 1.05rem;
    line-height: 1.7;
    text-align: justify; /* Justificado activado */
}

.service-detail-item ul {
    padding-left: 20px;
    margin-bottom: 15px;
}

.service-detail-item ul li {
    margin-bottom: 10px;
}

/* Botón "Ver más detalles" */
.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 25px;
    padding: 12px 28px;
    border: 2px solid var(--brand-dark, #1A1A2E);
    color: var(--brand-dark, #1A1A2E);
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.btn-outline:hover {
    background-color: var(--brand-dark, #1A1A2E);
    color: #fff;
}

/* --- BOTONES OSCUROS CON HOVER VERDE --- */
.btn-dark {
    background-color: var(--brand-dark);
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.btn-dark:hover {
    background-color: var(--whatsapp-green);
    transform: translateY(-3px);
}

/* --- BOTÓN FLOTANTE SERVICIOS (LATERAL DERECHO) --- */
.float-services {
    position: fixed;
    right: 0; /* Cambiado de left: 0 a right: 0 */
    top: 50%;
    transform: translateY(-50%); /* Se mantiene igual para centrar verticalmente */
    background-color: var(--brand-dark);
    color: #FFF;
    padding: 15px 20px;
    border-radius: 10px 0 0 10px; /* Invertido: Bordes redondeados solo a la izquierda */
    box-shadow: -3px 2px 15px rgba(0,0,0,0.2); /* Sombra ajustada hacia la izquierda (-3px) */
    z-index: 99;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: bold;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55), background-color 0.3s ease, opacity 0.3s ease;
}

.float-services:hover {
    background-color: var(--whatsapp-green);
    padding-left: 25px; /* Efecto sutil de "pop-out" al pasar el cursor */
    color: white;
}

/* Clase que se activa mediante JavaScript para ocultar el botón */
.float-services.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translate(-100%, -50%); /* Lo desliza fuera de la pantalla hacia la izquierda */
}

/* Responsividad para el botón en móviles (ocultamos el texto, dejamos solo el ícono) */
@media (max-width: 768px) {
    .float-services span {
        display: none;
    }
    .float-services {
        padding: 15px;
    }
    .float-services:hover {
        padding-left: 15px; /* Evitamos el pop-out en móvil */
    }
}
