/* Provincia Diario 1.0.1 · Ancho único y aislamiento de estilos.
 * Solo afecta componentes PD; no modifica el kit global, wp-admin ni otros widgets.
 * El ancho corresponde al panel Provincia Diario → Identidad → Ancho (px).
 */
:root { --pd-site-gutter:24px; }
body.pd-site-shell { margin:0; }
.pd-site-shell .pd-main { width:100%; max-width:none; margin-inline:0; }
.pdnews .pd-container {
    box-sizing:border-box;
    max-width:var(--pd-site-width,var(--pd-width,1320px));
    padding-inline:var(--pd-site-gutter);
}

/* El CSS por documento de Elementor tiene más especificidad que .e-con.
 * Las filas PD usan esta regla compartida en vez de heredar el full-width del kit.
 */
.elementor .elementor-element.e-con:is(.pd-layout-desk,.pd-layout-columns,.pd-layout-bottom) {
    --width:100%;
    --container-max-width:var(--pd-site-width,1320px);
    box-sizing:border-box;
    width:100%;
    max-width:var(--pd-site-width,1320px);
    min-width:0;
    margin-inline:auto;
    padding-inline:var(--pd-site-gutter)!important;
    align-self:center;
}
.elementor .elementor-element.e-con.pd-layout-section {
    --width:100%;
    width:100%;
    max-width:100%;
    min-width:0;
    margin-inline:0;
    padding-inline:0!important;
}
.elementor .elementor-element.e-con.pd-layout-desk {
    --display:grid;
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:20px;
    align-items:start;
}
.elementor .elementor-element.e-con.pd-layout-analysis {
    --display:grid;
    --width:100%;
    display:grid;
    grid-template-columns:minmax(0,3fr) minmax(0,1fr);
    box-sizing:border-box;
    width:calc(100% - var(--pd-site-gutter) * 2);
    max-width:calc(var(--pd-site-width,1320px) - var(--pd-site-gutter) * 2);
    min-width:0;
    margin-inline:auto;
    padding:0!important;
    gap:0;
    align-self:center;
}
.elementor .elementor-element.e-con:is(.pd-desk-column,.pd-analysis-main,.pd-analysis-aside) {
    --width:100%;
    width:100%;
    max-width:100%;
    min-width:0;
}
/* También soporta las filas si se editaron como contenedores boxed. */
.elementor .elementor-element.e-con:is(.pd-layout-desk,.pd-layout-analysis) > .e-con-inner {
    display:contents;
}
:is(.pd-layout-desk,.pd-layout-columns,.pd-layout-bottom,.pd-layout-analysis) .pdnews .pd-container {
    max-width:100%;
    padding-inline:0;
}
.pd-layout-analysis .pd-analysis-aside .pdnews .pd-opinion { padding:18px; }

/* La banda de titulares dibuja el borde en el mismo eje que las fotografías,
 * no 24px más afuera que el resto del contenido. */
.pdnews .pd-container.pd-breaking {
    width:calc(100% - var(--pd-site-gutter) * 2);
    max-width:calc(var(--pd-site-width,var(--pd-width,1320px)) - var(--pd-site-gutter) * 2);
    padding-left:0!important;
    padding-right:6px!important;
}
:is(.pd-layout-desk,.pd-layout-columns,.pd-layout-bottom) .pdnews .pd-container.pd-breaking {
    width:100%;
    max-width:100%;
}

/* Elementor/Hello fijan height:auto a img. La foto debe llenar el marco de la
 * tarjeta; de lo contrario aparece una franja vacía bajo la imagen. */
.pdnews .pd-card-image > img.pd-photo-img {
    display:block;
    width:100%;
    height:100%;
    max-width:100%;
    object-fit:cover;
}

/* Mantener el sistema sans serif de PD sin tocar la tipografía global del tema.
 * Los controles específicos de Elementor siguen teniendo prioridad. */
.pdnews :is(h1,h2,h3,h4).pd-card-title,
.pdnews :is(h1,h2,h3,h4).pd-section-title,
.pdnews :is(h1,h2,h3,h4).pd-post-title {
    font-family:var(--pd-font,Inter,Arial,Helvetica,sans-serif);
    font-style:normal;
}

/* Hello añade colores a button:hover/:focus y [type=button]. Reglas para todos
 * los estados de los controles PD, sin resetear formularios externos. */
.pdnews button:is(.pd-icon-button,.pd-pause,.pd-quote-pause,.pd-sub-toggle,.pd-backtop),
.pdnews .pd-search-form button,
.pdnews .pd-share button {
    -webkit-appearance:none;
    appearance:none;
    font-family:inherit;
    letter-spacing:normal;
    text-transform:none;
    text-shadow:none;
    box-shadow:none;
}
.pdnews button.pd-icon-button,
.pdnews button.pd-icon-button:is(:hover,:focus,:active) {
    color:#111;
    background:#fff;
    border-color:#ccc;
}
.pdnews button.pd-icon-button:hover { background:#eee; border-color:#111; }
.pdnews button:is(.pd-pause,.pd-quote-pause,.pd-sub-toggle,.pd-backtop),
.pdnews button:is(.pd-pause,.pd-quote-pause,.pd-sub-toggle,.pd-backtop):is(:hover,:focus,:active) {
    color:#333;
    background:transparent;
    border:0;
    border-radius:2px;
    box-shadow:none;
}
.pdnews button:is(.pd-pause,.pd-quote-pause,.pd-sub-toggle,.pd-backtop):hover { color:#000; background:#eee; }
.pdnews .pd-breaking button.pd-icon-button,
.pdnews .pd-quotes-controls button.pd-icon-button {
    border:0;
    background:transparent;
}
.pdnews .pd-breaking button.pd-icon-button:hover,
.pdnews .pd-quotes-controls button.pd-icon-button:hover { background:#eee; }
.pdnews .pd-search-form button,
.pdnews .pd-search-form button:is(:hover,:focus,:active) {
    border:0;
    border-radius:0;
    background:#111;
    color:#fff;
}
.pdnews .pd-search-form button:hover { background:#333; }
.pdnews :is(.pd-utility-search,.pd-inline-search) .pd-search-form button,
.pdnews :is(.pd-utility-search,.pd-inline-search) .pd-search-form button:is(:hover,:focus,:active) {
    background:transparent;
    color:#111;
}
.pdnews .pd-share button,
.pdnews .pd-share button:is(:hover,:focus,:active) { color:#111; background:#fff; border-color:var(--pd-border); }
.pdnews .pd-share button:hover { background:#eee; }
.pdnews button:is(.pd-icon-button,.pd-pause,.pd-quote-pause,.pd-sub-toggle,.pd-backtop):focus-visible,
.pdnews .pd-search-form button:focus-visible,
.pdnews .pd-share button:focus-visible {
    outline:2px solid var(--pd-hover-accent,#009fd8);
    outline-offset:3px;
}

@media(max-width:1024px) {
    .elementor .elementor-element.e-con.pd-layout-desk { grid-template-columns:repeat(2,minmax(0,1fr)); gap:25px; }
}
@media(max-width:767px) {
    :root { --pd-site-gutter:16px; }
    .elementor .elementor-element.e-con.pd-layout-desk { grid-template-columns:minmax(0,1fr); gap:24px; }
    .elementor .elementor-element.e-con.pd-layout-analysis { grid-template-columns:minmax(0,1fr); }
    .pd-layout-analysis .pd-analysis-aside .pdnews .pd-opinion { padding:20px; }
}
