/*
Theme Name: PAN Edomex FSE
Theme URI: https://panedomex.org
Author: PAN Edomex Dev
Description: Tema Full Site Editing para el portal del PAN Estado de México. Construido sobre WordPress nativo (bloques). Paleta institucional PAN: azul marino, rojo guinda y blanco. Cero dependencia de Elementor o plugins de page builder.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pan-edomex-fse
*/

@import url('https://fonts.googleapis.com/css2?family=Exo:wght@300;400;700;900&family=Montserrat:wght@300;400;700;900&family=Poppins:wght@300;400;700;900&family=Roboto:wght@300;400;700;900&display=swap');

/* =========================================================
   RESET BRUTALISTA INSTITUCIONAL
   Sin border-radius, sin box-shadows.
   La geometría cuadrada refleja rigor y transparencia.
   ========================================================= */
* {
    box-shadow: none !important;
    border-radius: 0 !important;
}

/* Base tokens */
body {
    background-color: var(--wp--preset--color--base) !important;
    color: var(--wp--preset--color--main) !important;
    font-family: var(--wp--preset--font-family--sans) !important;
}

/* Encabezado del sitio */
.site-header {
    border-bottom: 3px solid var(--wp--preset--color--primary) !important;
}

/* Pie de sitio */
.site-footer {
    border-top: 6px solid var(--wp--preset--color--secondary) !important;
}

/* Tarjetas de militantes y componentes del portal */
.pan-card {
    border: 2px solid var(--wp--preset--color--main);
    padding: 1.5rem;
    background: var(--wp--preset--color--base);
}

.pan-card:hover {
    background: var(--wp--preset--color--primary);
    color: #fff;
    transition: background 0.2s ease;
}

/* Badge institucional */
.pan-badge {
    display: inline-block;
    background: var(--wp--preset--color--secondary);
    color: var(--wp--preset--color--primary);
    font-weight: 900;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    padding: 0.25rem 0.75rem;
}

/* =========================================================
   ESTILOS DE BLOQUE NATIVOS PARA PORTFOLIO / QUERY LOOP
   ========================================================= */

/* Tarjeta Ejecutiva (is-style-pan-card) */
.is-style-pan-card {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 2rem !important;
}

.is-style-pan-card .wp-block-post {
    border: 3px solid var(--wp--preset--color--primary) !important;
    background: #ffffff !important;
    padding: 2rem !important;
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: space-between !important;
}

/* Forzar avatar circular en Tarjeta Ejecutiva y proveer silueta SVG de fallback si no hay foto */
.is-style-pan-card .wp-block-post-featured-image {
    border-radius: 50% !important;
    width: 140px !important;
    height: 140px !important;
    margin: 0 auto 1.5rem !important;
    border: 4px solid var(--wp--preset--color--secondary) !important;
    background-color: var(--wp--preset--color--surface) !important;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23003087"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>') !important;
    background-size: 70% !important;
    background-repeat: no-repeat !important;
    background-position: center bottom !important;
    overflow: hidden !important;
}

.is-style-pan-card img,
.is-style-pan-card .wp-block-post-featured-image img {
    border-radius: 50% !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.is-style-pan-card .wp-block-post-title {
    font-size: 1.25rem !important;
    font-weight: 900 !important;
    margin-bottom: 0.5rem !important;
}

/* Lista Institucional (is-style-pan-list) */
.is-style-pan-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
}

.is-style-pan-list .wp-block-post {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 1.5rem !important;
    border-bottom: 2px solid var(--wp--preset--color--surface) !important;
    padding-bottom: 1rem !important;
    background: transparent !important;
}

.is-style-pan-list .wp-block-post-featured-image img {
    width: 60px !important;
    height: 60px !important;
    object-fit: cover !important;
    border-radius: 0 !important; /* Cuadrado */
    border: 2px solid var(--wp--preset--color--primary) !important;
}

.is-style-pan-list .wp-block-post-title {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    margin: 0 !important;
}

/* =========================================================
   PARIDADES GEOMÉTRICAS ADICIONALES (ESCENARIO BETA)
   ========================================================= */

/* Holgura visual y paddings fijos de sección */
main.wp-block-group > .wp-block-group {
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
}

/* Rejilla de accesos rápidos del Home */
.home-access-grid {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 1.5rem !important;
    margin: 2rem 0 !important;
}

.home-access-grid > .wp-block-column {
    flex: 1 1 300px !important;
    border: 1px solid var(--wp--preset--color--primary) !important;
    padding: 2rem !important;
    background: #ffffff !important;
    transition: transform 0.2s ease, border-color 0.2s ease !important;
}

.home-access-grid > .wp-block-column:hover {
    border-color: var(--wp--preset--color--secondary) !important;
    background: var(--wp--preset--color--surface) !important;
}

/* Margen superior/inferior de Taxonomía Portafolio */
.archive-portfolio-layout,
.taxonomy-portfolio-layout {
    margin-top: 2rem !important;
    margin-bottom: 2rem !important;
}

