/* ==========================================================
   CABECALHO PREMIUM - receitasqueadoro.com.br
   /css/cabecalho-site.css
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800;900&display=swap');

/* ===== RESET E BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== CABEÇALHO PRINCIPAL ===== */
.cabecalho-container {
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 2px solid rgba(234, 89, 0, 0.12);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 10000;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.cabecalho-container.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 8px 40px rgba(234, 89, 0, 0.10);
    border-bottom-color: #EA5900;
}

/* ===== INNER WRAPPER ===== */
.cabecalho-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ===== LOGO ===== */
.cabecalho-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.cabecalho-logo img {
    height: 48px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cabecalho-logo:hover img {
    transform: scale(1.04);
    filter: drop-shadow(0 4px 12px rgba(234, 89, 0, 0.15));
}

/* ===== MENU PRINCIPAL ===== */
.cabecalho-menu {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
}

.cabecalho-menu-item {
    position: relative;
    padding: 10px 22px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: #2D2D2D;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    background: transparent;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Hover com glassmorphism */
.cabecalho-menu-item::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 10px;
    background: rgba(234, 89, 0, 0.06);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.cabecalho-menu-item:hover::before {
    opacity: 1;
}

.cabecalho-menu-item:hover {
    color: #EA5900;
    transform: translateY(-2px);
}

/* Linha animada no hover */
.cabecalho-menu-item::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    width: 0;
    height: 2.5px;
    background: #EA5900;
    border-radius: 4px;
    transform: translateX(-50%);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 20px rgba(234, 89, 0, 0.25);
}

.cabecalho-menu-item:hover::after {
    width: 50%;
}

/* Estado ativo */
.cabecalho-menu-item.ativo {
    color: #FFFFFF;
    background: linear-gradient(135deg, #EA5900, #D64D00);
    box-shadow: 0 4px 20px rgba(234, 89, 0, 0.30);
}

.cabecalho-menu-item.ativo::before {
    opacity: 0;
}

.cabecalho-menu-item.ativo::after {
    display: none;
}

.cabecalho-menu-item.ativo:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(234, 89, 0, 0.40);
}

/* ===== BADGE DE FAVORITOS ===== */
.cabecalho-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    background: linear-gradient(135deg, #FF3366, #FF0044);
    color: #FFFFFF;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 800;
    border-radius: 50%;
    line-height: 1;
    box-shadow: 0 2px 12px rgba(255, 0, 68, 0.35);
    animation: pulse-badge 2.5s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

/* ===== USUÁRIO LOGADO ===== */
.cabecalho-usuario {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 16px 6px 10px;
    background: rgba(234, 89, 0, 0.06);
    border: 1px solid rgba(234, 89, 0, 0.10);
    border-radius: 50px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cabecalho-usuario:hover {
    background: rgba(234, 89, 0, 0.10);
    border-color: rgba(234, 89, 0, 0.20);
}

.cabecalho-usuario .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #EA5900, #FF8C42);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(234, 89, 0, 0.25);
    flex-shrink: 0;
}

.cabecalho-usuario .nome {
    color: #2D2D2D;
    font-weight: 600;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== TOGGLE MOBILE ===== */
.cabecalho-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    padding: 10px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.cabecalho-toggle:hover {
    background: rgba(234, 89, 0, 0.06);
}

.cabecalho-toggle span {
    display: block;
    width: 28px;
    height: 2.5px;
    background: #2D2D2D;
    border-radius: 4px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: center;
}

.cabecalho-toggle.aberto span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5.5px);
    background: #EA5900;
}

.cabecalho-toggle.aberto span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.cabecalho-toggle.aberto span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5.5px);
    background: #EA5900;
}

/* ==========================================================
   BOTÃO WHATSAPP MOBILE - FORA DO MENU
   ========================================================== */

.cabecalho-whatsapp-mobile {
    display: none;
    position: relative;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #ffffff;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.40);
    border: 2px solid rgba(255, 255, 255, 0.25);
    transition: all 0.3s ease;
    animation: whatsapp-glow-mobile 2.5s ease-in-out infinite;
    flex-shrink: 0;
    margin-right: 8px;
}

.cabecalho-whatsapp-mobile:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.60);
}

.cabecalho-whatsapp-mobile:active {
    transform: scale(0.92);
}

.cabecalho-whatsapp-mobile .whatsapp-pulse-mobile {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 14px;
    height: 14px;
    background: #ff0044;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 0 rgba(255, 0, 68, 0.7);
    animation: whatsapp-pulse-dot-mobile 1.8s ease-in-out infinite;
}

.cabecalho-whatsapp-mobile i {
    font-size: 20px;
    line-height: 1;
}

