/*
Theme Name: Ideioso Vanilla
Theme URI: https://ideioso.com.br
Author: Hugo Antonio
Author URI: https://ideioso.com.br
Description: Tema premium desenvolvido do zero, focado em performance (Zero bloat), core web vitals e design arrojado em cores escuras. Utiliza Customizer nativo, dispensando Page Builders.
Version: 1.0.0
Text Domain: ideioso-vanilla
*/

/* -------------------------------------------------------------------------
   1. CSS Variables & Tokens (Light/Dark Mode via attribute)
------------------------------------------------------------------------- */
:root {
    /* Cores (Default: Dark Mode) */
    --color-bg: #09090b;
    --color-surface: #18181b;
    --color-surface-hover: #27272a;
    --color-border: rgba(255, 255, 255, 0.05);
    --color-primary: #b91c1c;
    --color-primary-hover: #991b1b;
    --color-text: #fafafa;
    --color-text-muted: #a1a1aa;
    
    /* Fontes */
    --font-main: 'Inter', system-ui, sans-serif;
    
    /* Espaçamentos e Transições */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --container-width: 1200px;
}

:root[data-theme="light"] {
    --color-bg: #fafafa;
    --color-surface: #ffffff;
    --color-surface-hover: #f4f4f5;
    --color-border: rgba(0, 0, 0, 0.08);
    --color-text: #09090b;
    --color-text-muted: #52525b;
}

/* -------------------------------------------------------------------------
   2. Reset Global
------------------------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* -------------------------------------------------------------------------
   3. Header & Navigation (Glassmorphism)
------------------------------------------------------------------------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(9, 9, 11, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    transition: var(--transition);
}

:root[data-theme="light"] .site-header {
    background: rgba(255, 255, 255, 0.85);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100px;
}

.custom-theme-logo {
    display: block;
    max-height: 80px;
}

.custom-theme-logo img {
    height: 80px;
    width: auto;
    display: block;
}

/* Default Dark Theme: show dark logo */
.logo-dark {
    display: block !important;
}
.logo-light {
    display: none !important;
}

/* Light Theme: show light logo */
:root[data-theme="light"] .logo-dark {
    display: none !important;
}
:root[data-theme="light"] .logo-light {
    display: block !important;
}

.site-branding .site-title {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--color-text);
}

.site-branding .site-title span {
    color: var(--color-primary);
}

.main-navigation {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.main-navigation > ul, .main-navigation div > ul {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-form {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 0.25rem 0.5rem;
}

:root[data-theme="light"] .search-form {
    background: rgba(0, 0, 0, 0.05);
}

.search-field {
    background: transparent;
    border: none;
    color: var(--color-text);
    padding: 0.5rem;
    outline: none;
    width: 150px;
}

.search-field::placeholder {
    color: var(--color-text-muted);
}

.search-submit {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 0.5rem;
}

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

.main-navigation a {
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
}

.main-navigation a:hover {
    color: var(--color-text);
}

.theme-toggle-btn {
    background: transparent;
    border: none;
    color: var(--color-text);
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--color-text);
    font-size: 1.5rem;
    cursor: pointer;
}

/* -------------------------------------------------------------------------
   4. Hero Section
------------------------------------------------------------------------- */
.hero-section {
    padding-top: 140px;
    padding-bottom: 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -2px;
}

.hero-title .highlight {
    background: linear-gradient(to right, var(--color-primary), #ff7675);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    margin-bottom: 2.5rem;
}

.btn-primary {
    display: inline-block;
    background-color: var(--color-primary);
    color: #fff !important;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
    transition: var(--transition);
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.6);
}

.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(239, 68, 68, 0.15) 0%, transparent 70%);
    z-index: 1;
    pointer-events: none;
}

/* -------------------------------------------------------------------------
   5. Content Grid
------------------------------------------------------------------------- */
.site-main {
    padding: 4rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 3rem;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 3.5rem;
}

.post-card {
    background-color: var(--color-surface);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-8px);
    border-color: rgba(239, 68, 68, 0.3);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.post-thumbnail {
    height: 220px;
    position: relative;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.post-meta {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

.post-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.post-title a:hover {
    color: var(--color-primary);
}

/* -------------------------------------------------------------------------
   6. Single Post
------------------------------------------------------------------------- */
.single-post-header {
    margin-top: 120px;
    margin-bottom: 3rem;
    text-align: center;
}

.single-post-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.entry-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
}

.entry-content p {
    margin-bottom: 1.5rem;
}

.entry-content h2, .entry-content h3 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

/* Pagination */
.pagination .page-numbers {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0 0.2rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    color: var(--color-text);
    font-weight: 600;
}

.pagination .page-numbers.current, .pagination .page-numbers:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

/* -------------------------------------------------------------------------
   7. Footer
------------------------------------------------------------------------- */
.site-footer {
    background-color: var(--color-surface);
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--color-border);
    margin-top: 4rem;
    text-align: center;
}

.site-footer p {
    color: var(--color-text-muted);
}

/* -------------------------------------------------------------------------
   8. Responsive
------------------------------------------------------------------------- */
@media screen and (max-width: 768px) {
    .main-navigation {
        display: none; /* Em um setup completo usariamos uma classe .toggled */
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: var(--color-bg);
        padding: 2rem;
        border-bottom: 1px solid var(--color-border);
    }
    .main-navigation.toggled {
        display: block;
    }
    .main-navigation ul {
        flex-direction: column;
    }
    .menu-toggle {
        display: block;
    }
    .hero-title {
        font-size: 3rem;
    }
}
