/**
 * PROSILICONES64 - HEADER PREMIUM
 * Header transparente con megamenu fullscreen
 * Colores PS64: Navy #002244, Teal #3BAAFE
 */

/* ═══════════════════════════════════════════════════════════
   HEADER VARIABLES
   ═══════════════════════════════════════════════════════════ */
:root {
    --hp-height: 72px;
    --hp-bg: transparent;
    --hp-bg-scrolled: rgba(0, 34, 68, 0.95);
    --hp-bg-open: #ffffff;
    --hp-text: #ffffff;
    --hp-text-open: #002244;
    --hp-accent: #3BAAFE;
    --hp-transition: 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ═══════════════════════════════════════════════════════════
   HEADER BASE
   ═══════════════════════════════════════════════════════════ */
.hp {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--hp-height);
    background: var(--hp-bg);
    transition: background var(--hp-transition), box-shadow var(--hp-transition);
}

.hp.is-scrolled:not(.is-mega-open) {
    background: var(--hp-bg-scrolled);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
}

.hp.is-mega-open {
    background: var(--hp-bg-open);
    box-shadow: 0 1px 0 rgba(0, 34, 68, 0.08);
}

.hp__container {
    max-width: 1400px;
    height: 100%;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 4vw, 3rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

/* ═══════════════════════════════════════════════════════════
   LOGO
   ═══════════════════════════════════════════════════════════ */
.hp__logo {
    position: relative;
    height: 36px;
    flex-shrink: 0;
}

.hp__logo a {
    display: block;
    height: 100%;
}

.hp__logo-img {
    height: 100%;
    width: auto;
    transition: opacity 0.3s ease;
}

.hp__logo-white { opacity: 1; }
.hp__logo-dark {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

.hp.is-mega-open .hp__logo-white { opacity: 0; }
.hp.is-mega-open .hp__logo-dark { opacity: 1; }

/* ═══════════════════════════════════════════════════════════
   NAVEGACION
   ═══════════════════════════════════════════════════════════ */
.hp__nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.hp__nav-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--hp-text);
    padding: 0.75rem 0.875rem;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.3s ease, opacity 0.3s ease;
}

.hp__nav-item::after {
    content: '';
    position: absolute;
    bottom: 0.5rem;
    left: 0.875rem;
    right: 0.875rem;
    height: 2px;
    background: var(--hp-accent);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.hp__nav-item:hover::after,
.hp__nav-item.is-active::after {
    transform: scaleX(1);
}

/* Megamenu abierto: texto negro */
.hp.is-mega-open .hp__nav-item {
    color: var(--hp-text-open);
}

.hp.is-mega-open .hp__nav-item.is-active {
    color: var(--hp-accent);
}

/* ═══════════════════════════════════════════════════════════
   ACTIONS (Buscador + Contacto + Idiomas)
   Altura uniforme: 42px para los 3 elementos
   ═══════════════════════════════════════════════════════════ */
.hp__actions {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

/* Buscador - 42px */
.hp__search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    cursor: pointer;
    color: var(--hp-text);
    transition: all 0.3s ease;
}

.hp__search-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.4);
}

.hp.is-mega-open .hp__search-btn {
    color: var(--hp-text-open);
    border-color: rgba(0, 34, 68, 0.15);
}

.hp.is-mega-open .hp__search-btn:hover {
    background: rgba(0, 34, 68, 0.04);
    border-color: rgba(0, 34, 68, 0.25);
}

/* Contacto - 42px - Premium Style */
.hp__contact-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 1.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--hp-text);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Línea animada inferior */
.hp__contact-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--hp-accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.hp__contact-btn:hover {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.05);
}

.hp__contact-btn:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Solo Mega open - fondo blanco, texto oscuro */
.hp.is-mega-open .hp__contact-btn {
    color: var(--hp-text-open);
    border-color: rgba(0, 34, 68, 0.15);
}

.hp.is-mega-open .hp__contact-btn:hover {
    border-color: var(--hp-accent);
    background: rgba(59, 170, 254, 0.04);
}

.hp.is-mega-open .hp__contact-btn::after {
    background: var(--hp-accent);
}

/* Idiomas Button - 42px */
.hp__lang-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    height: 42px;
    padding: 0 0.875rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--hp-text);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hp__lang-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.4);
}

.hp__lang-btn svg {
    transition: transform 0.3s ease;
}

.hp__lang-btn.is-active svg {
    transform: rotate(180deg);
}

.hp.is-mega-open .hp__lang-btn {
    color: var(--hp-text-open);
    border-color: rgba(0, 34, 68, 0.15);
}

.hp.is-mega-open .hp__lang-btn:hover {
    background: rgba(0, 34, 68, 0.04);
    border-color: rgba(0, 34, 68, 0.25);
}

/* ═══════════════════════════════════════════════════════════
   HAMBURGER
   ═══════════════════════════════════════════════════════════ */
.hp__hamburger {
    display: none;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
}

.hp__hamburger-box {
    position: relative;
    width: 22px;
    height: 14px;
}

.hp__hamburger-line {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--hp-text);
    border-radius: 1px;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.hp__hamburger-line:nth-child(1) { top: 0; }
.hp__hamburger-line:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hp__hamburger-line:nth-child(3) { bottom: 0; }

.hp__hamburger.is-active .hp__hamburger-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
.hp__hamburger.is-active .hp__hamburger-line:nth-child(2) {
    opacity: 0;
    transform: translateY(-50%) scaleX(0);
}
.hp__hamburger.is-active .hp__hamburger-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.hp.is-mega-open .hp__hamburger-line {
    background: var(--hp-text-open);
}

/* ═══════════════════════════════════════════════════════════
   MEGAMENU FULLSCREEN
   ═══════════════════════════════════════════════════════════ */
.hp-mega {
    position: fixed;
    top: var(--hp-height);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    background: #ffffff;
    overflow-y: auto;
    overscroll-behavior: contain;

    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition:
        opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0.4s,
        transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.hp-mega.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.hp-mega__container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem clamp(1.5rem, 4vw, 3rem) 2rem;
    min-height: calc(100vh - var(--hp-height));
    display: flex;
    flex-direction: column;
}

