/*
Theme Name: Gorillah Theme
Theme URI: https://www.gorillah.com.br
Author: Guilherme KreTo
Author URI: https://www.gorillah.com.br
Description: Tema WordPress ultra-leve e estrutural, projetado exclusivamente para uso com Elementor. Fornece apenas estrutura HTML5 semântica, sem qualquer estilização visual própria. Ideal para máxima performance e Core Web Vitals.
Version: 9.5.5
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gorillah-theme
Tags: elementor, minimal, skeleton, performance, html5

Gorillah Theme - Theme Skeleton for Elementor
Copyright (C) 2024 Guilherme KreTo
*/

/* =============================================================================
   RESET CSS - Remove margens e paddings padrão do navegador
   ============================================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
}


/* =============================================================================
   ELEMENTOR BOXED LAYOUT - Largura padrão 1140px
   ============================================================================= */

.e-con-boxed>.e-con-inner,
.elementor-section-boxed>.elementor-container {
    max-width: 1140px;
}

/* =============================================================================
   HEADER & FOOTER - Remove espaçamentos extras
   ============================================================================= */

header,
footer,
.elementor-location-header,
.elementor-location-footer,
[data-elementor-type="header"],
[data-elementor-type="footer"] {
    margin: 0 !important;
    padding: 0;
}

/* Remove margens do primeiro e último elemento dentro do header/footer */
.elementor-location-header>*:first-child,
.elementor-location-footer>*:first-child {
    margin-top: 0 !important;
}

.elementor-location-header>*:last-child,
.elementor-location-footer>*:last-child {
    margin-bottom: 0 !important;
}

/* =============================================================================
   ELEMENTOR - Compatibilidade sem sobrescrever espaçamentos do editor
   ============================================================================= */

/* Remove apenas margin externa involuntária do body/wrapper,
   sem tocar nos paddings e margins definidos no Elementor.
   Regras :first-child e :last-child removidas na v4.3.9 para não
   bloquear padding/margin configurados pelo usuário no editor. */

/* =============================================================================
   ELEMENTOR MENU — Correção de alinhamento e gap do submenu / flyout
   ============================================================================= */

/* Elimina gap vertical entre o item do menu e o dropdown */
.elementor-nav-menu--dropdown,
.e-n-menu-dropdown,
.e-n-menu .e-n-menu-content,
.e-n-menu .e-n-menu-dropdown-content {
    margin-top: 0 !important;
    top: 100% !important;
}

/* Para flyout lateral do Nested Menu: elimina gap horizontal */
.e-n-menu .e-n-menu-dropdown {
    margin-left: 0 !important;
    left: 100% !important;
}

/* Garante que o item do menu sirva como âncora para o submenu */
.elementor-nav-menu--main .menu-item-has-children,
.e-n-menu .e-n-menu-item {
    position: relative;
}

/* Ponte invisível que mantém o cursor sobre o item ao atravessar
   o espaço entre o link e o dropdown, impedindo que o menu feche */
.elementor-nav-menu--main .menu-item-has-children::before,
.e-n-menu .e-n-menu-item:has(.e-n-menu-dropdown)::before {
    content: '';
    position: absolute;
    left: 0;
    top: 100%;
    width: 100%;
    height: 20px;
    z-index: 9998;
}

/* Garante que o dropdown/flyout fique sempre acima do conteúdo */
.elementor-nav-menu--dropdown,
.e-n-menu-dropdown {
    z-index: 9999 !important;
}

/* =============================================================================
   ELEMENTOR MENU CART - solta o mini-cart do header para a viewport
   ============================================================================= */

.elementor-location-header .elementor-menu-cart__container.elementor-lightbox,
[data-elementor-type="header"] .elementor-menu-cart__container.elementor-lightbox,
header .elementor-menu-cart__container.elementor-lightbox {
    position: fixed !important;
    inset: 0 !important;
    width: auto !important;
    max-width: 100% !important;
    height: 100vh !important;
    height: 100dvh !important;
    overflow-x: hidden !important;
}

.elementor-location-header .elementor-menu-cart__container.elementor-lightbox .elementor-menu-cart__main,
[data-elementor-type="header"] .elementor-menu-cart__container.elementor-lightbox .elementor-menu-cart__main,
header .elementor-menu-cart__container.elementor-lightbox .elementor-menu-cart__main {
    max-width: min(100%, 100vw) !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    height: 100vh !important;
    height: 100dvh !important;
}

html:has(.elementor-widget-woocommerce-menu-cart.elementor-menu-cart--shown),
body:has(.elementor-widget-woocommerce-menu-cart.elementor-menu-cart--shown) {
    overflow-x: hidden !important;
}

/* =============================================================================
   FALLBACK NATIVO - Header & Footer sem Elementor
   Exibidos apenas quando o Elementor Pro Theme Builder não assume.
   ============================================================================= */

