/* spaces.css — Boletucho Espacios (© Figma venue-directory redesign)
   Neo-brutalist: thick black borders, hard offset shadows, white cards on
   the wall-paper background. No background bands on the pill row or the feed
   section — only the featured carousel gets a semi-transparent dark wash.
   Fonts: PubliFluor (display/Unbounded role), FluxischElse (mono/JetBrains role).
   Insolente stays only on the banner (sp-banner-eyebrow). */

/* Page background (overrides shared-styles) — same pattern as create.php/event.php */
body {
    background-image: url('../images/backgrounds/1.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-color: #e5dcc9;
}

.spaces-page {
    min-height: 100vh;
    background: transparent;
}

.spaces-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    padding-top: 155px;
}

/* ===== DESTACADOS (featured-section) ===== */
.sp-featured-banner {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-bottom: 3px solid #000;
    padding: 32px 80px;
}

.sp-featured-banner-inner {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.sp-banner-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
}

.sp-banner-head-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.sp-banner-eyebrow {
    font-family: 'Insolente', Arial, sans-serif;
    font-size: 26px;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #FFF;
    line-height: 1;
    margin: 0;
}

.sp-city-indicator {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.sp-city-name {
    font-family: 'FluxischElse', Arial, sans-serif;
    font-size: 15px;
    color: #9fbc99;
    font-weight: bold;
    line-height: 1;
}

.sp-city-change {
    font-family: 'FluxischElse', Arial, sans-serif;
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    line-height: 1;
}

.sp-city-change:hover {
    color: #9fbc99;
    text-decoration: underline;
}

.sp-city-set {
    font-size: 13px;
}

/* Empty state */
.sp-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 24px 60px;
    text-align: center;
    min-height: 340px;
}

.sp-empty-state .sp-empty-icon {
    font-size: 40px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.sp-empty-text {
    font-family: 'Gabarito', Arial, sans-serif;
    font-size: 18px;
    color: #555;
    margin: 0 0 20px;
    line-height: 1.4;
}

.sp-empty-cta {
    display: inline-block;
    font-family: 'FluxischElse', Arial, sans-serif;
    font-size: 15px;
    color: #111;
    background: #EAF205;
    border: 2px solid #111;
    padding: 10px 24px;
    text-decoration: none;
    box-shadow: 3px 3px 0 0 #111;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.sp-empty-cta:hover {
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0 0 #111;
}

.sp-car-btns {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sp-car-arrow {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #000;
    background: #FFF;
    box-shadow: 3px 3px 0 0 #000;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.05s ease;
}

.sp-car-arrow svg {
    width: 20px;
    height: 20px;
    display: block;
}

.sp-car-arrow:hover {
    background: #EAF205;
}

.sp-car-arrow:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 0 #000;
}

.sp-car-viewport {
    overflow: hidden;
}

.sp-car-track {
    display: flex;
    transition: transform 0.5s ease;
}

.sp-feat-slide {
    flex: 0 0 33.3333%;
    max-width: 33.3333%;
    padding: 0 16px;
    box-sizing: border-box;
    min-width: 0;
}

.sp-feat-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    height: 300px;
    box-sizing: border-box;
    padding: 18px;
    border: 3px solid #000;
    border-radius: 8px;
    background: #1A1A1A;
    box-shadow: 4px 4px 0 0 #000;
    text-decoration: none;
}

/* polaroid offset image stack */
.sp-feat-media {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    align-self: stretch;
}

.sp-feat-destacado {
    display: none;
}

.sp-stack-offset,
.sp-stack-photo {
    position: absolute;
    width: 100%;
    max-width: 260px;
    height: 116px;
    border: 3px solid #000;
    box-sizing: border-box;
}

.sp-stack-offset {
    background: #FF5C00;
    transform: rotate(-1.5deg);
}

.sp-stack-offset.t2 {
    background: #FFE500;
    transform: rotate(1.2deg);
}

.sp-stack-offset.t3 {
    background: #00E0FF;
    transform: rotate(-2.5deg);
}

