:root {
    --primary: #882AFF;
    --secondary: #D7008D;
    --text: #2E2E2E;
    --text-light: #666;
    --background: #fff;
    --background-alt: #f5f5f5;
    --border: #eaeaea;
    
    --font-primary: 'Inter', sans-serif;
    
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.2);
    
    --transition: all 0.3s ease;
}

/* ===== TRAVAS DE SEGURANÇA ===== */

/* Previne zoom em inputs no iOS */
@supports (-webkit-touch-callout: none) {
    input, textarea, select, button {
        font-size: 16px !important; /* Previne zoom automático no foco */
    }
}

/* Desabilita seleção de texto em elementos interativos */
.no-select, 
button, 
.menu-toggle, 
.search-toggle,
.post-card-link,
.btn-view-all {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent; /* Remove highlight ao tocar */
}

/* Previne arrasto de imagens */
img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    pointer-events: none; /* Desabilita interação com imagens */
}

/* Permite clique apenas no link, não na imagem */
.post-card-link img,
.hero-featured img,
.hero-side-image img {
    pointer-events: none;
}

/* Remove atalho de 3D touch no iOS */
* {
    -webkit-touch-callout: none;
}

/* Melhora toque em elementos clicáveis */
a, button, .clickable {
    touch-action: manipulation; /* Otimiza para touch */
    cursor: pointer;
}

/* Previne zoom duplo-toque */
* {
    touch-action: pan-y pinch-zoom; /* Permite apenas scroll vertical e zoom controlado */
}

/* Remove delay de clique em touch */
a, button, .post-card-link {
    touch-action: manipulation;
}

/* Garante que o site não arraste além do limite */
html, body {
    position: relative;
    width: 100%;
    overflow-x: hidden; /* Previne scroll horizontal */
    max-width: 100vw;
}

/* Previne bounce effect no iOS */
body {
    position: fixed;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* Mantém scroll suave */
}

/* Container principal com scroll controlado */
.site-main {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    color: var(--text);
    line-height: 1.6;
    background: var(--background);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Footer */
.site-footer {
    background: #1a1a1a;
    color: white;
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 2fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    height: 40px;
    width: auto;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    color: white;
    font-size: 20px;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--primary);
    transform: translateY(-3px);
}

.footer-links h4 {
    margin-bottom: 20px;
    font-size: 18px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #999;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.footer-newsletter input {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 6px;
    margin-bottom: 10px;
}

.footer-newsletter button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 6px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.footer-newsletter button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #333;
    color: #999;
    font-size: 14px;
}

/* ===== HEADER MOBILE-FIRST ===== */
.site-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 10px 0;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

/* Botões de ação */
.search-toggle,
.menu-toggle {
    background: none;
    border: none;
    font-size: 20px;
    color: #333;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-toggle {
    margin-left: -8px; /* Alinhamento fino */
}

.search-toggle:hover,
.menu-toggle:hover {
    background: #f5f5f5;
}

/* Logo centralizada */
.logo {
    flex: 1;
    text-align: center;
}

.logo img {
    max-height: 40px;
    width: auto;
    display: inline-block;
}

/* Menu hamburger */
.menu-toggle {
    width: 40px;
    height: 40px;
    flex-direction: column;
    gap: 5px;
    margin-right: -8px; /* Alinhamento fino */
}

.hamburger-line {
    width: 22px;
    height: 2px;
    background-color: #333;
    transition: all 0.3s ease;
    display: block;
    border-radius: 3px;
}

/* Barra de busca */
.search-bar {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: white;
    padding: 0 15px;
}

.search-bar.active {
    max-height: 70px;
    padding: 15px;
}

.search-form {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f5f5f5;
    border-radius: 30px;
    padding: 5px 15px;
}

.search-form input {
    flex: 1;
    border: none;
    background: none;
    padding: 10px 0;
    font-size: 16px;
    outline: none;
}

.search-form button {
    background: none;
    border: none;
    color: #666;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
}

.search-form button:hover {
    color: var(--primary);
}

.search-close {
    border-left: 1px solid #ddd;
    padding-left: 15px;
}

/* Menu lateral (deslizante) */
.side-menu {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    height: 100vh;
    background: white;
    z-index: 1001;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.side-menu.active {
    left: 0;
}

.side-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.side-menu-logo img {
    max-height: 32px;
    width: auto;
}

.side-menu-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    padding: 5px;
}

.side-menu-content {
    padding: 20px;
}

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

.side-menu-item {
    margin-bottom: 5px;
}

.side-menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.side-menu-link i {
    width: 20px;
    color: var(--primary);
    font-size: 16px;
}

.side-menu-link:hover {
    background: #f5f5f5;
    color: var(--primary);
    padding-left: 20px;
}

.side-menu-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 20px 0;
}

.side-menu-social {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.side-menu-social a {
    color: #666;
    font-size: 20px;
    transition: color 0.3s ease;
}

.side-menu-social a:hover {
    color: var(--primary);
}

/* Overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Desktop */
@media (min-width: 1024px) {
    .side-menu {
        width: 350px;
    }
}

/* Touch improvements */
@media (hover: none) and (pointer: coarse) {
    .search-toggle,
    .menu-toggle,
    .side-menu-link {
        min-height: 48px;
    }
    
    .search-form input {
        font-size: 16px; /* Previne zoom em iOS */
    }
}

/* Responsividade Básica */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
}