/* ==========================================================================
   VilaTec 2.0 — CSS de Microsoft 365 y Correo Corporativo
   Estética Premium Glassmorphic con Acentos de Neón Azul y Telemetría HUD
   ========================================================================== */

#sistemas-m365-page {
    background-color: #0b1120; /* Gris pizarra premium (Slate 900) */
    color: #f3f4f6;
    overflow-x: hidden;
}

/* ─── Hero Section ────────────────────────────────────────── */
.m365-hero {
    position: relative;
    padding: 12rem 0 8rem;
    min-height: 80vh;
    display: flex;
    align-items: center;
    background: radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.05) 0%, transparent 60%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.m365-hero__bg-image {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 60%;
    background-size: cover;
    background-position: center;
    mask-image: linear-gradient(to left, black 30%, transparent 100%);
    -webkit-mask-image: linear-gradient(to left, black 30%, transparent 100%);
    z-index: 0;
    opacity: 0.22;
    filter: saturate(0.9) contrast(1.1);
}

.m365-hero__overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, #05070a 5%, transparent 60%, #05070a 95%);
    z-index: 1;
    pointer-events: none;
}

.m365-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: rgba(59, 130, 246, 0.06);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: #60a5fa;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

.m365-hero__title {
    font-size: clamp(2.3rem, 4.5vw, 4.2rem);
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    color: #ffffff;
}

.m365-hero__highlight {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 50%, #1d4ed8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.m365-hero__desc {
    max-width: 36rem;
    color: #9ca3af;
    line-height: 1.65;
    margin-bottom: 3rem;
}

.m365-hero__ctas {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-top: 2.5rem;
}

.m365-hero__ctas .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.75rem;
}

/* ─── Bento Grid: Herramientas ────────────────────────────── */
.m365-core {
    padding: 8rem 0;
    position: relative;
    z-index: 10;
    background-color: #0e1629; /* Slate 950 */
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.m365-core__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.25rem;
    margin-top: 3.5rem;
}

.m365-core__card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    height: 340px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Alinear contenido al fondo */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #0b1120;
}

.m365-core__card-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.22; /* Oscurecer imagen por defecto */
    filter: saturate(0.85);
}

.m365-core__card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(11, 17, 32, 0.95) 15%, rgba(11, 17, 32, 0.4) 60%, transparent 100%);
    z-index: 1;
    pointer-events: none;
}

.m365-core__card-content {
    position: relative;
    z-index: 2;
    padding: 2.5rem;
}

.m365-core__card-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    font-weight: 700;
    color: #60a5fa;
    margin-bottom: 0.75rem;
    display: block;
    letter-spacing: 0.1em;
}

.m365-core__card-title {
    font-size: 1.65rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 0.75rem;
    line-height: 1.25;
}

.m365-core__card-desc {
    color: #9ca3af;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Efectos Bento Hover */
.m365-core__card:hover {
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-6px);
    box-shadow: 0 20px 45px rgba(59, 130, 246, 0.08), inset 0 0 15px rgba(59, 130, 246, 0.02);
}

.m365-core__card:hover .m365-core__card-img {
    transform: scale(1.05);
    opacity: 0.35;
}

/* ─── Panel de Valor Añadido: Tranquilidad ────────────────── */
.m365-value {
    padding: 8rem 0;
    background-color: #0b1120; /* Fondo alterno oscuro */
    position: relative;
}

.m365-value__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5rem;
    align-items: center;
}

.m365-value__image-wrapper {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.m365-value__image-wrapper:hover {
    transform: translateY(-8px);
    border-color: rgba(59, 130, 246, 0.2);
    box-shadow: 0 30px 70px rgba(59, 130, 246, 0.1), 0 0 30px rgba(59, 130, 246, 0.05);
}

.m365-value__image-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, transparent 100%);
    pointer-events: none;
}

.m365-value__glow {
    position: absolute;
    width: 120%;
    height: 120%;
    top: -10%;
    left: -10%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
    filter: blur(40px);
    z-index: 0;
    pointer-events: none;
}

.m365-value__image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1), filter 0.8s ease;
}

.m365-value__image-wrapper:hover .m365-value__image {
    transform: scale(1.06);
    filter: saturate(1.1) contrast(1.05);
}

.m365-value__title {
    font-size: clamp(2rem, 3.5vw, 2.7rem);
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.m365-value__desc {
    color: #9ca3af;
    line-height: 1.7;
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
}

.m365-value__list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.m365-value__item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.m365-value__icon {
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    color: #ff9d00; /* Color naranja/oro de VilaTec para los checks */
    margin-top: 0.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.m365-value__item-text {
    color: #e5e7eb;
    font-size: 1.05rem;
    line-height: 1.5;
}

/* ─── Sección de Blindaje ─────────────────────────────────── */
.m365-shield {
    padding: 8rem 0;
    background-color: #0e1629; /* Alterna fondo a más oscuro */
    position: relative;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.m365-shield__icon-container {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: rgba(255, 157, 0, 0.05);
    border: 1px solid rgba(255, 157, 0, 0.2);
    color: #ff9d00;
    margin-bottom: 2rem;
    position: relative;
    box-shadow: 0 0 25px rgba(255, 157, 0, 0.1);
}

.m365-shield__icon-container span {
    font-size: 3rem !important;
    animation: shield-icon-pulse 3s ease-in-out infinite;
}

.m365-shield__icon-container::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1px solid rgba(255, 157, 0, 0.15);
    animation: shield-pulse 3s infinite;
}

@keyframes shield-icon-pulse {
    0% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(255, 157, 0, 0)); }
    50% { transform: scale(1.1); filter: drop-shadow(0 0 10px rgba(255, 157, 0, 0.6)); }
    100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(255, 157, 0, 0)); }
}

