/* ============================================================
   ARCHIVE-LOCATIONS — ARCHIVO NATHANIEL CROWE
   Autocontenido — usa body.post-type-archive-locations
   como prefijo global para ganar especificidad sobre GP
   ============================================================ */

/* ══════════════════════════════════════════════════════════════
   RESET GENERATEPRESS
   ══════════════════════════════════════════════════════════════ */
body.post-type-archive-locations,
body.post-type-archive-locations .site,
body.post-type-archive-locations .site-content,
body.post-type-archive-locations .site-main,
body.post-type-archive-locations .content-area {
    background: var(--crowe-paper) !important;
    background-color: var(--crowe-paper) !important;
    padding: 0 !important;
    max-width: none !important;
}

body.post-type-archive-locations .inside-article,
body.post-type-archive-locations .entry-header,
body.post-type-archive-locations .post-inner,
body.post-type-archive-locations .entry-content {
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
}

body.post-type-archive-locations article,
body.post-type-archive-locations .post {
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* ══════════════════════════════════════════════════════════════
   WRAPPER Y LAYOUT
   ══════════════════════════════════════════════════════════════ */
body.post-type-archive-locations .crowe-archive-wrap {
    background: var(--crowe-paper);
    background-image: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 27px,
        rgba(160, 130, 90, 0.04) 27px,
        rgba(160, 130, 90, 0.04) 28px
    );
    min-height: 100vh;
}

body.post-type-archive-locations .crowe-archive {
    padding: 0 0 60px;
}

body.post-type-archive-locations .crowe-archive__inner {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
}

/* ══════════════════════════════════════════════════════════════
   BARRAS SUPERIOR E INFERIOR
   ══════════════════════════════════════════════════════════════ */
body.post-type-archive-locations .crowe-home-topbar {
    background: var(--crowe-accent-dark);
    border-bottom: 2px solid var(--crowe-accent);
}

body.post-type-archive-locations .crowe-home-topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding: 8px 0;
}

body.post-type-archive-locations .crowe-home-topbar__id {
    font-family: var(--crowe-mono);
    font-size: 0.6rem;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: #7a5a38;
}

body.post-type-archive-locations .crowe-home-topbar__status {
    display: flex;
    align-items: center;
    gap: 7px;
    font-family: var(--crowe-mono);
    font-size: 0.6rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #a07840;
}

body.post-type-archive-locations .crowe-home-topbar__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #6a9a50;
    animation: crowe-loc-blink 2.4s ease-in-out infinite;
}

@keyframes crowe-loc-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

body.post-type-archive-locations .crowe-home-sysbar {
    background: var(--crowe-accent-dark);
    border-top: 2px solid var(--crowe-accent);
    margin-top: 48px;
}

body.post-type-archive-locations .crowe-home-sysbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding: 8px 0;
    font-family: var(--crowe-mono);
    font-size: 0.58rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #6a4a28;
}

/* ══════════════════════════════════════════════════════════════
   CABECERA DEL ÍNDICE
   ══════════════════════════════════════════════════════════════ */
body.post-type-archive-locations .crowe-archive-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 48px 0 0;
    margin-bottom: 32px;
}

body.post-type-archive-locations .crowe-archive-header__left {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

body.post-type-archive-locations .crowe-archive-header__eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-family: var(--crowe-mono);
    font-size: 0.64rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--crowe-ink-faint);
}

body.post-type-archive-locations .crowe-archive-header__eyebrow-line {
    display: block;
    width: 28px;
    height: 1px;
    background: var(--crowe-border);
    flex-shrink: 0;
}

body.post-type-archive-locations .crowe-archive-header__title {
    margin: 0;
    font-family: var(--crowe-serif);
    font-size: clamp(2.4rem, 1.8rem + 2vw, 3.8rem);
    font-weight: 400;
    line-height: 0.95;
    letter-spacing: -0.02em;
    color: var(--crowe-ink);
}

body.post-type-archive-locations .crowe-archive-header__lead {
    margin: 4px 0 0;
    font-family: var(--crowe-mono);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    color: var(--crowe-ink-muted);
}

body.post-type-archive-locations .crowe-archive-header__breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--crowe-mono);
    font-size: 0.6rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--crowe-ink-faint);
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 52px;
}

body.post-type-archive-locations .crowe-archive-header__breadcrumb a {
    color: var(--crowe-ink-muted);
    text-decoration: none;
}

body.post-type-archive-locations .crowe-archive-header__breadcrumb a:hover {
    color: var(--crowe-accent);
}

/* ══════════════════════════════════════════════════════════════
   PANEL DE FILTROS
   ══════════════════════════════════════════════════════════════ */
