/**
 * MundoMTB - Main CSS
 * Variáveis, Reset, Grid, Header, Footer, Utilitários
 * 
 * @package MundoMTB
 * @version 1.0.0
 */




/* MONTSERRAT VARIABLE */

@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/Montserrat-VariableFont_wght.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}


/* OPEN SANS VARIABLE */

@font-face {
  font-family: 'Open Sans';
  src: url('../fonts/OpenSans-VariableFont_wdth,wght.woff2') format('woff2');
  font-weight: 300 800;
  font-style: normal;
  font-stretch: 75% 100%;
  font-display: swap;
}



/* ==========================================================================
   CSS CUSTOM PROPERTIES (Variáveis)
   ========================================================================== */

:root {
    /* Cores Principais */
    --color-primary: #1A1A1A;
    --color-secondary: #333333;
    --color-accent: #2ECC71;
    --color-accent-hover: #27AE60;
    --color-accent-blue: #3498DB;
    --color-accent-blue-hover: #2980B9;
    
    /* Cores Neutras */
    --color-white: #FFFFFF;
    --color-gray-100: #F8F9FA;
    --color-gray-200: #F5F5F5;
    --color-gray-300: #E0E0E0;
    --color-gray-400: #BDBDBD;
    --color-gray-500: #9E9E9E;
    --color-gray-600: #666666;
    --color-gray-700: #424242;
    --color-gray-800: #212121;
    
    /* Tipografia */
    --font-heading: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Tamanhos de Fonte */
    --text-xs: 0.75rem;     /* 12px */
    --text-sm: 0.875rem;    /* 14px */
    --text-base: 1rem;      /* 16px */
    --text-lg: 1.125rem;    /* 18px */
    --text-xl: 1.25rem;     /* 20px */
    --text-2xl: 1.5rem;     /* 24px */
    --text-3xl: 1.875rem;   /* 30px */
    --text-4xl: 2.25rem;    /* 36px */
    --text-5xl: 3rem;       /* 48px */
    
    /* Espaçamento */
    --space-xs: 0.5rem;     /* 8px */
    --space-sm: 1rem;       /* 16px */
    --space-md: 1.5rem;     /* 24px */
    --space-lg: 2rem;       /* 32px */
    --space-xl: 3rem;       /* 48px */
    --space-2xl: 4rem;      /* 64px */
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    
    /* Sombras */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    
    /* Transições */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;
    
    /* Layout */
    --container-max: 1280px;
    --container-narrow: 800px;
    --header-height: 70px;
    --header-height-mobile: 60px;
}

