/* ========== single-fullwidth.css ========== */
/* Estilos optimizados para plantilla de ancho completo - VERSIÓN CORREGIDA */

/* ========== VARIABLES Y CONFIGURACIÓN ========== */
.fullwidth-template {
    --color-header-bg: #f8f9fa;
    --content-max-width: 1600px;
    --text-max-width: 800px;
    --footer-max-width: 1200px;
    --spacing-xl: 60px;
    --spacing-lg: 50px;
    --spacing-md: 40px;
    --spacing-sm: 30px;
    --spacing-xs: 20px;
}

[data-theme="dark"] .fullwidth-template {
    --color-header-bg: #2a2a2a;
}

/* ========== ESTRUCTURA PRINCIPAL ========== */
.fullwidth-wrapper,
.fullwidth-content {
    width: 100%;
    margin: 0;
    padding: 0;
    max-width: none;
}

.fullwidth-template .site-content {
    padding: 0;
}

.fullwidth-template article {
    max-width: var(--content-max-width);
    margin: 0 auto;
    width: 100%;
}

/* ========== HEADER DEL POST ========== */
.fullwidth-template .post-header {
    padding: var(--spacing-xl) 5%;
    background-color: var(--color-header-bg);
    margin-bottom: 0;
    text-align: center;
}

.fullwidth-template .post-title {
    font-size: clamp(2rem, 5vw, 3rem);
    margin: 0 0 var(--spacing-xs);
    line-height: 1.2;
}

.fullwidth-template .post-meta {
    justify-content: center;
    margin-bottom: 0;
}

/* ========== CONTENIDO PRINCIPAL ========== */
.fullwidth-template .post-content {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: var(--spacing-lg) 5%;
    line-height: 1.7;
    font-size: 1.3rem;
}

/* ========== ELEMENTOS CENTRADOS ========== */
.fullwidth-template .post-content p,
.fullwidth-template .post-content h2,
.fullwidth-template .post-content h3,
.fullwidth-template .post-content blockquote,
.fullwidth-template .post-content .wp-block-list {
    max-width: var(--text-max-width);
    margin-left: auto;
    margin-right: auto;
}

/* ========== ESTILOS INDIVIDUALES ========== */
/* Párrafos */
.fullwidth-template .post-content p {
    margin-bottom: 1.8rem;
    margin-top: 1.5rem;
}

/* Encabezados */
.fullwidth-template .post-content h2 {
    font-size: 2rem;
    margin: var(--spacing-lg) auto calc(var(--spacing-lg) / 2);
    text-align: left;
}

.fullwidth-template .post-content h3 {
    font-size: 1.6rem;
    margin: var(--spacing-md) auto var(--spacing-xs);
    text-align: left;
}

/* Blockquotes */
.fullwidth-template .post-content blockquote {
    margin: var(--spacing-md) auto;
    padding-left: var(--spacing-sm);
    border-left: 4px solid var(--color-primary);
    font-style: italic;
}

/* ========== SISTEMA DE LISTAS OPTIMIZADO ========== */
/* Estilos base para todas las listas */
.fullwidth-template .post-content ul,
.fullwidth-template .post-content ol {
    padding-left: var(--spacing-md);
    margin-bottom: 1.8rem;
}

