
:root {
    --qpc-primary: #145c54;
    --qpc-primary-dark: #0f4842;
    --qpc-accent: #f2a43b;
    --qpc-ink: #18201f;
    --qpc-muted: #667370;
    --qpc-line: #e3e9e7;
    --qpc-soft: #f4f8f7;
    --qpc-white: #ffffff;
    --qpc-radius: 22px;
    --qpc-shadow: 0 18px 50px rgba(20, 92, 84, 0.11);
    --qpc-container: 1180px;
}

.qpc-event,
.qpc-event * {
    box-sizing: border-box;
}

.qpc-event {
    color: var(--qpc-ink);
    background: var(--qpc-white);
    font-size: 17px;
    line-height: 1.65;
}

.qpc-event__container {
    width: min(calc(100% - 32px), var(--qpc-container));
    margin-inline: auto;
}

.qpc-event__hero {
    position: relative;
    overflow: hidden;
    padding: 34px 0 58px;
    background:
        radial-gradient(circle at 85% 10%, rgba(242, 164, 59, .17), transparent 31%),
        linear-gradient(145deg, #edf7f5 0%, #f9fbfa 62%, #fff8ed 100%);
    border-bottom: 1px solid var(--qpc-line);
}

.qpc-event__breadcrumb {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 34px;
    color: var(--qpc-muted);
    font-size: 14px;
}

.qpc-event__breadcrumb a {
    color: var(--qpc-primary);
    text-decoration: none;
    font-weight: 700;
}

.qpc-event__hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
    gap: 48px;
    align-items: center;
}

.qpc-event__hero-copy h1 {
    max-width: 850px;
    margin: 12px 0 18px;
    color: var(--qpc-ink);
    font-size: clamp(38px, 5.2vw, 68px);
    line-height: 1.02;
    letter-spacing: -0.045em;
    font-weight: 850;
}

.qpc-event__eyebrow {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.qpc-event__municipality {
    color: var(--qpc-primary);
    font-weight: 800;
}

.qpc-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 13px;
    line-height: 1;
    font-weight: 800;
}

.qpc-badge--future {
    color: #7a4100;
    background: #fff0d7;
}

.qpc-badge--current {
    color: #0e5d42;
    background: #daf4e9;
}

.qpc-badge--past {
    color: #5f6765;
    background: #e9eeec;
}

.qpc-event__lead-date {
    margin: 0;
    color: var(--qpc-muted);
    font-size: clamp(18px, 2vw, 22px);
    font-weight: 650;
}

.qpc-event__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 24px;
}

.qpc-chip {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border: 1px solid rgba(20, 92, 84, .18);
    border-radius: 999px;
    color: var(--qpc-primary-dark);
    background: rgba(255, 255, 255, .65);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.qpc-chip:hover {
    background: var(--qpc-white);
}

.qpc-event__hero-image {
    overflow: hidden;
    margin: 0;
    aspect-ratio: 4 / 3;
    border-radius: 28px;
    background: #dfe9e6;
    box-shadow: var(--qpc-shadow);
}

.qpc-event__hero-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qpc-event__content {
    padding: 64px 0 92px;
}

.qpc-event__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 64px;
    align-items: start;
}

.qpc-event__main {
    min-width: 0;
}

.qpc-section {
    padding-bottom: 48px;
    margin-bottom: 48px;
    border-bottom: 1px solid var(--qpc-line);
}

.qpc-section:last-child {
    margin-bottom: 0;
}

.qpc-section h2 {
    margin: 0 0 18px;
    color: var(--qpc-ink);
    font-size: clamp(27px, 3vw, 38px);
    line-height: 1.12;
    letter-spacing: -0.025em;
}

.qpc-prose {
    color: #33403d;
    font-size: 18px;
}

.qpc-prose > :first-child {
    margin-top: 0;
}

.qpc-prose > :last-child {
    margin-bottom: 0;
}

.qpc-prose a,
.qpc-source a {
    color: var(--qpc-primary);
}

.qpc-location-name {
    margin: 0 0 22px;
    color: #33403d;
    font-size: 18px;
    font-weight: 700;
}