@keyframes whatsapp-glow-mobile {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.40);
    }
    50% {
        box-shadow: 0 4px 35px rgba(37, 211, 102, 0.65);
    }
}

@keyframes whatsapp-pulse-dot-mobile {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(255, 0, 68, 0.7);
    }
    50% {
        transform: scale(1.5);
        opacity: 0.8;
        box-shadow: 0 0 0 6px rgba(255, 0, 68, 0);
    }
}

/* ==========================================================
   BOTÃO WHATSAPP PREMIUM - GRUPO (DENTRO DO MENU)
   ========================================================== */

.cabecalho-whatsapp {
    position: relative;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%) !important;
    color: #ffffff !important;
    border-radius: 50px !important;
    padding: 10px 28px !important;
    margin: 0 4px !important;
    font-weight: 800 !important;
    font-size: 13px !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 4px 25px rgba(37, 211, 102, 0.45);
    border: 2px solid rgba(255, 255, 255, 0.25);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: whatsapp-glow 2.5s ease-in-out infinite;
    text-transform: uppercase;
    overflow: visible;
}

.cabecalho-whatsapp .icon {
    font-size: 1.3em;
    animation: whatsapp-bounce 1.8s ease-in-out infinite;
    display: inline-block;
}

.cabecalho-whatsapp:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 45px rgba(37, 211, 102, 0.60);
    background: linear-gradient(135deg, #2ad76a 0%, #14a085 100%) !important;
    border-color: rgba(255, 255, 255, 0.45);
}

.cabecalho-whatsapp:active {
    transform: scale(0.96);
    box-shadow: 0 2px 15px rgba(37, 211, 102, 0.30);
}

/* Pulsar de notificação */
.cabecalho-whatsapp .whatsapp-pulse {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 16px;
    height: 16px;
    background: #ff0044;
    border-radius: 50%;
    border: 2.5px solid #ffffff;
    box-shadow: 0 0 0 0 rgba(255, 0, 68, 0.7);
    animation: whatsapp-pulse-dot 1.8s ease-in-out infinite;
}

/* ===== ANIMAÇÕES ===== */

@keyframes whatsapp-glow {
    0%, 100% {
        box-shadow: 0 4px 25px rgba(37, 211, 102, 0.45);
    }
    50% {
        box-shadow: 0 4px 50px rgba(37, 211, 102, 0.70);
    }
}

@keyframes whatsapp-bounce {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    30% {
        transform: scale(1.2) rotate(-8deg);
    }
    60% {
        transform: scale(1.1) rotate(5deg);
    }
}

@keyframes whatsapp-pulse-dot {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(255, 0, 68, 0.7);
    }
    50% {
        transform: scale(1.4);
        opacity: 0.8;
        box-shadow: 0 0 0 8px rgba(255, 0, 68, 0);
    }
}

/* ==========================================================
   RESPONSIVIDADE
   ========================================================== */

/* Tablet */
@media screen and (max-width: 1024px) {
    .cabecalho-inner {
        padding: 0 24px;
        height: 68px;
    }

    .cabecalho-menu-item {
        padding: 8px 16px;
        font-size: 12px;
    }

    .cabecalho-logo img {
        height: 40px;
    }

    .cabecalho-whatsapp {
        padding: 8px 18px !important;
        font-size: 11px !important;
    }
    
    .cabecalho-whatsapp .whatsapp-pulse {
        width: 13px;
        height: 13px;
        top: -3px;
        right: -3px;
        border-width: 2px;
    }
}

/* Mobile */
@media screen and (max-width: 768px) {
    .cabecalho-inner {
        padding: 0 16px;
        height: 60px;
    }

    .cabecalho-logo img {
        height: 36px;
        max-width: 140px;
    }

    .cabecalho-toggle {
        display: flex;
    }

    /* Exibe botão WhatsApp fora do menu no mobile */
    .cabecalho-whatsapp-mobile {
        display: flex;
    }

    /* Esconde botão WhatsApp dentro do menu no mobile */
    .cabecalho-whatsapp {
        display: none !important;
    }

    .cabecalho-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        padding: 16px 20px 24px;
        gap: 4px;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 2px solid rgba(234, 89, 0, 0.15);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.10);
        border-radius: 0 0 16px 16px;
        animation: slideDown 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .cabecalho-menu.aberto {
        display: flex;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px) scale(0.98);
        }
        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }

    .cabecalho-menu-item {
        padding: 14px 18px;
        font-size: 13px;
        justify-content: center;
        border-radius: 8px;
    }

    .cabecalho-menu-item::after {
        display: none;
    }

    .cabecalho-menu-item.ativo {
        background: linear-gradient(135deg, #EA5900, #D64D00);
        color: #FFFFFF;
        box-shadow: 0 4px 20px rgba(234, 89, 0, 0.30);
    }

    .cabecalho-usuario {
        display: none;
    }
}