/* Header de categoria */
.hp-mega__header {
    margin-bottom: 1.25rem;
    opacity: 0;
    transform: translateY(20px);
    animation: megaFadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
}

.hp-mega.is-open .hp-mega__header {
    animation-play-state: running;
}

.hp-mega__eyebrow {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--hp-accent);
    margin-bottom: 0.5rem;
}

.hp-mega__title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #000000;
    line-height: 1.1;
    margin: 0;
}

/* Título más pequeño para mega-menú de Productos (tiene tabs) */
.hp-mega__content:has(.hp-mega__tabs) .hp-mega__title {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
}

.hp-mega__subtitle {
    font-size: 1rem;
    color: #4a5a6a;
    margin-top: 0.75rem;
    max-width: 500px;
}

/* Tabs */
.hp-mega__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0, 34, 68, 0.08);
    opacity: 0;
    animation: megaFadeUp 0.6s ease 0.15s forwards;
}

.hp-mega__tab {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #5a6a7a;
    padding: 0.625rem 1.25rem;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
}

.hp-mega__tab:hover {
    color: var(--hp-accent);
    background: rgba(59, 170, 254, 0.06);
    border-color: rgba(59, 170, 254, 0.2);
}

.hp-mega__tab.is-active {
    color: var(--hp-accent);
    background: rgba(59, 170, 254, 0.08);
    border-color: var(--hp-accent);
    font-weight: 600;
}

/* Grid de cards */
.hp-mega__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.25rem;
    flex: 1;
    margin-bottom: 2rem;
}

.hp-mega__card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    padding: 1rem;
    background: #f8fafc;
    border: 1px solid transparent;
    border-radius: 12px;
    text-decoration: none;
    overflow: hidden;

    opacity: 0;
    transform: translateY(20px);
    animation: megaCardUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-play-state: paused;
}

.hp-mega.is-open .hp-mega__card {
    animation-play-state: running;
}

.hp-mega__card:nth-child(1) { animation-delay: 0.2s; }
.hp-mega__card:nth-child(2) { animation-delay: 0.25s; }
.hp-mega__card:nth-child(3) { animation-delay: 0.3s; }
.hp-mega__card:nth-child(4) { animation-delay: 0.35s; }
.hp-mega__card:nth-child(5) { animation-delay: 0.4s; }
.hp-mega__card:nth-child(6) { animation-delay: 0.45s; }
.hp-mega__card:nth-child(7) { animation-delay: 0.5s; }
.hp-mega__card:nth-child(8) { animation-delay: 0.55s; }

.hp-mega__card:hover {
    background: #f0f4f8;
    border-color: rgba(0, 34, 68, 0.1);
    transform: translateY(-4px);
}

.hp-mega__card-img {
    aspect-ratio: 4/3;
    border-radius: 8px;
    overflow: hidden;
    background: #e2e8f0;
}

.hp-mega__card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.hp-mega__card:hover .hp-mega__card-img img {
    transform: scale(1.05);
}

.hp-mega__card-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: #000000;
    line-height: 1.3;
}

.hp-mega__card:hover .hp-mega__card-title {
    color: var(--hp-accent);
}

/* Lista con iconos */
.hp-mega__list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.75rem;
}

.hp-mega__list-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border: 1px solid transparent;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;

    opacity: 0;
    transform: translateY(15px);
    animation: megaFadeUp 0.5s ease forwards;
    animation-play-state: paused;
}

.hp-mega.is-open .hp-mega__list-item {
    animation-play-state: running;
}

.hp-mega__list-item:nth-child(1) { animation-delay: 0.2s; }
.hp-mega__list-item:nth-child(2) { animation-delay: 0.25s; }
.hp-mega__list-item:nth-child(3) { animation-delay: 0.3s; }
.hp-mega__list-item:nth-child(4) { animation-delay: 0.35s; }

.hp-mega__list-item:hover {
    background: #f0f4f8;
    border-color: rgba(0, 34, 68, 0.1);
    transform: translateX(8px);
}

.hp-mega__list-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 170, 254, 0.1);
    border-radius: 10px;
    font-size: 1.125rem;
    color: var(--hp-accent);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.hp-mega__list-item:hover .hp-mega__list-icon {
    background: var(--hp-accent);
    color: #ffffff;
}

.hp-mega__list-text {
    font-size: 0.9375rem;
    font-weight: 500;
    color: #000000;
}

/* Idiomas Megamenu */
.hp-mega__langs-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
}

.hp-mega__langs-container .hp-mega__eyebrow {
    margin-bottom: 0.75rem;
}

.hp-mega__langs-container .hp-mega__header {
    margin-bottom: 2rem;
}

.hp-mega__langs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    max-width: 800px;
}

.hp-mega__lang-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem 1.5rem;
    background: rgba(0, 34, 68, 0.02);
    border: 2px solid rgba(0, 34, 68, 0.08);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.hp-mega__lang-card:hover {
    background: rgba(59, 170, 254, 0.04);
    border-color: var(--hp-accent);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 34, 68, 0.1);
}

.hp-mega__lang-card.is-active {
    background: rgba(59, 170, 254, 0.08);
    border-color: var(--hp-accent);
}

.hp-mega__lang-flag {
    font-size: 3rem;
    line-height: 1;
}

.hp-mega__lang-name {
    font-size: 1rem;
    font-weight: 600;
    color: #000000;
}

.hp-mega__lang-check {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    color: var(--hp-accent);
}

@media (max-width: 768px) {
    .hp-mega__langs-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .hp-mega__lang-card {
        padding: 1.5rem 1rem;
    }

    .hp-mega__lang-flag {
        font-size: 2rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   EMPRESA MEGAMENU - Premium centered layout
   ═══════════════════════════════════════════════════════════════════ */
.hp-mega__empresa-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem 2rem;
    text-align: center;
}

.hp-mega__empresa-container .hp-mega__header {
    margin-bottom: 2rem;
}

.hp-mega__empresa-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    max-width: 1100px;
    width: 100%;
}