.qpc-map {
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 8.5;
    border: 1px solid var(--qpc-line);
    border-radius: var(--qpc-radius);
    background: var(--qpc-soft);
}

.qpc-map iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.qpc-source {
    color: var(--qpc-muted);
    font-size: 15px;
}

.qpc-source p {
    margin-bottom: 12px;
}

.qpc-link-arrow {
    display: inline-flex;
    gap: 7px;
    align-items: center;
    color: var(--qpc-primary);
    font-weight: 800;
    text-decoration: none;
}

.qpc-event__aside {
    position: sticky;
    top: 28px;
}

.qpc-event-card {
    padding: 28px;
    border: 1px solid var(--qpc-line);
    border-radius: var(--qpc-radius);
    background: var(--qpc-white);
    box-shadow: var(--qpc-shadow);
}

.qpc-fact {
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 12px;
    padding: 0 0 20px;
    margin: 0 0 20px;
    border-bottom: 1px solid var(--qpc-line);
}

.qpc-fact__icon {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 12px;
    background: var(--qpc-soft);
    font-size: 19px;
}

.qpc-fact__label {
    display: block;
    margin-bottom: 3px;
    color: var(--qpc-muted);
    font-size: 12px;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 800;
}

.qpc-fact strong {
    display: block;
    color: var(--qpc-ink);
    font-size: 15px;
    line-height: 1.45;
}

.qpc-button,
.qpc-share {
    display: inline-flex;
    width: 100%;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font: inherit;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
}

.qpc-button {
    border: 1px solid var(--qpc-primary);
    color: var(--qpc-white);
    background: var(--qpc-primary);
}

.qpc-button:hover {
    color: var(--qpc-white);
    background: var(--qpc-primary-dark);
}

.qpc-share {
    margin-top: 10px;
    border: 1px solid var(--qpc-line);
    color: var(--qpc-primary-dark);
    background: var(--qpc-white);
}

.qpc-share:hover {
    background: var(--qpc-soft);
}

