/*=====================================
  Estilo para a seção de tags do blog
=====================================*/
.blog-tags {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 18px 16px 12px 16px;
    margin: 20px 0 25px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.blog-tags-titulo {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
    letter-spacing: 0.5px;
}

.blog-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.blog-tag {
    display: inline-block;
    background: #e3e7ed;
    color: #2a3b4d;
    font-size: 0.60rem;
    padding: 6px 14px;
    border-radius: 20px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    border: 1px solid #d1d9e6;
    box-shadow: 0 1px 2px rgba(44, 62, 80, 0.04);
    margin-bottom: 4px;
}

.blog-tag:hover,
.blog-tag:focus {
    background: #2a3b4d;
    color: #fff;
    border-color: #2a3b4d;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.08);
    text-decoration: none;
}

/* Responsivo: .blog-tag menor em smartphones */
@media (max-width: 600px) {
    .blog-tag {
        font-size: 0.48rem;
        padding: 4px 9px;
        border-radius: 14px;
    }
}

/* Edição atual */
.box-edicao-atual {
    color: #ffffff;
    background-color: #348899;
    display: block;
    line-height: 1.4;
    margin-bottom: 10px;
    text-align: center;
    padding-top: 10px;
    padding-bottom: 20px;
}

/*===========================
  Social Button CSS (Melhorado)
============================ */
.row-centered {
    text-align: center;
}

.col-centered {
    display: inline-block;
    float: none;
    margin-right: -4px;
}

.social-meta {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.share-btns {
    padding-top: 1rem;
    padding-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.share-btn_old {
    display: flex;
    align-items: center;
    gap: 0.5em;
    color: #fff;
    border: none;
    padding: 0.5em 1.2em;
    border-radius: 30px;
    font-size: 1em;
    font-weight: 600;
    margin: 0 0.2em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition:
        background 0.2s,
        box-shadow 0.2s,
        transform 0.15s,
        opacity 0.2s;
    cursor: pointer;
    text-decoration: none;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 0.4em;
    color: #fff;
    border: none;
    padding: 0.18em 0.5em;
    /* menor */
    border-radius: 12px;
    /* menor */
    font-size: 0.75em;
    /* menor */
    font-weight: 600;
    margin: 0 0.15em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition:
        background 0.2s,
        box-shadow 0.2s,
        transform 0.15s,
        opacity 0.2s;
    cursor: pointer;
    text-decoration: none;
}

.share-btn i {
    font-size: 1em;
    /* menor */
    margin-right: 0.2em;
    /* menor */
}

.share-btn:focus,
.share-btn:hover {
    opacity: 0.92;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    transform: translateY(-2px) scale(1.04);
    text-decoration: none;
}

.share-btn:active {
    color: #e2e2e2;
    transform: scale(0.98);
}

.share-btn.twitter {
    background: linear-gradient(135deg, #55acee 60%, #2795e9 100%);
}

.share-btn.facebook {
    background: linear-gradient(135deg, #3b5998 60%, #30487b 100%);
}

.share-btn.reddit {
    background: linear-gradient(135deg, #ff5700 60%, #c44100 100%);
}

.share-btn.hackernews {
    background: linear-gradient(135deg, #ff6600 60%, #c44d00 100%);
}

.share-btn.linkedin {
    background: linear-gradient(135deg, #4875b4 60%, #25497d 100%);
}

.share-btn.telegram {
    background: linear-gradient(135deg, #0088cc 60%, #005f8c 100%);
}

.share-btn.pinterest {
    background: linear-gradient(135deg, #e60023 60%, #b8001b 100%);
}

.share-btn.tumblr {
    background: linear-gradient(135deg, #36465d 60%, #222f3e 100%);
}

.share-btn.pocket {
    background: linear-gradient(135deg, #ef4056 60%, #b92b3a 100%);
}

.share-btn.whatsapp {
    background: linear-gradient(135deg, #25d366 60%, #1ebc5a 100%);
}

.share-btn.email {
    background: linear-gradient(135deg, #444444 60%, #222222 100%);
}

/* Responsivo: botões menores em telas pequenas */
@media (max-width: 480px) {
    .share-btn {
        font-size: 0.95em;
        padding: 0.35em 0.9em;
        border-radius: 22px;
    }

    .share-btn i {
        font-size: 1.1em;
        margin-right: 0.25em;
    }

    .share-btns {
        gap: 0.3em;
    }
}

/* Responsivo: ainda menores em telas pequenas */
@media (max-width: 600px) {
    .share-btn {
        font-size: 0.88em;
        padding: 0.28em 0.7em;
        border-radius: 18px;
    }

    .share-btn i {
        font-size: 1em;
    }

    .share-btns {
        gap: 0.18em;
    }
}

/*=====================================
  Acessibilidade - Alto Contraste
  e botões flutuantes
=====================================*/
.high-contrast {
    background-color: #000 !important;
    color: #fff !important;
}

.high-contrast a {
    color: #00ffff !important;
    text-decoration: underline !important;
}

.high-contrast button,
.high-contrast .btn {
    background-color: #000 !important;
    color: #ffff00 !important;
    border: 2px solid #ffff00 !important;
}

.high-contrast * {
    box-shadow: none !important;
    text-shadow: none !important;
}

.high-contrast img {
    border: 2px solid #ffff00 !important;
}

/* Garantir que os flutuantes sigam fixos mesmo em alto contraste */
body.high-contrast .btn-whatsapp-pulse,
body.high-contrast .accessibility-toggle,
body.high-contrast .darkmode-trigger {
    position: fixed;
    filter: none;
}

/* Tooltips flutuantes */
.floating-tooltip {
    position: relative;
}
.floating-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    transform: translate(0, -50%);
    background: #000;
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    z-index: 120;
    white-space: nowrap;
}
.floating-tooltip::before {
    content: "";
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translate(2px, -50%) rotate(45deg);
    width: 8px;
    height: 8px;
    background: #000;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 119;
}
.floating-tooltip:hover::after,
.floating-tooltip:focus-visible::after {
    opacity: 1;
    transform: translate(-4px, -50%);
}
.floating-tooltip:hover::before,
.floating-tooltip:focus-visible::before {
    opacity: 1;
    transform: translate(2px, -50%) rotate(45deg);
}

/* Reafirma posição fixa dos botões com tooltip */
.btn-whatsapp-pulse.floating-tooltip,
.accessibility-toggle.floating-tooltip,
.darkmode-trigger.floating-tooltip,
.scroll-top.floating-tooltip {
    position: fixed;
}

/* Ajustes mobile para alinhamento dos botões flutuantes */
@media (max-width: 768px) {
    .btn-whatsapp-pulse,
    .btn-whatsapp-pulse-border,
    .accessibility-toggle,
    .darkmode-trigger,
    .scroll-top {
        right: 34px;
    }
    .btn-whatsapp-pulse,
    .btn-whatsapp-pulse-border {
        width: 48px;
        height: 48px;
        font-size: 20px;
        bottom: 72px;
    }
    .btn-whatsapp-pulse-border::before {
        inset: -4px;
        border-width: 3px;
    }
    .accessibility-toggle {
        width: 48px;
        height: 48px;
        bottom: 128px;
    }
    .darkmode-trigger {
        width: 48px;
        height: 48px;
        bottom: 184px;
    }
    .darkmode-trigger .icon::before {
        font-size: 18px;
    }
    .scroll-top {
        width: 44px;
        height: 44px;
        right: 34px;
        bottom: -70px;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease, transform 0.2s ease, bottom 0.2s ease;
    }
    .scroll-top.open {
        bottom: 18px;
        opacity: 1;
        pointer-events: auto;
    }
}

/* Botões flutuantes - estados padrão (escondidos até scroll) */
.btn-whatsapp-pulse,
.accessibility-toggle,
.darkmode-trigger {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px) scale(0.95);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

body.floating-buttons-visible .btn-whatsapp-pulse,
body.floating-buttons-visible .accessibility-toggle,
body.floating-buttons-visible .darkmode-trigger {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

/* Botão WhatsApp (pulse) */
.btn-whatsapp-pulse {
    position: fixed;
    right: 30px;
    bottom: 90px;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    font-size: 22px;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    z-index: 99;
    animation: whatsappPulse 1.6s ease-out infinite;
    transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-whatsapp-pulse:hover {
    color: #fff;
    transform: translateY(0) scale(1.08);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.32);
}

.btn-whatsapp-pulse-border {
    right: 30px;
    bottom: 90px;
}

.btn-whatsapp-pulse-border::before {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 4px solid #25d366;
    opacity: 0.75;
    animation: whatsappPulseBorder 1.6s ease-out infinite;
}

@keyframes whatsappPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.45);
    }
    70% {
        box-shadow: 0 0 0 18px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

@keyframes whatsappPulseBorder {
    0% {
        transform: scale(1);
        opacity: 0.75;
    }
    80% {
        transform: scale(1.28);
        opacity: 0;
    }
    100% {
        transform: scale(1.28);
        opacity: 0;
    }
}

/* Botão Alto Contraste */
.accessibility-toggle {
    position: fixed;
    right: 30px;
    bottom: 154px;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid #ffeb3b;
    background: #0b0b0b;
    color: #ffeb3b;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    z-index: 99;
    cursor: pointer;
    animation: accessibilityPulse 2s ease-out infinite;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.accessibility-toggle .fa-universal-access {
    font-size: 22px;
    line-height: 1;
}

.accessibility-toggle:hover {
    transform: translateY(0) scale(1.08);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.32);
}

.accessibility-toggle:focus-visible {
    outline: 3px solid #00ffff;
    outline-offset: 3px;
}

body.high-contrast .accessibility-toggle {
    background: #ffeb3b;
    color: #000;
    animation-play-state: paused;
    box-shadow: 0 0 0 6px rgba(255, 235, 59, 0.35);
}

@keyframes accessibilityPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 235, 59, 0.5);
    }
    70% {
        box-shadow: 0 0 0 18px rgba(255, 235, 59, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 235, 59, 0);
    }
}

/* Realinhamento vertical (WhatsApp / Acessibilidade / Dark) */
.darkmode-trigger {
    right: 30px;
    bottom: 218px;
    width: 52px;
    height: 52px;
    margin: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    transform: translateY(10px) scale(0.95);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.darkmode-trigger .icon::before {
    font-size: 20px;
}
