/*
Theme Name: Maixua Theme
Theme URI: https://www.maixua.net
Author: Maixua
Author URI: https://www.maixua.net
Description: Tema personalizado para Maixua.net centrado en Educación, Inteligencia Artificial y la normativa LOMLOE. Carga ultrarrápida, diseño adaptativo y optimizado para docentes.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: maixua
Tags: education, blog, news, two-columns, custom-menu, featured-images, responsive-layout
*/

:root {
    --primary: #4F46E5;
    --primary-hover: #4338CA;
    --primary-light: #EEF2FF;
    --accent-ia: #0EA5E9;
    --accent-ia-light: #E0F2FE;
    --accent-edu: #10B981;
    --dark: #0F172A;
    --gray-900: #1E293B;
    --gray-700: #334155;
    --gray-500: #64748B;
    --gray-200: #E2E8F0;
    --gray-100: #F8FAFC;
    --white: #FFFFFF;
    --radius-lg: 20px;
    --radius-md: 12px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 20px 35px -10px rgba(79, 70, 229, 0.15);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: #F1F5F9;
    color: var(--gray-700);
    line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    color: var(--dark);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.top-banner {
    background: linear-gradient(135deg, var(--primary) 0%, #3B82F6 100%);
    color: var(--white);
    text-align: center;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.top-banner .badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

header {
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--gray-200);
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 1.6rem;
    color: var(--dark);
    letter-spacing: -0.5px;
}

.logo-icon {
    background: linear-gradient(135deg, var(--primary), var(--accent-ia));
    color: var(--white);
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow-sm);
}

.logo span {
    color: var(--primary);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
}

.nav-menu li a {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--gray-700);
}

.nav-menu li a:hover,
.nav-menu li.current-menu-item > a {
    color: var(--primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--gray-200);
    color: var(--gray-700);
}

.btn-outline:hover {
    background: var(--gray-100);
    border-color: var(--gray-500);
}

.main-wrapper {
    max-width: 1280px;
    margin: 32px auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
}

.featured-hero {
    grid-column: 1 / -1;
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    border: 1px solid var(--gray-200);
}

.featured-hero-content {
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    width: fit-content;
}

.tag-ia {
    background: var(--accent-ia-light);
    color: #0284C7;
}

.tag-lomloe {
    background: #FEF3C7;
    color: #D97706;
}

.featured-hero h2 {
    font-size: 2.2rem;
    line-height: 1.25;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.featured-hero p {
    color: var(--gray-500);
    font-size: 1.05rem;
    margin-bottom: 24px;
}

.meta-info {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-top: auto;
}

.author-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #DDD6FE;
    color: #5B21B6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.featured-hero-image {
    background: linear-gradient(135deg, #1E1B4B 0%, #312E81 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.featured-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
    transition: transform 0.3s ease;
}

.featured-hero:hover .featured-hero-image img {
    transform: scale(1.03);
}

.category-filter {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.filter-btn {
    padding: 10px 20px;
    border-radius: 30px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gray-700);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.filter-btn:hover, .filter-btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: #CBD5E1;
}

.card-image {
    height: 200px;
    position: relative;
    overflow: hidden;
    background: var(--gray-100);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card h3 {
    font-size: 1.25rem;
    line-height: 1.35;
    margin-bottom: 12px;
}

.card p {
    color: var(--gray-500);
    font-size: 0.925rem;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--gray-500);
}

.breadcrumbs {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: -16px;
}

.breadcrumbs a:hover {
    color: var(--primary);
}

.article-container {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    padding: 40px;
    overflow: hidden;
}

.article-header h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    letter-spacing: -0.5px;
    margin-bottom: 16px;
}

.article-subtitle {
    font-size: 1.15rem;
    color: var(--gray-500);
    line-height: 1.5;
    margin-bottom: 24px;
}

.article-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.author-detail {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar-lg {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366F1, #8B5CF6);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
}

.share-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.share-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--gray-200);
    background: var(--white);
    color: var(--gray-700);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.share-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

.featured-image-box {
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 36px;
    background: var(--gray-100);
}

