/**
 * HEADER GLOBAL CAMAPE v3
 * Ubicación: components/header/header.css
 */

:root {
    --cp-primary: #00C853;
    --cp-secondary: #050505;

    --cp-white: #ffffff;
    --cp-black: #050505;
    --cp-text: #111111;
    --cp-muted: #667085;
    --cp-border: rgba(0,0,0,.10);
    --cp-panel: rgba(255,255,255,.94);
    --cp-panel-solid: #ffffff;
    --cp-soft: #E9FFF1;
    --cp-shadow: 0 18px 60px rgba(0,0,0,.14);
}

html[data-theme="dark"] {
    --cp-white: #050505;
    --cp-black: #ffffff;
    --cp-text: #ffffff;
    --cp-muted: rgba(255,255,255,.68);
    --cp-border: rgba(255,255,255,.14);
    --cp-panel: rgba(5,5,5,.90);
    --cp-panel-solid: #080808;
    --cp-soft: rgba(0,200,83,.12);
    --cp-shadow: 0 20px 70px rgba(0,0,0,.55);
}

body.cp-lock {
    overflow: hidden;
}

.cp-header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9990;
    color: var(--cp-text);
    font-family: inherit;
}

.cp-header * {
    box-sizing: border-box;
}

.cp-header a {
    color: inherit;
    text-decoration: none;
}

.cp-wrap {
    width: min(1220px, calc(100% - 34px));
    margin: 0 auto;
}

/* TOPBAR */
.cp-topbar {
    background: var(--cp-secondary);
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,.12);
    font-size: .78rem;
}

.cp-topbar-inner {
    min-height: 38px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}

.cp-topbar-left,
.cp-topbar-social {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cp-topbar-left span,
.cp-topbar-left a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: rgba(255,255,255,.78);
}

.cp-topbar-left a:hover {
    color: var(--cp-primary);
}

.cp-topbar-social a {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.82);
    transition: .22s ease;
}

.cp-topbar-social a:hover {
    background: var(--cp-primary);
    color: #fff;
    transform: translateY(-2px);
}

/* NAVBAR */
.cp-navbar {
    background: var(--cp-panel);
    border-bottom: 1px solid var(--cp-border);
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 32px rgba(0,0,0,.08);
}

.cp-header.is-scrolled .cp-navbar {
    box-shadow: var(--cp-shadow);
}

.cp-navbar-inner {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.cp-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 220px;
}

.cp-brand-logo {
    width: 50px;
    height: 50px;
    border-radius: 17px;
    background: #ffffff;
    border: 1px solid var(--cp-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(0,0,0,.12);
}

.cp-brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 5px;
}

.cp-brand-info {
    display: grid;
    line-height: 1.15;
}

.cp-brand-info strong {
    color: var(--cp-text);
    font-size: 1.05rem;
    font-weight: 950;
    letter-spacing: -.4px;
}

.cp-brand-info small {
    margin-top: 4px;
    max-width: 220px;
    color: var(--cp-muted);
    font-size: .72rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cp-brand-mini {
    min-width: 0;
}

.cp-brand-mini .cp-brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 14px;
}

/* DESKTOP NAV */
.cp-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.cp-nav a {
    position: relative;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    color: var(--cp-muted);
    font-size: .88rem;
    font-weight: 850;
    transition: .22s ease;
}

.cp-nav a:hover,
.cp-nav a.is-active {
    color: var(--cp-text);
    background: color-mix(in srgb, var(--cp-primary) 12%, transparent);
}

.cp-nav a.is-active::after {
    content: "";
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 5px;
    height: 2px;
    border-radius: 5px;
    background: var(--cp-primary);
}

/* ACTIONS */
.cp-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.cp-icon-btn,
.cp-access-btn,
.cp-menu-btn {
    border: 1px solid var(--cp-border);
    background: rgba(255,255,255,.08);
    color: var(--cp-text);
    cursor: pointer;
    transition: .22s ease;
}

.cp-icon-btn:hover,
.cp-access-btn:hover,
.cp-menu-btn:hover {
    border-color: var(--cp-primary);
    background: color-mix(in srgb, var(--cp-primary) 12%, transparent);
}

.cp-icon-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cp-moon {
    display: none;
}

html[data-theme="dark"] .cp-sun {
    display: none;
}

html[data-theme="dark"] .cp-moon {
    display: inline-block;
}

.cp-access-btn {
    min-height: 46px;
    padding: 0 15px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 900;
}

.cp-wa-btn {
    min-height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    background: var(--cp-primary);
    color: #fff !important;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-weight: 950;
    box-shadow: 0 14px 34px color-mix(in srgb, var(--cp-primary) 34%, transparent);
    transition: .22s ease;
}

.cp-wa-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.06);
}

.cp-menu-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.cp-menu-btn span {
    width: 20px;
    height: 2px;
    border-radius: 4px;
    background: var(--cp-text);
    transition: .22s ease;
}