/* Listas regulares (sin centrado) */
.fullwidth-template .post-content ul:not(.wp-block-list),
.fullwidth-template .post-content ol:not(.wp-block-list) {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

/* ========== CORRECCIÓN ESPECÍFICA PARA wp-block-list ========== */
/* Listas .wp-block-list (centradas) - CON !important PARA GARANTIZAR FUNCIONAMIENTO */
.fullwidth-template .post-content .wp-block-list,
.fullwidth-template .post-content ul.wp-block-list,
.fullwidth-template .post-content ol.wp-block-list {
    margin-bottom: 1.8rem;
    box-sizing: border-box;
    display: block !important;
    max-width: var(--text-max-width) !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Elementos de lista */
.fullwidth-template .post-content ul li,
.fullwidth-template .post-content ol li,
.fullwidth-template .post-content .wp-block-list li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* ========== MEDIA ========== */
/* Imágenes */
.fullwidth-template .post-content img {
    width: 100%;
    max-width: none;
    margin: var(--spacing-md) 0 0 0;
}

.fullwidth-template .post-content img.alignfull {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

/* Pie de foto */
.wp-element-caption {
    font-style: italic;
    font-size: calc(var(--font-size-base) * 0.9);
    color: var(--color-text-light);
    text-align: center;
    margin-top: calc(var(--spacing-unit) * 0.3);
    line-height: 1.4;
    padding: calc(var(--spacing-unit) * 0.3125) calc(var(--spacing-unit) * 0.625);
    background: var(--color-card-hover);
    border-left: 3px solid var(--color-border);
    font-family: var(--font-main);
    border-radius: calc(var(--border-radius) * 0.5);
    transition: color var(--transition-speed), background var(--transition-speed), border-color var(--transition-speed);
}

/* ========== VIDEOS YOUTUBE ========== */
.fullwidth-template .post-content .lazy-youtube {
    width: 100%;
    margin: var(--spacing-md) auto;
    display: block;
}

/* ========== LAZY YOUTUBE RESPONSIVE ========== */
/* Escritorio y laptops - 50% y centrado */
@media (min-width: 1024px) {
    .fullwidth-template .post-content .lazy-youtube {
        width: 60%;
        max-width: 60%;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Móviles y tablets - 100% de ancho */
@media (max-width: 1023px) {
    .fullwidth-template .post-content .lazy-youtube {
        width: 100%;
        max-width: 100%;
    }
}

/* ========== FOOTER Y COMENTARIOS ========== */
.fullwidth-template .post-footer {
    max-width: var(--footer-max-width);
    margin: 0 auto;
    padding: var(--spacing-md) 5%;
    border-top: 1px solid var(--color-border);
}

.fullwidth-template .post-comments {
    max-width: var(--footer-max-width);
    margin: 0 auto;
    padding: 0 5%;
}

/* ========== RESPONSIVE ========== */
/* Tablet (780px) */
@media (max-width: 780px) {
    .fullwidth-template .post-header {
        padding: var(--spacing-md) 5%;
    }
    
    .fullwidth-template .post-content {
        width: 100%;
        max-width: 100%;
        padding: var(--spacing-sm) 5%;
    }
    
    .fullwidth-template .post-content h2 {
        font-size: 1.7rem;
    }
    
    .fullwidth-template .post-content h3 {
        font-size: 1.4rem;
    }
    
    .fullwidth-template .post-footer {
        padding: var(--spacing-sm) 5%;
    }
}

/* Móvil (450px) */
@media (max-width: 450px) {
    .fullwidth-template .post-header {
        padding: var(--spacing-sm) 5%;
    }
    
    .fullwidth-template .post-content {
        width: 100%;
        max-width: 100%;
        padding: var(--spacing-xs) 5%;
        font-size: 1rem;
    }
    
    .fullwidth-template .post-content img {
        margin: calc(var(--spacing-lg) / 2) 0;
    }
    
    /* Elementos centrados en móvil */
    .fullwidth-template .post-content h2 {
        font-size: 1.5rem;
        margin: calc(var(--spacing-md) + 5px) auto var(--spacing-xs);
    }
    
    .fullwidth-template .post-content h3 {
        font-size: 1.3rem;
        margin: var(--spacing-sm) auto 18px;
    }
    
    .fullwidth-template .post-content blockquote {
        padding-left: var(--spacing-xs);
        margin: var(--spacing-sm) auto;
    }
    
    /* Listas en móvil */
    .fullwidth-template .post-content ul,
    .fullwidth-template .post-content ol {
        padding-left: var(--spacing-sm);
    }
    
    /* Asegurar que wp-block-list se mantenga centrado en móvil */
    .fullwidth-template .post-content .wp-block-list,
    .fullwidth-template .post-content ul.wp-block-list,
    .fullwidth-template .post-content ol.wp-block-list {
        margin-left: auto !important;
        margin-right: auto !important;
        max-width: 100% !important;
    }
    
    .fullwidth-template .post-footer {
        padding: calc(var(--spacing-lg) / 2) 5%;
    }
}

/* Pantallas grandes (1400px+) */
@media (min-width: 1400px) {
    .fullwidth-template .post-content img.alignfull {
        max-height: 80vh;
        object-fit: cover;
    }
}



/* ========== Barra de búsqueda ========== */

.site-search-bar {
    margin: 30px 0 50px;
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.search-invitation {
    font-size: 1.4rem;
    color: var(--color-text-light);
    margin-bottom: 10px;
    font-weight: 500;
}

.site-search-bar .search-form {
    display: inline-flex;
    width: 100%;
    max-width: 700px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.1),
        0 4px 12px rgba(0, 0, 0, 0.08);
    background: #fff;
    border: 1px solid #e0e0e0;
}

.site-search-bar .search-input-group {
    flex: 1;
    display: flex;
    align-items: stretch;
    width: 100%;
}

.site-search-bar .search-field {
    flex: 1;
    padding: 12px 20px;
    font-size: 1.4rem;
    border: none;
    outline: none;
    background: #fff !important;
    color: #222 !important;
    border-top-left-radius: 24px;
    border-bottom-left-radius: 24px;
    width: 100%;
    font-family: inherit;
}

.site-search-bar .search-field:focus {
    background: #f8f9fa !important;
}

.site-search-bar .search-field::placeholder {
    color: #666 !important;
    opacity: 1;
}

.site-search-bar .search-submit {
    flex-shrink: 0;
    padding: 0 25px;
    background-color: var(--color-primary);
    color: #fff;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-top-right-radius: 24px;
    border-bottom-right-radius: 24px;
    font-family: inherit;
    font-size: 1rem;
}

.site-search-bar .search-submit:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.site-search-bar .search-submit:active {
    transform: translateY(0);
}

/* Mejoras para móviles */
@media (max-width: 768px) {
    .site-search-bar {
        margin: 20px 0 30px;
        padding: 0 10px;
        gap: 12px;
    }
    
    .search-invitation {
        font-size: 1.4rem;
        margin-bottom: 8px;
        padding: 0 10px;
    }
    
    .site-search-bar .search-form {
        flex-direction: row;
        max-width: 100%;
        border-radius: 20px;
        height: 50px;
    }

    .site-search-bar .search-input-group {
        flex-direction: row;
        width: 100%;
    }

    .site-search-bar .search-field {
        height: 48px;
        border-radius: 20px 0 0 20px;
        padding: 0 16px;
        font-size: 1.2rem;
    }

    .site-search-bar .search-submit {
        height: 48px;
        min-width: 80px;
        padding: 0 18px;
        border-radius: 0 20px 20px 0;
        font-size: 0.95rem;
    }
}

/* Para pantallas muy pequeñas */
@media (max-width: 480px) {
    .site-search-bar {
        margin: 15px 0 25px;
        padding: 0 8px;
    }
    
    .search-invitation {
        font-size: 0.95rem;
    }
    
    .site-search-bar .search-form {
        height: 46px;
        border-radius: 18px;
    }
    
    .site-search-bar .search-field {
        height: 44px;
        padding: 0 14px;
        font-size: 0.9rem;
        border-radius: 18px 0 0 18px;
    }
    
    .site-search-bar .search-submit {
        height: 44px;
        min-width: 70px;
        padding: 0 16px;
        font-size: 0.9rem;
        border-radius: 0 18px 18px 0;
    }
}

/* Modo oscuro */
[data-theme="dark"] .site-search-bar .search-form {
    background: var(--color-background);
    border-color: var(--color-border);
}

[data-theme="dark"] .site-search-bar .search-field {
    background: #fff !important;
    color: #222 !important;
}

[data-theme="dark"] .site-search-bar .search-field:focus {
    background: #f8f9fa !important;
}

[data-theme="dark"] .site-search-bar .search-field::placeholder {
    color: #666 !important;
}

[data-theme="dark"] .site-search-bar .search-submit {
    background-color: var(--color-primary);
}

[data-theme="dark"] .site-search-bar .search-submit:hover {
    background-color: var(--color-primary-hover);
}

/* Estados de carga */
.site-search-bar .search-form.loading .search-submit {
    opacity: 0.7;
    pointer-events: none;
}

.site-search-bar .search-form:not(.loading) .search-submit {
    opacity: 1;
    pointer-events: auto;
}


