/*
Theme Name: Aurora Theme
Theme URI: https://github.com/aurora-theme
Author: Aurora
Author URI: https://aurora.dev
Description: Tema WordPress profesional con seguridad y rendimiento optimizados.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aurora-theme
Tags: blog, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-primary:    #6C63FF;
    --color-secondary:  #FF6584;
    --color-dark:       #1a1a2e;
    --color-gray:       #6b7280;
    --color-light:      #f9fafb;
    --color-white:      #ffffff;
    --color-border:     #e5e7eb;

    --font-base:        'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-heading:     'Segoe UI', system-ui, sans-serif;

    --radius-sm:        4px;
    --radius-md:        8px;
    --radius-lg:        16px;

    --shadow-sm:        0 1px 3px rgba(0,0,0,.08);
    --shadow-md:        0 4px 16px rgba(0,0,0,.10);
    --shadow-lg:        0 8px 32px rgba(0,0,0,.12);

    --transition:       .25s ease;
    --max-width:        1200px;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-base);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-dark);
    background: var(--color-white);
}

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

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover { color: var(--color-secondary); }

/* =============================================
   LAYOUT
   ============================================= */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.site-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-main {
    flex: 1;
    padding: 3rem 0;
}

/* =============================================
   HEADER
   ============================================= */
.site-header {
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    padding-bottom: 1rem;
    gap: 1rem;
}

.site-branding a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-dark);
    letter-spacing: -.5px;
}
.site-branding a:hover { color: var(--color-primary); }

.site-branding .custom-logo {
    max-height: 50px;
    width: auto;
}

/* =============================================
   NAVIGATION
   ============================================= */
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.main-nav a {
    display: block;
    padding: .5rem .9rem;
    border-radius: var(--radius-sm);
    font-size: .95rem;
    font-weight: 500;
    color: var(--color-dark);
    transition: background var(--transition), color var(--transition);
}
.main-nav a:hover,
.main-nav .current-menu-item > a {
    background: var(--color-primary);
    color: var(--color-white);
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: 2px solid var(--color-primary);
    border-radius: var(--radius-sm);
    padding: .4rem .7rem;
    cursor: pointer;
    color: var(--color-primary);
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .menu-toggle { display: block; }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-white);
        border-top: 1px solid var(--color-border);
        box-shadow: var(--shadow-md);
        padding: 1rem;
    }
    .main-nav.is-open { display: block; }
    .main-nav ul { flex-direction: column; }
}

/* =============================================
   POSTS GRID
   ============================================= */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.post-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}
.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

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

.post-content {
    padding: 1.5rem;
}

.post-content h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: .5rem;
    line-height: 1.3;
}
.post-content h2 a { color: var(--color-dark); }
.post-content h2 a:hover { color: var(--color-primary); }

.post-meta {
    font-size: .85rem;
    color: var(--color-gray);
    margin-bottom: 1rem;
    display: flex;
    gap: .5rem;
    align-items: center;
    flex-wrap: wrap;
}

.post-excerpt {
    color: var(--color-gray);
    font-size: .95rem;
    margin-bottom: 1.2rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* =============================================
   SINGLE POST
   ============================================= */
.single-post {
    max-width: 780px;
    margin: 0 auto;
}

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

.featured-image {
    margin: 1.5rem 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
}

.post-body {
    font-size: 1.05rem;
    line-height: 1.8;
}

.post-body h2, .post-body h3 { margin: 2rem 0 1rem; }
.post-body p  { margin-bottom: 1.2rem; }
.post-body ul, .post-body ol { padding-left: 1.5rem; margin-bottom: 1.2rem; }
.post-body blockquote {
    border-left: 4px solid var(--color-primary);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: var(--color-light);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    color: var(--color-gray);
}
.post-body code {
    background: var(--color-light);
    padding: .2em .4em;
    border-radius: var(--radius-sm);
    font-size: .9em;
}
.post-body pre {
    background: var(--color-dark);
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin-bottom: 1.2rem;
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
    display: inline-block;
    padding: .55rem 1.2rem;
    background: var(--color-primary);
    color: var(--color-white) !important;
    border-radius: var(--radius-sm);
    font-size: .9rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
}
.btn:hover {
    background: var(--color-secondary);
    transform: translateY(-1px);
}
.btn-outline {
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary) !important;
}
.btn-outline:hover {
    background: var(--color-primary);
    color: var(--color-white) !important;
}

/* =============================================
   SIDEBAR & WIDGETS
   ============================================= */
.content-sidebar-wrap {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2.5rem;
    align-items: start;
}

@media (max-width: 900px) {
    .content-sidebar-wrap { grid-template-columns: 1fr; }
}

.widget {
    background: var(--color-light);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.widget-title {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 1rem;
    color: var(--color-dark);
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--color-primary);
}

/* =============================================
   PAGINATION
   ============================================= */
.pagination {
    display: flex;
    gap: .5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    font-weight: 500;
    color: var(--color-dark);
    transition: all var(--transition);
}
.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white);
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
    background: var(--color-dark);
    color: rgba(255,255,255,.7);
    padding: 2.5rem 0;
    margin-top: auto;
}

.site-footer .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-nav ul {
    list-style: none;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-nav a {
    color: rgba(255,255,255,.6);
    font-size: .9rem;
    transition: color var(--transition);
}
.footer-nav a:hover { color: var(--color-white); }

/* =============================================
   NO RESULTS / 404
   ============================================= */
.no-results, .error-404 {
    text-align: center;
    padding: 4rem 1rem;
}
.no-results h1, .error-404 h1 {
    font-size: 6rem;
    font-weight: 900;
    color: var(--color-primary);
    line-height: 1;
}

/* =============================================
   ACCESSIBILITY
   ============================================= */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.skip-link {
    position: absolute;
    top: -999px;
    left: 1rem;
    background: var(--color-primary);
    color: #fff;
    padding: .5rem 1rem;
    border-radius: var(--radius-sm);
    z-index: 9999;
}
.skip-link:focus { top: 1rem; }

*:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}