.hp-mega__empresa-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2.5rem 2rem;
    background: rgba(0, 34, 68, 0.02);
    border: 2px solid rgba(0, 34, 68, 0.06);
    border-radius: 16px;
    text-decoration: none;
    position: relative;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);

    opacity: 0;
    transform: translateY(20px);
    animation: megaFadeUp 0.5s ease forwards;
    animation-play-state: paused;
}

.hp-mega.is-open .hp-mega__empresa-card {
    animation-play-state: running;
}

.hp-mega__empresa-card:nth-child(1) { animation-delay: 0.2s; }
.hp-mega__empresa-card:nth-child(2) { animation-delay: 0.3s; }
.hp-mega__empresa-card:nth-child(3) { animation-delay: 0.4s; }

.hp-mega__empresa-card:hover {
    background: rgba(59, 170, 254, 0.04);
    border-color: var(--hp-accent);
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0, 34, 68, 0.12);
}

.hp-mega__empresa-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(59, 170, 254, 0.08), rgba(59, 170, 254, 0.15));
    border-radius: 20px;
    color: var(--hp-accent);
    transition: all 0.4s ease;
}

.hp-mega__empresa-card:hover .hp-mega__empresa-icon {
    background: var(--hp-accent);
    color: white;
    transform: scale(1.05);
}

.hp-mega__empresa-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #000000;
    letter-spacing: -0.01em;
}

.hp-mega__empresa-desc {
    font-size: 0.875rem;
    color: #6a7a8a;
    line-height: 1.5;
    max-width: 200px;
}

@media (max-width: 768px) {
    .hp-mega__empresa-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        max-width: 320px;
    }

    .hp-mega__empresa-card {
        padding: 1.5rem;
        flex-direction: row;
        text-align: left;
        gap: 1.25rem;
    }

    .hp-mega__empresa-icon {
        width: 56px;
        height: 56px;
        border-radius: 14px;
        flex-shrink: 0;
    }

    .hp-mega__empresa-icon svg {
        width: 24px;
        height: 24px;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   APLICACIONES MEGAMENU - Premium centered CTA
   ═══════════════════════════════════════════════════════════════════ */
.hp-mega__app-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;

    opacity: 0;
    animation: megaFadeUp 0.5s ease 0.1s forwards;
}

.hp-mega__app-icon {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(59, 170, 254, 0.1), rgba(59, 170, 254, 0.2));
    border-radius: 18px;
    color: var(--hp-accent);
    margin-bottom: 1.25rem;

    opacity: 0;
    transform: scale(0.8);
    animation: appIconIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
}

.hp-mega__app-icon svg {
    width: 36px;
    height: 36px;
}

@keyframes appIconIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.hp-mega__app-container .hp-mega__eyebrow {
    margin-bottom: 0.75rem;
}

.hp-mega__app-container .hp-mega__header {
    margin-bottom: 1.5rem;
}

.hp-mega__app-container .hp-mega__subtitle {
    max-width: 480px;
    font-size: 1rem;
    line-height: 1.6;
}

.hp-mega__app-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: var(--hp-accent);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);

    opacity: 0;
    transform: translateY(20px);
    animation: megaFadeUp 0.5s ease 0.4s forwards;
}

.hp-mega__app-cta:hover {
    background: #2a9fee;
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(59, 170, 254, 0.3);
    gap: 1rem;
}

.hp-mega__app-cta svg {
    transition: transform 0.3s ease;
}

.hp-mega__app-cta:hover svg {
    transform: translateX(4px);
}

@media (max-width: 768px) {
    .hp-mega__app-icon {
        width: 80px;
        height: 80px;
        border-radius: 20px;
    }

    .hp-mega__app-icon svg {
        width: 36px;
        height: 36px;
    }

    .hp-mega__app-cta {
        padding: 0.875rem 1.5rem;
        font-size: 0.9375rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   FORMULACIONES MEGAMENU - Layout 2 columnas tipo Blog (Premium)
   ═══════════════════════════════════════════════════════════════════ */
.hp-mega__formulas-container {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 2.5rem;
    padding: 0.5rem 0 1rem;
}

/* Left: Featured Serie Card */
.hp-mega__formulas-left {
    opacity: 0;
    animation: megaFadeUp 0.5s ease 0.1s forwards;
}

.hp-mega__formulas-featured {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: linear-gradient(145deg, rgba(0, 34, 68, 0.02), rgba(0, 34, 68, 0.04));
    border: 1px solid rgba(0, 34, 68, 0.08);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.hp-mega__formulas-featured:hover {
    background: linear-gradient(145deg, rgba(59, 170, 254, 0.04), rgba(59, 170, 254, 0.08));
    border-color: var(--hp-accent);
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 34, 68, 0.1);
}

.hp-mega__formulas-featured-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(59, 170, 254, 0.08), rgba(0, 212, 170, 0.08));
}

.hp-mega__formulas-featured-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--hp-accent), #00d4aa);
    border-radius: 20px;
    color: white;
    box-shadow: 0 8px 24px rgba(59, 170, 254, 0.3);
}

.hp-mega__formulas-featured-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.375rem 0.75rem;
    background: rgba(255, 255, 255, 0.95);
    border-left: 3px solid var(--hp-accent);
    border-radius: 0 6px 6px 0;
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--hp-accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hp-mega__formulas-featured-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.hp-mega__formulas-featured-code {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--hp-accent);
    margin-bottom: 0.375rem;
}

.hp-mega__formulas-featured-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #000000;
    line-height: 1.3;
    margin: 0 0 1rem;
}

.hp-mega__formulas-featured-specs {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.hp-mega__formulas-spec {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.8125rem;
    color: #4a5a6a;
}

.hp-mega__formulas-spec svg {
    width: 16px;
    height: 16px;
    color: var(--hp-accent);
    flex-shrink: 0;
}

.hp-mega__formulas-featured-certs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-top: auto;
}

.hp-mega__formulas-cert {
    padding: 0.25rem 0.5rem;
    background: rgba(59, 170, 254, 0.1);
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--hp-accent);
}