/* ==========================================================================
   RESET / NORMALIZE
   ========================================================================== */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--color-primary);
    background-color: var(--color-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

input,
button,
textarea,
select {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

ul,
ol {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

/* ==========================================================================
   LAYOUT / GRID
   ========================================================================== */

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-sm);
}

.container--narrow {
    max-width: var(--container-narrow);
}

.grid {
    display: grid;
    gap: var(--space-md);
}

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

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

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

@media (max-width: 1024px) {
    .grid--4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .grid--2,
    .grid--3,
    .grid--4 {
        grid-template-columns: 1fr;
    }
}

/* Flexbox Utilities */
.flex {
    display: flex;
}

.flex--center {
    align-items: center;
    justify-content: center;
}

.flex--between {
    align-items: center;
    justify-content: space-between;
}

.flex--column {
    flex-direction: column;
}

.flex--wrap {
    flex-wrap: wrap;
}

.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

/* ==========================================================================
   HEADER
   ========================================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--color-white);
    border-bottom: 1px solid var(--color-gray-300);
    height: var(--header-height);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-sm);
}

/* Logo */
.site-logo {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.site-logo img,
.site-logo svg {
    height: 40px;
    width: auto;
}

.site-logo__text {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 800;
    color: var(--color-primary);
}

/* Navegação Principal */
.main-nav {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.main-nav__list {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.main-nav__item {
    position: relative;
}

.main-nav__link {
    display: block;
    padding: var(--space-xs) var(--space-sm);
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color var(--transition-fast);
    border-radius: var(--radius-sm);
}

.main-nav__link:hover,
.main-nav__link--active {
    color: var(--color-accent);
    background-color: var(--color-gray-100);
}

/* Menu Mobile Toggle */
.menu-toggle {
    display: none;
    padding: var(--space-xs);
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle__bar {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-primary);
    margin: 5px 0;
    transition: var(--transition-fast);
}

/* Search Button */
.header-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: var(--radius-full);
    transition: background-color var(--transition-fast);
}

.header-search-btn:hover {
    background-color: var(--color-gray-200);
}

.header-search-btn svg {
    width: 20px;
    height: 20px;
    stroke: var(--color-primary);
}

/* Header Mobile */
@media (max-width: 968px) {
    .site-header {
        height: var(--header-height-mobile);
    }
    
    .main-nav {
        display: none;
        position: absolute;
        top: var(--header-height-mobile);
        left: 0;
        right: 0;
        background-color: var(--color-white);
        border-bottom: 1px solid var(--color-gray-300);
        padding: var(--space-sm);
        box-shadow: var(--shadow-lg);
    }
    
    .main-nav.is-active {
        display: block;
    }
    
    .main-nav__list {
        flex-direction: column;
        gap: 0;
    }
    
    .main-nav__link {
        display: block;
        padding: var(--space-sm);
        border-bottom: 1px solid var(--color-gray-200);
    }
    
    .menu-toggle {
        display: block;
    }
}


.nav-menu a {
    font-family: "Oswald", "Montserrat", sans-serif;
    font-weight: 700;
    font-size: 21px;
    text-transform: uppercase;
    letter-spacing: .02em;
    line-height: 1;
}

.nav-menu .current-menu-item > a {
    border-bottom: 4px solid #2ecc71;
    padding-bottom: 10px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

/* FOOTER FINAL - Mundo MTB */
.site-footer {
    background: #171717;
    color: #fff;
    margin-top: 64px;
    padding: 56px 0 0;
}

.footer-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

.footer-main {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 42px;
}

.footer-brand img,
.footer-logo img {
    height: 72px;
    width: auto;
    margin-bottom: 18px;
    filter: brightness(0) invert(1);
}

.footer-description {
    max-width: 320px;
    font-size: 14px;
    line-height: 1.7;
    color: #bdbdbd;
}

.footer-title,
.footer-column__title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 16px;
    color: #fff;
}

.footer-menu,
.footer-categories {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.footer-menu a,
.footer-categories a,
.footer-menu__link {
    font-size: 15px;
    color: #cfcfcf;
    line-height: 1.35;
    transition: color .2s ease;
}

.footer-menu a:hover,
.footer-categories a:hover,
.footer-menu__link:hover {
    color: #2ecc71;
}

.footer-social,
.social-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-social a,
.social-links a,
.footer-social__link {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    background: #2a2a2a;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.footer-social a:hover,
.social-links a:hover,
.footer-social__link:hover {
    background: #2ecc71;
}

.footer-social svg,
.social-links svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.12);
    padding: 22px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #9e9e9e;
    font-size: 14px;
}

.footer-bottom p {
    margin: 0;
}

/* esconde mobile nav dentro do footer caso esteja entrando no fluxo */
.site-footer + .mobile-nav,
.mobile-nav {
    z-index: 999;
}

@media (max-width: 768px) {
    .site-footer {
        margin-top: 42px;
        padding-top: 42px;
        padding-bottom: 78px;
    }

    .footer-main {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .footer-brand img,
    .footer-logo img {
        height: 58px;
    }

    .footer-bottom {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: 12px 24px;
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn--primary {
    background-color: var(--color-accent);
    color: var(--color-white);
}

.btn--primary:hover {
    background-color: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn--secondary {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn--secondary:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn--ghost {
    background-color: transparent;
    color: var(--color-primary);
    padding: 8px 0;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.btn--ghost:hover {
    color: var(--color-accent);
}

.btn--large {
    padding: 16px 32px;
    font-size: var(--text-base);
}

.btn--small {
    padding: 8px 16px;
    font-size: var(--text-xs);
}

.btn--full {
    width: 100%;
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */

/* Visibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.hidden {
    display: none !important;
}

@media (max-width: 768px) {
    .hidden-mobile { display: none !important; }
}

@media (min-width: 769px) {
    .hidden-desktop { display: none !important; }
}

/* Text Alignment */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Spacing */
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

/* Section Spacing */
.section {
    padding: var(--space-xl) 0;
}

.section--large {
    padding: var(--space-2xl) 0;
}

/* Section Titles */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
}

.section-title {
    font-size: var(--text-2xl);
    font-weight: 800;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-link {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-accent);
    display: flex;
    align-items: center;
    gap: 4px;
}

.section-link:hover {
    text-decoration: underline;
}

/* ==========================================================================
   CATEGORY TAGS
   ========================================================================== */

.tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--radius-sm);
    background-color: var(--color-gray-200);
    color: var(--color-gray-600);
}

.tag--primary {
    background-color: var(--color-accent);
    color: var(--color-white);
}

.tag--xco {
    background-color: #E74C3C;
    color: var(--color-white);
}

.tag--downhill {
    background-color: #9B59B6;
    color: var(--color-white);
}

.tag--enduro {
    background-color: #E67E22;
    color: var(--color-white);
}

.tag--trail {
    background-color: #1ABC9C;
    color: var(--color-white);
}

/* ==========================================================================
   MOBILE BOTTOM NAVIGATION
   ========================================================================== */

.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: var(--color-white);
    border-top: 1px solid var(--color-gray-300);
    padding: var(--space-xs) 0;
    padding-bottom: env(safe-area-inset-bottom);
}

@media (max-width: 768px) {
    .mobile-nav {
        display: block;
    }
    
    body {
        padding-bottom: 70px;
    }
}

.mobile-nav__list {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.mobile-nav__item {
    flex: 1;
    text-align: center;
}

.mobile-nav__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: var(--space-xs);
    color: var(--color-gray-500);
    transition: color var(--transition-fast);
}

.mobile-nav__link--active,
.mobile-nav__link:hover {
    color: var(--color-accent);
}

.mobile-nav__icon {
    width: 24px;
    height: 24px;
}

.mobile-nav__label {
    font-size: 10px;
    font-weight: 500;
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

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

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn var(--transition-base);
}

.animate-slide-up {
    animation: slideUp var(--transition-slow);
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
    .site-header,
    .site-footer,
    .mobile-nav,
    .sidebar {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    a[href]::after {
        content: " (" attr(href) ")";
    }
}


/*  ##################################################  */


/* Ajuste logo/header MundoMTB */
.site-header {
    height: 92px;
    border-bottom: 0;
}

.header-inner {
    max-width: 1280px;
    height: 92px;
}

.site-branding,
.site-logo,
.logo-link {
    flex: 0 0 auto;
}

.site-logo img,
.site-branding img,
.custom-logo {
    width: auto;
    height: 72px;
    max-width: 150px;
    object-fit: contain;
}

/* Se a logo estiver vindo gigante por outro seletor */
.site-header img {
    max-height: 110px;
    width: auto;
}










/* HEADER FINAL - Mundo MTB */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 100px;
    background: #fff;
    border-bottom: 1px solid #eee;
}

body.admin-bar .site-header {
    top: 32px;
}

.header-container,
.header-inner {
    max-width: 1180px;
   /* height: 86px;  */
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-branding,
.logo-link,
.custom-logo-link {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

.custom-logo {
    width: auto !important;
    height: 110px !important;
    max-width: 120px !important;
    object-fit: contain;
}

.main-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.main-navigation ul {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 42px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.main-navigation a {

    color: #111;
    text-transform: none;
    text-transform: uppercase;
}

.header-search,
.header-search-btn {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    text-transform: uppercase;
}

@media (max-width: 768px) {
    .site-header {
        height: 74px;
    }

    body.admin-bar .site-header {
        top: 46px;
    }

    .header-container,
    .header-inner {
        height: 74px;
        padding: 0 18px;
    }

    .custom-logo {
        height: 54px !important;
        max-width: 120px !important;
    }

    .main-navigation {
        display: none;
    }
}



/* Lupa header estilo mockup */
.header-search {
    flex: 0 0 42px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-search-btn,
.header-search button {
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none;
    cursor: pointer;
    font-size: 0;
}

.header-search-btn::before,
.header-search button::before {
    content: "";
    width: 22px;
    height: 22px;
    display: block;
    background: currentColor;
    color: #111;
    mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.5 3a7.5 7.5 0 0 1 5.95 12.06l4.24 4.25-1.38 1.38-4.25-4.24A7.5 7.5 0 1 1 10.5 3Zm0 2a5.5 5.5 0 1 0 0 11 5.5 5.5 0 0 0 0-11Z'/%3E%3C/svg%3E") center / contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.5 3a7.5 7.5 0 0 1 5.95 12.06l4.24 4.25-1.38 1.38-4.25-4.24A7.5 7.5 0 1 1 10.5 3Zm0 2a5.5 5.5 0 1 0 0 11 5.5 5.5 0 0 0 0-11Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* esconde texto/ponto solto se existir */
.header-search-btn > *,
.header-search button > * {
    display: none !important;
}




/* Footer full width corrigido */
.site-footer {
    width: 100vw !important;
    max-width: none !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    margin-top: 64px;
    background: #171717;
    color: #fff;
}

.site-footer .footer-container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 56px 24px 0;
}

body {
    overflow-x: hidden;
}


@media (max-width: 768px) {
    .main-navigation {
        display: none !important;
    }

    .mobile-menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border: 0;
        background: transparent;
        padding: 0;
        cursor: pointer;
    }

    .mobile-menu-toggle .hamburger-line {
        display: block;
        width: 30px;
        height: 3px;
        background: #111;
        border-radius: 20px;
        margin: 4px 0;
    }

    .header-container {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
    }
}

@media (min-width: 769px) {
    .mobile-menu-toggle {
        display: none !important;
    }
}



@media (max-width: 768px) {

    .mobile-navigation {
        display: none;
    }

    .mobile-navigation.is-open {
        display: block;
    }

}



@media (max-width: 768px) {

    .main-navigation {
        display: none !important;
    }

    .mobile-menu-toggle {
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 5px;
        width: 44px;
        height: 44px;
        background: transparent;
        border: 0;
        padding: 0;
    }

    .hamburger-line {
        width: 28px;
        height: 3px;
        border-radius: 999px;
        background: #111;
        display: block;
    }

    .mobile-navigation {
        display: none;
        position: fixed;
        top: 74px;
        left: 0;
        width: 100%;
        background: #fff;
        z-index: 999;
        padding: 24px;
        box-shadow: 0 10px 30px rgba(0,0,0,.08);
    }

    .mobile-navigation.is-open {
        display: block;
    }

    .mobile-nav-menu {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .mobile-nav-menu li {
        margin-bottom: 18px;
    }

    .mobile-nav-menu a {
        font-size: 24px;
        font-weight: 700;
        text-transform: uppercase;
        color: #111;
    }
}



.hamburger-line {
    display: block;
    width: 28px;
    height: 3px;
    background: #111;
    border-radius: 999px;
}


@media (max-width: 768px) {

    /* remove lupa/pesquisa no mobile */
    .header-search {
        display: none !important;
    }

    /* deixa o sanduíche mais compacto */
    .mobile-menu-toggle {
        gap: 3px !important;
    }

    .mobile-menu-toggle .hamburger-line {
        width: 30px;
        height: 3px;
        margin: 0 !important;
    }

}