.featured-image-box img {
    width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: cover;
    display: block;
}

.image-caption {
    padding: 10px 16px;
    font-size: 0.825rem;
    color: var(--gray-500);
    text-align: center;
    background: var(--gray-100);
    border-top: 1px solid var(--gray-200);
}

.toc-box {
    background: var(--primary-light);
    border: 1px solid #C7D2FE;
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin-bottom: 32px;
}

.toc-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toc-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.925rem;
}

.toc-list a {
    color: var(--primary);
    font-weight: 500;
}

.article-body {
    font-size: 1.05rem;
    color: var(--gray-700);
    line-height: 1.8;
}

.article-body h2 {
    font-size: 1.75rem;
    margin: 36px 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--gray-100);
}

.article-body h3 {
    font-size: 1.35rem;
    margin: 28px 0 12px;
}

.article-body p {
    margin-bottom: 20px;
}

.article-body ul, .article-body ol {
    margin-bottom: 24px;
    padding-left: 24px;
}

.article-body li {
    margin-bottom: 8px;
}

.callout-box {
    background: var(--gray-100);
    border-left: 4px solid var(--primary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: 20px;
    margin: 28px 0;
    font-size: 0.975rem;
}

.prompt-box {
    background: #0F172A;
    color: #E2E8F0;
    border-radius: var(--radius-md);
    padding: 20px;
    margin: 28px 0;
    position: relative;
    font-family: monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

.prompt-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #334155;
    color: #94A3B8;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.btn-copy-prompt {
    background: rgba(255, 255, 255, 0.1);
    color: #FFF;
    border: none;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-copy-prompt:hover {
    background: var(--primary);
}

.author-bio-card {
    background: var(--gray-100);
    border-radius: var(--radius-md);
    padding: 28px;
    margin-top: 48px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.author-bio-text h4 {
    font-size: 1.15rem;
    margin-bottom: 6px;
}

.author-bio-text p {
    font-size: 0.9rem;
    color: var(--gray-500);
    margin-bottom: 12px;
}

.comments-section {
    margin-top: 48px;
    padding-top: 36px;
    border-top: 1px solid var(--gray-200);
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.widget {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 24px;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
}

.widget-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.widget-title i {
    color: var(--primary);
}

.widget-prompt {
    background: linear-gradient(135deg, #EEF2FF 0%, #E0F2FE 100%);
    border: 1px solid #C7D2FE;
}

.widget-newsletter {
    background: linear-gradient(135deg, var(--dark) 0%, var(--gray-900) 100%);
    color: var(--white);
    border: none;
}

.widget-newsletter h3, .widget-newsletter p {
    color: var(--white);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.input-control {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.05);
    color: var(--white);
    font-size: 0.9rem;
}

.popular-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.popular-item {
    display: flex;
    gap: 12px;
    align-items: center;
}

.popular-num {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: #CBD5E1;
    min-width: 28px;
}

footer {
    background: var(--dark);
    color: #94A3B8;
    margin-top: 60px;
    padding: 60px 0 30px;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 40px;
}

.footer-brand h2 {
    color: var(--white);
    margin-bottom: 12px;
    font-size: 1.5rem;
}

.footer-title {
    color: var(--white);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    max-width: 1280px;
    margin: 40px auto 0;
    padding: 24px 24px 0;
    border-top: 1px solid #1E293B;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
}

.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--dark);
    color: var(--white);
    padding: 12px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    font-size: 0.875rem;
    display: none;
    align-items: center;
    gap: 8px;
    z-index: 1000;
}

@media (max-width: 1024px) {
    .main-wrapper {
        grid-template-columns: 1fr;
    }
    .featured-hero {
        grid-template-columns: 1fr;
    }
    .featured-hero-image {
        height: 250px;
    }
    .footer-container {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    .article-container {
        padding: 24px;
    }
    .article-header h1 {
        font-size: 1.8rem;
    }
    .featured-hero-content {
        padding: 24px;
    }
    .footer-container {
        grid-template-columns: 1fr;
    }
}