.hp-mega__formulas-featured-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--hp-accent);
}

.hp-mega__formulas-featured:hover .hp-mega__formulas-featured-link {
    gap: 0.75rem;
}

.hp-mega__formulas-featured-link svg {
    transition: transform 0.3s ease;
}

.hp-mega__formulas-featured:hover .hp-mega__formulas-featured-link svg {
    transform: translateX(4px);
}

/* Right: Header + Categories + Quick Stats */
.hp-mega__formulas-right {
    display: flex;
    flex-direction: column;
}

.hp-mega__formulas-right .hp-mega__header {
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: megaFadeUp 0.5s ease 0.15s forwards;
}

.hp-mega__formulas-right .hp-mega__title {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

/* Categories Grid */
.hp-mega__formulas-cats {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.hp-mega__formulas-cat {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(0, 34, 68, 0.02);
    border: 1px solid rgba(0, 34, 68, 0.06);
    border-left: 3px solid var(--cat-color, var(--hp-accent));
    border-radius: 0 12px 12px 0;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);

    opacity: 0;
    transform: translateX(-10px);
    animation: formulasCatIn 0.4s ease forwards;
    animation-play-state: paused;
}

.hp-mega.is-open .hp-mega__formulas-cat {
    animation-play-state: running;
}

.hp-mega__formulas-cat:nth-child(1) { animation-delay: 0.2s; --cat-color: #00d4aa; }
.hp-mega__formulas-cat:nth-child(2) { animation-delay: 0.25s; --cat-color: #ff6b6b; }
.hp-mega__formulas-cat:nth-child(3) { animation-delay: 0.3s; --cat-color: #a855f7; }

@keyframes formulasCatIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hp-mega__formulas-cat:hover {
    background: rgba(59, 170, 254, 0.06);
    border-color: rgba(59, 170, 254, 0.15);
    transform: translateX(6px);
}

.hp-mega__formulas-cat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 170, 254, 0.1);
    border-radius: 12px;
    color: var(--hp-accent);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.hp-mega__formulas-cat:hover .hp-mega__formulas-cat-icon {
    background: var(--hp-accent);
    color: white;
    transform: scale(1.05);
}

.hp-mega__formulas-cat-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    flex: 1;
}

.hp-mega__formulas-cat-name {
    font-size: 1rem;
    font-weight: 600;
    color: #000000;
}

.hp-mega__formulas-cat-desc {
    font-size: 0.8125rem;
    color: #6a7a8a;
}

.hp-mega__formulas-cat-count {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--hp-accent);
    background: rgba(59, 170, 254, 0.1);
    padding: 0.25rem 0.625rem;
    border-radius: 20px;
    white-space: nowrap;
}

/* Quick Stats */
.hp-mega__formulas-stats {
    display: flex;
    gap: 1.5rem;
    padding: 1rem 0;
    margin-bottom: 1rem;
    border-top: 1px solid rgba(0, 34, 68, 0.06);
    border-bottom: 1px solid rgba(0, 34, 68, 0.06);

    opacity: 0;
    animation: megaFadeUp 0.5s ease 0.35s forwards;
}

.hp-mega__formulas-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: #4a5a6a;
}

.hp-mega__formulas-stat svg {
    width: 18px;
    height: 18px;
    color: var(--hp-accent);
}

.hp-mega__formulas-stat strong {
    color: #000000;
    font-weight: 600;
}

/* CTA Button */
.hp-mega__formulas-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    margin-top: auto;
    padding: 0.875rem 1.5rem;
    background: transparent;
    border: 2px solid var(--hp-accent);
    color: var(--hp-accent);
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;

    opacity: 0;
    animation: megaFadeUp 0.5s ease 0.4s forwards;
}

.hp-mega__formulas-cta:hover {
    background: var(--hp-accent);
    color: white;
    gap: 0.875rem;
}

.hp-mega__formulas-cta svg {
    transition: transform 0.3s ease;
}

.hp-mega__formulas-cta:hover svg {
    transform: translateX(4px);
}

/* ═══════════════════════════════════════════════════════════════════
   FORMULACIONES V2 - Layout con 3 grupos de categorías
   ═══════════════════════════════════════════════════════════════════ */
.hp-mega__formulas-v2 {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 0.5rem 0 1rem;
}

.hp-mega__formulas-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    opacity: 0;
    animation: megaFadeUp 0.4s ease 0.1s forwards;
}

.hp-mega__formulas-intro {
    flex: 1;
}

.hp-mega__formulas-v2 .hp-mega__title {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    margin-bottom: 0.25rem;
}

.hp-mega__formulas-v2 .hp-mega__subtitle {
    font-size: 0.875rem;
    max-width: 400px;
}

.hp-mega__formulas-v2 .hp-mega__formulas-stats {
    display: flex;
    gap: 1.25rem;
    margin: 0;
    padding: 0;
    border: none;
    opacity: 1;
    animation: none;
}

.hp-mega__formulas-v2 .hp-mega__formulas-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.125rem;
    padding: 0.5rem 0.75rem;
    background: rgba(59, 170, 254, 0.06);
    border-radius: 8px;
}

.hp-mega__formulas-v2 .hp-mega__formulas-stat strong {
    font-size: 0.875rem;
    color: var(--hp-accent);
}

.hp-mega__formulas-v2 .hp-mega__formulas-stat span {
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6a7a8a;
}

/* Grid de grupos */
.hp-mega__formulas-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.hp-mega__formulas-group {
    opacity: 0;
    animation: megaFadeUp 0.4s ease forwards;
}

.hp-mega__formulas-group:nth-child(1) { animation-delay: 0.15s; }
.hp-mega__formulas-group:nth-child(2) { animation-delay: 0.2s; }
.hp-mega__formulas-group:nth-child(3) { animation-delay: 0.25s; }

.hp-mega__formulas-group-title {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #6a7a8a;
    margin: 0 0 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0, 34, 68, 0.08);
}

