.cerbero-menu {
    width: 80%;
    margin: -12px auto 30px auto;
    padding: 10px;
    border: 1px solid var(--border, #30363d);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(22, 27, 34, 0.94), rgba(13, 17, 23, 0.97));
    box-shadow:
        0 0 25px rgba(88, 166, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.cerbero-menu-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.cerbero-menu-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 11px 12px;
    border: 1px solid rgba(48, 54, 61, 0.58);
    border-radius: 10px;
    background: rgba(7, 11, 17, 0.78);
    color: #c9d1d9;
    text-decoration: none;
    overflow: hidden;
    cursor: pointer;
    font: inherit;
    box-sizing: border-box;
    isolation: isolate;
    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        background 0.18s ease,
        box-shadow 0.18s ease;
}

.cerbero-menu-item::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image: url("https://recursos.cerberoshield.es/LogoCerberoshield591ghdFGJf6gn1fg+j.png");
    background-position: center -7px;
    background-size: 138px auto;
    background-repeat: no-repeat;
    opacity: 0.15;
    filter: grayscale(0.15) contrast(1.22) brightness(1.12) saturate(0.9);
    transform: scale(1);
    transition:
        opacity 0.22s ease,
        transform 0.22s ease,
        filter 0.22s ease,
        background-position 0.22s ease;
    pointer-events: none;
}

.cerbero-menu-item::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at center 24%, rgba(88, 166, 255, 0.08), transparent 58%),
        linear-gradient(180deg, rgba(15, 22, 32, 0.88), rgba(7, 11, 17, 0.95));
    opacity: 0.93;
    pointer-events: none;
}

.cerbero-menu-item:hover {
    transform: translateY(-2px);
    border-color: rgba(88, 166, 255, 0.60);
    background: rgba(88, 166, 255, 0.07);
    box-shadow: 0 0 18px rgba(88, 166, 255, 0.12);
}

.cerbero-menu-item:hover::before {
    opacity: 0.22;
    transform: scale(1.05);
    background-position: center -5px;
    filter: grayscale(0) contrast(1.28) brightness(1.18) saturate(1.05);
}