@media (max-width: 920px) {
    .qpc-event__hero-grid,
    .qpc-event__layout {
        grid-template-columns: 1fr;
    }

    .qpc-event__hero-grid {
        gap: 32px;
    }

    .qpc-event__layout {
        gap: 36px;
    }

    .qpc-event__aside {
        position: static;
        order: -1;
    }

    .qpc-event-card {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0 24px;
    }

    .qpc-button,
    .qpc-share {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .qpc-event {
        font-size: 16px;
    }

    .qpc-event__container {
        width: min(calc(100% - 24px), var(--qpc-container));
    }

    .qpc-event__hero {
        padding: 22px 0 38px;
    }

    .qpc-event__breadcrumb {
        margin-bottom: 24px;
        font-size: 13px;
    }

    .qpc-event__hero-copy h1 {
        margin-top: 10px;
        font-size: clamp(34px, 11vw, 49px);
    }

    .qpc-event__hero-image {
        aspect-ratio: 16 / 10;
        border-radius: 20px;
    }

    .qpc-event__content {
        padding: 34px 0 60px;
    }

    .qpc-event-card {
        display: block;
        padding: 22px;
    }

    .qpc-section {
        padding-bottom: 34px;
        margin-bottom: 34px;
    }

    .qpc-map {
        aspect-ratio: 1 / 1;
    }
}


/* 0.1.1 — información práctica */
.qpc-practical__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.qpc-practical__item {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 13px;
    align-items: start;
    padding: 18px;
    border: 1px solid var(--qpc-line);
    border-radius: 16px;
    background: var(--qpc-soft);
}

.qpc-practical__icon {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 13px;
    background: var(--qpc-white);
    font-size: 20px;
}

.qpc-practical__label {
    display: block;
    margin-bottom: 4px;
    color: var(--qpc-muted);
    font-size: 12px;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: .075em;
    font-weight: 800;
}

.qpc-practical__item strong {
    display: block;
    color: var(--qpc-ink);
    font-size: 16px;
    line-height: 1.45;
}

.qpc-location-title {
    margin: 0 0 4px;
    color: var(--qpc-ink);
    font-size: 21px;
    font-weight: 850;
}

.qpc-card-status {
    margin-bottom: 20px;
}

.qpc-badge--cancelled {
    color: #8b1f1f;
    background: #fde7e7;
}

.qpc-badge--postponed,
.qpc-badge--rescheduled {
    color: #7a4100;
    background: #fff0d7;
}

.qpc-badge--online {
    color: #3a367d;
    background: #ecebff;
}

@media (max-width: 640px) {
    .qpc-practical__grid {
        grid-template-columns: 1fr;
    }
}


/* 0.1.2 — compatibilidad Core 0.3.0 y diagnóstico */
.qpc-debug {
    width: min(calc(100% - 32px), var(--qpc-container));
    margin: 16px auto;
    padding: 12px 16px;
    border: 1px dashed #9aa8a4;
    border-radius: 10px;
    background: #fffbe8;
    font-size: 13px;
}
.qpc-debug pre {
    overflow: auto;
    max-height: 320px;
    margin: 10px 0 0;
    white-space: pre-wrap;
}

/* Si no hay imagen destacada, la cabecera no reserva visualmente una segunda columna. */
.qpc-event__hero-grid:not(:has(.qpc-event__hero-image)) {
    grid-template-columns: minmax(0, 820px);
}

.qpc-badge--removed {
    color: #555;
    background: #ececec;
}

.qpc-event__image-credit {
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.4;
    color: var(--qpc-muted, #6b7280);
}


/* 0.4.0 — conexión entre agenda y comunidad */
.qpc-event-community {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    gap: 28px;
    align-items: center;
    padding: 26px;
    margin-top: 8px;
    border-radius: 20px;
    color: #fff;
    background:
        radial-gradient(circle at 95% 0%, rgba(242,170,69,.25), transparent 34%),
        #105048;
}

.qpc-event-community__eyebrow {
    display: block;
    margin-bottom: 6px;
    color: #c7e6e1;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .09em;
    font-weight: 850;
}

.qpc-event-community h2 {
    margin: 0 0 8px;
    color: white;
    font-size: 27px;
}

.qpc-event-community p {
    max-width: 600px;
    margin: 0;
    color: rgba(255,255,255,.72);
    font-size: 15px;
}

.qpc-event-community > a {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: 0 17px;
    border-radius: 13px;
    color: #105048;
    background: white;
    font-size: 14px;
    font-weight: 850;
    text-decoration: none;
    white-space: nowrap;
}

@media (max-width: 700px) {
    .qpc-event-community {
        grid-template-columns: 1fr;
    }

    .qpc-event-community > a {
        width: 100%;
    }
}


/* 0.4.1 — navegación y pie coherentes con la portada */
.qpc-event-single .wp-site-blocks > header,
.qpc-event-single .wp-site-blocks > footer { display:none; }

.qpc-event__topbar {
    border-bottom:1px solid #dde7e4;
    background:#fff;
}
.qpc-event__topbar-inner {
    display:flex;
    min-height:82px;
    align-items:center;
    justify-content:space-between;
    gap:24px;
}
.qpc-event__brand {
    display:inline-flex;
    align-items:center;
    gap:10px;
    color:#162220;
    font-weight:850;
    text-decoration:none;
}
.qpc-event__brand-mark {
    display:grid;
    width:38px;
    height:38px;
    place-items:center;
    border-radius:13px;
    color:#fff;
    background:#17685f;
    font-weight:900;
}
.qpc-event__nav { display:flex; gap:24px; align-items:center; }
.qpc-event__nav a {
    color:#162220;
    font-size:14px;
    font-weight:750;
    text-decoration:none;
}
.qpc-event__breadcrumb a { color:inherit; }

.qpc-event__footer {
    padding:26px 0 34px;
    border-top:1px solid #dde7e4;
    background:#fff;
}
.qpc-event__footer-inner {
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:24px;
    color:#64716f;
    font-size:13px;
}
.qpc-event__footer-inner strong { display:block; color:#162220; }
.qpc-event__footer-inner span { display:block; margin-top:2px; }
.qpc-event__footer-inner nav { display:flex; gap:18px; }
.qpc-event__footer-inner a {
    color:#17685f;
    font-weight:800;
    text-decoration:none;
}
@media (max-width:700px) {
    .qpc-event__topbar-inner { min-height:68px; }
    .qpc-event__nav a:not(:last-child) { display:none; }
    .qpc-event__footer-inner {
        align-items:flex-start;
        flex-direction:column;
    }
}


/* 0.4.5 — estados y acciones de la ficha */
.qpc-event__hero-actions {
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    margin-top:26px;
}

.qpc-event__hero-cta {
    display:inline-flex;
    min-height:48px;
    align-items:center;
    justify-content:center;
    padding:0 18px;
    border-radius:14px;
    color:#fff;
    background:var(--qpc-primary);
    font-size:15px;
    font-weight:850;
    text-decoration:none;
}

.qpc-event__hero-cta:hover {
    color:#fff;
    background:var(--qpc-primary-dark);
}

.qpc-event-notice {
    border-bottom:1px solid var(--qpc-line);
}

.qpc-event-notice .qpc-event__container {
    padding-top:18px;
    padding-bottom:18px;
}

.qpc-event-notice strong {
    display:block;
    margin-bottom:3px;
    font-size:15px;
}

.qpc-event-notice p {
    margin:0;
    font-size:14px;
}

.qpc-event-notice--cancelled,
.qpc-event-notice--removed {
    color:#781f1f;
    background:#fff0f0;
}

.qpc-event-notice--postponed,
.qpc-event-notice--rescheduled {
    color:#724708;
    background:#fff7e9;
}

.qpc-event-notice--online {
    color:#393579;
    background:#f2f1ff;
}

.qpc-directions {
    display:inline-flex;
    margin-top:14px;
    color:var(--qpc-primary);
    font-size:14px;
    font-weight:800;
    text-decoration:none;
}

.qpc-event-card__unavailable {
    margin:0;
    padding:13px 14px;
    border-radius:12px;
    color:#7a2424;
    background:#fff0f0;
    font-size:13px;
    line-height:1.45;
}

.qpc-event a:focus-visible,
.qpc-event button:focus-visible {
    outline:3px solid rgba(242,164,59,.65);
    outline-offset:3px;
}

@media (max-width:640px) {
    .qpc-event__hero-actions {
        margin-top:20px;
    }

    .qpc-event__hero-cta {
        width:100%;
    }
}


/* 0.5.0 — ficha sin repeticiones, acciones y relacionados */
.qpc-badge--today {
    color:#7a2408;
    background:#ffe4d9;
}
.qpc-badge--tomorrow,
.qpc-badge--soon {
    color:#6a4700;
    background:#fff1ca;
}
.qpc-badge--last-days {
    color:#7a1f4b;
    background:#fbe1ef;
}

.qpc-event__hero-image {
    position:relative;
    overflow:hidden;
    aspect-ratio:4/3;
    background:#edf7f5;
}

.qpc-event__hero-image img,
.qpc-event__hero-image .wp-post-image {
    position:absolute;
    inset:0;
    z-index:1;
    width:100%;
    height:100%;
    object-fit:cover;
}

.qpc-event__image-placeholder {
    position:absolute;
    inset:0;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:8px;
    color:var(--qpc-primary);
    background:
        radial-gradient(circle at 70% 20%, rgba(242,164,59,.25), transparent 28%),
        linear-gradient(135deg,#edf7f5,#fff7e9);
}

.qpc-event__image-placeholder > span {
    display:grid;
    width:76px;
    height:76px;
    place-items:center;
    border-radius:22px;
    color:#fff;
    background:var(--qpc-primary);
    font-size:30px;
    font-weight:900;
}

.qpc-event__image-placeholder small {
    font-weight:800;
}

.qpc-event__image-credit {
    position:absolute;
    right:10px;
    bottom:10px;
    z-index:2;
}

.qpc-event__layout--single {
    display:block;
    max-width:920px;
}

.qpc-event__main {
    max-width:none;
}

.qpc-practical--top {
    margin-top:0;
}

.qpc-event-actions {
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    margin-top:22px;
    padding-top:20px;
    border-top:1px solid var(--qpc-line);
}

.qpc-action {
    display:inline-flex;
    min-height:44px;
    align-items:center;
    justify-content:center;
    padding:0 14px;
    border:1px solid var(--qpc-line);
    border-radius:12px;
    color:var(--qpc-primary);
    background:#fff;
    font:inherit;
    font-size:13px;
    font-weight:800;
    text-decoration:none;
    cursor:pointer;
}

.qpc-event-feedback {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:28px;
    margin-top:28px;
    padding:26px;
    border-radius:20px;
    background:#eef8f6;
    border:1px solid #dcebe7;
}

.qpc-event-feedback > div > span,
.qpc-event-related__head > span {
    display:block;
    margin-bottom:5px;
    color:var(--qpc-primary);
    font-size:12px;
    font-weight:850;
    text-transform:uppercase;
    letter-spacing:.08em;
}

.qpc-event-feedback h2,
.qpc-event-related__head h2 {
    margin:0 0 7px;
    font-size:clamp(26px,3vw,36px);
    letter-spacing:-.03em;
}

.qpc-event-feedback p {
    margin:0;
    color:var(--qpc-muted);
}

.qpc-event-feedback > a {
    flex:0 0 auto;
    display:inline-flex;
    min-height:44px;
    align-items:center;
    padding:0 15px;
    border-radius:12px;
    color:#fff;
    background:var(--qpc-primary);
    font-weight:850;
    text-decoration:none;
}

.qpc-event-related {
    padding:60px 0 72px;
    border-top:1px solid var(--qpc-line);
    background:var(--qpc-soft);
}

.qpc-event-related__head {
    margin-bottom:24px;
}

.qpc-event-grid--related {
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:16px;
}

.qpc-event-related .qpc-home-card {
    background:#fff;
}

.qpc-mobile-actions {
    display:none;
}

.qpc-event .qpc-site-footer {
    border-top:1px solid var(--qpc-line);
}

.qpc-event .qpc-site-footer__links {
    display:flex;
    flex-wrap:wrap;
    justify-content:flex-end;
    gap:10px 18px;
}

.qpc-event .qpc-site-footer__links a {
    color:var(--qpc-primary);
    font-size:13px;
    font-weight:750;
    text-decoration:none;
}

@media (max-width:960px) {
    .qpc-event-grid--related {
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}

@media (max-width:700px) {
    .qpc-event__hero-image {
        aspect-ratio:16/10;
    }

    .qpc-event-actions {
        display:grid;
        grid-template-columns:1fr 1fr;
    }

    .qpc-event-actions .qpc-button {
        grid-column:1 / -1;
    }

    .qpc-event-feedback {
        align-items:flex-start;
        flex-direction:column;
    }

    .qpc-event-feedback > a {
        width:100%;
        justify-content:center;
    }

    .qpc-event-grid--related {
        grid-template-columns:1fr;
    }

    .qpc-mobile-actions {
        position:fixed;
        z-index:999;
        left:10px;
        right:10px;
        bottom:10px;
        display:grid;
        grid-template-columns:repeat(3,1fr);
        gap:5px;
        padding:6px;
        border:1px solid rgba(20,92,84,.18);
        border-radius:14px;
        background:rgba(255,255,255,.94);
        box-shadow:0 12px 34px rgba(15,72,66,.18);
        backdrop-filter:blur(10px);
    }

    .qpc-mobile-actions a,
    .qpc-mobile-actions button {
        display:flex;
        min-height:42px;
        align-items:center;
        justify-content:center;
        border:0;
        border-radius:10px;
        color:var(--qpc-primary);
        background:var(--qpc-soft);
        font:inherit;
        font-size:11px;
        font-weight:850;
        text-decoration:none;
    }

    .qpc-event .qpc-site-footer {
        padding-bottom:82px;
    }

    .qpc-event .qpc-site-footer__inner {
        align-items:flex-start;
        flex-direction:column;
    }

    .qpc-event .qpc-site-footer__links {
        justify-content:flex-start;
    }
}


/* 0.5.1 */
.qpc-event__image-placeholder.is-hidden {
    visibility:hidden;
}

body.qpc-event-single .wp-site-blocks > footer,
body.qpc-event-single footer.wp-block-template-part {
    display:none !important;
}