.hp-mega__formulas-group-cats {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

/* Category items v2 */
.hp-mega__formulas-v2 .hp-mega__formulas-cat {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.625rem;
    background: transparent;
    border: none;
    border-left: none;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.25s ease;
    opacity: 1;
    transform: none;
    animation: none;
}

.hp-mega__formulas-v2 .hp-mega__formulas-cat:hover {
    background: rgba(59, 170, 254, 0.08);
    transform: translateX(4px);
}

.hp-mega__formulas-v2 .hp-mega__formulas-cat-icon {
    width: 32px;
    height: 32px;
    background: rgba(0, 34, 68, 0.04);
    border-radius: 6px;
    color: #4a5a6a;
}

.hp-mega__formulas-v2 .hp-mega__formulas-cat:hover .hp-mega__formulas-cat-icon {
    background: var(--hp-accent);
    color: white;
    transform: none;
}

.hp-mega__formulas-v2 .hp-mega__formulas-cat-name {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #1a2a3a;
}

.hp-mega__formulas-v2 .hp-mega__formulas-cat:hover .hp-mega__formulas-cat-name {
    color: var(--hp-accent);
}

.hp-mega__formulas-v2 .hp-mega__formulas-cat-count {
    font-size: 0.6875rem;
    font-weight: 600;
    color: #94a3b8;
    background: none;
    padding: 0;
    margin-left: auto;
}

/* Footer */
.hp-mega__formulas-footer {
    display: flex;
    justify-content: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 34, 68, 0.06);
    opacity: 0;
    animation: megaFadeUp 0.4s ease 0.3s forwards;
}

.hp-mega__formulas-footer .hp-mega__formulas-cta {
    opacity: 1;
    animation: none;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
}

/* Responsive V2 */
@media (max-width: 900px) {
    .hp-mega__formulas-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .hp-mega__formulas-header {
        flex-direction: column;
        gap: 1rem;
    }

    .hp-mega__formulas-v2 .hp-mega__formulas-stats {
        justify-content: flex-start;
    }
}

/* Responsive Formulaciones */
@media (max-width: 900px) {
    .hp-mega__formulas-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hp-mega__formulas-left {
        order: 2;
    }

    .hp-mega__formulas-right {
        order: 1;
    }

    .hp-mega__formulas-featured {
        flex-direction: row;
        max-height: 200px;
    }

    .hp-mega__formulas-featured-visual {
        width: 35%;
        padding: 1.5rem;
    }

    .hp-mega__formulas-featured-icon {
        width: 60px;
        height: 60px;
    }

    .hp-mega__formulas-featured-content {
        width: 65%;
    }

    .hp-mega__formulas-stats {
        flex-wrap: wrap;
        gap: 1rem;
    }
}

@media (max-width: 600px) {
    .hp-mega__formulas-featured {
        flex-direction: column;
        max-height: none;
    }

    .hp-mega__formulas-featured-visual {
        width: 100%;
    }

    .hp-mega__formulas-featured-content {
        width: 100%;
    }

    .hp-mega__formulas-cat {
        padding: 0.875rem 1rem;
    }

    .hp-mega__formulas-cat-icon {
        width: 40px;
        height: 40px;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   APLICACIONES MEGAMENU V2 - Grid con sectores industriales
   Similar a formulaciones pero con sectores
   ═══════════════════════════════════════════════════════════════════ */
.hp-mega__apps-v2 {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 0.5rem 0 1rem;
}

.hp-mega__apps-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    opacity: 0;
    animation: megaFadeUp 0.4s ease 0.1s forwards;
}

.hp-mega__apps-intro {
    flex: 1;
}

.hp-mega__apps-v2 .hp-mega__title {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    margin-bottom: 0.25rem;
}

.hp-mega__apps-v2 .hp-mega__subtitle {
    font-size: 0.875rem;
    max-width: 400px;
}

.hp-mega__apps-stats {
    display: flex;
    gap: 1.25rem;
}

.hp-mega__apps-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.125rem;
    padding: 0.5rem 0.75rem;
    background: rgba(59, 170, 254, 0.06);
    border-radius: 8px;
}

.hp-mega__apps-stat strong {
    font-size: 0.875rem;
    color: var(--hp-accent);
}

.hp-mega__apps-stat span {
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6a7a8a;
}

/* Grid de sectores */
.hp-mega__apps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    opacity: 0;
    animation: megaFadeUp 0.4s ease 0.15s forwards;
}

.hp-mega__apps-sector {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 0.75rem;
    background: transparent;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.25s ease;
    opacity: 0;
    animation: megaFadeUp 0.35s ease forwards;
}

.hp-mega__apps-sector:hover {
    background: rgba(59, 170, 254, 0.08);
    transform: translateX(4px);
}

.hp-mega__apps-sector-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 34, 68, 0.04);
    border-radius: 8px;
    color: #4a5a6a;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.hp-mega__apps-sector:hover .hp-mega__apps-sector-icon {
    background: var(--hp-accent);
    color: white;
}

.hp-mega__apps-sector-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    flex: 1;
    min-width: 0;
}

.hp-mega__apps-sector-name {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #1a2a3a;
    transition: color 0.25s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hp-mega__apps-sector:hover .hp-mega__apps-sector-name {
    color: var(--hp-accent);
}

.hp-mega__apps-sector-count {
    font-size: 0.6875rem;
    font-weight: 600;
    color: #94a3b8;
    margin-left: auto;
    padding-left: 0.5rem;
}

/* Footer */
.hp-mega__apps-footer {
    display: flex;
    justify-content: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 34, 68, 0.06);
    opacity: 0;
    animation: megaFadeUp 0.4s ease 0.25s forwards;
}

.hp-mega__apps-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 2px solid var(--hp-accent);
    color: var(--hp-accent);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.hp-mega__apps-cta:hover {
    background: var(--hp-accent);
    color: white;
    gap: 0.875rem;
}

.hp-mega__apps-cta svg {
    transition: transform 0.3s ease;
}

.hp-mega__apps-cta:hover svg {
    transform: translateX(4px);
}

/* Responsive Aplicaciones V2 */
@media (max-width: 1100px) {
    .hp-mega__apps-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .hp-mega__apps-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hp-mega__apps-header {
        flex-direction: column;
        gap: 1rem;
    }

    .hp-mega__apps-stats {
        justify-content: flex-start;
    }
}

