/* Casa Abu - Recursos Cosas de Princesas */

/* Sección de recursos */
.recursos-section {
    padding: 2rem 0;
}

.recursos-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem;
}

/* Scrollbar personalizado */
.recursos-list::-webkit-scrollbar {
    width: 6px;
}

.recursos-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.recursos-list::-webkit-scrollbar-thumb {
    background: var(--color-primary-light, #d8b4fe);
    border-radius: 3px;
}

.recursos-list::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary, #9b59b6);
}

/* Subsecciones */
.recursos-subsection {
    margin-bottom: 2rem;
}

.recursos-subtitle {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-primary, #9b59b6);
    margin: 0 0 1rem 0;
    text-align: center;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-primary-light, #d8b4fe);
}

/* Eliminado .recursos-grid para no sobrescribir el grid principal */

/* Grid de tarjetas para PDFs */
.recursos-grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

/* Tarjetas de recursos */
.recurso-card {
    display: flex;
    flex-direction: column;
    background: white;
    border: 2px solid var(--color-primary-light, #e9d5ff);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    height: 100%;
}

.recurso-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(155, 89, 182, 0.2);
    border-color: var(--color-primary, #9b59b6);
}

.pdf-card {
    position: relative;
    background: linear-gradient(135deg, #fdfbfb 0%, #f9f7fc 100%);
}

.pdf-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #9b59b6, #d8b4fe);
    z-index: 1;
}

/* Header de la tarjeta */
.recurso-card-header {
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #f9f7fc 0%, #f3e8ff 50%);
    text-align: center;
    border-bottom: 1px solid #e9d5ff;
}

/* Body de la tarjeta */
.recurso-card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Footer de la tarjeta */
.recurso-card-footer {
    padding: 1rem 1.5rem 1.5rem;
    display: flex;
    justify-content: center;
}

/* Icono */
.recurso-icon {
    font-size: 3rem;
    text-align: center;
    margin: 0 auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Información del recurso */
.recurso-info {
    flex: 1;
    min-width: 0;
}

.recurso-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--color-text, #1f2937);
    margin: 0 0 0.75rem 0;
    text-align: center;
    line-height: 1.3;
}

.recurso-meta {
    display: flex;
    justify-content: center;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--color-text-light, #6b7280);
    margin-top: auto;
}

.meta-type {
    background: var(--color-primary-light, #e9d5ff);
    color: var(--color-primary-dark, #7e22ce);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-weight: 500;
}

.meta-size {
    display: flex;
    align-items: center;
    font-weight: 500;
}

/* Enlaces de descarga */
.recurso-link {
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    color: white;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    width: 100%;
}

.btn-download:hover {
    background: linear-gradient(135deg, #8e44ad 0%, #7b3a9a 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(155, 89, 182, 0.4);
    text-decoration: none;
    color: white;
}

/* Grid de imágenes */
.recursos-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.recurso-image-item {
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.recurso-image-item:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.recurso-image-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid #e5e7eb;
}

.recurso-image-caption {
    padding: 1rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--color-text-light, #6b7280);
    background: #f9fafb;
}

/* Responsive */
@media (max-width: 768px) {
    .recursos-grid-cards {
        grid-template-columns: 1fr;
    }

    .recurso-card {
        max-width: 400px;
        margin: 0 auto;
    }

    .recursos-images-grid {
        grid-template-columns: 1fr;
    }

    .recurso-image-item img {
        height: 250px;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.recursos-list > * {
    animation: fadeIn 0.5s ease forwards;
}

.recursos-list > *:nth-child(1) { animation-delay: 0.1s; }
.recursos-list > *:nth-child(2) { animation-delay: 0.2s; }
.recursos-list > *:nth-child(3) { animation-delay: 0.3s; }

/* Nuevos estilos para presentación mejorada */

/* Botones de acción principales */
.recursos-actions-main {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-action-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    color: white;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-action-primary:hover {
    background: linear-gradient(135deg, #8e44ad 0%, #7b3a9a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(155, 89, 182, 0.35);
    color: white;
}

/* Sección expandible */
.recursos-expand-section {
    margin-top: 1rem;
}

.btn-expand {
    width: 100%;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #f9f7fc 0%, #f3e8ff 50%);
    border: 2px solid var(--color-primary-light, #e9d5ff);
    border-radius: 0.5rem;
    color: var(--color-primary, #9b59b6);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.btn-expand:hover {
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 50%);
    border-color: var(--color-primary, #9b59b6);
}

/* Lista compacta de archivos */
.recursos-list-compact {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    margin-top: 0.5rem;
    padding: 1rem;
}

.recursos-file-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s ease;
}

.file-item:last-child {
    border-bottom: none;
}

.file-item:hover {
    background-color: #f9fafb;
}

.file-icon {
    font-size: 1.25rem;
    margin-right: 0.75rem;
}

.file-name {
    flex: 1;
    font-size: 0.95rem;
    color: #374151;
}

.file-size {
    font-size: 0.85rem;
    color: #6b7280;
    margin-right: 1rem;
}

.file-action {
    padding: 0.35rem 0.75rem;
    background: var(--color-primary, #9b59b6);
    color: white;
    border-radius: 0.375rem;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.file-action:hover {
    background: var(--color-primary-dark, #7e22ce);
    transform: translateX(2px);
}

/* Galería mini de imágenes */
.recursos-images-mini {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    flex-wrap: wrap;
}

.mini-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 0.375rem;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mini-img:hover {
    transform: scale(1.1);
    border-color: var(--color-primary, #9b59b6);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Responsive para nueva presentación */
@media (max-width: 640px) {
    .recursos-actions-main {
        flex-direction: column;
    }

    .btn-action-primary {
        width: 100%;
        justify-content: center;
    }

    .file-item {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .file-name {
        width: 100%;
        margin-bottom: 0.25rem;
    }
}