.sp-stack-photo {
    background: #FFF;
    overflow: hidden;
    transform: rotate(0.8deg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sp-stack-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sp-stack-empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sp-stack-empty svg {
    width: 42px;
    height: 42px;
    opacity: 0.25;
}

.sp-feat-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sp-feat-title {
    font-family: 'PubliFluor', Arial, sans-serif;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.1;
    text-transform: uppercase;
    color: #FFF;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sp-feat-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'FluxischElse', Arial, sans-serif;
    font-size: 12px;
    color: #D8E0D5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sp-feat-meta svg {
    width: 14px;
    height: 14px;
    flex: none;
    stroke: currentColor;
    fill: none;
}

.sp-feat-locale {
    display: none;
}

/* ===== Filters (category pills) ===== */
.sp-filter-bar {
    padding: 40px 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.sp-filter-row {
    display: flex;
    align-items: center;
    gap: 16px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    min-width: 0;
}

.sp-filter-row::-webkit-scrollbar {
    display: none;
}

.sp-tab {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: 3px solid #000;
    border-radius: 100px;
    background: #FFF;
    box-shadow: 3px 3px 0 0 #000;
    font-family: 'FluxischElse', Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    color: #000;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.sp-tab.active {
    background: #000;
    color: #FFF;
}

.sp-tab.is-extra {
    display: none;
}

.sp-filter-bar.is-expanded .sp-tab.is-extra {
    display: inline-flex;
}

.sp-filter-more {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: 3px solid #000;
    background: #FFF;
    box-shadow: 3px 3px 0 0 #000;
    font-family: 'FluxischElse', Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    color: #000;
    cursor: pointer;
    transition: background 0.15s ease;
}

.sp-filter-more:hover {
    background: #EAF205;
}

/* ===== Feed header ===== */
.sp-grid-section {
    padding: 0 80px 80px;
}

.sp-utility-strip {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 3px solid #000;
    margin-bottom: 24px;
}

.sp-utility-count {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background: #FFF;
    border: 3px solid #000;
    box-shadow: 3px 3px 0 0 #000;
    font-family: 'PubliFluor', Arial, sans-serif;
    font-size: 22px;
    font-weight: 900;
    text-transform: uppercase;
    color: #000;
    line-height: 1;
}

.sp-suggest-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    border: 3px solid #000;
    background: #000;
    box-shadow: 3px 3px 0 0 #000;
    font-family: 'FluxischElse', Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    color: #FFF;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.sp-suggest-btn:hover {
    background: #EAF205;
    color: #000;
}

/* ===== Feed grid + cards ===== */
.sp-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
}

/* ===== Pagination (respects active filter) ===== */
.sp-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 36px;
}

.sp-pager-btn {
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #000;
    background: #FFF;
    box-shadow: 3px 3px 0 0 #000;
    font-family: 'FluxischElse', Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #000;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.sp-pager-btn:hover {
    background: #EAF205;
}

.sp-pager-btn.is-active {
    background: #000;
    color: #FFF;
}

.sp-pager-btn.is-disabled {
    opacity: 0.35;
    cursor: default;
    box-shadow: none;
}

.sp-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
    border: 3px solid #000;
    background: #FFF;
    box-shadow: 5px 5px 0 0 #000;
    text-decoration: none;
    color: inherit;
}

.sp-card-photo {
    height: 200px;
    border: 3px solid #000;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.sp-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sp-card-photo .sp-ph-block {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sp-card-photo .sp-ph-block svg {
    width: 64px;
    height: 64px;
    opacity: 0.4;
    fill: #000;
}

.sp-card-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sp-card-name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.sp-card-name {
    font-family: 'PubliFluor', Arial, sans-serif;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.1;
    text-transform: uppercase;
    color: #000;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sp-verify-badge {
    flex: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #000;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sp-verify-badge svg {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: #FFF;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sp-cat-tag {
    align-self: flex-start;
    padding: 6px 12px;
    border: 2px solid #000;
    background: #FFF;
    font-family: 'FluxischElse', Arial, sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #000;
    letter-spacing: 0.5px;
}

.sp-divider {
    height: 2px;
    background: #000;
}

.sp-address-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sp-schedule-line {
    font-family: 'FluxischElse', Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #000;
}