@media (max-width: 600px) {
    .hp-mega__apps-grid {
        grid-template-columns: 1fr;
    }

    .hp-mega__apps-sector {
        padding: 0.75rem 1rem;
    }

    .hp-mega__apps-sector-icon {
        width: 40px;
        height: 40px;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   BLOG MEGAMENU - Two column layout with featured article
   ═══════════════════════════════════════════════════════════════════ */
.hp-mega__blog-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 2rem;
    padding: 0.5rem 0 1rem;
}

/* Left: Featured Article */
.hp-mega__blog-left {
    opacity: 0;
    animation: megaFadeUp 0.5s ease 0.1s forwards;
}

.hp-mega__blog-featured {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: rgba(0, 34, 68, 0.02);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.hp-mega__blog-featured:hover {
    background: rgba(59, 170, 254, 0.04);
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 34, 68, 0.1);
}

.hp-mega__blog-featured-img {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.hp-mega__blog-featured-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.hp-mega__blog-featured:hover .hp-mega__blog-featured-img img {
    transform: scale(1.05);
}

.hp-mega__blog-featured-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.375rem 0.75rem;
    background: rgba(255, 255, 255, 0.95);
    border-left: 3px solid var(--cat-color, var(--hp-accent));
    border-radius: 0 6px 6px 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: #000000;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.hp-mega__blog-featured-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.hp-mega__blog-featured-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--hp-accent);
    margin-bottom: 0.5rem;
}

.hp-mega__blog-featured-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #000000;
    line-height: 1.3;
    margin: 0 0 auto;
}

.hp-mega__blog-featured-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--hp-accent);
}

.hp-mega__blog-featured:hover .hp-mega__blog-featured-link {
    gap: 0.75rem;
}

.hp-mega__blog-featured-link svg {
    transition: transform 0.3s ease;
}

.hp-mega__blog-featured:hover .hp-mega__blog-featured-link svg {
    transform: translateX(4px);
}

/* Right: Header + Categories + CTA */
.hp-mega__blog-right {
    display: flex;
    flex-direction: column;
}

.hp-mega__blog-right .hp-mega__header {
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: megaFadeUp 0.5s ease 0.15s forwards;
}

.hp-mega__blog-right .hp-mega__title {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

.hp-mega__blog-cats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.hp-mega__blog-cat {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(0, 34, 68, 0.02);
    border: 1px solid rgba(0, 34, 68, 0.06);
    border-left: 3px solid var(--cat-color, var(--hp-accent));
    border-radius: 0 10px 10px 0;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);

    opacity: 0;
    transform: translateX(-10px);
    animation: blogCatIn 0.4s ease forwards;
    animation-play-state: paused;
}

.hp-mega.is-open .hp-mega__blog-cat {
    animation-play-state: running;
}

@keyframes blogCatIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hp-mega__blog-cat:hover {
    background: rgba(59, 170, 254, 0.06);
    border-color: rgba(59, 170, 254, 0.15);
    transform: translateX(4px);
}

.hp-mega__blog-cat-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 170, 254, 0.1);
    border-radius: 10px;
    color: var(--hp-accent);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.hp-mega__blog-cat:hover .hp-mega__blog-cat-icon {
    background: var(--hp-accent);
    color: white;
}

.hp-mega__blog-cat-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.hp-mega__blog-cat-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #000000;
}

.hp-mega__blog-cat-count {
    font-size: 0.75rem;
    color: #6a7a8a;
}

.hp-mega__blog-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    margin-top: auto;
    padding: 0.875rem 1.5rem;
    background: transparent;
    border: 2px solid var(--hp-accent);
    color: var(--hp-accent);
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;

    opacity: 0;
    animation: megaFadeUp 0.5s ease 0.4s forwards;
}

.hp-mega__blog-cta:hover {
    background: var(--hp-accent);
    color: white;
    gap: 0.875rem;
}

.hp-mega__blog-cta svg {
    transition: transform 0.3s ease;
}

.hp-mega__blog-cta:hover svg {
    transform: translateX(4px);
}

@media (max-width: 900px) {
    .hp-mega__blog-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hp-mega__blog-left {
        order: 2;
    }

    .hp-mega__blog-right {
        order: 1;
    }

    .hp-mega__blog-featured {
        flex-direction: row;
        max-height: 180px;
    }

    .hp-mega__blog-featured-img {
        width: 40%;
        aspect-ratio: auto;
    }

    .hp-mega__blog-featured-content {
        width: 60%;
    }

    .hp-mega__blog-featured-title {
        font-size: 1rem;
    }
}

@media (max-width: 600px) {
    .hp-mega__blog-cats {
        grid-template-columns: 1fr;
    }

    .hp-mega__blog-featured {
        flex-direction: column;
        max-height: none;
    }

    .hp-mega__blog-featured-img {
        width: 100%;
        aspect-ratio: 16/9;
    }

    .hp-mega__blog-featured-content {
        width: 100%;
    }
}

/* Footer */
.hp-mega__footer {
    margin-top: auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 34, 68, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.hp-mega__footer-text {
    font-size: 0.875rem;
    color: #6a7a8a;
}

.hp-mega__footer-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--hp-accent);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hp-mega__footer-link:hover {
    gap: 0.75rem;
}

/* ═══════════════════════════════════════════════════════════
   MOBILE MENU
   ═══════════════════════════════════════════════════════════ */

/* Ocultar CTA flotante cuando el menú móvil está abierto */
body:has(.hp-mobile.is-open) .cta-flotante {
    display: none !important;
}

.hp-mobile {
    position: fixed;
    inset: 0;
    z-index: 9999; /* Por encima de todo */
    background: #ffffff;
    display: flex;
    flex-direction: column;

    opacity: 0;
    visibility: hidden;
    transform: translateX(100%);
    transition: opacity 0.4s ease, visibility 0.4s, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.hp-mobile.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.hp-mobile__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    height: var(--hp-height);
    border-bottom: 1px solid rgba(0, 34, 68, 0.08);
    background: #ffffff;
}