body.post-type-archive-locations .crowe-archive-filters {
    margin-bottom: 28px;
    border: 1px solid var(--crowe-border-soft);
    background: var(--crowe-paper-dark);
    overflow: hidden;
}

body.post-type-archive-locations .crowe-archive-filters__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 16px;
    background: rgba(30,15,5,0.04);
    border-bottom: 1px solid var(--crowe-border-soft);
}

body.post-type-archive-locations .crowe-archive-filters__label {
    font-family: var(--crowe-mono);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: var(--crowe-ink-faint);
}

body.post-type-archive-locations .crowe-archive-filters__reset {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--crowe-mono);
    font-size: 0.58rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--crowe-red);
    text-decoration: none;
    border: 1px solid rgba(139,32,16,0.25);
    padding: 2px 8px;
}

body.post-type-archive-locations .crowe-archive-filters__groups {
    display: flex;
    flex-direction: column;
}

body.post-type-archive-locations .crowe-archive-filter-group {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 12px 16px;
    border-bottom: 1px dotted var(--crowe-border-soft);
}

body.post-type-archive-locations .crowe-archive-filter-group:last-child {
    border-bottom: none;
}

body.post-type-archive-locations .crowe-archive-filter-group__label {
    font-family: var(--crowe-mono);
    font-size: 0.58rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--crowe-ink-faint);
    min-width: 70px;
    flex-shrink: 0;
    padding-top: 4px;
}

body.post-type-archive-locations .crowe-archive-filter-group__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

body.post-type-archive-locations .crowe-archive-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    font-family: var(--crowe-mono);
    font-size: 0.6rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--crowe-ink-muted);
    background: rgba(196,174,142,0.15);
    border: 1px solid var(--crowe-border-soft);
    transition: background 150ms ease, color 150ms ease;
}

body.post-type-archive-locations .crowe-archive-pill:hover {
    background: rgba(107,60,24,0.1);
    color: var(--crowe-ink-mid);
}

body.post-type-archive-locations .crowe-archive-pill--active {
    background: var(--crowe-accent-dark) !important;
    border-color: var(--crowe-accent) !important;
    color: #c8a870 !important;
}

/* ══════════════════════════════════════════════════════════════
   CABECERA DE RESULTADOS
   ══════════════════════════════════════════════════════════════ */
body.post-type-archive-locations .crowe-archive-results-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--crowe-border-soft);
    font-family: var(--crowe-mono);
    font-size: 0.62rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--crowe-ink-faint);
}

body.post-type-archive-locations .crowe-archive-results-header__filtered {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--crowe-ink-muted);
}

body.post-type-archive-locations .crowe-archive-results-header__tag {
    padding: 1px 6px;
    border: 1px solid var(--crowe-border-soft);
    font-size: 0.56rem;
    color: var(--crowe-accent);
    background: rgba(107,60,24,0.06);
}

/* ══════════════════════════════════════════════════════════════
   GRID
   ══════════════════════════════════════════════════════════════ */
body.post-type-archive-locations .crowe-archive-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 16px !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* ══════════════════════════════════════════════════════════════
   TARJETA DE LOCALIZACIÓN
   ══════════════════════════════════════════════════════════════ */
body.post-type-archive-locations .crowe-loc-card {
    display: flex !important;
    flex-direction: column !important;
    border: 1px solid var(--crowe-border-soft) !important;
    background: var(--crowe-paper-dark) !important;
    overflow: hidden !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
    position: relative;
}

body.post-type-archive-locations .crowe-loc-card:hover {
    border-color: var(--crowe-border) !important;
    box-shadow: 0 8px 24px rgba(30,15,5,0.07) !important;
    transform: translateY(-2px);
}

body.post-type-archive-locations .crowe-loc-card::before {
    content: "" !important;
    display: block !important;
    height: 3px !important;
    background: var(--crowe-border-soft) !important;
    border-radius: 0 !important;
    transition: background 200ms ease;
    position: static !important;
    width: auto !important;
    top: auto !important;
    left: auto !important;
}

body.post-type-archive-locations .crowe-loc-card:hover::before {
    background: var(--crowe-accent) !important;
}

body.post-type-archive-locations .crowe-loc-card__type-strip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(30,15,5,0.04);
    border-bottom: 1px dotted var(--crowe-border-soft);
    font-family: var(--crowe-mono);
    font-size: 0.56rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--crowe-ink-faint);
}

body.post-type-archive-locations .crowe-loc-card__media {
    display: block !important;
    position: relative !important;
    overflow: hidden !important;
    background: var(--crowe-paper-mid) !important;
    aspect-ratio: 4 / 3 !important;
    border-bottom: 1px solid var(--crowe-border-soft) !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    min-height: unset !important;
}