.sp-address-line {
    font-family: 'FluxischElse', Arial, sans-serif;
    font-size: 11px;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== Featured content hero ===== */
.sp-hero-slogan {
    display: none;
}

/* ===== Empty state tile ===== */
.sp-empty-tile {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
    padding: 64px 40px;
    border: 3px solid #000;
    background: #FFF;
    box-shadow: 5px 5px 0 0 #000;
}

.sp-empty-icon {
    font-size: 32px;
    color: #000;
}

.sp-empty-title {
    font-family: 'PubliFluor', Arial, sans-serif;
    font-size: 18px;
    font-weight: 800;
    text-transform: uppercase;
    color: #000;
}

.sp-empty-sub {
    font-family: 'FluxischElse', Arial, sans-serif;
    font-size: 12px;
    color: #555;
}

/* ===== Carousel dots (mobile art direction) ===== */
.sp-car-dots {
    display: none;
}

/* ==================== Skeleton (echoed before data, matches index.php) ==================== */
/* Uses the shared `.skeleton` shimmer (shared-styles.css) — same as the homepage. */

.sp-card.skeleton {
    min-height: 360px;
    background: linear-gradient(90deg, #f0ede6 25%, #e8e4db 50%, #f0ede6 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite linear;
}

/* ==================== Tablet / Mobile ==================== */
@media (max-width: 1280px) {
    .sp-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 980px) {
    .sp-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sp-featured-banner {
        padding: 24px 20px;
    }

    .sp-banner-eyebrow {
        font-size: 16px;
    }

    .sp-car-btns {
        display: none;
    }

    .sp-car-dots {
        display: flex;
        justify-content: center;
        gap: 8px;
        margin-top: 16px;
    }

    .sp-car-dot {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.35);
        cursor: pointer;
        transition: background 0.2s ease;
    }

    .sp-car-dot.active {
        background: #EAF205;
    }

    .sp-feat-slide {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 0;
    }

    .sp-feat-card {
        height: auto;
        min-height: 0;
        padding: 0;
        gap: 0;
        border: 2.5px solid #000;
        border-radius: 4px;
        box-shadow: 4px 4px 0 0 #000;
        overflow: hidden;
    }

    .sp-feat-media {
        height: 160px;
        display: block;
        border-bottom: 2.5px solid #000;
        background: #FF5C00;
        flex: none;
    }

    .sp-feat-destacado {
        display: inline-flex;
        position: absolute;
        top: 12px;
        left: 12px;
        z-index: 2;
        padding: 2px 6px;
        border-radius: 2px;
        border: 1px solid #000;
        background: #EAF205;
        font-family: 'FluxischElse', Arial, sans-serif;
        font-size: 9px;
        font-weight: 700;
        text-transform: uppercase;
        color: #000;
    }

    .sp-stack-offset {
        display: none;
    }

    .sp-stack-photo {
        position: static;
        width: 100%;
        max-width: none;
        height: 100%;
        border: none;
        transform: none;
    }

    .sp-feat-info {
        padding: 16px 16px 0;
        gap: 4px;
    }

    .sp-feat-locale {
        display: block;
        font-family: 'FluxischElse', Arial, sans-serif;
        font-size: 11px;
        font-weight: 500;
        color: #EAF205;
        text-transform: uppercase;
    }

    .sp-feat-title {
        font-size: 18px;
    }

    .sp-feat-meta {
        padding: 0 16px 16px;
        color: #CCC;
        margin-top: 8px;
    }

    .sp-filter-bar {
        padding: 16px 0 16px 20px;
    }

    .sp-tab {
        padding: 8px 14px;
        border: 2px solid #000;
        border-radius: 4px;
        box-shadow: 2px 2px 0 0 #000;
        font-size: 13px;
        text-transform: none;
        gap: 6px;
    }

    .sp-tab.is-extra {
        display: inline-flex;
    }

    .sp-tab.active {
        background: #EAF205;
        color: #000;
    }

    .sp-filter-more {
        display: none;
    }

    .sp-grid-section {
        padding: 20px;
    }

    .sp-utility-strip {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding-bottom: 16px;
        margin-bottom: 20px;
    }

    .sp-utility-count {
        font-size: 14px;
        font-weight: 800;
    }

    .sp-suggest-btn {
        align-self: stretch;
        justify-content: center;
        padding: 12px 16px;
        border: 2px solid #000;
        border-radius: 4px;
        box-shadow: 2px 2px 0 0 #000;
        font-size: 11px;
    }

    .sp-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .sp-card {
        padding: 0;
        gap: 0;
        border: 2.5px solid #000;
        border-radius: 4px;
        box-shadow: 4px 4px 0 0 #000;
        overflow: hidden;
    }

    .sp-card-photo {
        height: 130px;
        border: none;
        border-bottom: 2.5px solid #000;
        border-radius: 0;
        flex: none;
    }

    .sp-card-body {
        padding: 16px;
        gap: 12px;
    }

    .sp-empty-tile {
        padding: 40px 20px;
        border: 2.5px solid #000;
        border-radius: 4px;
        box-shadow: 4px 4px 0 0 #000;
    }
}

/* ==================== Desktop Footer Banner (same as index.php) ==================== */
.footer-banner {
    position: relative;
    width: 100%;
    height: 165px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    padding: 0 20px 18px;
    box-sizing: border-box;
    margin-top: auto;
    flex-shrink: 0;
    clip-path: polygon(
        0% 50%,
        8% 35%,
        16% 50%,
        24% 35%,
        32% 50%,
        40% 35%,
        48% 50%,
        56% 35%,
        64% 50%,
        72% 35%,
        80% 50%,
        88% 35%,
        96% 50%,
        100% 50%,
        100% 100%,
        0% 100%
    );
}

.footer-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../images/footer.JPG') no-repeat 50% 40%;
    background-size: cover;
    filter: grayscale(100%) brightness(0.8);
    z-index: 0;
}