.hp-mobile__logo {
    height: 32px;
}

.hp-mobile__logo img {
    height: 100%;
    width: auto;
}

.hp-mobile__close {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f7fa;
    border: none;
    border-radius: 50%;
    color: #002244;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hp-mobile__close:active {
    transform: scale(0.95);
}

.hp-mobile__body {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 1.25rem 2rem;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 120px; /* Espacio para el footer fijo interno */
}

.hp-mobile__cat {
    border-bottom: 1px solid rgba(0, 34, 68, 0.08);
}

.hp-mobile__cat-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: #002244;
    cursor: pointer;
    text-decoration: none;
}

.hp-mobile__cat-icon {
    font-size: 0.875rem;
    color: #8899aa;
    transition: transform 0.3s ease;
}

.hp-mobile__cat.is-open .hp-mobile__cat-icon {
    transform: rotate(90deg);
    color: #3BAAFE;
}

.hp-mobile__cat-content {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.4s ease;
}

.hp-mobile__cat.is-open .hp-mobile__cat-content {
    grid-template-rows: 1fr;
}

.hp-mobile__cat-inner {
    overflow: hidden;
    padding-bottom: 1rem;
}

.hp-mobile__cat-links {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hp-mobile__link {
    font-size: 0.9375rem;
    color: #445566;
    text-decoration: none;
    padding: 0.5rem 0;
}

.hp-mobile__link:active {
    color: var(--hp-accent);
}

/* Footer ya definido en sección de nuevos estilos */

/* Boton Contacto Movil */
.hp-mobile__contact-btn {
    display: block;
    width: 100%;
    padding: 1rem;
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    color: #ffffff;
    background: var(--hp-accent);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.hp-mobile__contact-btn:hover {
    background: #2ba0f0;
    transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════════
   MOBILE MENU - NUEVOS ESTILOS COMPLETOS
   ═══════════════════════════════════════════════════════════ */

/* Buscador móvil */
.hp-mobile__search {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(0, 34, 68, 0.08);
}

.hp-mobile__search form {
    display: flex;
    gap: 0.5rem;
    background: #f5f7fa;
    border-radius: 12px;
    padding: 0.5rem 1rem;
}

.hp-mobile__search input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1rem;
    color: #002244;
    outline: none;
}

.hp-mobile__search input::placeholder {
    color: #8899aa;
}

.hp-mobile__search button {
    background: none;
    border: none;
    color: #3BAAFE;
    cursor: pointer;
    padding: 0.25rem;
}

/* Subcategorías (para productos) */
.hp-mobile__subcat {
    border-bottom: 1px solid rgba(0, 34, 68, 0.06);
}

.hp-mobile__subcat:last-child {
    border-bottom: none;
}

.hp-mobile__subcat-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 0;
    background: none;
    border: none;
    font-size: 0.95rem;
    font-weight: 500;
    color: #002244;
    cursor: pointer;
    text-align: left;
}

.hp-mobile__subcat-btn.hp-mobile__subcat-link {
    color: #3BAAFE;
    text-decoration: none;
}

.hp-mobile__subcat-content {
    display: none;
    padding-bottom: 1rem;
}

.hp-mobile__subcat.is-open .hp-mobile__subcat-content {
    display: block;
}

.hp-mobile__subcat.is-open > .hp-mobile__subcat-btn .hp-mobile__cat-icon {
    transform: rotate(90deg);
}

/* Grid de productos con imágenes */
.hp-mobile__products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.625rem;
    margin-top: 0.5rem;
}

.hp-mobile__product-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid rgba(0, 34, 68, 0.08);
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.2s ease;
}

.hp-mobile__product-card:active {
    transform: scale(0.97);
    border-color: var(--hp-accent);
}

.hp-mobile__product-card img {
    width: 100%;
    height: 70px;
    object-fit: cover;
    background: #f5f7fa;
}

.hp-mobile__product-card span {
    padding: 0.5rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #002244;
    line-height: 1.25;
    text-align: center;
}

/* Grid de industrias - 2 columnas */
.hp-mobile__industries-grid {
    grid-template-columns: repeat(2, 1fr);
}

/* Enlaces de empresa con iconos */
.hp-mobile__empresa-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hp-mobile__empresa-links .hp-mobile__link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 12px;
    text-decoration: none;
}

.hp-mobile__empresa-links .hp-mobile__link i {
    font-size: 1.5rem;
    color: #3BAAFE;
}

.hp-mobile__empresa-links .hp-mobile__link div {
    display: flex;
    flex-direction: column;
}

.hp-mobile__empresa-links .hp-mobile__link strong {
    font-size: 0.95rem;
    color: #002244;
}

.hp-mobile__empresa-links .hp-mobile__link small {
    font-size: 0.8rem;
    color: #667788;
    margin-top: 0.125rem;
}

/* Sección Blog */
.hp-mobile__blog-section {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    margin-top: 0.5rem;
}

.hp-mobile__blog-featured {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    display: block;
    min-height: 120px;
    background: #f5f7fa;
}

.hp-mobile__blog-featured img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.hp-mobile__blog-featured-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.75rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.hp-mobile__blog-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    color: white;
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.hp-mobile__blog-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: white;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hp-mobile__blog-categories {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.hp-mobile__blog-label {
    font-size: 0.6875rem;
    font-weight: 600;
    color: #8899aa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.125rem;
}

.hp-mobile__blog-cat {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 0.75rem;
    background: #f8fafc;
    border-radius: 8px;
    text-decoration: none;
    color: #002244;
    font-size: 0.8125rem;
    font-weight: 500;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.hp-mobile__blog-cat:active {
    border-color: var(--hp-accent);
    background: #f0f7ff;
}

.hp-mobile__blog-cat-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.hp-mobile__blog-cat-count {
    margin-left: auto;
    font-size: 0.75rem;
    color: #8899aa;
    font-weight: 400;
}

.hp-mobile__blog-cta {
    display: block;
    text-align: center;
    padding: 0.75rem;
    background: #002244;
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8125rem;
    margin-top: 0.25rem;
    transition: all 0.2s ease;
}

.hp-mobile__blog-cta:active {
    background: #001a33;
    transform: scale(0.98);
}

/* Footer móvil mejorado - Fijo en la parte inferior */
.hp-mobile__footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem 1.25rem;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(0, 34, 68, 0.1);
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    background: #ffffff;
    box-shadow: 0 -4px 20px rgba(0, 34, 68, 0.08);
}

.hp-mobile__contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    font-weight: 600;
    font-size: 0.9375rem;
    border-radius: 10px;
}

