/* =======================================================
   ESTILOS GENERALES Y HOME UNIFICADOS 
   ======================================================= */
:root {
    --home-azul: #003366;
    --home-rojo: #cc0000;
    --home-blanco: #ffffff;
    --smooth-curve: cubic-bezier(0.165, 0.84, 0.44, 1);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 130px; 
}

.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;
}

/* Títulos generales reducidos de 2.8rem a 2.5rem */
.home-why-title,
.home-video-title,
.home-services-main-title,
.home-recursos-main-title {
    color: var(--home-azul, #003366);
    font-size: 2.5rem; 
    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 {
    width: 100%;
    height: 100%;
    position: relative;
}

.home-hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    visibility: hidden;
    z-index: 1;
    transition: opacity 1s ease-in-out, visibility 1s;
}

.home-hero-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.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: 3;
    color: var(--home-blanco, #ffffff);
    max-width: 750px;
}

.home-hero-slide .home-hero-badge,
.home-hero-slide h1,
.home-hero-slide p,
.home-hero-slide .home-hero-buttons {
    opacity: 0;
    transform: translateX(-25px);
    transition: opacity 0.7s var(--smooth-curve), transform 0.7s var(--smooth-curve);
}

.home-hero-slide.active .home-hero-badge {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.2s;
}

.home-hero-slide.active h1 {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.35s;
}

.home-hero-slide.active p {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.5s;
}

.home-hero-slide.active .home-hero-buttons {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.65s;
}

.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 Hero reducido de 3.8 a 3.5rem */
.home-hero-content h1 {
    color: var(--home-blanco, #ffffff);
    font-size: 3.5rem;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.1;
    margin-bottom: 20px;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Párrafo unificado a 1.15rem */
.home-hero-content p {
    font-size: 1.15rem;
    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;
}

.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; 
    font-weight: 700;
    text-decoration: none;
    border: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: all 0.4s var(--smooth-curve);
}

.home-hero-btn-carousel:hover {
    background-color: var(--home-rojo, #cc0000);
    color: #ffffff;
    transform: translateY(-4px);
    box-shadow: 0 12px 25px rgba(204, 0, 0, 0.25);
}

.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; 
    font-weight: 700;
    text-decoration: none;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 51, 102, 0.2);
    transition: all 0.4s var(--smooth-curve);
}

.home-btn-square-blue:hover {
    background-color: var(--home-rojo, #cc0000);
    color: #ffffff;
    transform: translateY(-4px);
    box-shadow: 0 12px 25px rgba(204, 0, 0, 0.25);
}

/* =======================================================
   ESTILOS: SECCIÓN ¿POR QUÉ ELEGIRNOS?
   ======================================================= */
.home-why-section {
    padding: 90px 5%;
    background-color: var(--home-blanco, #ffffff);
    width: 100%;
    box-sizing: border-box;
}

.home-why-layout {
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

@media (min-width: 768px) {
    .home-why-layout {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 60px;
        align-items: center;
    }
}

.home-why-content {
    width: 100%;
    display: flex;
    flex-direction: column;
}

/* Título reducido a 2.5rem */
.home-why-content .recursos-title {
    position: relative;
    display: inline-block;
    align-self: center; 
    text-align: center;
    margin-bottom: 15px;
    color: var(--home-azul, #003366);
    font-size: 2.5rem;
    font-weight: 700;
}

.home-why-content .recursos-title::after {
    content: '';
    position: absolute;
    left: 50%; 
    transform: translateX(-50%); 
    bottom: -6px;
    width: 50px;
    height: 3px;
    background-color: var(--home-rojo, #cc0000);
    border-radius: 2px;
}

/* Párrafo unificado a 1.15rem, justificado sin guiones */
.home-why-lead {
    font-size: 1.15rem; 
    color: #4b5563;
    line-height: 1.8;
    font-weight: 400;
    text-align: justify;
    letter-spacing: -0.01em; 
    word-spacing: -0.03em;   
    margin-bottom: 30px;
    -webkit-hyphens: none;
    -ms-hyphens: none;
    hyphens: none;
}

.home-why-lead strong {
    color: var(--home-azul, #003366);
    font-weight: 700;
}

.home-why-actions {
    width: 100%;
}

.home-why-image {
    width: 100%;
    display: flex;
    justify-content: center;
}

.home-image-frame {
    width: 100%;
    max-width: 550px; 
    border-radius: 10px;
    overflow: hidden;
    background-color: #f8fafc;
    box-shadow: 0 10px 30px rgba(0, 51, 102, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1), 
                box-shadow 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.home-image-frame img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.home-image-frame:hover {
    box-shadow: 0 18px 40px rgba(0, 51, 102, 0.12);
}

.home-image-frame:hover img {
    transform: scale(1.03); 
}

/* =======================================================
   ESTILOS DE LA SECCIÓN DE VIDEO
   ======================================================= */
.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);
}

/* Título de sección de video ajustado de 3.0 a 2.6rem */
.home-video-title {
    color: var(--home-blanco, #ffffff);
    font-size: 2.6rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
}

/* Párrafo unificado a 1.15rem, justificado sin guiones */
.home-video-desc {
    color: #e2e8f0;
    font-size: 1.15rem;
    line-height: 1.8;
    margin-bottom: 30px;
    text-align: justify;
    letter-spacing: -0.01em; 
    word-spacing: -0.03em;
    font-weight: 400;
    -webkit-hyphens: none;
    -ms-hyphens: none;
    hyphens: none;
}

.home-video-desc strong {
    color: #ffffff;
    font-weight: 700;
}

.home-video-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Listas ajustadas a 1.15rem */
.home-video-list li {
    color: #ffffff;
    font-size: 1.15rem; 
    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.15rem;
}

.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;
    }
}

/* =======================================================
   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;
}

/* Párrafo unificado a 1.15rem */
.home-services-lead {
    font-size: 1.15rem;
    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;
}

/* Títulos de tarjeta rebajados de 1.4 a 1.3rem */
.home-service-card-front h3 {
    color: var(--home-azul, #003366);
    font-size: 1.3rem;
    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);
}

/* Títulos de tarjeta rebajados de 1.4 a 1.3rem */
.home-service-card-back h3 {
    color: #ffffff;
    font-size: 1.3rem;
    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;
}

/* =======================================================
   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;
}

/* Párrafo unificado a 1.15rem, justificado sin guiones */
.home-recursos-lead {
    font-size: 1.15rem;
    color: #334155; 
    line-height: 1.8;
    margin-bottom: 40px;
    font-weight: 400;
    text-align: justify;
    letter-spacing: -0.01em; 
    word-spacing: -0.03em;
    -webkit-hyphens: none;
    -ms-hyphens: none;
    hyphens: none;
}

.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;
}

/* Título de timeline reducido a 1.4rem */
.home-timeline-content h3 {
    color: var(--home-azul, #003366);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

/* Párrafo unificado a 1.15rem */
.home-timeline-content p {
    color: #4b5563; 
    font-size: 1.15rem;
    line-height: 1.7;
    margin: 0;
    text-align: left; 
}

@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;
}

/* Título de aliados reducido a 2.5rem */
.home-aliados-main-title {
    color: #ffffff;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 20px;
}

/* Párrafo unificado a 1.15rem */
.home-aliados-lead {
    font-size: 1.15rem;
    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
   ======================================================= */
.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;
}

/* Párrafo unificado a 1.15rem, justificado sin guiones */
.home-contacto-desc {
    font-size: 1.15rem;
    color: #4b5563;
    line-height: 1.8;
    margin-bottom: 35px;
    text-align: justify;
    letter-spacing: -0.01em; 
    word-spacing: -0.03em;
    -webkit-hyphens: none;
    -ms-hyphens: none;
    hyphens: none;
}

.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;
    }
}

@media print {

    html, body {
        height: auto !important;
        min-height: auto !important;
        overflow: visible !important;
        background: #ffffff !important;
        color: #000000 !important;
    }

    section, div, .galeria-wrapper {
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .btn-regresar, .btn-regresar-blog, header, footer, nav {
        display: none !important;
    }

    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}