.footer-text {
    position: relative;
    z-index: 1;
    color: white;
    font-family: 'FluxischElse', Arial, sans-serif;
    font-weight: bold;
    font-size: 16px;
    text-align: center;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    max-width: 800px;
    line-height: 1.4;
}

.footer-buttons {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 28px;
    justify-content: center;
}

.footer-btn {
    color: rgba(255, 255, 255, 0.72);
    font-family: 'FluxischElse', Arial, sans-serif;
    font-size: 12px;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 1px;
    transition: color 0.2s, border-color 0.2s;
}

.footer-btn:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.75);
}

/* ===== Navigation (Copied from index.css for Banner) ===== */
.nav-buttons {
    position: absolute;
    top: 60%;
    transform: translateY(-50%);
    z-index: 25;
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-buttons img {
    width: 30px;
    height: 30px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.nav-buttons img:hover {
    transform: scale(1.1);
}

.left-nav {
    left: calc(5vw + 40px);
}

.right-nav {
    right: calc(5vw + 40px);
}

.create-event-link {
    position: absolute;
    top: 60%;
    left: calc(50% + 120px);
    transform: translateY(-50%);
    z-index: 25;
}

/* ===== Mobile Navigation (Copied from index.css for Banner) ===== */
.mobile-nav {
    display: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 25;
}

.mobile-nav-left {
    left: 30px;
}

.mobile-nav-right {
    right: 30px;
}

.mobile-nav img {
    width: 30px;
    height: 30px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.mobile-nav img:hover {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .nav-buttons,
    .create-event-link {
        display: none;
    }

    .mobile-nav {
        display: block;
    }

    .spaces-content {
        padding-top: 120px;
    }
}

/* ---- Mobile Events/Spaces tabs (same as index.css) ---- */
.idx-tabs { display: none; }

@media (max-width: 768px) {
    .idx-tabs {
        display: flex;
        gap: 8px;
        margin: 0 0 14px;
        padding: 0 20px;
    }
    .idx-tab {
        flex: 1;
        padding: 10px 0;
        background: rgba(0, 0, 0, 0.35);
        border: 1px solid rgba(255, 255, 255, 0.15);
        border-radius: 10px;
        color: rgba(255, 255, 255, 0.6);
        font-family: 'FluxischElse', Arial, sans-serif;
        font-size: 0.72rem;
        letter-spacing: 1.5px;
        text-transform: uppercase;
        text-decoration: none;
        text-align: center;
        cursor: pointer;
        transition: all 0.15s;
    }
    .idx-tab:hover,
    .idx-tab:focus {
        color: rgba(255, 255, 255, 0.9);
        border-color: rgba(255, 255, 255, 0.35);
    }
    .idx-tab.is-active {
        background: #9fbc99;
        color: #151515;
        border-color: #9fbc99;
    }
}

/* Footer banner mobile adjustments — declared AFTER the desktop footer
   styles so they actually win on mobile (same behavior as index.css) */
@media (max-width: 768px) {
    .footer-banner {
        height: 145px;
        gap: 6px;
    }

    .footer-text {
        font-size: 12px;
    }

    .footer-buttons {
        gap: 18px;
    }

    .footer-btn {
        font-size: 11px;
    }
}

@media (max-width: 400px) {
    .footer-text {
        font-size: 11px;
    }
}