/* Estilización de Barras de Progreso nativas */
.wp-block-progress,
.wp-block-progress-bar {
    width: 100% !important;
    background-color: var(--wp--preset--color--surface) !important;
    border: 1px solid var(--wp--preset--color--main) !important;
    height: 1.25rem !important;
    margin-bottom: 1.5rem !important;
}

.wp-block-progress-bar-fill {
    height: 100% !important;
    background-color: var(--wp--preset--color--primary) !important;
}

/* Cajas de Características (litho-feature-box equivalents) */
.feature-box-grid > .wp-block-column {
    border: 1px solid var(--wp--preset--color--primary) !important;
    padding: 1.75rem !important;
    background: #ffffff !important;
    font-family: 'Montserrat', sans-serif !important;
}

/* Iconos de archivos PDF en Documentos Básicos */
a[href$=".pdf"]::before {
    content: "PDF" !important;
    display: inline-block !important;
    background-color: var(--wp--preset--color--secondary) !important;
    color: #ffffff !important;
    font-size: 0.65rem !important;
    font-weight: 900 !important;
    padding: 0.15rem 0.35rem !important;
    margin-right: 0.5rem !important;
    text-transform: uppercase !important;
}

/* Formulario de afiliación wide screen patch */
.afiliacion-form-container {
    max-width: 600px !important;
    margin: 0 auto !important;
    padding: 2rem !important;
    border: 2px solid var(--wp--preset--color--primary) !important;
    background-color: #ffffff !important;
}

/* Ocultar badge flotante de reCAPTCHA en desarrollo */
.grecaptcha-badge {
    display: none !important;
}

/* =========================================================
   ESTILOS PARA SHORTCODES INSTITUCIONALES PARAMETRIZABLES
   ========================================================= */

.pan-shortcode-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 1.5rem !important;
    margin: 1.5rem 0 !important;
}

.pan-event-card {
    border: 2px solid #ffffff !important;
    padding: 1.5rem !important;
    background: #ffffff !important;
    color: #111111 !important;
}

.pan-event-card h3 {
    margin-top: 0 !important;
    font-weight: 800 !important;
    font-size: 1.2rem !important;
}

.pan-event-card h3 a {
    color: var(--wp--preset--color--primary) !important;
    text-decoration: none !important;
}

.pan-event-card h3 a:hover {
    text-decoration: underline !important;
}

.pan-news-card {
    border: 1px solid rgba(255,255,255,0.2) !important;
    padding: 1rem !important;
    background: #ffffff !important;
    color: #111111 !important;
    display: flex !important;
    flex-direction: column !important;
}

.pan-news-card img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16/9 !important;
    object-fit: cover !important;
}

.pan-news-card .news-meta {
    font-size: 0.75rem !important;
    color: var(--wp--preset--color--secondary) !important;
    font-weight: 700 !important;
    margin: 0.5rem 0 0.25rem !important;
}

.pan-news-card h3 {
    margin: 0.5rem 0 !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
}

.pan-news-card h3 a {
    color: #111111 !important;
    text-decoration: none !important;
}

.pan-news-card .news-date {
    font-size: 0.75rem !important;
    color: #777777 !important;
    margin-top: auto !important;
}

.pan-magazine-card {
    border: 1px solid rgba(255,255,255,0.2) !important;
    padding: 1rem !important;
    background: #ffffff !important;
    color: #111111 !important;
    text-align: center !important;
}

.pan-magazine-card img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 3/4 !important;
    object-fit: cover !important;
    margin-bottom: 0.75rem !important;
}

.pan-magazine-card h3 {
    margin: 0 !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
}

.pan-official-card {
    border: 3px solid var(--wp--preset--color--primary) !important;
    background: #ffffff !important;
    padding: 1.5rem !important;
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

.pan-official-avatar {
    border-radius: 50% !important;
    width: 120px !important;
    height: 120px !important;
    margin-bottom: 1rem !important;
    border: 4px solid var(--wp--preset--color--secondary) !important;
    background-color: var(--wp--preset--color--surface) !important;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23003087"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>') !important;
    background-size: 70% !important;
    background-repeat: no-repeat !important;
    background-position: center bottom !important;
    overflow: hidden !important;
}

.pan-official-avatar img {
    border-radius: 50% !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.pan-official-card h3 {
    font-size: 1.15rem !important;
    font-weight: 900 !important;
    margin: 0.5rem 0 0.25rem !important;
    color: var(--wp--preset--color--primary) !important;
}

.pan-official-card .official-role {
    font-size: 0.85rem !important;
    color: #666666 !important;
    font-weight: 700 !important;
    margin-bottom: 0.5rem !important;
    text-transform: uppercase !important;
}

.pan-contacto-info-box {
    border-left: 4px solid var(--wp--preset--color--secondary) !important;
    padding-left: 1.5rem !important;
    margin: 1.5rem 0 !important;
}

.pan-no-posts {
    padding: 2rem !important;
    background: var(--wp--preset--color--surface) !important;
    border: 1px solid var(--wp--preset--color--primary) !important;
    font-style: italic !important;
}


