/* =======================================================
   ESTILOS GENERALES Y HOME UNIFICADOS (Basados en Nosotros)
   ======================================================= */
:root {
    --home-azul: #003366;
    --home-rojo: #cc0000;
    --home-blanco: #ffffff;
}

/* Aplicación general de tipografía limpia y formal y estandarización de títulos principales */
.home-hero-section,
.home-why-section,
.home-video-feature-section,
.home-services-preview-section,
.home-recursos-timeline-section {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* Estandarización unificada para todos los títulos de sección principales en el Home (Sin mayúsculas forzadas) */
.home-why-title,
.home-video-title,
.home-services-main-title,
.home-recursos-main-title {
    color: var(--home-azul, #003366);
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 20px;
}

.home-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

/* --- HERO CON CARRUSEL --- */
.home-hero-section {
    position: relative;
    height: calc(100vh - 110px);
    min-height: 550px;
    background-color: var(--home-azul, #003366);
    overflow: hidden;
}

.home-hero-carousel, 
.home-hero-slide {
    width: 100%;
    height: 100%;
}

.home-hero-slide {
    display: none;
    background-size: cover;
    background-position: center;
    position: relative;
}

.home-hero-slide.active {
    display: block;
}

.home-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(75deg, rgba(0, 30, 60, 0.95) 0%, rgba(0, 51, 102, 0.6) 45%, rgba(0, 0, 0, 0) 100%);
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    text-align: left;
    padding: 0 5% 90px 5%;
}

.home-hero-content {
    position: relative;
    z-index: 2;
    color: var(--home-blanco, #ffffff);
    max-width: 750px;
}

.home-hero-badge {
    display: inline-block;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--home-rojo, #cc0000);
    padding-bottom: 5px;
}

/* Título principal del carrusel alineado a la tipografía corporativa formal */
.home-hero-content h1 {
    color: var(--home-blanco, #ffffff);
    font-size: 3.8rem;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.1;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
}

.home-hero-content p {
    font-size: 1.25rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    margin-bottom: 35px;
}

.home-hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

/* --- BOTONES DEL CARRUSEL (BLANCOS -> ROJOS EN HOVER CON BORDES REDONDOS) --- */
.home-hero-btn-carousel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    color: var(--home-azul, #003366);
    padding: 12px 30px;
    border-radius: 6px; /* Bordes redondeados */
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
    border: none;
}

.home-hero-btn-carousel:hover {
    background-color: var(--home-rojo, #cc0000);
    color: #ffffff;
    transform: translateY(-2px);
}

/* --- BOTONES GENERALES (AZULES -> ROJOS EN HOVER CON BORDES REDONDOS) --- */
.home-btn-square-blue {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--home-azul, #003366);
    color: #ffffff;
    padding: 12px 30px;
    border-radius: 6px; /* Bordes redondeados */
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
}

.home-btn-square-blue:hover {
    background-color: var(--home-rojo, #cc0000);
    color: #ffffff;
    transform: translateY(-2px);
}

/* --- SECCIÓN ¿POR QUÉ ELEGIRNOS? --- */
.home-why-section {
    padding: 90px 5%;
    background-color: var(--home-blanco, #ffffff);
}

.home-why-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .home-why-layout {
        grid-template-columns: 1fr 1fr;
        gap: 60px;
    }
}

.home-why-lead {
    font-size: 1.25rem;
    color: #334155;
    line-height: 1.8;
    font-weight: 400;
    text-align: justify;
    margin-bottom: 30px;
}

.home-why-lead strong {
    color: var(--home-azul, #003366);
    font-weight: 700;
}

.home-image-frame {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.home-image-frame img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.home-image-frame:hover img {
    transform: scale(1.03);
}

/* --- RESPONSIVE GENERAL --- */
@media (max-width: 768px) {
    .home-hero-content h1 {
        font-size: 2.5rem;
    }
    .home-hero-overlay {
        padding: 0 5% 60px 5%;
    }
    .home-hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }
}

/* =======================================================
   PASO 3: ESTILOS DE LA SECCIÓN DE VIDEO (ANCHO AMPLIADO)
   ======================================================= */
.home-video-feature-section {
    padding: 100px 0;
    background-color: var(--home-azul, #003366);
    width: 100%;
    overflow: hidden;
}

.home-container-wide {
    max-width: 1350px;
    margin: 0 auto;
    padding: 0 4%;
}

.home-video-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 60px;
    align-items: center;
    width: 100%;
}

@media (min-width: 992px) {
    .home-video-layout {
        grid-template-columns: 1fr 1.2fr;
        gap: 80px;
    }
}

.home-video-text-col {
    color: var(--home-blanco, #ffffff);
}

.home-video-title {
    color: var(--home-blanco, #ffffff);
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
}

.home-video-desc {
    color: #e2e8f0;
    font-size: 1.25rem;
    line-height: 1.8;
    margin-bottom: 30px;
    text-align: justify;
    font-weight: 400;
}

.home-video-desc strong {
    color: #ffffff;
    font-weight: 700;
}

.home-video-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.home-video-list li {
    color: #ffffff;
    font-size: 1.2rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 400;
}

.home-video-list li i {
    color: var(--home-rojo, #cc0000);
    font-size: 1.2rem;
}

.home-video-col {
    width: 100%;
}

.home-video-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 480px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border: 3px solid rgba(255, 255, 255, 0.12);
    background-color: #000;
}

.home-video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 768px) {
    .home-video-title {
        font-size: 2.3rem;
    }
    .home-video-wrapper {
        aspect-ratio: 4 / 3;
        max-height: 300px;
    }
}

/* =======================================================
   PASO 4: ESTILOS DE TARJETAS CON EFECTO GIRO (HOME)
   ======================================================= */
.home-services-preview-section {
    padding: 100px 0;
    background-color: var(--home-gris-fondo, #f8fafc);
    border-top: 1px solid var(--home-gris-borde, #e2e8f0);
}

.home-services-header {
    max-width: 850px;
    margin: 0 auto 50px auto;
    text-align: center;
}

.home-services-lead {
    font-size: 1.25rem;
    color: #334155;
    line-height: 1.8;
    text-align: center;
    margin: 0 auto;
    max-width: 800px;
}

.home-services-preview-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    max-width: 1250px;
    margin: 0 auto 50px auto;
}

@media (min-width: 768px) {
    .home-services-preview-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.home-service-preview-card {
    background-color: transparent;
    height: 380px;
    perspective: 1000px;
}

.home-service-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
    transform-style: preserve-3d;
}

.home-service-preview-card:hover .home-service-card-inner {
    transform: rotateY(180deg);
}

.home-service-card-front, 
.home-service-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 51, 102, 0.04);
    border: 1px solid rgba(0, 51, 102, 0.06);
    border-top: 5px solid var(--home-rojo, #cc0000);
    background: #ffffff;
}

.home-service-card-front {
    display: flex;
    flex-direction: column;
}

.home-service-preview-img {
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.home-service-preview-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.home-service-card-front h3 {
    color: var(--home-azul, #003366);
    font-size: 1.4rem;
    font-weight: 700;
    margin: auto 20px;
}

.home-service-card-back {
    background-color: var(--home-azul, #003366);
    color: #ffffff;
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px;
    border-top: 5px solid var(--home-rojo, #cc0000);
}

.home-service-card-back h3 {
    color: #ffffff;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.home-service-card-back p {
    color: #cbd5e1;
    font-size: 1.1rem;
    line-height: 1.7;
    margin: 0;
    text-align: center;
}

.home-services-btn-container {
    text-align: center;
}

/* =======================================================
   PASO 5: ESTILOS DE RECURSOS (TIMELINE CLARO)
   ======================================================= */
.home-recursos-timeline-section {
    padding: 100px 0;
    background-color: #ffffff;
    overflow: hidden;
}

.home-recursos-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 60px;
    max-width: 1300px;
    margin: 0 auto;
    align-items: center;
}

@media (min-width: 992px) {
    .home-recursos-layout {
        grid-template-columns: 1fr 1.2fr;
        gap: 90px;
    }
}

.home-recursos-info {
    text-align: left;
}

.home-recursos-lead {
    font-size: 1.25rem;
    color: #334155; 
    line-height: 1.8;
    margin-bottom: 40px;
    font-weight: 400;
    text-align: justify;
}

.home-recursos-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.home-recursos-timeline {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 45px;
}

.home-recursos-timeline::before {
    content: '';
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: 27px;
    width: 2px;
    background-color: #e2e8f0;
    z-index: 1;
}

.home-timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 25px;
    position: relative;
    z-index: 2;
    cursor: default;
}

.home-timeline-icon {
    flex: 0 0 56px;
    height: 56px;
    background-color: var(--home-azul, #003366);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 0 0 8px #ffffff; 
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.home-timeline-item:hover .home-timeline-icon {
    transform: translateY(-5px) scale(1.08);
    background-color: var(--home-rojo, #cc0000);
}

.home-timeline-content {
    padding-top: 5px;
}

.home-timeline-content h3 {
    color: var(--home-azul, #003366);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.home-timeline-item:hover .home-timeline-content h3 {
    color: var(--home-rojo, #cc0000);
}

.home-timeline-content p {
    color: #4b5563; 
    font-size: 1.125rem;
    line-height: 1.7;
    margin: 0;
}

@media (max-width: 992px) {
    .home-recursos-info {
        text-align: center;
    }
    .home-recursos-buttons {
        justify-content: center;
    }
    .home-recursos-timeline {
        padding-left: 10px;
    }
}

@media (max-width: 600px) {
    .home-recursos-main-title {
        font-size: 2.4rem;
    }
    .home-recursos-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    .home-timeline-item {
        gap: 20px;
    }
    .home-timeline-icon {
        flex: 0 0 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    .home-recursos-timeline::before {
        left: 22px;
    }
}

/* =======================================================
   ESTILOS DE ALIADOS ESTRATÉGICOS
   ======================================================= */
.home-aliados-section {
    padding: 100px 0;
    background-color: var(--home-azul, #003366);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.home-aliados-header {
    max-width: 850px;
    margin: 0 auto 50px auto;
    text-align: center;
}

.home-aliados-main-title {
    color: #ffffff;
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 20px;
}

.home-aliados-lead {
    font-size: 1.25rem;
    color: #cbd5e1;
    line-height: 1.8;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.home-aliados-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
    align-items: center;
}

@media (min-width: 768px) {
    .home-aliados-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.home-aliado-card {
    background: transparent;
    padding: 20px;
    border: none;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 160px;
    transition: transform 0.3s ease;
}

.home-aliado-card:hover {
    transform: translateY(-5px);
}

.home-aliado-card img {
    max-width: 100%;
    max-height: 120px;
    object-fit: contain;
    filter: none; 
    opacity: 1;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.home-aliado-card:hover img {
    transform: scale(1.05);
}

/* =======================================================
   ESTILOS DE CONTÁCTANOS / CTA FINAL (CON IMAGEN)
   ======================================================= */
.home-contacto-cta-section {
    padding: 100px 0;
    background-color: #ffffff;
    margin-top: 0;
    margin-bottom: 0 !important;
    overflow: hidden;
}

.home-contacto-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 50px;
    align-items: center;
    max-width: 1300px;
    margin: 0 auto;
}

@media (min-width: 992px) {
    .home-contacto-layout {
        grid-template-columns: 1.1fr 0.9fr;
        gap: 80px;
    }
}

.home-contacto-text-col {
    text-align: left;
}

.home-contacto-desc {
    font-size: 1.25rem;
    color: #4b5563;
    line-height: 1.8;
    margin-bottom: 35px;
    text-align: justify;
}

.home-contacto-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.home-contacto-image-frame {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 51, 102, 0.1);
    border: 1px solid #e2e8f0;
}

.home-contacto-image-frame img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.home-contacto-image-frame:hover img {
    transform: scale(1.03);
}

@media (max-width: 992px) {
    .home-contacto-text-col {
        text-align: center;
    }
    .home-contacto-buttons {
        justify-content: center;
    }
    .home-contacto-desc {
        text-align: center;
    }
}

@media (max-width: 600px) {
    .home-contacto-title {
        font-size: 2.3rem;
    }
}