.gorillah-header-fallback {
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.gorillah-header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    max-width: 1140px;
    margin: 0 auto;
    padding: 16px 24px;
}

.gorillah-header-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.gorillah-header-logo .gorillah-logo {
    max-height: 48px;
    width: auto;
    display: block;
}

.gorillah-site-title {
    font-size: 20px;
    font-weight: 700;
    color: #404040;
    text-decoration: none;
}

.gorillah-header-navigation {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.gorillah-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.gorillah-menu > li {
    position: relative;
}

.gorillah-menu a {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    color: #404040;
    text-decoration: none;
    transition: color 0.2s ease;
}

.gorillah-menu a:hover {
    color: #000;
}

/* Submenu nativo (dropdown) */
.gorillah-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    background: #fff;
    border: 1px solid #e8e8e8;
    min-width: 200px;
}

.gorillah-menu li:focus-within > ul,
.gorillah-menu li:hover > ul {
    display: block;
}

.gorillah-menu ul li {
    padding: 0;
}

.gorillah-menu ul a {
    display: block;
    padding: 8px 16px;
}

/* Footer fallback */
.gorillah-footer-fallback {
    background: #f7f7f7;
    border-top: 1px solid #e8e8e8;
    margin-top: 40px;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    color: #404040;
}

.gorillah-footer-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.gorillah-footer-menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.gorillah-footer-menu a {
    font-size: 16px;
    color: #404040;
    text-decoration: none;
}

.gorillah-footer-menu a:hover {
    color: #000;
}

.gorillah-footer-copyright {
    font-size: 14px;
    color: #666;
    text-align: center;
}

/* Responsivo: empilha header em telas pequenas */
@media (max-width: 768px) {
    .gorillah-header-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .gorillah-header-navigation {
        justify-content: flex-start;
        width: 100%;
    }

    .gorillah-menu {
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }
}

/* =============================================================================
   BLOG - CARDS
   Exibidos no fallback nativo (quando Elementor Pro Theme Builder não assume)
   ============================================================================= */

.gorillah-blog {
    max-width: 1140px;
    margin: 0 auto;
    padding: 32px 24px;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.gorillah-blog-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.gorillah-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.gorillah-card:hover {
    border-color: #d0d0d0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.gorillah-card-thumb {
    display: block;
    line-height: 0;
}

.gorillah-card-thumb-img {
    width: 100%;
    height: auto;
    display: block;
}

.gorillah-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 16px;
    gap: 12px;
}

.gorillah-card-title {
    font-size: 16px;
    font-weight: 700;
    color: #404040;
    margin: 0;
    line-height: 1.4;
}

.gorillah-card-title a {
    color: #404040;
    text-decoration: none;
}

.gorillah-card-title a:hover {
    color: #000;
}

.gorillah-card-excerpt {
    font-size: 14px;
    color: #666;
    margin: 0;
    line-height: 1.6;
}

.gorillah-card-btn {
    align-self: flex-start;
    margin-top: auto;
    display: inline-block;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    background: #404040;
    border: 1px solid #404040;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.gorillah-card-btn:hover {
    background: #000;
    border-color: #000;
}

/* Paginação */
.gorillah-pagination {
    margin-top: 32px;
    text-align: center;
}

.gorillah-pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 2px;
    font-size: 14px;
    color: #404040;
    text-decoration: none;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    background: #fff;
}

.gorillah-pagination .page-numbers.current,
.gorillah-pagination .page-numbers:hover {
    background: #404040;
    border-color: #404040;
    color: #fff;
}

/* =============================================================================
   SINGLE - POST INDIVIDUAL
   Layout básico no fallback nativo
   ============================================================================= */

.gorillah-single {
    max-width: 1140px;
    margin: 0 auto;
    padding: 32px 24px;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.gorillah-single-header {
    margin-bottom: 24px;
}

.gorillah-single-title {
    font-size: 16px;
    font-weight: 700;
    color: #404040;
    margin: 0 0 16px;
    line-height: 1.4;
}

.gorillah-single-thumb {
    line-height: 0;
}

.gorillah-single-thumb-img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.gorillah-single-content {
    font-size: 14px;
    color: #666;
    line-height: 1.7;
}

.gorillah-single-content p {
    margin: 0 0 16px;
}

.gorillah-single-content h2,
.gorillah-single-content h3,
.gorillah-single-content h4 {
    color: #404040;
    line-height: 1.4;
}

.gorillah-single-content img {
    max-width: 100%;
    height: auto;
}

.gorillah-single-back {
    display: inline-block;
    margin-top: 24px;
    font-size: 14px;
    font-weight: 700;
    color: #404040;
    text-decoration: none;
}

.gorillah-single-back:hover {
    color: #000;
}

/* Responsivo: empilha cards em telas pequenas */
@media (max-width: 768px) {
    .gorillah-blog,
    .gorillah-single {
        padding: 24px 16px;
    }

    .gorillah-blog-container {
        grid-template-columns: 1fr;
    }
}