/* Mobile pequeno */
@media screen and (max-width: 400px) {
    .cabecalho-inner {
        padding: 0 12px;
        height: 54px;
    }

    .cabecalho-logo img {
        height: 30px;
        max-width: 120px;
    }

    .cabecalho-menu-item {
        padding: 12px 14px;
        font-size: 12px;
    }

    .cabecalho-whatsapp-mobile {
        width: 38px;
        height: 38px;
        font-size: 16px;
        margin-right: 4px;
    }

    .cabecalho-whatsapp-mobile i {
        font-size: 16px;
    }

    .cabecalho-whatsapp-mobile .whatsapp-pulse-mobile {
        width: 12px;
        height: 12px;
        top: -2px;
        right: -2px;
        border-width: 1.5px;
    }
}

/* Desktop - esconde botão fora do menu */
@media screen and (min-width: 769px) {
    .cabecalho-whatsapp-mobile {
        display: none !important;
    }
}

/* ===== IMPRESSÃO ===== */
@media print {
    .cabecalho-container {
        position: static;
        background: #FFFFFF !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        border-bottom: 1px solid #333;
        box-shadow: none !important;
    }

    .cabecalho-menu,
    .cabecalho-toggle,
    .cabecalho-usuario {
        display: none !important;
    }

    .cabecalho-inner {
        justify-content: center;
        height: auto;
        padding: 20px 0;
    }

    .cabecalho-logo img {
        height: 60px;
    }
}

/* ==========================================================
   DARK MODE - Suporte automático
   ========================================================== */

@media (prefers-color-scheme: dark) {
    .cabecalho-whatsapp {
        box-shadow: 0 4px 30px rgba(37, 211, 102, 0.55);
        border-color: rgba(255, 255, 255, 0.30);
    }
    
    .cabecalho-whatsapp:hover {
        box-shadow: 0 8px 50px rgba(37, 211, 102, 0.75);
    }

    .cabecalho-whatsapp-mobile {
        box-shadow: 0 4px 25px rgba(37, 211, 102, 0.50);
    }

    .cabecalho-whatsapp-mobile:hover {
        box-shadow: 0 6px 35px rgba(37, 211, 102, 0.70);
    }
}

/* ==========================================================
   BOTÃO WHATSAPP MOBILE COM TEXTO
   ========================================================== */

.cabecalho-whatsapp-mobile {
    display: none;
    position: relative;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #ffffff;
    border-radius: 50px;
    padding: 6px 14px 6px 10px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.40);
    border: 2px solid rgba(255, 255, 255, 0.25);
    transition: all 0.3s ease;
    animation: whatsapp-glow-mobile 2.5s ease-in-out infinite;
    flex-shrink: 0;
    margin-right: 8px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.cabecalho-whatsapp-mobile i {
    font-size: 16px;
    line-height: 1;
}

.cabecalho-whatsapp-mobile .whatsapp-mobile-text {
    font-size: clamp(8px, 1.8vw, 11px);
}

.cabecalho-whatsapp-mobile:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.60);
}

.cabecalho-whatsapp-mobile:active {
    transform: scale(0.95);
}

.cabecalho-whatsapp-mobile .whatsapp-pulse-mobile {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 14px;
    height: 14px;
    background: #ff0044;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 0 rgba(255, 0, 68, 0.7);
    animation: whatsapp-pulse-dot-mobile 1.8s ease-in-out infinite;
}

/* Mobile - exibe o botão com texto */
@media screen and (max-width: 768px) {
    .cabecalho-whatsapp-mobile {
        display: flex;
    }
}

@media screen and (max-width: 400px) {
    .cabecalho-whatsapp-mobile {
        padding: 4px 10px 4px 8px;
        font-size: 9px;
        border-radius: 30px;
        margin-right: 4px;
    }
    
    .cabecalho-whatsapp-mobile i {
        font-size: 12px;
    }
    
    .cabecalho-whatsapp-mobile .whatsapp-mobile-text {
        font-size: clamp(6px, 1.5vw, 9px);
    }
    
    .cabecalho-whatsapp-mobile .whatsapp-pulse-mobile {
        width: 10px;
        height: 10px;
        top: -3px;
        right: -3px;
        border-width: 1.5px;
    }
}

/* Desktop - esconde o botão mobile */
@media screen and (min-width: 769px) {
    .cabecalho-whatsapp-mobile {
        display: none !important;
    }
}