:root {
    --primary: #A3332B;
    --secondary: #D84F3A;
    --bg-body: #fbfbfb;
    --bg-light: #F7F3EF;
    --footer-bg: #881813;
    --text: #333333;
    --white: #FFFFFF;
    --gap: 30px;
    --header-h: 95px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Nunito', sans-serif; background-color: var(--bg-body); color: var(--text); line-height: 1.6; }
html, body { max-width: 100%; overflow-x: hidden; }
/* SCROLLBAR STYLING */
html, body { scrollbar-color: var(--primary) #dddddd; }
html { scrollbar-width: thin; }
::-webkit-scrollbar { width: 12px; height: 12px; }
html::-webkit-scrollbar-thumb, body::-webkit-scrollbar-thumb { background-color: var(--primary); border-radius: 10px; min-height: 60px; background-clip: padding-box; border: 3px solid #dddddd; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08); }
html::-webkit-scrollbar-thumb:hover, body::-webkit-scrollbar-thumb:hover { background-color: #8C2B24; }
html::-webkit-scrollbar-track, body::-webkit-scrollbar-track { background: #dddddd; }
html, body { overflow-y: auto; }
/* Ensure drawer/modal scrollbars visible */
.mobile-menu-drawer, .search-modal { scrollbar-color: var(--primary) #e9e9e9; }
.mobile-menu-drawer::-webkit-scrollbar, .search-modal::-webkit-scrollbar { width: 8px; }
.mobile-menu-drawer::-webkit-scrollbar-thumb, .search-modal::-webkit-scrollbar-thumb { background-color: var(--primary); border-radius: 10px; }

@media (min-width: 851px) {
  html { scrollbar-width: auto; }
  ::-webkit-scrollbar { width: 14px; height: 14px; }
}

/* Forçar visibilidade da scrollbar no desktop em qualquer container scrollável */
@media (min-width: 851px) {
  * { scrollbar-color: var(--primary) #dddddd; }
  *::-webkit-scrollbar { width: 16px; height: 16px; }
  *::-webkit-scrollbar-thumb { background-color: var(--primary); border-radius: 10px; min-height: 60px; background-clip: padding-box; border: 3px solid #dddddd; }
  *::-webkit-scrollbar-thumb:hover { background-color: #8C2B24; }
  *::-webkit-scrollbar-track { background: #dddddd; }
}
a { text-decoration: none; color: inherit; transition: 0.2s; }

/* HEADER */
header.main-header { background: var(--white); border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 1200; padding: 10px 0 0 0; box-shadow: 0 2px 10px rgba(0,0,0,0.02); }
.header-flex { display: flex; justify-content: space-between; align-items: center; height: 85px; gap: 20px; padding-bottom: 10px; }
.brand-area { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.logo img { height: 55px; width: auto; display: block; }
.btn-site-mini { background-color: #883728; color: white !important; font-size: 0.7rem; padding: 2px 12px; border-radius: 20px; text-decoration: none; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; line-height: 1.4; white-space: nowrap; }
.btn-site-mini:hover { background-color: var(--primary); transform: translateY(-1px); }

/* BUSCA */
.search-box form { display: flex; align-items: center; background: var(--bg-body); border: 1px solid #e0e0e0; border-radius: 50px; padding: 4px 4px 4px 25px; width: 100%; max-width: 550px; transition: border-color 0.2s, background 0.2s; }
.search-box form:focus-within { border-color: var(--primary); background: var(--white); }
.search-box input { border: none; background: transparent; width: 100%; padding: 8px 0; outline: none; font-size: 1rem; color: #555; }
.search-box button { background: var(--primary); color: white; border: none; border-radius: 50%; width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; margin-left: 10px; transition: background 0.2s; }
.search-box button:hover { background: var(--secondary); }

/* NAV & BOTAO VOLTAR (CORRIGIDO) */
.top-nav { display: flex; align-items: center; gap: 20px; font-weight: 700; color: #555; font-size: 0.9rem; }
.top-nav a:hover { color: var(--primary); }
.nav-fav-icon svg { width: 20px; height: 20px; vertical-align: middle; margin-right: 5px; }
.mobile-actions { display: none; }

/* --- BOTÃO CORRIGIDO AQUI --- */
.btn-back-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: var(--primary); /* #A3332B */
    color: var(--white) !important;   /* Texto Branco */
    border: 1px solid var(--primary);
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-decoration: none;
}
.btn-back-tag:hover {
    background-color: var(--secondary);
    border-color: var(--secondary);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(163, 51, 43, 0.2);
    color: var(--white) !important;
}
.btn-back-tag:focus, .btn-back-tag:active { color: var(--white) !important; background-color: var(--primary); border-color: var(--primary); }

.hamburger-btn { display: none; background: transparent; border: none; cursor: pointer; padding: 10px; color: var(--text); }
.hamburger-btn svg { width: 32px; height: 32px; }
.search-icon-btn { display: none; background: var(--primary); color: #fff; border: none; border-radius: 50%; width: 42px; height: 42px; align-items: center; justify-content: center; cursor: pointer; padding: 0; }

/* MENU MOBILE */
.mobile-menu-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 2000; opacity: 0; visibility: hidden; transition: 0.3s; }
.mobile-menu-drawer { position: fixed; top: 0; left: 0; width: 280px; height: 100%; background: var(--white); z-index: 2001; transform: translateX(-100%); transition: 0.3s ease-out; box-shadow: 2px 0 10px rgba(0,0,0,0.1); display: flex; flex-direction: column; overflow-y: auto; }
.mobile-menu-open .mobile-menu-overlay { opacity: 1; visibility: visible; }
.mobile-menu-open .mobile-menu-drawer { transform: translateX(0); }
.search-modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 2100; opacity: 0; visibility: hidden; transition: 0.3s; }
.search-modal { position: fixed; top: 15vh; left: 50%; transform: translateX(-50%) scale(0.98); background: var(--white); width: 92%; max-width: 560px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.15); z-index: 2101; opacity: 0; pointer-events: none; transition: 0.25s ease; }
.search-modal-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid #eee; }
.btn-close-search { background: transparent; border: none; font-size: 1.8rem; line-height: 1; color: #999; cursor: pointer; }
.search-modal-form { display: flex; gap: 10px; padding: 18px; }
.search-modal-form input { flex: 1; border: 1px solid #e0e0e0; border-radius: 10px; padding: 12px 14px; font-size: 1rem; }
.search-modal-submit { background: var(--primary); color: white; border: none; border-radius: 10px; padding: 12px 18px; font-weight: 700; }
.search-open .search-modal-overlay { opacity: 1; visibility: visible; }
.search-open .search-modal { opacity: 1; transform: translateX(-50%) scale(1); pointer-events: auto; }
.drawer-header { padding: 20px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; }
.btn-close-menu { background: transparent; border: none; font-size: 2rem; line-height: 1; color: #999; cursor: pointer; }
.drawer-content { padding: 20px; }
.drawer-content h4 { margin: 20px 0 10px 0; font-size: 0.85rem; text-transform: uppercase; color: #999; letter-spacing: 1px; }
.drawer-link { display: block; padding: 12px 0; border-bottom: 1px solid #f5f5f5; color: var(--text); font-weight: 600; font-size: 1rem; }
.drawer-link:hover { color: var(--primary); padding-left: 5px; }
.drawer-link.highlight { color: var(--primary); }

/* CATEGORIAS */
.cat-bar { width: 100%; background: var(--white); display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; padding: 20px 20px; border-bottom: 1px solid #eee; position: sticky; top: var(--header-h); z-index: 900; box-shadow: 0 2px 10px rgba(0,0,0,0.04); }
.cat-pill { display: inline-block; padding: 8px 24px; background: var(--bg-body); color: #666; border-radius: 30px; font-weight: 700; font-size: 0.95rem; flex-shrink: 0; border: 1px solid #eee; cursor: pointer; transition: 0.2s; }
.cat-pill:hover { background: var(--white); color: var(--primary); border-color: var(--primary); }
.cat-pill.active { background: var(--primary); color: white; border-color: var(--primary); box-shadow: 0 4px 10px rgba(163, 51, 43, 0.2); }
@media (max-width: 768px) { .cat-pill { font-size: 12px; padding: 6px 16px; } .cat-bar { gap: 8px; padding: 15px 10px; } }
@media (max-width: 850px) { .cat-bar { position: static; top: auto; z-index: auto; box-shadow: none; } }
@media (min-width: 769px) { .cat-pill { font-size: 0.70rem; } .cat-tag { font-size: 0.7rem; } .single-cat-tag { font-size: 0.75rem; }
}

/* LAYOUT */
.container { max-width: 1200px; width: 100%; margin: 0 auto; padding: 0 20px; }
.video-layout { display: grid; grid-template-columns: 1fr 340px; gap: var(--gap); margin-top: 30px; }
.video-feed { display: flex; flex-direction: column; gap: 40px; }
.video-card { background: var(--white); border-radius: 12px; overflow: hidden; border: 1px solid #eee; box-shadow: 0 2px 10px rgba(0,0,0,0.02); }
.thumb-wrapper { position: relative; padding-top: 56.25%; background: #000; cursor: pointer; overflow: hidden; }
.thumb-wrapper img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; transition: opacity 0.2s; }
.thumb-wrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 2; }
.play-icon { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(163, 51, 43, 0.9); color: white; width: 70px; height: 70px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 30px; border: 3px solid white; pointer-events: none; z-index: 3; transition: 0.2s; }
.thumb-wrapper.playing .play-icon { display: none !important; }
.thumb-wrapper.playing img { display: none !important; }
.thumb-wrapper.playing { cursor: auto; } 

/* SINGLE VIDEO */
.single-video-wrapper { background: var(--white); border-radius: 12px; overflow: hidden; border: 1px solid #eee; padding-bottom: 25px; }
.single-info-padding { padding: 30px; }
.single-cat-tag { display: inline-block; background: var(--bg-light); color: var(--primary); font-weight: 800; font-size: 0.8rem; padding: 4px 12px; border-radius: 4px; text-transform: uppercase; margin-bottom: 10px; }
.single-video-wrapper h1 { font-size: 2.2rem; margin-bottom: 15px; line-height: 1.2; color: var(--primary); }
.intro-text { font-size: 1.15rem; color: #444; margin: 25px 0; line-height: 1.8; background-color: #fafafa; padding: 20px; border-left: 5px solid var(--secondary); border-radius: 0 8px 8px 0; }
.recipe-content-box { font-size: 1.1rem; color: #333; }
.recipe-content-box h2 { color: var(--primary); font-size: 1.8rem; margin-top: 40px; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid #eee; display: inline-block; width: 100%; }
.recipe-content-box ul { list-style: none; padding: 0; margin: 0 0 30px 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 15px; }
.recipe-content-box ul li { background: #fff8f8; border: 1px solid #ffe0e0; padding: 12px 15px; border-radius: 8px; display: flex; align-items: center; line-height: 1.4; font-weight: 600; }
.recipe-content-box ul li:before { content: '✔'; color: var(--primary); margin-right: 10px; font-size: 1.2rem; }
.recipe-content-box ol { counter-reset: recipe-steps; list-style: none; padding: 0; }
.recipe-content-box ol li { position: relative; padding-left: 50px; margin-bottom: 25px; }
.recipe-content-box ol li:before { counter-increment: recipe-steps; content: counter(recipe-steps); position: absolute; left: 0; top: 0; width: 35px; height: 35px; background: var(--primary); color: white; border-radius: 50%; text-align: center; line-height: 35px; font-weight: bold; }
.recipe-content-box strong { color: var(--primary); }
.recipe-content-box h3 { margin-top: 30px; color: var(--secondary); }

/* AUTHOR BOX */
.author-box { display: flex; align-items: center; gap: 20px; background: #fcfcfc; border: 1px solid #eee; padding: 25px; border-radius: 10px; margin: 30px 0; box-shadow: 0 2px 5px rgba(0,0,0,0.02); }
.author-box img { width: 90px; height: 90px; border-radius: 50%; border: 3px solid var(--white); box-shadow: 0 2px 8px rgba(0,0,0,0.1); object-fit: cover; }
.author-box-content h3 { font-size: 1.2rem; margin: 0 0 5px 0; color: var(--text); }
.author-box-content h3 a { text-decoration: none; color: var(--primary); font-weight: 800; }
.author-box-content span { font-size: 0.85rem; text-transform: uppercase; color: #888; font-weight: 700; letter-spacing: 0.5px; }
.author-box-content p { font-size: 0.95rem; color: #666; margin-top: 8px; line-height: 1.4; }

@media (max-width: 600px) { .author-box { flex-direction: column; text-align: center; } }

/* CARDS & WIDGETS */
.card-info { padding: 25px; }
.cat-tag { text-transform: uppercase; font-size: 0.75rem; font-weight: 800; color: var(--secondary); display: block; margin-bottom: 8px; }
.card-info h2 { font-size: 1.5rem; margin-bottom: 12px; line-height: 1.3; color: var(--text); }
.card-desc { color: #666; font-size: 1rem; margin-bottom: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { border-top: 1px solid #eee; padding-top: 15px; margin-top: 15px; display: flex; justify-content: space-between; align-items: center; color: #888; font-size: 0.9rem; }
.btn-details { display: inline-block; background: transparent; border: 1px solid var(--primary); color: var(--primary); padding: 8px 20px; border-radius: 30px; font-weight: 700; font-size: 0.9rem; }
.btn-details:hover, .btn-details:focus, .btn-details:active { background: var(--primary); color: #fff !important; border-color: var(--primary); }
.btn-share { display: inline-flex; align-items: center; gap: 8px; background: var(--primary); color: white; border: none; border-radius: 30px; padding: 8px 16px; font-weight: 700; font-size: 0.9rem; cursor: pointer; }
.btn-share:hover { background: var(--secondary); }
.btn-fav { background: transparent; border: none; cursor: pointer; padding: 5px; display: flex; align-items: center; justify-content: center; transition: transform 0.2s; }
.btn-fav svg { width: 24px; height: 24px; }
.btn-fav:hover { transform: scale(1.1); }
.btn-fav.active { transform: scale(1.05); }
.sidebar { display: flex; flex-direction: column; gap: 20px; }
.ad-slot { background: var(--white); display: flex; align-items: center; justify-content: center; color: #aaa; border: 1px dashed #ddd; margin: 15px 0; }
.feed-ad { height: 120px; }
.header-ad { width: 100%; height: 150px; margin-bottom: 20px; background: #f0f0f0; border-radius: 8px; }
.sidebar-ad { height: 250px; width: 100%; }
.recipe-bottom-ad { width: 100%; height: auto; margin-top: 40px; margin-bottom: 20px; background: #f9f9f9; border-radius: 8px; border: 1px solid #eee; }
.ad-slot.recipe-bottom-ad { display: block; align-items: initial; justify-content: initial; padding: 0; overflow: visible; }
.rec-widget { background: var(--white); padding: 20px; border: 1px solid #eee; border-radius: 8px; }
.rec-widget h3 { margin-bottom: 25px; padding-bottom: 10px; border-bottom: 1px solid #f5f5f5; }
.sticky-wrapper { position: sticky; top: 90px; z-index: 90; }
#footer { background: var(--footer-bg); color: white; padding: 60px 0 30px 0; margin-top: 60px; border-top: 5px solid #72120d; }
.footer-flex { display: flex; justify-content: space-between; gap: 50px; align-items: flex-start; text-align: left; }
.footer-logo { flex: 1; max-width: 450px; }
.footer-logo img { margin-bottom: 20px; display: block; }
.social { display: flex; gap: 15px; margin-bottom: 25px; }
.social a { transition: transform 0.2s; }
.social a:hover { transform: scale(1.1); }
.footer-logo nav ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 25px; }
.footer-logo nav a { color: #ffdbd9; font-weight: 600; font-size: 0.95rem; }
.footer-logo nav a:hover { color: white; text-decoration: underline; }
.footer-logo p { font-size: 0.85rem; color: #ffcbc9; line-height: 1.5; }
.footer-logo p a { color: #fff; font-weight: bold; }
.footer-author { flex: 1; background: rgba(0,0,0,0.1); padding: 30px; border-radius: 12px; }
.author { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }
.author img { border-radius: 50%; border: 3px solid rgba(255,255,255,0.2); width: 80px; height: 80px; }
.author h3 { font-size: 1.2rem; margin: 0; color: white; line-height: 1.3; }
.author h3 span { display: block; font-size: 0.85rem; font-weight: 400; color: #ffcbc9; margin-top: 4px; }
.footer-author p { font-size: 0.95rem; color: #ffebeb; line-height: 1.7; }
.breadcrumb-nav { font-size: 0.85rem; color: #666; margin-bottom: 15px; display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.breadcrumb-nav a { color: #666; text-decoration: none; }
.breadcrumb-nav a:hover { color: var(--primary); text-decoration: underline; }
.breadcrumb-sep { color: #ccc; font-size: 0.8rem; }
.breadcrumb-current { color: var(--text); font-weight: 600; }
@media (max-width: 850px) {
    .video-layout { grid-template-columns: 1fr; }
    .sidebar { order: 2; }
    .header-flex { height: auto; padding-bottom: 10px; }
    .hamburger-btn { display: block; order: 1; }
    .brand-area { order: 2; }
    .search-box { display: none; }
    .search-icon-btn { display: inline-flex; order: 3; }
    .top-nav { display: none; }
    .container { padding: 0 12px; }
    .mobile-actions { display: flex; gap: 12px; align-items: center; padding: 10px 20px; }
    .mobile-actions .btn-back-tag { flex: 1; text-align: center; }
    .mobile-actions .nav-fav-icon { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
}

body.mobile-menu-open, body.search-open { overflow: hidden; }

@media (min-width: 851px) {
    .footer-flex { flex-direction: row; justify-content: space-between; align-items: flex-start; text-align: left; }
    .footer-author { text-align: left; }
    .footer-logo nav ul { justify-content: flex-start; }
    .footer-logo img { margin: 0 0 20px 0; }
    .social { justify-content: flex-start; }
}
@media (max-width: 850px) {
    .footer-flex { flex-direction: column; align-items: center; text-align: center; }
    .footer-logo nav ul { justify-content: center; }
    .social { justify-content: center; }
    .footer-author { text-align: left; }
    .footer-logo img { margin: 0 auto 20px auto; }
    .feed-top-ad { display: none; }
}
/* SINGLE PAGE LAYOUT */
.single-page .single-video-wrapper { max-width: 820px; margin: 0 auto; }
.single-page .single-info-padding, .single-page .intro-text, .single-page .recipe-content-box, .single-page .author-box { max-width: 820px; margin-left: auto; margin-right: auto; }
@media (max-width: 900px) { .single-page .single-video-wrapper, .single-page .single-info-padding, .single-page .intro-text, .single-page .recipe-content-box, .single-page .author-box { max-width: 100%; } }
/* Melhorias mobile single */
@media (max-width: 600px) {
    .single-video-wrapper h1 { font-size: 1.7rem; }
    .single-info-padding { padding: 18px; }
    .card-meta { flex-wrap: wrap; gap: 10px; row-gap: 8px; }
    .btn-share { padding: 8px 12px; font-size: 0.85rem; }
}
