/* --- RESET & VARIABLES GLOBALES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --color-azul: #2b388f;
    --color-rojo: #e31e24;
    --color-oscuro: #111827;
    --color-fondo-sitio: #ffffff;
    --color-tarjeta: #f8fafc;
    --color-texto: #1e293b;
    --color-subtexto: #64748b;
}

body {
    background-color: var(--color-fondo-sitio);
    color: var(--color-texto);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Configuración para la vista del telón */
.curtain-body {
    overflow: hidden;
    height: 100vh;
}

/* --- TELÓN DE APERTURA --- */
.curtain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.panel {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    transition: transform 1.2s cubic-bezier(0.77, 0, 0.175, 1);
    z-index: 1;
}

.panel-left {
    left: 0;
    background: linear-gradient(135deg, #182052 0%, var(--color-azul) 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.panel-right {
    right: 0;
    background: linear-gradient(135deg, var(--color-rojo) 0%, #8c1014 100%);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.curtain-overlay.open .panel-left {
    transform: translateX(-100%);
}

.curtain-overlay.open .panel-right {
    transform: translateX(100%);
}

.curtain-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    background: transparent;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.logo-welcome {
    max-width: 380px;
    width: 90%;
    height: auto;
    display: block;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
}

.btn-ingresar {
    background: linear-gradient(90deg, var(--color-azul), var(--color-rojo));
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 14px 48px;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 3px;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.btn-ingresar:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 30px rgba(227, 30, 36, 0.5);
    border-color: #ffffff;
}

.curtain-overlay.open .curtain-content {
    opacity: 0;
    transform: scale(0.85);
    pointer-events: none;
}

/* --- SITIO PRINCIPAL --- */
.main-site {
    padding: 1.5rem 3rem 4rem;
    background-color: #ffffff;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-logo {
    height: 42px;
    width: auto;
}

.brand-name {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.5px;
    color: var(--color-oscuro);
}

.nav-links a {
    color: var(--color-subtexto);
    text-decoration: none;
    margin-left: 2rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-azul);
}

.hero-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 2rem 0;
}

.hero-card {
    background: var(--color-tarjeta);
    padding: 4rem 3rem;
    border-radius: 16px;
    text-align: center;
    max-width: 650px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.hero-card h1 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: var(--color-oscuro);
}

.hero-card p {
    color: var(--color-subtexto);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.btn-primary {
    display: inline-block;
    background: var(--color-azul);
    color: #ffffff;
    padding: 12px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s ease;
}

.btn-primary:hover {
    background: var(--color-rojo);
}

/* --- SECCIÓN DE SERVICIOS CON ROMBOS HORIZONTALES --- */
.services-section {
    padding: 4rem 0;
    max-width: 1100px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-header h2 {
    font-size: 2.2rem;
    color: var(--color-oscuro);
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--color-subtexto);
    font-size: 1.05rem;
}

.services-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Estilo Base del Rombo Horizontal (Paralelogramo) */
.service-rhombus {
    display: block;
    text-decoration: none;
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, var(--color-tarjeta) 100%);
    border: 2px solid #e2e8f0;
    /* Efecto Rombo Horizontal con clip-path */
    clip-path: polygon(4% 0%, 100% 0%, 96% 100%, 0% 100%);
    padding: 1.8rem 4rem;
    transition: all 0.4s ease;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.03);
}

/* Contenido dentro del Rombo */
.rhombus-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.service-icon {
    font-size: 2.4rem;
    color: var(--color-azul);
    min-width: 60px;
    height: 60px;
    border-radius: 12px;
    background: rgba(43, 56, 143, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.service-info {
    flex: 1;
}

.service-info h3 {
    font-size: 1.35rem;
    color: var(--color-oscuro);
    margin-bottom: 0.4rem;
    transition: color 0.3s ease;
}

.service-info p {
    color: var(--color-subtexto);
    font-size: 0.95rem;
    line-height: 1.5;
}

.service-arrow {
    font-size: 1.3rem;
    color: var(--color-subtexto);
    transition: transform 0.3s ease, color 0.3s ease;
}

/* EFECTOS HOVER PARA EL ROMBO */
.service-rhombus:hover {
    background: linear-gradient(135deg, var(--color-azul) 0%, #1c2563 100%);
    border-color: var(--color-azul);
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 15px 30px rgba(43, 56, 143, 0.25);
}

.service-rhombus:hover .service-icon {
    background: #ffffff;
    color: var(--color-azul);
    transform: scale(1.1);
}

.service-rhombus:hover .service-info h3,
.service-rhombus:hover .service-info p,
.service-rhombus:hover .service-arrow {
    color: #ffffff;
}

.service-rhombus:hover .service-arrow {
    transform: translateX(8px);
}

/* ANIMACIONES ENTRADA ALTERNADAS (ENTRADA DESDE IZQUIERDA/DERECHA) */
.slide-from-right {
    animation: slideRight 1s ease-out forwards;
}

.slide-from-left {
    animation: slideLeft 1s ease-out forwards;
}

@keyframes slideRight {
    from {
        opacity: 0;
        transform: translateX(80px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideLeft {
    from {
        opacity: 0;
        transform: translateX(-80px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ESTILOS INTERNOS DE LAS PÁGINAS INDIVIDUALES DE SERVICIO */
.page-container {
    max-width: 1000px;
    margin: 3rem auto;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-subtexto);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 2rem;
    transition: color 0.3s ease;
}

.btn-back:hover {
    color: var(--color-azul);
}

.service-detail-card {
    background: var(--color-tarjeta);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 3rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.04);
}

.service-detail-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.service-detail-header i {
    font-size: 3rem;
    color: var(--color-azul);
}

.service-detail-header h1 {
    font-size: 2.2rem;
    color: var(--color-oscuro);
}

.service-detail-body p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-texto);
    margin-bottom: 1.5rem;
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
    .main-site {
        padding: 1rem 1.5rem;
    }

    .service-rhombus {
        clip-path: none;
        border-radius: 12px;
        padding: 1.5rem;
    }

    .rhombus-content {
        flex-direction: column;
        text-align: center;
    }

    .service-arrow {
        display: none;
    }
}
/* --- ESTILOS COMPLEMENTARIOS PARA EL HERO AMPLIADO --- */
.hero-card {
    max-width: 850px; /* Ampliado para acomodar cómodamente el nuevo texto */
}

.hero-subtitle {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--color-azul);
    margin-bottom: 1.5rem;
}

.hero-description {
    color: var(--color-texto);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.hero-services-list {
    text-align: left;
    background: #ffffff;
    padding: 1.8rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-bottom: 1.8rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.hero-services-list h3 {
    font-size: 1.1rem;
    color: var(--color-oscuro);
    margin-bottom: 1rem;
}

.hero-services-list ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.hero-services-list li {
    font-size: 0.98rem;
    color: var(--color-texto);
    line-height: 1.5;
}

.hero-services-list li span {
    margin-right: 6px;
}

.hero-footer-text {
    color: var(--color-subtexto);
    font-size: 1.05rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-footer-text strong {
    color: var(--color-azul);
}
