/* ========================================
   CANCHAS.CSS - TARJETAS EXPANDIBLES
   Estilo para menú de canchas con panel expandible en hover
   ======================================== */

/* ========================
   CONTENEDOR DE CANCHAS
   ======================== */

.canchas-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    padding: 20px;
    perspective: 1000px;
}

/* ========================
   TARJETA CANCHA (PEQUEÑA)
   ======================== */

.cancha-card {
    position: relative;
    width: 100%;
    height: 320px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    transform-origin: center;
}

.cancha-card:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
    transform: translateY(-8px);
}

/* ========================
   IMAGEN DE LA CANCHA
   ======================== */

.cancha-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.3s ease;
}

.cancha-card:hover .cancha-image {
    filter: brightness(0.4) blur(3px);
}

/* ========================
   OVERLAY (INFORMACIÓN EN TARJETA PEQUEÑA)
   ======================== */

.cancha-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0));
    color: white;
    z-index: 10;
}

.cancha-nombre {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 4px;
}

.cancha-tipo {
    font-size: 0.9em;
    color: #e0e0e0;
    margin-bottom: 8px;
}

.cancha-precio {
    font-size: 1.1em;
    color: var(--halo, #d7f06a);
    font-weight: bold;
}

/* ========================
   PANEL EXPANDIDO (HOVER)
   ======================== */

.cancha-panel {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    padding: 24px;
    border-radius: 12px;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.95);
    transition: all 0.3s ease;
    z-index: 20;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.cancha-card:hover .cancha-panel {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

/* ========================
   CONTENIDO DEL PANEL
   ======================== */

.panel-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}

.panel-titulo {
    font-size: 1.3em;
    font-weight: bold;
    color: #333;
    margin-bottom: 4px;
}

.panel-tipo {
    font-size: 0.9em;
    color: #666;
}

.panel-content {
    flex: 1;
    margin-bottom: 16px;
}

.panel-section {
    margin-bottom: 16px;
}

.panel-section-titulo {
    font-size: 0.85em;
    color: #999;
    text-transform: uppercase;
    font-weight: bold;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.panel-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.panel-info-icono {
    font-size: 1.3em;
    width: 32px;
}

.panel-info-texto {
    font-size: 0.95em;
    color: #333;
}

.panel-info-subtexto {
    font-size: 0.85em;
    color: #666;
}

/* ========================
   ESPECIFICACIONES
   ======================== */

.panel-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    background: #f9f9f9;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.spec {
    display: flex;
    flex-direction: column;
}

.spec-label {
    font-size: 0.8em;
    color: #999;
    text-transform: uppercase;
    margin-bottom: 4px;
    font-weight: bold;
}

.spec-valor {
    font-size: 0.95em;
    color: #333;
    font-weight: 500;
}

/* ========================
   DESCRIPCIÓN
   ======================== */

.panel-descripcion {
    font-size: 0.9em;
    color: #555;
    line-height: 1.5;
    margin-bottom: 12px;
}

/* ========================
   BOTONES
   ======================== */

.panel-buttons {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.btn-panel {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

/* .btn-reservar toma el estilo lima del tema (global.css) */

.btn-detalles {
    background: #fff;
    color: var(--tinta, #0f2416);
    border: 1.5px solid #c9d5cc;
    transition: background-color .2s, border-color .2s;
}

.btn-detalles:hover {
    background: #eef3ee;
    border-color: var(--tinta, #0f2416);
}

/* ========================
   INSIGNIA DE ILUMINACIÓN
   ======================== */

.iluminacion-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #fff3cd;
    color: #856404;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
    margin-top: 8px;
}

.iluminacion-badge.si {
    background: #d4edda;
    color: #155724;
}

.iluminacion-badge.no {
    background: #f8d7da;
    color: #721c24;
}

/* ========================
   RESPONSIVE
   ======================== */

@media (max-width: 768px) {
    .canchas-container {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 16px;
        padding: 12px;
    }

    .cancha-card {
        height: 240px;
    }

    .cancha-panel {
        padding: 16px;
        font-size: 0.9em;
    }

    .panel-titulo {
        font-size: 1.1em;
    }

    .panel-specs {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .canchas-container {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 8px;
    }

    .cancha-card {
        height: 200px;
    }

    .cancha-panel {
        padding: 12px;
    }

    .panel-buttons {
        flex-direction: column;
    }
}

/* ========================
   ANIMACIÓN DE CARGA
   ======================== */

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cancha-card {
    animation: slideUp 0.6s ease forwards;
}

.cancha-card:nth-child(1) {
    animation-delay: 0.1s;
}

.cancha-card:nth-child(2) {
    animation-delay: 0.2s;
}

.cancha-card:nth-child(3) {
    animation-delay: 0.3s;
}

.cancha-card:nth-child(4) {
    animation-delay: 0.4s;
}
.detalle-cancha {
    padding: 2rem 1rem;
    max-width: 1100px;
    margin: 0 auto;
}

.volver {
    display: inline-block;
    margin-bottom: 1rem;
}

.detalle-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 800px) {
    .detalle-grid {
        grid-template-columns: 1.2fr 1fr;
    }
}

.detalle-foto img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 12px;
    background: #eef2f7;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-ok {
    background: #e6f6ec;
    color: #1b7a3e;
}

.badge-no {
    background: #fde8e8;
    color: #a12626;
}

.precio {
    font-size: 1.6rem;
    font-weight: 700;
}

.precio span {
    font-size: 0.9rem;
    font-weight: 400;
    color: #666;
}

.datos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.datos div {
    background: #f5f7fa;
    padding: 0.75rem;
    border-radius: 8px;
}

.datos dt {
    font-size: 0.8rem;
    color: #666;
}

.datos dd {
    margin: 0;
    font-weight: 600;
}