/**
 * WordPress Specific Styles
 * Additional styles for WordPress integration
 *
 * @package Junco
 */

/* =====================================================
   GLOBAL FIXES
   ===================================================== */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    background-color: #f1f1f1;
    font-family: Barlow, Arial, sans-serif;
    margin: 0;
    padding: 0;
}

/* Menu positioned at very top */
.s-menu {
    top: 0 !important;
    margin-top: 0 !important;
}

/* =====================================================
   PRELOADER
   ===================================================== */
#preloader {
    position: fixed;
    inset: 0;
    background: #1dbdea;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

#preloader svg {
    width: 120px;
    height: auto;
    opacity: 0;
    animation: fadeInRotate 2s ease-in-out infinite;
}

@keyframes fadeInRotate {
    0% { opacity: 0; transform: rotate(0deg) scale(1); }
    25% { opacity: 1; transform: rotate(3deg) scale(1.02); }
    75% { opacity: 1; transform: rotate(-3deg) scale(1); }
    100% { opacity: 0; transform: rotate(0deg) scale(1); }
}

/* =====================================================
   COOKIE BANNER
   ===================================================== */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    z-index: 9999;
    font-family: "Barlow", sans-serif;
    color: #222;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
    max-width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.cookie-banner.show {
    opacity: 1;
    pointer-events: all;
    transform: translateX(-50%) translateY(0);
}

.cookie-banner p {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    flex: 1;
}

.cookie-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-shrink: 0;
}

.cookie-banner button {
    border: none;
    border-radius: 50px;
    padding: 10px 24px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-family: "Barlow", sans-serif;
}

.btn-accept {
    background-color: #CD242B;
    color: #fff;
}

.btn-accept:hover {
    background-color: #b01e23;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(205, 36, 43, 0.3);
}

.btn-policy {
    background-color: transparent;
    color: #222;
    border: 2px solid #CD242B;
}

.btn-policy:hover {
    background-color: rgba(205, 36, 43, 0.1);
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .cookie-banner {
        flex-direction: column;
        text-align: center;
        bottom: 10px;
        padding: 16px 20px;
        width: 95%;
        gap: 16px;
    }

    .cookie-banner p {
        font-size: 14px;
    }

    .cookie-buttons {
        width: 100%;
        flex-direction: column;
        gap: 10px;
    }

    .cookie-banner button {
        width: 100%;
        padding: 12px 0;
    }
}

/* =====================================================
   BACK TO TOP BUTTON
   ===================================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: #0c396e;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.back-to-top.show {
    opacity: 1;
    pointer-events: all;
    transform: translateX(-50%) translateY(0);
}

.back-to-top:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: translateX(-50%) translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.back-to-top:active {
    transform: translateX(-50%) translateY(-2px);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        width: 45px;
        height: 45px;
    }

    .back-to-top svg {
        width: 20px;
        height: 20px;
    }
}

/* =====================================================
   VIDEO PLAYER
   ===================================================== */
.video-container-hgn {
    position: relative;
    width: 100%;
    background-color: #000;
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 16 / 9;
}

.hgn-video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: 12px;
    background-color: #000;
}

.hgn-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    width: 80px;
    height: 80px;
    background-color: #cd242b;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(205, 36, 43, 0.4);
}

.hgn-play-btn:hover {
    transform: translate(-50%, -50%) scale(1.15);
    background-color: #a01d23;
    box-shadow: 0 6px 30px rgba(205, 36, 43, 0.6);
}

.hgn-play-btn.hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.hgn-play-icon {
    width: 0;
    height: 0;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-left: 26px solid white;
    margin-left: 6px;
}

@media (max-width: 768px) {
    .hgn-play-btn {
        width: 60px;
        height: 60px;
    }

    .hgn-play-icon {
        border-top: 12px solid transparent;
        border-bottom: 12px solid transparent;
        border-left: 20px solid white;
        margin-left: 5px;
    }
}

/* =====================================================
   WORDPRESS SPECIFIC ELEMENTS
   ===================================================== */

/* Custom Logo */
.custom-logo-link {
    display: flex;
    align-items: center;
}

.custom-logo {
    max-width: 90px;
    height: auto;
    transition: all 0.5s;
}

.custom-logo:hover {
    transform: scale(0.95);
}

/* Screen Reader Text */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 14px;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* Alignments */
.alignleft {
    float: left;
    margin-right: 1.5em;
    margin-bottom: 1em;
}

.alignright {
    float: right;
    margin-left: 1.5em;
    margin-bottom: 1em;
}

.aligncenter {
    clear: both;
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1em;
}