@keyframes shield-pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.25); opacity: 0.5; }
    100% { transform: scale(1.4); opacity: 0; }
}

.m365-shield__title {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 1.5rem;
    max-width: 45rem;
    margin-left: auto;
    margin-right: auto;
}

.m365-shield__desc {
    color: #9ca3af;
    line-height: 1.75;
    font-size: 1.1rem;
    max-width: 50rem;
    margin-left: auto;
    margin-right: auto;
}

/* ─── CTA Final ───────────────────────────────────────────── */
.m365-cta {
    padding: 8rem 0;
    background-color: #0b1120;
    position: relative;
    overflow: hidden;
}

.m365-cta__bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.05) 0%, transparent 70%);
    z-index: 0;
}

.m365-cta__card {
    position: relative;
    z-index: 1;
    max-width: 52rem;
    margin: 0 auto;
    text-align: center;
}

.m365-cta__title {
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.m365-cta__desc {
    font-size: 1.125rem;
    color: #9ca3af;
    line-height: 1.7;
    margin-bottom: 3rem;
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
}

.m365-cta__card .btn {
    padding: 1.25rem 2.5rem;
    font-weight: 700;
    background: #ff9d00; /* Naranja corporativo */
    border-color: #ff9d00;
    color: #05070a;
    box-shadow: 0 0 25px rgba(255, 157, 0, 0.35);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
}

.m365-cta__card .btn:hover {
    background: #e08a00;
    border-color: #e08a00;
    box-shadow: 0 0 35px rgba(255, 157, 0, 0.5);
    transform: translateY(-2px);
    color: #05070a;
}

/* ==========================================================================
   DISEÑO RESPONSIVO (MÓVIL / TABLETAS)
   ========================================================================== */

/* Portátiles y pantallas medianas */
@media (max-width: 1024px) {
    .m365-hero {
        padding: 10rem 0 6rem;
    }
    
    .m365-hero__bg-image {
        width: 100%;
        opacity: 0.12;
    }

    .m365-core__grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .m365-core__card {
        height: 280px;
    }

    .m365-value__grid {
        grid-template-columns: 1fr;
        gap: 3.5rem;
    }

    .m365-value__image-wrapper {
        order: 2;
    }

    .m365-value__text {
        order: 1;
    }
}

/* Móviles en vertical */
@media (max-width: 576px) {
    .m365-hero__badge {
        font-size: 0.7rem;
        padding: 0.4rem 0.85rem;
    }

    .m365-hero__title {
        font-size: 2.1rem;
        line-height: 1.2;
    }

    .m365-hero__ctas {
        flex-direction: column;
        align-items: stretch;
    }

    .m365-hero__ctas .btn {
        text-align: center;
        justify-content: center;
        white-space: normal;
        font-size: 0.78rem;
        padding: 0.85rem 1rem;
        line-height: 1.4;
    }

    .m365-core__card {
        height: auto !important;
        min-height: 300px !important;
        justify-content: flex-end !important;
    }

    .m365-core__card-content {
        padding: 1.5rem !important;
    }

    .m365-core__card-num {
        font-size: 0.72rem !important;
        margin-bottom: 0.4rem !important;
    }

    .m365-core__card-title {
        font-size: 1.25rem !important;
        margin-bottom: 0.5rem !important;
        line-height: 1.3 !important;
    }

    .m365-core__card-desc {
        font-size: 0.85rem !important;
        line-height: 1.55 !important;
    }

    .m365-value__text {
        padding: 0 1rem;
    }

    .m365-cta__card {
        padding: 0 1.5rem;
    }

    .m365-cta__card .btn {
        width: 100%;
        max-width: 100%;
        text-align: center;
        justify-content: center;
        white-space: normal;
        font-size: 0.78rem;
        padding: 0.85rem 1rem;
        line-height: 1.4;
        display: inline-flex !important;
        align-items: center !important;
    }

    #laiaOptions {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    #laiaOptions .btn {
        width: 100% !important;
        text-align: center !important;
        justify-content: center !important;
        margin: 0 !important;
    }
}

/* ─── ANIMACIONES PREMIUM PARA LAIA ───────────────────────────────────── */
@keyframes pulse-laia {
    0% { transform: scale(1); filter: drop-shadow(0 0 2px rgba(0,240,255,0.4)); }
    50% { transform: scale(1.08); filter: drop-shadow(0 0 12px rgba(0,240,255,0.8)); }
    100% { transform: scale(1); filter: drop-shadow(0 0 2px rgba(0,240,255,0.4)); }
}

@keyframes modal-fadein {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