.cerbero-menu-item.is-active {
    border-color: rgba(88, 166, 255, 0.78);
    background: rgba(88, 166, 255, 0.08);
    box-shadow:
        0 0 18px rgba(88, 166, 255, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.cerbero-menu-item.is-active::before {
    opacity: 0.28;
    transform: scale(1.05);
    background-position: center -5px;
    filter: grayscale(0) contrast(1.32) brightness(1.2) saturate(1.08);
}

.cerbero-menu-copy {
    position: relative;
    z-index: 2;
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.cerbero-menu-copy strong {
    color: var(--accent, #58a6ff);
    font-size: 0.82em;
    line-height: 1.2;
    letter-spacing: 0.55px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 0 10px rgba(88, 166, 255, 0.24);
}

.cerbero-menu-item.is-active .cerbero-menu-copy strong {
    color: #d8ecff;
}

.cerbero-menu-icon {
    display: none !important;
}

.cerbero-menu-contact-trigger {
    appearance: none;
    -webkit-appearance: none;
}

.cerbero-menu-item:focus-visible,
.cerbero-contact-close:focus-visible,
.cerbero-contact-action:focus-visible,
.cerbero-contact-email:focus-visible {
    outline: 2px solid var(--accent, #58a6ff);
    outline-offset: 3px;
}

body.cerbero-modal-open {
    overflow: hidden;
}

.cerbero-contact-modal[hidden] {
    display: none;
}

.cerbero-contact-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
}

.cerbero-contact-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(1, 4, 9, 0.78);
    backdrop-filter: blur(7px);
    opacity: 0;
    transition: opacity 0.18s ease;
}

.cerbero-contact-window {
    position: relative;
    z-index: 1;
    width: min(720px, 96vw);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    isolation: isolate;
    border: 1px solid var(--border, #30363d);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(22, 27, 34, 0.96), rgba(13, 17, 23, 0.98));
    box-shadow:
        0 20px 80px rgba(0, 0, 0, 0.82),
        0 0 45px rgba(88, 166, 255, 0.12);
    transform: translateY(10px) scale(0.98);
    opacity: 0;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.cerbero-contact-window::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: url("https://recursos.cerberoshield.es/LogoCerberoshield591ghdFGJf6gn1fg+j.png");
    background-repeat: no-repeat;
    background-position: center 56px;
    background-size: 420px auto;
    opacity: 0.20;
    filter: grayscale(0.04) contrast(1.28) brightness(1.16) saturate(1.06);
    pointer-events: none;
}

.cerbero-contact-window::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(circle at center 30%, rgba(88, 166, 255, 0.13), transparent 46%),
        linear-gradient(180deg, rgba(13, 17, 23, 0.54), rgba(13, 17, 23, 0.90));
    pointer-events: none;
}

.cerbero-contact-modal.is-open .cerbero-contact-backdrop,
.cerbero-contact-modal.is-open .cerbero-contact-window {
    opacity: 1;
}

.cerbero-contact-modal.is-open .cerbero-contact-window {
    transform: translateY(0) scale(1);
}

.cerbero-contact-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 4;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(139, 148, 158, 0.35);
    border-radius: 9px;
    background: rgba(13, 17, 23, 0.78);
    color: #c9d1d9;
    font-size: 1.45em;
    line-height: 1;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.cerbero-contact-close:hover {
    border-color: rgba(88, 166, 255, 0.65);
    background: rgba(88, 166, 255, 0.12);
    color: #ffffff;
}

.cerbero-contact-header {
    position: relative;
    z-index: 2;
    padding: 28px 56px 24px 32px;
    text-align: center;
    border-bottom: 1px solid var(--border, #30363d);
    background:
        linear-gradient(180deg, rgba(22, 27, 34, 0.84), rgba(13, 17, 23, 0.68));
    backdrop-filter: blur(1.5px);
}

.cerbero-contact-main {
    margin: 0;
    font-weight: 900;
    font-size: 1.55em;
    letter-spacing: 4px;
    text-transform: uppercase;
    background: linear-gradient(to right, #ffffff, var(--accent, #58a6ff));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cerbero-contact-sub {
    margin-top: 8px;
    color: #8b949e;
    font-size: 0.78em;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.cerbero-contact-body {
    position: relative;
    z-index: 2;
    padding: 28px 32px 30px;
    color: #c9d1d9;
    background: rgba(13, 17, 23, 0.64);
    backdrop-filter: blur(1.5px);
    overflow-y: auto;
}

.cerbero-contact-card {
    position: relative;
    z-index: 2;
    padding: 22px 18px;
    margin-bottom: 18px;
    border: 1px solid rgba(88, 166, 255, 0.34);
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(88, 166, 255, 0.16), rgba(22, 27, 34, 0.58));
    backdrop-filter: blur(2px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    text-align: center;
}

.cerbero-contact-label {
    margin-bottom: 9px;
    color: #8b949e;
    font-size: 0.76em;
    font-weight: 800;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    text-align: center;
}

.cerbero-contact-email {
    display: inline-block;
    color: var(--accent, #58a6ff);
    font-size: 1.25em;
    font-weight: 900;
    text-align: center;
    text-decoration: none;
    word-break: break-word;
}

.cerbero-contact-email:hover {
    text-decoration: underline;
}

.cerbero-contact-body p {
    position: relative;
    z-index: 2;
    margin: 0 0 18px 0;
    color: #c9d1d9;
    font-size: 0.96em;
    line-height: 1.65;
}

.cerbero-contact-notice {
    position: relative;
    z-index: 2;
    margin: 0 0 20px 0;
    padding: 14px 16px;
    border: 1px solid rgba(210, 153, 34, 0.32);
    border-radius: 10px;
    background: rgba(18, 17, 12, 0.72);
    color: #d6d0c4;
    font-size: 0.9em;
    line-height: 1.55;
    backdrop-filter: blur(1.5px);
}

.cerbero-contact-notice strong {
    color: #f0c674;
}

.cerbero-contact-footer {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 16px 24px;
    border-top: 1px solid var(--border, #30363d);
    background: rgba(13, 17, 23, 0.72);
    backdrop-filter: blur(1.5px);
    color: #8b949e;
    font-size: 0.78em;
    font-weight: 700;
}

.cerbero-contact-status {
    display: inline-flex;
    align-items: center;
    color: #2ea043;
    text-transform: uppercase;
}

.cerbero-contact-status i {
    width: 9px;
    height: 9px;
    margin-right: 8px;
    border-radius: 50%;
    background: #2ea043;
    box-shadow: 0 0 10px #2ea043;
    animation: cerberoContactPulse 2s infinite;
}

@keyframes cerberoContactPulse {
    0% { opacity: 1; transform: scale(0.95); }
    50% { opacity: 0.55; transform: scale(1.12); }
    100% { opacity: 1; transform: scale(0.95); }
}

@media (max-width: 1040px) {
    .cerbero-menu {
        width: 84%;
    }

    .cerbero-menu-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .cerbero-menu {
        width: 88%;
        margin-top: -8px;
    }

    .cerbero-menu-grid {
        grid-template-columns: 1fr;
    }

    .cerbero-menu-item {
        justify-content: center;
    }

    .cerbero-contact-modal {
        padding: 12px;
    }

    .cerbero-contact-window::before {
        background-position: center 72px;
        background-size: 330px auto;
        opacity: 0.17;
    }

    .cerbero-contact-header {
        padding: 24px 50px 20px 22px;
    }

    .cerbero-contact-main {
        font-size: 1.18em;
        letter-spacing: 2.4px;
    }

    .cerbero-contact-body {
        padding: 22px;
    }

    .cerbero-contact-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Footer común CerberoShield: contador global y estado operativo */
.footer-bar {
    background: #0d1117;
    padding: 20px 30px;
    border-top: 1px solid var(--border, #30363d);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    font-size: 0.85em;
    color: #8b949e;
    box-sizing: border-box;
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.footer-stats {
    font-size: 0.82em;
    color: #8b949e;
    letter-spacing: 0.2px;
}

.footer-stats .stats-number {
    color: #2ea043;
    font-weight: 800;
}

.footer-stats .footer-separator {
    color: #30363d;
    margin: 0 8px;
}

.footer-status {
    color: #2ea043;
    font-weight: bold;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

@media (max-width: 760px) {
    .footer-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .footer-status {
        white-space: normal;
    }
}