.cp-menu-btn.is-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.cp-menu-btn.is-active span:nth-child(2) {
    opacity: 0;
}

.cp-menu-btn.is-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* MOBILE */
.cp-mobile-overlay,
.cp-access-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    background: rgba(0,0,0,.66);
    backdrop-filter: blur(10px);
}

.cp-mobile-overlay.is-open,
.cp-access-overlay.is-open {
    display: block;
}

.cp-mobile-panel {
    width: min(420px, calc(100% - 28px));
    height: calc(100vh - 28px);
    margin: 14px;
    margin-left: auto;
    padding: 18px;
    border-radius: 30px;
    background: var(--cp-panel-solid);
    border: 1px solid var(--cp-border);
    box-shadow: var(--cp-shadow);
    color: var(--cp-text);
    display: flex;
    flex-direction: column;
    animation: cpSlideIn .23s ease;
}

.cp-mobile-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--cp-border);
}

.cp-close-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--cp-border);
    background: transparent;
    color: var(--cp-text);
    cursor: pointer;
}

.cp-mobile-links {
    display: grid;
    gap: 10px;
    padding: 18px 0;
}

.cp-mobile-links a {
    min-height: 56px;
    border-radius: 20px;
    padding: 0 16px;
    background: color-mix(in srgb, var(--cp-primary) 8%, transparent);
    border: 1px solid var(--cp-border);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 900;
}

.cp-mobile-links a i {
    width: 36px;
    height: 36px;
    border-radius: 13px;
    background: var(--cp-primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cp-mobile-bottom {
    margin-top: auto;
    display: grid;
    gap: 10px;
}

.cp-mobile-wa,
.cp-mobile-theme {
    min-height: 54px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 950;
}

.cp-mobile-wa {
    background: var(--cp-primary);
    color: #fff !important;
}

.cp-mobile-theme {
    border: 1px solid var(--cp-border);
    background: transparent;
    color: var(--cp-text);
    cursor: pointer;
}

/* ACCESS */
.cp-access-overlay {
    align-items: center;
    justify-content: center;
    padding: 22px;
}

.cp-access-overlay.is-open {
    display: flex;
}

.cp-access-panel {
    width: min(940px, 100%);
    max-height: calc(100vh - 44px);
    overflow-y: auto;
    padding: 22px;
    border-radius: 32px;
    background: var(--cp-panel-solid);
    border: 1px solid var(--cp-border);
    box-shadow: var(--cp-shadow);
    color: var(--cp-text);
    animation: cpPop .22s ease;
}

.cp-access-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--cp-border);
}

.cp-access-head strong {
    display: block;
    font-size: 1.4rem;
    font-weight: 950;
}

.cp-access-head small {
    display: block;
    margin-top: 4px;
    color: var(--cp-muted);
}

.cp-access-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    padding-top: 18px;
}

.cp-access-grid a {
    min-height: 150px;
    padding: 20px;
    border-radius: 24px;
    background: color-mix(in srgb, var(--cp-primary) 8%, transparent);
    border: 1px solid var(--cp-border);
    transition: .22s ease;
}

.cp-access-grid a:hover {
    border-color: var(--cp-primary);
    transform: translateY(-4px);
}

.cp-access-grid i {
    width: 50px;
    height: 50px;
    border-radius: 18px;
    margin-bottom: 14px;
    background: var(--cp-primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.cp-access-grid strong {
    display: block;
    margin-bottom: 7px;
    font-weight: 950;
}

.cp-access-grid span {
    display: block;
    color: var(--cp-muted);
    line-height: 1.55;
    font-size: .9rem;
}

/* ANIMATION */
@keyframes cpSlideIn {
    from {
        opacity: 0;
        transform: translateX(24px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes cpPop {
    from {
        opacity: 0;
        transform: scale(.96);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* RESPONSIVE */
@media (max-width: 1120px) {
    .cp-nav {
        display: none;
    }

    .cp-menu-btn {
        display: inline-flex;
    }

    .cp-access-btn span {
        display: none;
    }
}

@media (max-width: 760px) {
    .cp-topbar {
        display: none;
    }

    .cp-navbar-inner {
        min-height: 72px;
    }

    .cp-brand {
        min-width: 0;
    }

    .cp-brand-info small {
        display: none;
    }

    .cp-brand-logo {
        width: 44px;
        height: 44px;
        border-radius: 15px;
    }

    .cp-wa-btn {
        display: none;
    }

    .cp-access-grid {
        grid-template-columns: 1fr;
    }

    .cp-access-grid a {
        min-height: auto;
    }
}

@media (max-width: 460px) {
    .cp-wrap {
        width: min(100% - 22px, 1220px);
    }

    .cp-icon-btn,
    .cp-access-btn,
    .cp-menu-btn {
        width: 42px;
        height: 42px;
        padding: 0;
        justify-content: center;
    }
}