/**
 * Frontend styles — Proyectos FTSP.
 * Covers: archive shortcode, home map widget, single project page.
 * Aligned to FTSP Design DNA: caja-blanca-sombra, boton-normal, fuccia accent.
 */

/* ─── HIDDEN ATTRIBUTE OVERRIDE ─── */
.ftsp-proy-wrapper [hidden],
.ftsp-mapa-home [hidden],
.ftsp-proy-single [hidden] {
    display: none !important;
}

/* ═══════════════════════════════════════════════
   1. ARCHIVE FILTERS
   ═══════════════════════════════════════════════ */
.ftsp-proy-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 24px;
    font-family: 'Nunito', sans-serif;
}

.ftsp-proy-filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1 1 180px;
}

.ftsp-proy-filter-group label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--gris-oscuro-ftsp, #606060);
    opacity: 0.6;
}

.ftsp-proy-filter-group select,
.ftsp-proy-filter-group input {
    height: 42px;
    padding: 0 12px;
    border: 1.5px solid #e8e5e8;
    border-radius: 4px;
    font-size: 14px;
    font-family: 'Nunito', sans-serif;
    color: var(--gris-oscuro-ftsp, #606060);
    background: var(--blanco-ftsp, #ffffff);
    transition: border-color 0.25s ease;
    appearance: none;
    -webkit-appearance: none;
}

.ftsp-proy-filter-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23606060' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.ftsp-proy-filter-group select:focus,
.ftsp-proy-filter-group input:focus {
    outline: none;
    border-color: var(--fuccia-ftsp, #d13a78);
}

.ftsp-proy-filter-group--search {
    flex: 1;
    min-width: 200px;
}

.ftsp-proy-filter-actions {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

/* Buscar button — boton-normal DNA */
.ftsp-proy-btn-filter {
    height: 42px;
    padding: 0 24px;
    border: none;
    border-radius: 4px;
    background: var(--fuccia-ftsp, #d13a78);
    color: var(--blanco-ftsp, #ffffff);
    font-size: 14px;
    font-weight: 700;
    font-family: 'Nunito', sans-serif;
    cursor: pointer;
    transition: background 0.3s ease;
    white-space: nowrap;
}

.ftsp-proy-btn-filter:hover {
    background: var(--naranja-ftsp, #ef7c5d);
}

/* Limpiar button — outline style */
.ftsp-proy-btn-clear {
    height: 42px;
    padding: 0 20px;
    border: 1.5px solid var(--fuccia-ftsp, #d13a78);
    border-radius: 4px;
    background: transparent;
    color: var(--fuccia-ftsp, #d13a78);
    font-size: 14px;
    font-weight: 700;
    font-family: 'Nunito', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.ftsp-proy-btn-clear:hover {
    background: var(--fuccia-ftsp, #d13a78);
    color: var(--blanco-ftsp, #ffffff);
}

/* ═══════════════════════════════════════════════
   2. TOOLBAR
   ═══════════════════════════════════════════════ */
.ftsp-proy-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    font-family: 'Nunito', sans-serif;
}

.ftsp-proy-count {
    font-size: 13px;
    color: var(--gris-oscuro-ftsp, #606060);
    opacity: 0.6;
}

.ftsp-proy-view-toggle {
    display: flex;
    gap: 6px;
}

.ftsp-proy-view-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #e8e5e8;
    border-radius: 4px;
    background: var(--blanco-ftsp, #ffffff);
    color: var(--gris-oscuro-ftsp, #606060);
    cursor: pointer;
    transition: all 0.25s ease;
    padding: 0;
}

.ftsp-proy-view-btn:hover {
    border-color: var(--fuccia-ftsp, #d13a78);
    color: var(--fuccia-ftsp, #d13a78);
}

.ftsp-proy-view-btn.is-active {
    background: var(--fuccia-ftsp, #d13a78);
    border-color: var(--fuccia-ftsp, #d13a78);
    color: var(--blanco-ftsp, #ffffff);
}

.ftsp-proy-view-btn svg {
    width: 16px;
    height: 16px;
}

/* ═══════════════════════════════════════════════
   3. PROJECT GRID
   ═══════════════════════════════════════════════ */
.ftsp-proy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    font-family: 'Nunito', sans-serif;
}

/* ═══════════════════════════════════════════════
   4. PROJECT CARD — matches caja-blanca-sombra
   ═══════════════════════════════════════════════ */
.ftsp-proy-card {
    background: var(--blanco-ftsp, #ffffff);
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.8s ease, transform 0.8s ease;
}

.ftsp-proy-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* Card image */
.ftsp-proy-card__image {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    position: relative;
}

.ftsp-proy-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.8s ease;
}

.ftsp-proy-card:hover .ftsp-proy-card__image img {
    transform: scale(1.03);
}

/* No-image placeholder (background comes from inline style) */
.ftsp-proy-card__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 3;
}

.ftsp-proy-card__placeholder svg {
    width: 48px;
    height: 48px;
}

/* Card body */
.ftsp-proy-card__body {
    padding: 20px;
}

/* Badges */
.ftsp-proy-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.ftsp-proy-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 100px;
    color: var(--blanco-ftsp, #ffffff);
    letter-spacing: 0.2px;
    line-height: 1.4;
}

/* Sector badge — base pill style (background from inline style) */
.ftsp-proy-badge-sector {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: var(--blanco-ftsp, #ffffff);
    line-height: 1.4;
}

/* Estado badge — base pill style (background from inline style) */
.ftsp-proy-badge-estado {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: var(--blanco-ftsp, #ffffff);
    line-height: 1.4;
}

.ftsp-proy-badge--en_formulacion {
    background: #8b8fa3;
}

.ftsp-proy-badge--en_ejecucion {
    background: var(--verde-ftsp, #57bab7);
}

.ftsp-proy-badge--finalizado {
    background: #4caf50;
}

.ftsp-proy-badge--suspendido {
    background: var(--naranja-ftsp, #ef7c5d);
}

/* Card title */
.ftsp-proy-card__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--gris-oscuro-ftsp, #606060);
    margin: 0 0 4px 0;
    line-height: 1.35;
}

/* Card subtitle */
.ftsp-proy-card__subtitle {
    font-size: 14px;
    font-weight: 600;
    color: var(--gris-oscuro-ftsp, #606060);
    margin: 2px 0 8px;
    line-height: 1.3;
}

/* Card location */
.ftsp-proy-card__location {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--gris-oscuro-ftsp, #606060);
    opacity: 0.6;
    margin-bottom: 12px;
}

.ftsp-proy-card__location svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Card link */
.ftsp-proy-card__link {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    color: var(--fuccia-ftsp, #d13a78);
    text-decoration: none;
    transition: color 0.25s ease;
}

.ftsp-proy-card__link::after {
    content: ' \2192';
}

.ftsp-proy-card__link:hover {
    color: var(--naranja-ftsp, #ef7c5d);
}

/* ═══════════════════════════════════════════════
   5. MAP CONTAINER
   ═══════════════════════════════════════════════ */
.ftsp-proy-map-container {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
}

.ftsp-proy-map-container .ftsp-proy-map {
    width: 100%;
    min-height: 480px;
}

/* ═══════════════════════════════════════════════
   6. HOME MAP WIDGET
   ═══════════════════════════════════════════════ */
/* The home map widget fills its parent container completely */
/* Force Bricks shortcode wrapper to inherit parent height */
.brxe-shortcode:has(.ftsp-mapa-home) {
    height: 100%;
}

.ftsp-mapa-home {
    font-family: 'Nunito', sans-serif;
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 400px;
    border-radius: 10px;
    overflow: hidden;
}

.ftsp-mapa-home__map {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    filter: saturate(0.2) brightness(1.05) contrast(0.92);
}

/* Fade-out gradient overlay on edges to blend into background */
.ftsp-mapa-home::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        linear-gradient(to right, transparent 60%, rgba(244, 242, 244, 0.7) 90%, rgba(244, 242, 244, 0.95) 100%),
        linear-gradient(to bottom, transparent 70%, rgba(244, 242, 244, 0.5) 90%, rgba(244, 242, 244, 0.9) 100%),
        linear-gradient(to top, transparent 85%, rgba(244, 242, 244, 0.3) 100%);
}

/* Filter pills floating inside the map — top left */
.ftsp-mapa-home__filters {
    position: absolute;
    top: 12px;
    left: 12px;
    max-width: 45%;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    pointer-events: none;
    background: rgba(244, 242, 244, 0.6);
    border-radius: 16px;
    padding: 8px 12px;
    backdrop-filter: blur(6px);
}

.ftsp-mapa-home__pill {
    pointer-events: auto;
    padding: 8px 18px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 700;
    font-family: 'Nunito', sans-serif;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.92);
    color: var(--gris-oscuro-ftsp, #606060);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(4px);
}

/* Colored dot indicator per sector */
.ftsp-mapa-home__pill::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
    background: var(--gris-oscuro-ftsp, #606060);
}

/* "Todos" pill — no dot */
.ftsp-mapa-home__pill[data-sector=""]::before {
    display: none;
}

/* Sector dot colors — match sector colors from helpers.php */
.ftsp-mapa-home__pill[data-sector="agua-y-saneamiento"]::before {
    background: #d13a78;
}
.ftsp-mapa-home__pill[data-sector="energia"]::before {
    background: var(--naranja-ftsp, #ef7c5d);
}
.ftsp-mapa-home__pill[data-sector="conectividad"]::before {
    background: #57bab7;
}

.ftsp-mapa-home__pill:hover {
    background: rgba(255, 255, 255, 1);
    color: var(--fuccia-ftsp, #d13a78);
}

.ftsp-mapa-home__pill.is-active {
    background: var(--fuccia-ftsp, #d13a78);
    color: var(--blanco-ftsp, #ffffff);
    box-shadow: 0 2px 8px rgba(209, 58, 120, 0.35);
    transform: scale(1.05);
}

/* When active, dot should be white */
.ftsp-mapa-home__pill.is-active::before {
    background: var(--blanco-ftsp, #ffffff);
}

/* ═══════════════════════════════════════════════
   7. LOADING OVERLAY
   ═══════════════════════════════════════════════ */
.ftsp-proy-loading {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(3px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    z-index: 10;
}

.ftsp-proy-loading span {
    font-size: 13px;
    color: var(--gris-oscuro-ftsp, #606060);
    font-weight: 600;
    opacity: 0.5;
}

.ftsp-proy-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--gris-ftsp, #f4f2f4);
    border-top-color: var(--fuccia-ftsp, #d13a78);
    border-radius: 50%;
    animation: ftspProySpin 0.8s linear infinite;
}

@keyframes ftspProySpin {
    to {
        transform: rotate(360deg);
    }
}

/* ═══════════════════════════════════════════════
   8. EMPTY STATE
   ═══════════════════════════════════════════════ */
.ftsp-proy-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 32px;
    text-align: center;
    color: var(--gris-oscuro-ftsp, #606060);
}

.ftsp-proy-empty svg {
    opacity: 0.2;
    margin-bottom: 16px;
    color: var(--fuccia-ftsp, #d13a78);
}

.ftsp-proy-empty p {
    font-size: 15px;
    margin: 0 0 20px 0;
    opacity: 0.6;
}

/* Empty state reuses .ftsp-proy-btn-filter for its CTA */

/* ═══════════════════════════════════════════════
   9. PAGINATION
   ═══════════════════════════════════════════════ */
.ftsp-proy-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 30px;
    font-family: 'Nunito', sans-serif;
}

.ftsp-proy-page-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #e8e5e8;
    border-radius: 4px;
    background: var(--blanco-ftsp, #ffffff);
    color: var(--gris-oscuro-ftsp, #606060);
    font-size: 14px;
    font-weight: 600;
    font-family: 'Nunito', sans-serif;
    cursor: pointer;
    transition: all 0.25s ease;
    padding: 0;
}

.ftsp-proy-page-btn:hover {
    border-color: var(--fuccia-ftsp, #d13a78);
    color: var(--fuccia-ftsp, #d13a78);
}

.ftsp-proy-page-btn.is-active {
    background: var(--fuccia-ftsp, #d13a78);
    border-color: var(--fuccia-ftsp, #d13a78);
    color: var(--blanco-ftsp, #ffffff);
}

.ftsp-proy-page-btn.ftsp-proy-page-prev,
.ftsp-proy-page-btn.ftsp-proy-page-next {
    width: auto;
    padding: 0 14px;
    font-size: 13px;
    gap: 4px;
    white-space: nowrap;
}

.ftsp-proy-page-btn:disabled,
.ftsp-proy-page-btn.is-disabled {
    opacity: 0.4;
    pointer-events: none;
}

.ftsp-proy-page-btn svg {
    width: 14px;
    height: 14px;
}

.ftsp-proy-page-ellipsis {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--gris-oscuro-ftsp, #606060);
    opacity: 0.4;
}

/* ═══════════════════════════════════════════════
   10. SINGLE PROJECT PAGE
   ═══════════════════════════════════════════════ */

/* Hero */
.ftsp-proy-single {
    font-family: 'Nunito', sans-serif;
    color: var(--gris-oscuro-ftsp, #606060);
}

.ftsp-proy-hero {
    position: relative;
    min-height: 400px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
}

.ftsp-proy-hero__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.ftsp-proy-hero__content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1276px;
    margin: 0 auto;
    padding: 0 30px;
}

/* Overlapping white box — SIGNATURE caja desfasada DNA */
.ftsp-proy-hero__box {
    background: var(--blanco-ftsp, #ffffff);
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 30px 36px;
    margin-bottom: -80px;
    position: relative;
    z-index: 3;
}

/* Breadcrumb */
.ftsp-proy-breadcrumb {
    font-size: 12px;
    color: var(--blanco-ftsp, #ffffff);
    opacity: 0.7;
    margin-bottom: 16px;
    position: relative;
    z-index: 2;
}

.ftsp-proy-breadcrumb a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s;
}

.ftsp-proy-breadcrumb a:hover {
    opacity: 1;
}

.ftsp-proy-breadcrumb__sep {
    opacity: 0.4;
    margin: 0 6px;
}

.ftsp-proy-breadcrumb__current {
    font-weight: 700;
    opacity: 1;
}

/* Hero box title */
.ftsp-proy-hero__title {
    font-size: 28px;
    font-weight: 700;
    color: var(--gris-oscuro-ftsp, #606060);
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.ftsp-proy-hero__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Content section — compensates hero overlap */
.ftsp-proy-content {
    padding-top: 100px;
    background: var(--gris-ftsp, #f4f2f4);
}

.ftsp-proy-content__inner {
    max-width: 1276px;
    margin: 0 auto;
    padding: 0 30px 60px;
}

/* Two-column layout */
.ftsp-proy-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
    align-items: start;
}

/* Left column — descriptions */
.ftsp-proy-main {
    min-width: 0;
}

.ftsp-proy-section {
    margin-bottom: 32px;
}

.ftsp-proy-section__title {
    font-size: 20px;
    font-weight: 700;
    color: var(--gris-oscuro-ftsp, #606060);
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.ftsp-proy-section__title b,
.ftsp-proy-section__title strong {
    color: var(--fuccia-ftsp, #d13a78);
}

.ftsp-proy-section__text {
    font-size: 15px;
    line-height: 1.7;
    color: var(--gris-oscuro-ftsp, #606060);
    margin: 0;
}

.ftsp-proy-section__text p {
    margin: 0 0 12px 0;
}

.ftsp-proy-section__text p:last-child {
    margin-bottom: 0;
}

/* Beneficiaries stats grid */
.ftsp-proy-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 16px;
}

.ftsp-proy-stat {
    background: var(--blanco-ftsp, #ffffff);
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 20px 16px;
    text-align: center;
}

.ftsp-proy-stat__num {
    display: block;
    font-size: 28px;
    font-weight: 800;
    color: var(--fuccia-ftsp, #d13a78);
    line-height: 1.2;
}

.ftsp-proy-stat__label {
    display: block;
    font-size: 11px;
    color: var(--gris-oscuro-ftsp, #606060);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-top: 4px;
    font-weight: 700;
    opacity: 0.6;
}

/* Right column — technical card (sticky) */
.ftsp-proy-sidebar {
    position: sticky;
    top: 100px;
}

.ftsp-proy-tech-card {
    background: var(--blanco-ftsp, #ffffff);
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 24px;
}

.ftsp-proy-tech-card__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--gris-oscuro-ftsp, #606060);
    margin: 0 0 18px 0;
    padding-bottom: 12px;
    border-bottom: 1.5px solid var(--gris-ftsp, #f4f2f4);
}

.ftsp-proy-tech-card__row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid var(--gris-ftsp, #f4f2f4);
    gap: 12px;
}

.ftsp-proy-tech-card__row:last-child {
    border-bottom: none;
}

.ftsp-proy-tech-card__label {
    font-size: 12px;
    font-weight: 700;
    color: var(--gris-oscuro-ftsp, #606060);
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    flex-shrink: 0;
}

.ftsp-proy-tech-card__value {
    font-size: 14px;
    font-weight: 600;
    color: var(--gris-oscuro-ftsp, #606060);
    text-align: right;
}

/* Progress bar */
.ftsp-proy-progress {
    margin-top: 6px;
}

.ftsp-proy-progress__bar {
    height: 8px;
    background: var(--gris-ftsp, #f4f2f4);
    border-radius: 4px;
    overflow: hidden;
}

.ftsp-proy-progress__fill {
    height: 100%;
    background: var(--verde-ftsp, #57bab7);
    border-radius: 4px;
    transition: width 0.6s ease;
}

.ftsp-proy-progress__text {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-top: 4px;
    color: var(--gris-oscuro-ftsp, #606060);
    opacity: 0.6;
}

/* Map in tech card */
.ftsp-proy-tech-card__map {
    border-radius: 8px;
    overflow: hidden;
    margin-top: 16px;
    height: 200px;
}

/* Gallery section — full width */
.ftsp-proy-gallery {
    background: var(--blanco-ftsp, #ffffff);
    padding: 60px 0;
}

.ftsp-proy-gallery__inner {
    max-width: 1276px;
    margin: 0 auto;
    padding: 0 30px;
}

.ftsp-proy-gallery__title {
    font-size: 22px;
    font-weight: 700;
    color: var(--gris-oscuro-ftsp, #606060);
    margin: 0 0 24px 0;
}

.ftsp-proy-gallery__title b,
.ftsp-proy-gallery__title strong {
    color: var(--fuccia-ftsp, #d13a78);
}

.ftsp-proy-gallery__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.ftsp-proy-gallery__item {
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    overflow: hidden;
}

.ftsp-proy-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.ftsp-proy-gallery__item:hover img {
    transform: scale(1.05);
}

/* Power BI section — full width */
.ftsp-proy-powerbi {
    background: var(--gris-ftsp, #f4f2f4);
    padding: 60px 0;
}

.ftsp-proy-powerbi__inner {
    max-width: 1276px;
    margin: 0 auto;
    padding: 0 30px;
}

.ftsp-proy-powerbi__title {
    font-size: 22px;
    font-weight: 700;
    color: var(--gris-oscuro-ftsp, #606060);
    margin: 0 0 24px 0;
}

.ftsp-proy-powerbi__title b,
.ftsp-proy-powerbi__title strong {
    color: var(--fuccia-ftsp, #d13a78);
}

.ftsp-proy-powerbi__iframe {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.ftsp-proy-powerbi__iframe iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
}

/* CTA section */
.ftsp-proy-cta {
    background: var(--verde-ftsp, #57bab7);
    padding: 60px 0;
    text-align: center;
}

.ftsp-proy-cta__inner {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 30px;
}

.ftsp-proy-cta__title {
    font-size: 26px;
    font-weight: 700;
    color: var(--blanco-ftsp, #ffffff);
    margin: 0 0 12px 0;
}

.ftsp-proy-cta__text {
    font-size: 16px;
    color: var(--blanco-ftsp, #ffffff);
    opacity: 0.9;
    margin: 0 0 24px 0;
    line-height: 1.6;
}

/* boton-blanco style */
.ftsp-proy-cta__btn {
    display: inline-block;
    padding: 12px 32px;
    border: 1.5px solid var(--gris-ftsp, #f4f2f4);
    border-radius: 4px;
    background: transparent;
    color: var(--blanco-ftsp, #ffffff);
    font-size: 15px;
    font-weight: 700;
    font-family: 'Nunito', sans-serif;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.ftsp-proy-cta__btn:hover {
    background: var(--gris-ftsp, #f4f2f4);
    color: var(--fuccia-ftsp, #d13a78);
}

/* ═══════════════════════════════════════════════
   11. RESPONSIVE
   ═══════════════════════════════════════════════ */

/* Tablet Portrait: max-width 991px */
@media (max-width: 991px) {
    .ftsp-proy-filter-group {
        flex: 1 1 calc(50% - 6px);
    }

    .ftsp-proy-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }

    .ftsp-proy-layout {
        grid-template-columns: 1fr 340px;
        gap: 24px;
    }

    .ftsp-proy-hero__box {
        padding: 24px 28px;
    }

    .ftsp-proy-hero__title {
        font-size: 24px;
    }

    .ftsp-proy-section__title {
        font-size: 18px;
    }

    .ftsp-proy-stat__num {
        font-size: 24px;
    }

    .ftsp-proy-gallery,
    .ftsp-proy-powerbi,
    .ftsp-proy-cta {
        padding: 48px 0;
    }

    .ftsp-proy-map-container .ftsp-proy-map {
        min-height: 400px;
    }

    .ftsp-mapa-home {
        min-height: 360px;
    }
}

/* Mobile Landscape: max-width 767px */
@media (max-width: 767px) {
    .ftsp-proy-filters {
        flex-direction: column;
        gap: 10px;
    }

    .ftsp-proy-filter-group {
        flex: 1 1 100%;
        width: 100%;
    }

    .ftsp-proy-filter-group select,
    .ftsp-proy-filter-group input {
        width: 100%;
        box-sizing: border-box;
    }

    .ftsp-proy-filter-group--search {
        min-width: unset;
    }

    .ftsp-proy-filter-actions {
        width: 100%;
    }

    .ftsp-proy-btn-filter,
    .ftsp-proy-btn-clear {
        flex: 1;
    }

    .ftsp-proy-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 16px;
    }

    .ftsp-proy-layout {
        grid-template-columns: 1fr;
    }

    .ftsp-proy-sidebar {
        position: static;
    }

    .ftsp-proy-hero {
        min-height: 340px;
    }

    .ftsp-proy-hero__box {
        padding: 20px 22px;
        margin-bottom: -60px;
    }

    .ftsp-proy-hero__title {
        font-size: 22px;
    }

    .ftsp-proy-hero__content {
        padding: 0 20px;
    }

    .ftsp-proy-content__inner {
        padding: 0 20px 48px;
    }

    .ftsp-proy-content {
        padding-top: 80px;
    }

    .ftsp-proy-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .ftsp-proy-stat {
        padding: 16px 12px;
    }

    .ftsp-proy-stat__num {
        font-size: 22px;
    }

    .ftsp-proy-gallery__inner,
    .ftsp-proy-powerbi__inner {
        padding: 0 20px;
    }

    .ftsp-proy-gallery,
    .ftsp-proy-powerbi,
    .ftsp-proy-cta {
        padding: 40px 0;
    }

    .ftsp-proy-cta__title {
        font-size: 22px;
    }

    .ftsp-proy-map-container .ftsp-proy-map {
        min-height: 320px;
    }

    .ftsp-mapa-home__filters {
        gap: 4px;
    }

    .ftsp-mapa-home__pill {
        font-size: 12px;
        padding: 6px 14px;
    }

    .ftsp-mapa-home {
        min-height: 300px;
    }

    .ftsp-proy-powerbi__iframe iframe {
        aspect-ratio: 4 / 3;
    }
}

/* Mobile Portrait: max-width 478px */
@media (max-width: 478px) {
    .ftsp-proy-filters {
        gap: 8px;
    }

    .ftsp-proy-filter-group select,
    .ftsp-proy-filter-group input {
        height: 38px;
        font-size: 13px;
    }

    .ftsp-proy-btn-filter,
    .ftsp-proy-btn-clear {
        height: 38px;
        font-size: 13px;
        padding: 0 16px;
    }

    .ftsp-proy-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .ftsp-proy-card__image {
        aspect-ratio: 4 / 3;
    }

    .ftsp-proy-card__body {
        padding: 10px;
    }

    .ftsp-proy-card__title {
        font-size: 13px;
        line-height: 1.25;
    }

    .ftsp-proy-card__subtitle {
        font-size: 11px;
        margin: 1px 0 6px;
    }

    .ftsp-proy-card__badges {
        gap: 4px;
    }

    .ftsp-proy-card__badge {
        font-size: 9px;
        padding: 2px 6px;
    }

    .ftsp-proy-card__location {
        font-size: 11px;
        margin-bottom: 8px;
    }

    .ftsp-proy-card__link {
        font-size: 12px;
    }

    .ftsp-proy-hero {
        min-height: 300px;
    }

    .ftsp-proy-hero__title {
        font-size: 22px;
    }

    .ftsp-proy-hero__box {
        padding: 18px 20px;
        margin-bottom: -50px;
        border-radius: 8px;
    }

    .ftsp-proy-content {
        padding-top: 70px;
    }

    .ftsp-proy-content__inner {
        padding: 0 16px 40px;
    }

    .ftsp-proy-section__title {
        font-size: 17px;
    }

    .ftsp-proy-stats {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .ftsp-proy-stat__num {
        font-size: 20px;
    }

    .ftsp-proy-stat__label {
        font-size: 10px;
    }

    .ftsp-proy-tech-card {
        padding: 20px;
    }

    .ftsp-proy-tech-card__row {
        flex-direction: column;
        gap: 2px;
    }

    .ftsp-proy-tech-card__value {
        text-align: left;
    }

    .ftsp-proy-gallery__grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .ftsp-proy-gallery__title,
    .ftsp-proy-powerbi__title {
        font-size: 19px;
    }

    .ftsp-proy-gallery__inner,
    .ftsp-proy-powerbi__inner {
        padding: 0 16px;
    }

    .ftsp-proy-cta__inner {
        padding: 0 16px;
    }

    .ftsp-proy-cta__title {
        font-size: 20px;
    }

    .ftsp-proy-cta__text {
        font-size: 14px;
    }

    .ftsp-proy-breadcrumb {
        font-size: 11px;
    }

    .ftsp-proy-pagination {
        margin-top: 24px;
    }

    .ftsp-proy-page-btn {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }

    .ftsp-proy-count {
        font-size: 12px;
    }

    .ftsp-proy-empty {
        padding: 40px 20px;
    }

    .ftsp-proy-empty p {
        font-size: 13px;
    }

    .ftsp-proy-empty .ftsp-proy-btn-filter {
        padding: 9px 20px;
        font-size: 13px;
    }

    .ftsp-mapa-home {
        min-height: 260px;
    }

    .ftsp-proy-map-container .ftsp-proy-map {
        min-height: 280px;
    }
}

/* ═══════════════════════════════════════════════
   12. GOOGLE MAPS INFOWINDOW
   ═══════════════════════════════════════════════ */
.gm-style .ftsp-proy-infowindow {
    max-width: 300px;
    padding: 16px 18px;
    font-family: 'Nunito', sans-serif;
    line-height: 1.4;
}

.ftsp-proy-infowindow__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

.ftsp-proy-infowindow__badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 100px;
    color: var(--blanco-ftsp, #ffffff);
    letter-spacing: 0.2px;
    display: inline-block;
}

.ftsp-proy-infowindow__title {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 6px 0;
    line-height: 1.35;
}

.ftsp-proy-infowindow__title a {
    color: var(--gris-oscuro-ftsp, #606060);
    text-decoration: none;
    transition: color 0.2s;
}

.ftsp-proy-infowindow__title a:hover {
    color: var(--fuccia-ftsp, #d13a78);
}

.ftsp-proy-infowindow__subtitle {
    font-size: 13px;
    font-weight: 600;
    color: var(--gris-oscuro-ftsp, #606060);
    margin: -2px 0 6px;
    line-height: 1.3;
}

.ftsp-proy-infowindow__location {
    font-size: 12px;
    color: var(--gris-oscuro-ftsp, #606060);
    opacity: 0.6;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.ftsp-proy-infowindow__location svg {
    flex-shrink: 0;
}

.ftsp-proy-infowindow__link {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    color: var(--fuccia-ftsp, #d13a78);
    text-decoration: none;
    transition: color 0.2s;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
}

.ftsp-proy-infowindow__link:hover {
    color: var(--naranja-ftsp, #ef7c5d);
}

/* ─── MAP LEGEND ─── */
.ftsp-proy-map-legend {
    background: var(--blanco-ftsp, #ffffff);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    padding: 12px 16px;
    margin: 0 0 10px 10px;
    font-family: 'Nunito', sans-serif;
    max-height: 260px;
    overflow-y: auto;
    transition: padding 0.3s ease;
}

/* Toggle button */
.ftsp-proy-map-legend__toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
    font-family: 'Nunito', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gris-oscuro-ftsp, #606060);
    padding: 0;
    margin: 0 0 8px 0;
    width: 100%;
}

.ftsp-proy-map-legend__toggle svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Collapsed state */
.ftsp-proy-map-legend.is-collapsed {
    padding: 8px 12px;
}

.ftsp-proy-map-legend.is-collapsed .ftsp-proy-map-legend__toggle {
    margin: 0;
}

.ftsp-proy-map-legend.is-collapsed .ftsp-proy-map-legend__list {
    display: none;
}

.ftsp-proy-map-legend__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.ftsp-proy-map-legend__item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ftsp-proy-map-legend__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

.ftsp-proy-map-legend__label {
    font-size: 11px;
    color: var(--gris-oscuro-ftsp, #606060);
    white-space: nowrap;
}

/* ═══════════════════════════════════════════════
   DRAWER PANEL
   ═══════════════════════════════════════════════ */

.ftsp-proy-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.35s ease;
    backdrop-filter: blur(2px);
}

.ftsp-proy-drawer-overlay.is-open {
    opacity: 1;
}

.ftsp-proy-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 50vw;
    max-width: 720px;
    z-index: 9999;
    background: var(--blanco-ftsp, #ffffff);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: 'Nunito', sans-serif;
}

.ftsp-proy-drawer.is-open {
    transform: translateX(0);
}

.ftsp-proy-drawer__header {
    display: flex;
    justify-content: flex-end;
    padding: 12px 16px;
    border-bottom: 1px solid var(--gris-ftsp, #f4f2f4);
    flex-shrink: 0;
}

.ftsp-proy-drawer__close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--gris-ftsp, #f4f2f4);
    border-radius: 50%;
    cursor: pointer;
    color: var(--gris-oscuro-ftsp, #606060);
    transition: all 0.2s;
}

.ftsp-proy-drawer__close:hover {
    background: var(--fuccia-ftsp, #d13a78);
    color: var(--blanco-ftsp, #ffffff);
}

.ftsp-proy-drawer__body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.ftsp-proy-drawer__loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 14px;
    color: var(--gris-oscuro-ftsp, #606060);
    opacity: 0.5;
}

.ftsp-proy-drawer__error {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--gris-oscuro-ftsp, #606060);
    opacity: 0.6;
    font-size: 14px;
}

/* Hero image inside drawer */
.ftsp-proy-drawer__hero {
    width: 100%;
    max-height: 360px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--gris-ftsp, #f4f2f4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ftsp-proy-drawer__hero img {
    width: 100%;
    max-height: 360px;
    object-fit: contain;
    display: block;
}

/* Content */
.ftsp-proy-drawer__content {
    padding: 24px 28px 40px;
}

.ftsp-proy-drawer__badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.ftsp-proy-drawer__title {
    font-size: 20px;
    font-weight: 700;
    color: var(--gris-oscuro-ftsp, #606060);
    margin: 0 0 6px;
    line-height: 1.3;
}

.ftsp-proy-drawer__subtitle {
    font-size: 17px;
    font-weight: 600;
    color: var(--gris-oscuro-ftsp, #606060);
    margin: -2px 0 16px;
    line-height: 1.35;
}

.ftsp-proy-drawer__location {
    font-size: 13px;
    color: var(--gris-oscuro-ftsp, #606060);
    opacity: 0.6;
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0 0 20px;
}

/* Sections */
.ftsp-proy-drawer__section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--gris-ftsp, #f4f2f4);
}

.ftsp-proy-drawer__section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.ftsp-proy-drawer__section h3 {
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--fuccia-ftsp, #d13a78);
    margin: 0 0 10px;
}

.ftsp-proy-drawer__richtext {
    font-size: 14px;
    line-height: 1.65;
    color: var(--gris-oscuro-ftsp, #606060);
}

/* Stats */
.ftsp-proy-drawer__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.ftsp-proy-drawer__stat {
    background: var(--gris-ftsp, #f4f2f4);
    border-radius: 8px;
    padding: 12px 10px;
    text-align: center;
}

.ftsp-proy-drawer__stat-num {
    display: block;
    font-size: 20px;
    font-weight: 800;
    color: var(--fuccia-ftsp, #d13a78);
}

.ftsp-proy-drawer__stat-label {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--gris-oscuro-ftsp, #606060);
    opacity: 0.6;
    margin-top: 2px;
}

/* Tech data */
.ftsp-proy-drawer__techdata {
    background: var(--gris-ftsp, #f4f2f4);
    border-radius: 10px;
    padding: 16px 20px;
}

.ftsp-proy-drawer__techrow {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    gap: 12px;
}

.ftsp-proy-drawer__techrow:last-child {
    border-bottom: none;
}

.ftsp-proy-drawer__techlabel {
    font-size: 12px;
    font-weight: 600;
    color: var(--gris-oscuro-ftsp, #606060);
    opacity: 0.7;
    flex-shrink: 0;
}

.ftsp-proy-drawer__techvalue {
    font-size: 13px;
    font-weight: 700;
    color: var(--gris-oscuro-ftsp, #606060);
    text-align: right;
}

/* Progress bar inside drawer */
.ftsp-proy-drawer__progress {
    display: inline-block;
    width: 80px;
    height: 6px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 3px;
    overflow: hidden;
    vertical-align: middle;
    margin-right: 6px;
}

.ftsp-proy-drawer__progress-fill {
    height: 100%;
    background: var(--verde-ftsp, #57bab7);
    border-radius: 3px;
}

/* Gallery in drawer */
.ftsp-proy-drawer__section .splide__slide img {
    width: 100%;
    max-height: 400px;
    border-radius: 8px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* Splide arrows — force pixel sizes to prevent Bricks font-size inheritance */
.ftsp-proy-drawer .splide__arrow {
    width: 32px !important;
    height: 32px !important;
    background: rgba(255, 255, 255, 0.85) !important;
    border-radius: 50% !important;
    border: none !important;
    opacity: 0.8;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.ftsp-proy-drawer .splide__arrow svg {
    width: 16px !important;
    height: 16px !important;
    fill: var(--gris-oscuro-ftsp, #606060) !important;
}

/* Power BI iframe in drawer */
.ftsp-proy-drawer__iframe-wrap {
    border-radius: 8px;
    overflow: hidden;
}

.ftsp-proy-drawer__iframe-wrap iframe {
    width: 100%;
    aspect-ratio: 16/9;
    border: 0;
}

/* Responsive drawer */
@media (max-width: 991px) {
    .ftsp-proy-drawer {
        width: 65vw;
    }
}

@media (max-width: 767px) {
    .ftsp-proy-drawer {
        width: 90vw;
        max-width: none;
    }

    .ftsp-proy-drawer__hero {
        max-height: 260px;
    }

    .ftsp-proy-drawer__hero img {
        max-height: 260px;
    }

    .ftsp-proy-drawer__content {
        padding: 20px 20px 30px;
    }

    .ftsp-proy-drawer__title {
        font-size: 18px;
    }

    .ftsp-proy-drawer__stats {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 478px) {
    .ftsp-proy-drawer {
        width: 100vw;
    }

    .ftsp-proy-drawer__content {
        padding: 16px 16px 24px;
    }
}

/* ═══════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════ */
@keyframes ftspProyFadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ftsp-proy-animate-in {
    animation: ftspProyFadeInUp 0.5s ease forwards;
}