.hp-mobile__langs {
    display: flex;
    justify-content: center;
    gap: 0.375rem;
    flex-wrap: wrap;
}

.hp-mobile__lang {
    padding: 0.5rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: 6px;
    background: #f5f7fa;
    border: 1px solid transparent;
    color: #445566;
    text-decoration: none;
    transition: all 0.2s ease;
}

.hp-mobile__lang:active {
    transform: scale(0.95);
}

.hp-mobile__lang.is-active {
    background: #002244;
    color: white;
    border-color: #002244;
}

/* ═══════════════════════════════════════════════════════════
   OVERLAY
   ═══════════════════════════════════════════════════════════ */
.hp-overlay {
    position: fixed;
    inset: 0;
    z-index: 998;
    background: rgba(0, 34, 68, 0.3);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s;
}

.hp-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

/* ═══════════════════════════════════════════════════════════
   SEARCH MODAL
   ═══════════════════════════════════════════════════════════ */
.hp-search {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
    background: rgba(0, 34, 68, 0.97);
    backdrop-filter: blur(20px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s;
}

.hp-search.is-open {
    opacity: 1;
    visibility: visible;
}

.hp-search__container {
    width: 100%;
    max-width: 700px;
    padding: 0 2rem;
}

.hp-search__close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hp-search__close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.hp-search__form {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease 0.1s, transform 0.4s ease 0.1s;
}

.hp-search.is-open .hp-search__form {
    opacity: 1;
    transform: translateY(0);
}

.hp-search__input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.hp-search__icon {
    display: none; /* Ocultar lupa */
}

.hp-search__input {
    width: 100%;
    padding: 1.5rem;
    font-size: 1.25rem;
    font-weight: 500;
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
    -webkit-text-fill-color: #ffffff; /* Safari fix */
}

.hp-search__input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Evitar que el autofill del navegador cambie colores */
.hp-search__input:-webkit-autofill,
.hp-search__input:-webkit-autofill:hover,
.hp-search__input:-webkit-autofill:focus {
    -webkit-text-fill-color: #ffffff !important;
    -webkit-box-shadow: 0 0 0px 1000px rgba(255, 255, 255, 0.1) inset !important;
    transition: background-color 5000s ease-in-out 0s;
}

.hp-search__input:focus {
    border-color: var(--hp-accent);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 4px rgba(59, 170, 254, 0.2);
}

.hp-search__hint {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
}

.hp-search__hint kbd {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-family: inherit;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

/* Autocomplete dropdown */
.hp-search__autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0.5rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: all 0.2s ease;
    max-height: 400px;
    overflow-y: auto;
}

.hp-search__autocomplete.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.hp-search__suggestions {
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
}

.hp-search__suggestion {
    border-bottom: 1px solid #f0f0f0;
}

.hp-search__suggestion:last-child {
    border-bottom: none;
}

.hp-search__suggestion-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1.25rem;
    text-decoration: none;
    color: #333;
    transition: all 0.15s ease;
}

.hp-search__suggestion-link:hover,
.hp-search__suggestion.is-selected .hp-search__suggestion-link {
    background: #f5f7fa;
}

.hp-search__suggestion-type {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    min-width: 70px;
    text-align: center;
}

.hp-search__suggestion-type--producto {
    background: #00A5DF;
    color: #ffffff;
}

.hp-search__suggestion-type--aplicacion {
    background: #6f42c1;
    color: #ffffff;
}

.hp-search__suggestion-type--blog {
    background: #fd7e14;
    color: #ffffff;
}

.hp-search__suggestion-type--industria {
    background: #20c997;
    color: #ffffff;
}

.hp-search__suggestion-type--proceso {
    background: #6c757d;
    color: #ffffff;
}

.hp-search__suggestion-title {
    flex: 1;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #212529;
}

.hp-search__suggestion-title mark {
    background: #fff3cd;
    color: inherit;
    padding: 0 2px;
    border-radius: 2px;
}

.hp-search__suggestion--all {
    background: #f8fafc;
    border-top: 2px solid #e9ecef;
}

.hp-search__suggestion--all .hp-search__suggestion-link {
    justify-content: space-between;
    color: #00A5DF;
    font-weight: 600;
}

.hp-search__suggestion--all .hp-search__suggestion-link:hover {
    background: #e7f5ff;
}

.hp-search__suggestion--all svg {
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════
   ANIMACIONES
   ═══════════════════════════════════════════════════════════ */
@keyframes megaFadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes megaCardUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .hp__nav, .hp__actions { display: none; }
    .hp__hamburger { display: flex; }
    .hp-mega { display: none; }
}

@media (max-width: 768px) {
    .hp-mega__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    .hp-mega__list { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .hp, .hp-mega, .hp-mobile, .hp-mega__card, .hp__nav-item::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* ═══════════════════════════════════════════════════════════
   HEROES GLOBALES - 100vh en desktop
   ═══════════════════════════════════════════════════════════ */
@media (min-width: 1025px) {
    /* Todos los heroes del proyecto a 100vh en desktop (excepto aplicaciones) */
    .blog-hero,
    .fab-hero,
    .contacto-hero,
    .ind-hero,
    .pro-hero,
    .cap-hero,
    .emp-hero,
    .home-hero,
    .page-hero {
        min-height: 100vh !important;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

/* Ajuste padding-top para compensar header fijo */
.blog-hero {
    padding-top: calc(var(--hp-height) + 2rem) !important;
}

.article-hero {
    padding-top: var(--hp-height) !important;
}
