/**
 * Accesible Places — Estilos de ficha individual y archivos de taxonomía
 */

/* ══════════════════════════════════════════
   SINGLE — Ficha de lugar
══════════════════════════════════════════ */

.ap-single-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

/* Cabecera */
.ap-single-header {
    margin-bottom: 28px;
}

.ap-single-header__meta {
    margin-bottom: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ap-single-header__title {
    font-size: 2rem;
    margin: 0 0 8px;
    line-height: 1.2;
}

.ap-single-header__location {
    font-size: 1rem;
    color: #555;
    margin: 0 0 16px;
}

.ap-single-header__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Galería */
/* Galería estática (1 sola imagen) */
.ap-single-gallery--static {
    margin-bottom: 32px;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.ap-single-gallery--static img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Galería slider (más de 1 imagen) — Swiper */
.ap-single-gallery--slider {
    margin-bottom: 32px;
    border-radius: 12px;
    overflow: hidden;
}

.ap-gallery-swiper {
    aspect-ratio: 16 / 9;
    width: 100%;
}

.ap-gallery-swiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Flechas de navegación con colores de marca */
.ap-gallery-swiper .swiper-button-prev,
.ap-gallery-swiper .swiper-button-next {
    color: #fff;
    background: rgba(13, 10, 46, 0.45);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    backdrop-filter: blur(4px);
    transition: background 0.15s;
}

.ap-gallery-swiper .swiper-button-prev:hover,
.ap-gallery-swiper .swiper-button-next:hover {
    background: var(--ap-primary, #7c3aed);
}

.ap-gallery-swiper .swiper-button-prev::after,
.ap-gallery-swiper .swiper-button-next::after {
    font-size: 14px;
    font-weight: 700;
}

/* Bullets */
.ap-gallery-swiper .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.6);
    opacity: 1;
}

.ap-gallery-swiper .swiper-pagination-bullet-active {
    background: #fff;
    transform: scale(1.2);
}

/* Body: main + sidebar */
.ap-single-body {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
    align-items: start;
}

/* Secciones */
.ap-single-section {
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid #f0f0f0;
}

.ap-single-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.ap-single-section__title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 14px;
    color: #222;
}

.ap-single-section--admin {
    background: #fff8e1;
    border: 1px dashed #f0b429;
    border-radius: 8px;
    padding: 16px;
}

/* Descripción */
.ap-single-description {
    color: #444;
    line-height: 1.7;
}

/* Tags */
.ap-tag-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Grilla de deportes con foto o ícono — usa más espacio que un tag simple
   porque la ficha individual tiene lugar de sobra, a diferencia de las
   cards de listado donde solo cabe un ícono chico. */
.ap-sport-grid {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 12px;
}

.ap-sport-grid__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: var(--ap-text, #0d0a2e);
    text-align: center;
    padding: 10px 8px;
    border-radius: var(--border-radius, 10px);
    border: 1px solid var(--ap-border, #ddd6fe);
    transition: border-color 0.15s, transform 0.15s;
}

.ap-sport-grid__item:hover {
    border-color: var(--ap-primary, #7c3aed);
    transform: translateY(-2px);
}

.ap-sport-grid__visual {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ap-primary-light, #ede9fe);
    flex-shrink: 0;
}

.ap-sport-grid__visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ap-sport-grid__icon {
    font-size: 1.8rem;
    line-height: 1;
}

.ap-sport-grid__placeholder {
    width: 100%;
    height: 100%;
}

.ap-sport-grid__name {
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.3;
}

.ap-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.15s;
}

.ap-tag:hover { opacity: 0.8; }

.ap-tag--sport      { background: var(--ap-accent-light); color: var(--ap-accent-dark); }
.ap-tag--disability { background: var(--ap-primary-light); color: var(--ap-primary-dark); }
.ap-tag--type       { background: var(--ap-primary-light); color: var(--ap-primary-dark); }

/* Instalaciones */
.ap-amenity-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
}

.ap-amenity-item {
    font-size: 0.9rem;
    color: var(--ap-accent-dark);
    padding: 6px 10px;
    background: var(--ap-accent-light);
    border-radius: 6px;
}

/* Horarios */
.ap-hours-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.ap-hours-table th,
.ap-hours-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.ap-hours-table th {
    font-weight: 600;
    width: 130px;
    color: #333;
}

.ap-hours-table td { color: #555; }

/* Sidebar */
.ap-single-sidebar {
    position: sticky;
    top: 24px;
}

.ap-single-address {
    font-size: 0.85rem;
    color: #666;
    margin: 8px 0 0;
}

/* Contacto */
.ap-contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ap-contact-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.ap-contact-list a {
    color: var(--ap-primary);
    text-decoration: none;
    word-break: break-all;
}

.ap-contact-list a:hover { text-decoration: underline; }

.ap-contact-list__icon { font-size: 1rem; flex-shrink: 0; }

/* ══════════════════════════════════════════
   ARCHIVE — Taxonomías
══════════════════════════════════════════ */

.ap-archive-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

.ap-archive-header {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 2px solid #f0f0f0;
}

.ap-archive-header__label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ap-primary);
    margin: 0 0 4px;
}

.ap-archive-header__title {
    font-size: 2rem;
    margin: 0 0 8px;
}

.ap-archive-header__description {
    color: #555;
    margin: 0 0 8px;
}

.ap-archive-header__count {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0;
}

/* Paginación */
.nav-links {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.nav-links a,
.nav-links span {
    padding: 8px 14px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.9rem;
    text-decoration: none;
    color: var(--ap-primary);
    transition: background 0.15s;
}

.nav-links a:hover    { background: #f0f7fb; }
.nav-links .current   { background: var(--ap-primary); color: #fff; border-color: var(--ap-primary); }

/* Thumbnail en cards de archive */
.ap-place-card__thumb {
    display: block;
    margin-bottom: 12px;
    border-radius: 6px;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.ap-place-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s;
}

.ap-place-card:hover .ap-place-card__thumb img { transform: scale(1.03); }

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */

@media (max-width: 768px) {
    .ap-single-body {
        grid-template-columns: 1fr;
    }

    .ap-single-sidebar {
        position: static;
    }

    .ap-single-header__title { font-size: 1.5rem; }
    .ap-archive-header__title { font-size: 1.5rem; }

    .ap-single-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .ap-single-gallery {
        grid-template-columns: 1fr;
    }

    .ap-amenity-list {
        grid-template-columns: 1fr;
    }
}