/* Captions */
.wp-caption {
    margin-bottom: 1.5em;
    max-width: 100%;
}

.wp-caption img[class*="wp-image-"] {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.wp-caption .wp-caption-text {
    margin: 0.8075em 0;
    font-size: 14px;
    color: #666;
    text-align: center;
}

/* Galleries */
.gallery {
    margin-bottom: 1.5em;
    display: grid;
    grid-gap: 1.5em;
}

.gallery-item {
    display: inline-block;
    text-align: center;
    width: 100%;
}

.gallery-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.gallery-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.gallery-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.gallery-columns-5 {
    grid-template-columns: repeat(5, 1fr);
}

.gallery-columns-6 {
    grid-template-columns: repeat(6, 1fr);
}

.gallery-caption {
    display: block;
}

/* =====================================================
   BLOG CARD STYLES
   ===================================================== */
.blog-card-link {
    display: block;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 15px;
}

.blog-card-image {
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.blog-card-link:hover .blog-card-image {
    transform: scale(1.05);
}

/* =====================================================
   POST CONTENT STYLES
   ===================================================== */
.post-featured-image {
    margin-bottom: 30px;
    border-radius: 12px;
    overflow: hidden;
}

.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.post-categories,
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.post-tags-wrapper {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Post Navigation */
.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #ddd;
    gap: 20px;
}

.nav-previous,
.nav-next {
    flex: 1;
    max-width: 45%;
}

.nav-next {
    text-align: right;
}

.nav-link-post {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 15px;
    border-radius: 10px;
    background: #f5f5f5;
    transition: all 0.3s ease;
}

.nav-link-post:hover {
    background: #e8e8e8;
    transform: translateY(-2px);
}

.nav-label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.nav-title {
    display: block;
    font-weight: 600;
    color: #0c396d;
}

@media (max-width: 768px) {
    .post-navigation {
        flex-direction: column;
    }

    .nav-previous,
    .nav-next {
        max-width: 100%;
        text-align: left;
    }
}

/* =====================================================
   SEARCH RESULTS
   ===================================================== */
.search-query {
    color: var(--2);
}

.search-excerpt {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

/* =====================================================
   PAGE CONTENT
   ===================================================== */
.section-page-content {
    padding: 60px 0;
}

.page-featured-image {
    margin-bottom: 30px;
    border-radius: 12px;
    overflow: hidden;
}

.page-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.page-content {
    max-width: 900px;
}

/* Page Links */
.page-links {
    clear: both;
    margin: 20px 0;
    font-weight: 600;
}

.page-links a {
    display: inline-block;
    padding: 5px 12px;
    background: #0c396d;
    color: #fff;
    border-radius: 5px;
    margin: 0 5px;
    text-decoration: none;
    transition: background 0.3s ease;
}

.page-links a:hover {
    background: #cd242b;
}

/* =====================================================
   COMMENTS
   ===================================================== */
.comments-area {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #ddd;
}

.comments-title {
    font-size: 24px;
    margin-bottom: 30px;
    color: #0c396d;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.comment-body {
    display: flex;
    gap: 20px;
}

.comment-author .avatar {
    border-radius: 50%;
}

.comment-meta {
    margin-bottom: 10px;
}

.comment-author-name {
    font-weight: 600;
    color: #0c396d;
}

.comment-date {
    font-size: 13px;
    color: #666;
}

.comment-content {
    line-height: 1.7;
}

.comment-reply-link {
    display: inline-block;
    margin-top: 10px;
    color: #cd242b;
    text-decoration: none;
    font-weight: 500;
}

.comment-reply-link:hover {
    text-decoration: underline;
}

/* Comment Form */
.comment-form {
    margin-top: 30px;
}

.comment-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 15px;
    font-family: inherit;
    font-size: 15px;
    transition: border-color 0.3s ease;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: #0c396d;
}

.comment-form textarea {
    min-height: 150px;
    resize: vertical;
}

.comment-form .submit {
    background-color: #cd242b;
    color: #fff;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.comment-form .submit:hover {
    background-color: #b01e23;
    transform: translateY(-2px);
}

/* =====================================================
   WIDGETS
   ===================================================== */
.widget {
    margin-bottom: 30px;
}

.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.widget li:last-child {
    border-bottom: none;
}

.widget a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.widget a:hover {
    color: #cd242b;
}

/* =====================================================
   WF CUSTOM BUTTON (Blog Section)
   ===================================================== */
.wf-btn-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    font-family: system-ui, -apple-system, sans-serif;
}

.wf-custom-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 11px 11px 25px;
    border-radius: 9999px;
    text-decoration: none;
    cursor: pointer;
    border: none;
    outline: none;
    position: relative;
    overflow: hidden;
    background-color: #0c396e;
    color: white;
    box-shadow: 0 10px 15px -3px rgba(12, 57, 110, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(1);
}

.wf-custom-btn:hover {
    background-color: #ce252c;
    transform: scale(1.05);
    box-shadow: 0 20px 25px -5px rgba(206, 37, 44, 0.4);
}

.wf-text-large {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.025em;
    color: white;
    white-space: nowrap;
    line-height: 1;
    z-index: 2;
}

.wf-icon-circle {
    background-color: white;
    color: #0c396e;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.3s ease;
    z-index: 2;
    flex-shrink: 0;
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.1);
}

