/*
 * Theme Name: Minimalista Contemporáneo - Accent Verde
 * Description: Estilo limpio, blanco, minimalista (Apple/Stripe/Google) con un acento irreverente #A4F939. Pensado para diseñadores.
 */

:root {
    /* Paleta de colores */
    --bg-color: #ffffff;
    --bg-secondary: #fbfbfd;
    --text-main: #1d1d1f; /* Gris casi negro, estilo Apple */
    --text-muted: #86868b;
    --accent: #A4F939; /* Verde irreverente */
    --accent-hover: #90df2f;
    --border-color: #f5f5f7;
    
    /* Tipografía */
    --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    
    /* Espaciado y dimensiones */
    --max-width: 1100px;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    
    /* Sombras */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 20px 40px rgba(164, 249, 57, 0.15); /* Sombra con un ligero tinte verde */
}

/* ==========================================================================
   Reset y Base
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    color: var(--text-main);
    background-color: var(--bg-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--text-main);
    text-decoration: none;
    transition: all 0.3s ease;
}

::selection {
    background-color: var(--accent);
    color: #000;
}

/* ==========================================================================
   Header y Navegación
   ========================================================================== */
#header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#branding {
    flex-shrink: 0;
}

#site-title h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
    text-transform: uppercase;
}

#site-title a {
    position: relative;
    z-index: 1;
}

/* Subrayado verde al hacer hover en el título */
#site-title a::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 100%;
    height: 8px;
    background-color: var(--accent);
    z-index: -1;
    transition: transform 0.2s ease;
    transform-origin: bottom left;
    transform: scaleY(0.3);
}

#site-title a:hover::after {
    transform: scaleY(1);
}

#site-description {
    display: none; /* Ocultamos la descripción en el header para más limpieza */
}

#menu {
    display: flex;
    align-items: center;
    gap: 40px;
}

.menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 32px;
}

.menu li a {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
}

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

/* Buscador del Header */
#search .search-form {
    display: flex;
    position: relative;
    align-items: center;
}

#search .search-field {
    background: var(--bg-secondary);
    border: 1px solid transparent;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-family: inherit;
    font-size: 14px;
    width: 200px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

#search .search-field:focus {
    background: #fff;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(164, 249, 57, 0.2);
    width: 240px;
}

#search .search-submit {
    position: absolute;
    right: 4px;
    background: var(--text-main);
    color: #fff;
    border: none;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

#search .search-submit:hover {
    background: var(--accent);
    color: #000;
}

/* ==========================================================================
   Layout Principal
   ========================================================================== */
#container {
    max-width: var(--max-width);
    margin: 64px auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 64px;
}

/* ==========================================================================
   Artículos (Feed / Blog)
   ========================================================================== */
article.post {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 48px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease;
}

article.post:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: transparent;
}

.entry-title {
    margin: 0 0 16px 0;
    font-size: 32px;
    line-height: 1.2;
    letter-spacing: -0.8px;
    font-weight: 700;
}

.entry-title a {
    color: var(--text-main);
    background: linear-gradient(to right, var(--accent) 0%, var(--accent) 100%);
    background-size: 0px 4px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: background-size 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding-bottom: 4px;
}

article.post:hover .entry-title a {
    background-size: 100% 4px;
}

.entry-meta {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.entry-meta a {
    color: var(--text-main);
}

.entry-meta a:hover {
    color: var(--accent);
}

.entry-summary p {
    font-size: 17px;
    line-height: 1.7;
    color: #555;
    margin: 0 0 24px 0;
}

/* Botón Leer Más */
.more-link {
    display: inline-block;
    background-color: var(--text-main);
    color: #fff !important;
    padding: 10px 24px;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.more-link:hover {
    background-color: var(--accent);
    color: #000 !important;
    transform: translateY(-1px);
}

/* ==========================================================================
   Sidebar (Widgets)
   ========================================================================== */
#sidebar {
    padding-top: 12px;
}

.widget_block {
    margin-bottom: 48px;
    background: var(--bg-secondary);
    padding: 32px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.wp-block-heading {
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin: 0 0 24px 0;
}

.wp-block-latest-posts {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wp-block-latest-posts li {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

.wp-block-latest-posts li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.wp-block-latest-posts a {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--text-main);
    display: block;
}

.wp-block-latest-posts a:hover {
    color: #000;
    padding-left: 8px; /* Pequeño empuje interactivo */
}

/* Formulario de búsqueda en el sidebar */
.widget_search .wp-block-search__label {
    display: none;
}

.widget_search .wp-block-search__inside-wrapper {
    display: flex;
    gap: 8px;
}

.widget_search .wp-block-search__input {
    flex-grow: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.widget_search .wp-block-search__input:focus {
    border-color: var(--accent);
}

.widget_search .wp-block-search__button {
    background: var(--accent);
    color: #000;
    border: none;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.widget_search .wp-block-search__button:hover {
    background: var(--accent-hover);
}

/* ==========================================================================
   Navegación (Paginación)
   ========================================================================== */
.posts-navigation {
    margin-top: 64px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
}

.nav-links {
    display: flex;
    justify-content: space-between;
}

.nav-links a {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    color: var(--text-main);
    padding: 12px 24px;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
}

.nav-links a:hover {
    background: var(--accent);
    color: #000;
}

/* ==========================================================================
   Footer
   ========================================================================== */
#footer {
    text-align: center;
    padding: 64px 24px;
    margin-top: 80px;
    background-color: var(--bg-secondary);
    color: var(--text-muted);
    font-size: 14px;
    border-top: 1px solid var(--border-color);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 992px) {
    #container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    #header {
        flex-direction: column;
        padding: 20px;
        gap: 20px;
    }
    
    #menu {
        flex-direction: column;
        width: 100%;
        gap: 20px;
    }
    
    #search .search-field {
        width: 100%;
    }
    
    #search .search-field:focus {
        width: 100%;
    }
}

@media (max-width: 768px) {
    article.post {
        padding: 32px 24px;
    }
    
    .entry-title {
        font-size: 26px;
    }
}