body.post-type-archive-locations .crowe-loc-card__media img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 0 !important;
    filter: sepia(0.2) contrast(1.03);
}

body.post-type-archive-locations .crowe-loc-card__placeholder {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 160px !important;
}

body.post-type-archive-locations .crowe-loc-card__body {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    padding: 14px 14px 12px !important;
    gap: 8px !important;
    background: transparent !important;
    border-radius: 0 !important;
}

body.post-type-archive-locations .crowe-loc-card__geo {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: var(--crowe-mono);
    font-size: 0.6rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--crowe-ink-faint);
}

body.post-type-archive-locations .crowe-case-card__title {
    margin: 0 !important;
    font-family: var(--crowe-serif) !important;
    font-size: 1.1rem !important;
    font-weight: 400 !important;
    line-height: 1.2 !important;
    color: var(--crowe-ink) !important;
}

body.post-type-archive-locations .crowe-case-card__title a {
    color: inherit !important;
    text-decoration: none !important;
}

body.post-type-archive-locations .crowe-case-card__excerpt {
    margin: 0 !important;
    font-family: var(--crowe-serif) !important;
    font-style: italic !important;
    font-size: 0.82rem !important;
    line-height: 1.7 !important;
    color: var(--crowe-ink-soft) !important;
}

body.post-type-archive-locations .crowe-loc-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px dotted var(--crowe-border-soft);
}

body.post-type-archive-locations .crowe-loc-card__cases-count {
    font-family: var(--crowe-mono);
    font-size: 0.58rem;
    letter-spacing: 0.12em;
    color: var(--crowe-ink-faint);
    display: flex;
    align-items: baseline;
    gap: 4px;
}

body.post-type-archive-locations .crowe-loc-card__cases-num {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--crowe-ink-mid);
}

body.post-type-archive-locations .crowe-case-card__cta {
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;
    font-family: var(--crowe-mono) !important;
    font-size: 0.58rem !important;
    letter-spacing: 0.18em !important;
    text-transform: uppercase !important;
    color: var(--crowe-ink-muted) !important;
    text-decoration: none !important;
}

body.post-type-archive-locations .crowe-case-card__cta:hover {
    color: var(--crowe-accent) !important;
}

/* ══════════════════════════════════════════════════════════════
   PAGINACIÓN
   ══════════════════════════════════════════════════════════════ */
body.post-type-archive-locations .crowe-archive-pagination {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--crowe-border-soft);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

body.post-type-archive-locations .crowe-archive-pagination__inner {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
}

body.post-type-archive-locations .crowe-archive-pagination__inner .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    font-family: var(--crowe-mono);
    font-size: 0.62rem;
    letter-spacing: 0.14em;
    text-decoration: none;
    color: var(--crowe-ink-muted);
    border: 1px solid var(--crowe-border-soft);
    background: var(--crowe-paper-dark);
}

body.post-type-archive-locations .crowe-archive-pagination__inner .page-numbers.current {
    background: var(--crowe-accent-dark);
    border-color: var(--crowe-accent);
    color: #c8a870;
}

body.post-type-archive-locations .crowe-archive-pagination__info {
    font-family: var(--crowe-mono);
    font-size: 0.58rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--crowe-ink-faint);
}

/* ══════════════════════════════════════════════════════════════
   SIN RESULTADOS
   ══════════════════════════════════════════════════════════════ */
body.post-type-archive-locations .crowe-archive-empty {
    padding: 60px 0;
    display: flex;
    justify-content: center;
}

body.post-type-archive-locations .crowe-archive-empty__inner {
    max-width: 420px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 32px;
    border: 1px solid var(--crowe-border-soft);
    background: var(--crowe-paper-dark);
}

body.post-type-archive-locations .crowe-archive-empty__title {
    font-family: var(--crowe-serif);
    font-size: 1.4rem;
    color: var(--crowe-ink);
    margin: 0;
}

body.post-type-archive-locations .crowe-archive-empty__text {
    font-family: var(--crowe-mono);
    font-size: 0.72rem;
    line-height: 1.7;
    color: var(--crowe-ink-muted);
    margin: 0;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 960px) {
    body.post-type-archive-locations .crowe-archive-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 720px) {
    body.post-type-archive-locations .crowe-archive__inner {
        width: calc(100% - 32px);
    }
    body.post-type-archive-locations .crowe-archive-header {
        flex-direction: column;
        gap: 12px;
        padding-top: 32px;
    }
    body.post-type-archive-locations .crowe-archive-filter-group {
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 560px) {
    body.post-type-archive-locations .crowe-archive-grid {
        grid-template-columns: 1fr !important;
    }
}