.wf-custom-btn:hover .wf-icon-circle {
    transform: rotate(45deg);
    color: #ce252c;
}

.wf-icon-svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
}

/* =====================================================
   UTILITY CLASSES
   ===================================================== */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* =====================================================
   FIXES - HERO SECTION SPACING
   ===================================================== */
/* Remove espaço extra entre menu e Hero */
.section-22 {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Hero Section grudada no menu */
.s-menu + .section-22,
.s-menu ~ .section-22 {
    margin-top: 0 !important;
}

/* Ajuste para admin bar */
.admin-bar .section-22 {
    margin-top: 0 !important;
}

/* =====================================================
   FIXES - CENTRALIZAÇÃO VERTICAL
   ===================================================== */
/* Marcas (Junco, Fã, Happy Life, Doces Tempos) - centralizar vertical */
.bloco-marcas-home {
    align-items: center !important;
}

/* Loja Virtual - centralizar vertical */
.grid-8 {
    align-items: center !important;
}

/* =====================================================
   JUNCO MENU NAVIGATION (Independent from Webflow JS)
   ===================================================== */

/* Menu - Estado fechado (padrão) */
#junco-nav-menu {
    display: none;
    position: fixed;
    top: 85px;
    right: 0;
    bottom: 0;
    width: 300px;
    max-width: 85vw;
    height: calc(100vh - 85px);
    background-color: #fff;
    z-index: 997;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 0;
    box-shadow: -5px 0 25px rgba(0,0,0,0.2);
    transform: translateX(100%);
    transition: transform 0.3s ease-out;
}

/* Menu - Estado aberto */
#junco-nav-menu.is-open {
    display: block;
    transform: translateX(0);
}

/* Botão do menu - mostrar sempre */
#junco-menu-button {
    display: flex !important;
    cursor: pointer;
}

/* Botão quando menu está aberto */
#junco-menu-button.is-open {
    background-color: rgba(29, 56, 104, 0.15);
}

/* Lista do menu */
#junco-nav-menu .nav-menu {
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0;
    list-style: none;
}

#junco-nav-menu .list-item-5 {
    margin: 0;
    padding: 0;
    text-align: right;
}

#junco-nav-menu .nav-link {
    display: block;
    padding: 15px 25px;
    font-size: 17px;
    color: #000;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

#junco-nav-menu .nav-link:hover {
    background-color: #f5f5f5;
    color: #cd242b;
}

#junco-nav-menu .nav-link.w--current {
    color: #cd242b;
}

/* Redes sociais no menu */
#junco-nav-menu .list-item-5-copy {
    margin-top: 20px;
    padding: 20px 25px;
    border-top: 1px solid #eee;
}

#junco-nav-menu .div-block-322 {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Overlay escuro quando menu está aberto */
body.menu-open::before {
    content: '';
    position: fixed;
    top: 85px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 996;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Impedir scroll do body quando menu aberto */
body.menu-open {
    overflow: hidden;
}

/* Garantir que o header NÃO se move quando menu abre */
.s-menu {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 998 !important;
    height: 85px;
}

/* Ajuste para admin bar do WordPress */
.admin-bar .s-menu {
    top: 32px !important;
}

.admin-bar #junco-nav-menu {
    top: 117px;
    height: calc(100vh - 117px);
}

.admin-bar.menu-open::before {
    top: 117px;
}

@media screen and (max-width: 782px) {
    .admin-bar .s-menu {
        top: 46px !important;
    }

    .admin-bar #junco-nav-menu {
        top: 131px;
        height: calc(100vh - 131px);
    }

    .admin-bar.menu-open::before {
        top: 131px;
    }
}

@media screen and (max-width: 767px) {
    /* Hero section sem espaço extra mobile */
    .section-22 {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
}

@media screen and (max-width: 479px) {
    /* Ajustes mobile pequeno */
    .section-22 {
        margin-top: 0 !important;
    }
}
