/*
Theme Name: ANHQV Tech
Theme URI: https://aquinohayquienviva.es
Author: Antigravity AI
Description: A modern, tech-focused dark mode theme with glassmorphism effects. v2.0
Version: 1.1.0
*/

:root {
    /* Identidad de Marca (Tech Magazine) */
    --accent-primary: #3b82f6;
    /* Blue 500 */
    --accent-glow: #60a5fa;
    /* Blue 400 */
    --accent-secondary: #f59e0b;
    /* Amber 500 */

    /* Fondo y Superficies (Dark Mode) */
    --bg-body: #0f172a;
    /* Slate 900 */
    --bg-card: #1e293b;
    /* Slate 800 */
    --bg-header: #0f172a;
    /* Solid Background (Fix user issue) */

    /* Tipografía */
    --text-main: #f8fafc;
    /* Slate 50 */
    --text-muted: #94a3b8;
    /* Slate 400 */

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Espaciado */
    --container-width: 1200px;
    --reading-width: 800px;
    /* Ancho optimo lectura */
}

/* Reset Básico */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.7;
    font-size: 18px;
    /* Bigger base font for "Modern" feel */
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--accent-glow);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* Tipografía */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-main);
    margin-bottom: 0.75em;
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: 2.5rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2rem;
}

p {
    margin-bottom: 1.5rem;
}

/* Header (Solid + Shadow) */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-header);
    /* backdrop-filter: none; Removed to avoid glitch/transparency issues */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0;
    /* Zero padding as requested */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.header-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 45px;
    /* Extremely compact */
}

/* ANTI-AD PROTECTION: Force hide ads injected into header */
.site-header .google-auto-placed,
.site-header .adsbygoogle,
.site-header ins {
    display: none !important;
    height: 0 !important;
    overflow: hidden !important;
}

.site-branding a {
    display: flex;
    align-items: center;
    height: 100%;
    text-decoration: none;
}

.site-branding img {
    height: 32px;
    /* Fit within 45px header */
    width: auto;
    border-radius: 0;
    display: block;
    margin-right: 12px;
    /* Space between logo and text */
}

.brand-text {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

.site-tagline {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-left: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-left: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    line-height: 1;
    display: inline-block;
    white-space: nowrap;
}

/* Hide tagline on very small mobiles to prevent overflow */
@media (max-width: 400px) {
    .site-tagline {
        display: none;
    }
}

.main-navigation ul {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.main-navigation a {
    font-weight: 600;
    font-size: 1rem;
    position: relative;
    opacity: 0.8;
}

.main-navigation a:hover {
    opacity: 1;
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
    /* Glowing text */
}

/* Grid Layout (Masonry-ish) */
.main-container {
    max-width: var(--container-width);
    margin: 4rem auto;
    padding: 0 1.5rem;
}

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

/* Cards Modernized */
.post-card {
    background: var(--bg-card);
    border-radius: 20px;
    /* Rounder */
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.27), box-shadow 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.03);
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    /* Deep shadow */
    border-color: rgba(59, 130, 246, 0.4);
}

.post-thumbnail {
    aspect-ratio: 16/9;
    overflow: hidden;
    position: relative;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    border-radius: 0;
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.1);
}

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

.post-category a {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--accent-secondary);
    font-weight: 800;
    letter-spacing: 0.08em;
    background: rgba(245, 158, 11, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
}

.post-title {
    font-size: 1.4rem;
    margin: 1rem 0;
}

.post-excerpt {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.post-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1rem;
    margin-top: auto;
}

/* SINGLE POST VIEW (Reading Experience) */
.single-post-container {
    max-width: var(--reading-width);
    margin: 0 auto;
}

.entry-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-top: 2rem;
}

.entry-title {
    font-size: 3rem;
    line-height: 1.1;
    margin-top: 1rem;
    background: linear-gradient(to bottom right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-meta {
    font-family: var(--font-heading);
    color: var(--accent-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.entry-thumbnail-full {
    margin: -2rem -4rem 3rem -4rem;
    /* Break out of container */
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.entry-content {
    font-size: 1.125rem;
    /* 18px reading text */
    color: #cbd5e1;
    /* Lighter than muted */
}

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

.entry-content h2 {
    margin-top: 3rem;
    font-size: 1.8rem;
    color: var(--accent-glow);
}

.entry-footer-tags {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.tags-label {
    font-weight: 700;
    color: var(--text-muted);
    margin-right: 0.5rem;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.entry-footer-tags a {
    display: inline-block;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 12px;
    border-radius: 99px;
    font-size: 0.85rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.entry-footer-tags a:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

/* Homepage Card Tags */
.card-tags {
    margin-bottom: 1rem;
}

.card-tags a {
    display: inline-block;
    font-size: 0.7rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    padding: 2px 8px;
    border-radius: 4px;
    /* Less rounded for small tags */
    margin-right: 4px;
    margin-bottom: 4px;
    transition: all 0.2s;
}

.card-tags a:hover {
    background: var(--accent-primary);
    color: white;
}

/* AD ZONES */
.ad-zone {
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    padding: 1rem;
    margin: 2rem 0;
    text-align: center;
    border-radius: 8px;
}

.ad-zone::before {
    content: 'ADVERTISEMENT';
    display: block;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.2);
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
}

/* SIDEBAR LAYOUT (v3) */
.layout-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    align-items: start;
}

@media (max-width: 900px) {
    .layout-grid {
        grid-template-columns: 1fr;
        /* Stack on mobile */
    }
}

/* Sidebar Widget Styles */
.widget-area {
    position: sticky;
    top: 6rem;
    /* Stick below header */
}

.widget {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}


/* Search Widget Styles */
.sidebar-search {
    margin-bottom: 2rem;
}

.search-form {
    display: flex;
    position: relative;
    width: 100%;
}

.search-field {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 99px;
    padding: 0.8rem 1.5rem;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    outline: none;
}

.search-field:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    background: rgba(30, 41, 59, 0.8);
}

.search-submit {
    position: absolute;
    right: 5px;
    top: 5px;
    bottom: 5px;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 99px;
    padding: 0 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.85rem;
}

.search-submit:hover {
    background: var(--accent-glow);
}

.widget-title {
    font-size: 1.25rem;
    color: var(--accent-glow);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.widget ul {
    list-style: none;
}

.widget ul li {
    margin-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    padding-bottom: 0.5rem;
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget a {
    color: var(--text-muted);
    font-weight: 500;
}

.widget a:hover {
    color: var(--accent-primary);
    padding-left: 5px;
    /* Slide effect */
}

/* Adjust Masonry for Sidebar presence */
.posts-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    /* Slightly smaller cards */
}

/* Footer */
.site-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 8rem;
    padding: 5rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    background: #0b1120;
}