/* css/descargas_relevantes.css */

/* Fuentes - Usamos Roboto para títulos (claro y moderno) y Open Sans para texto (legible) */
body {
    font-family: 'Open Sans', sans-serif; /* Fuente base para el cuerpo */
    background: linear-gradient(to bottom right, #f4f7f6, #e9ecef); /* Fondo suave con un ligero degradado */
    color: #333;
    line-height: 1.6;
    min-height: 100vh; /* Asegura que el degradado cubra toda la altura de la ventana */
    display: flex;
    flex-direction: column; /* Permite que el footer se fije abajo si es necesario */
}
h1 {
    color: #2c3e50; /* Color de título oscuro y elegante */
    text-align: center;
    margin-bottom: 40px;
    font-size: 3rem; /* Título más grande */
    font-weight: 700;
    letter-spacing: -0.5px;
    position: relative;
    padding-bottom: 15px;
}

h1::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: #d82e88; /* Color de acento rosado */
    border-radius: 2px;
}

.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 30px;
    background-color: #ffffff;
    border-radius: 15px; /* Bordes un poco más redondeados */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15); /* Sombra más pronunciada y suave */
    flex-grow: 1; /* Permite que el contenedor ocupe el espacio disponible */
}

.intro-text {
    text-align: center;
    font-size: 1.2em; /* Texto introductorio un poco más grande */
    margin-bottom: 40px;
    color: #555;
    max-width: 800px; /* Limita el ancho para mejor legibilidad */
    margin-left: auto;
    margin-right: auto;
}

/* --- Search Bar Styles --- */
.search-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 40px;
    gap: 10px; /* Space between elements */
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.search-bar input[type="text"] {
    flex-grow: 1;
    max-width: 400px;
    padding: 12px 20px;
    border: 1px solid #ccc;
    border-radius: 25px; /* Rounded input */
    font-size: 1em;
    outline: none;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.search-bar input[type="text"]:focus {
    border-color: #3498db;
    box-shadow: 0 0 8px rgba(52, 152, 219, 0.3);
}

.search-bar button {
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    background-color: #3498db;
    color: white;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px; /* Space between icon and text */
}

.search-bar button:hover {
    background-color: #ff3dcf;
    transform: translateY(-2px);
}

.search-bar button:active {
    transform: translateY(0);
}

.search-bar button i {
    margin-right: 0; /* Remove margin as gap handles spacing */
}

/* Specific style for Clear button */
#clearSearchButton {
    background-color: #e74c3c; /* Red for clear button */
}

#clearSearchButton:hover {
    background-color: #c0392b;
}


/* --- Carousel Styles --- */
.carousel-wrapper {
    position: relative;
    margin: 40px 0;
    display: flex;
    align-items: center;
    justify-content: center; /* Center the carousel within the wrapper */
}

.carousel-container {
width: calc(100% - 120px); 
max-width: 1300px;
overflow: hidden;
margin: 0 auto;
border-radius: 15px;
box-shadow: inset 0 0 15px rgba(0,0,0,0.05);
padding-left: 30px; 
padding-right: 30px; 
}

.carousel-track {
    display: flex; /* Use flexbox for horizontal alignment */
    gap: 35px; /* Space between cards */
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); /* Smooth slide transition */
    padding: 10px 0; /* Padding for the track itself, helps with card shadows at edges */
}

.download-card {
    flex-shrink: 0; /* Prevent cards from shrinking */
    width: calc(25% - (3 * 35px / 4)); /* Four cards per row minus gaps - (N-1)*gap/N */
    /* Calculation for 4 cards and 35px gap: (100% - 3*35px) / 4 */
    /* General formula: calc((100% - (N-1)*gap) / N) where N is cards per view */

    background: linear-gradient(to bottom, #ffffff, #fdfdfd);
    border: 1px solid #dcdcdc;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 320px;
}

.download-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

/* Icon (always Excel now) */
.download-card .icon-group {
    font-size: 4.5em;
    margin-bottom: 20px;
    height: 1.3em;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #27ae60; /* Always green for Excel icon */
}

.download-card .file-title {
    font-family: 'Roboto', sans-serif;
    font-size: 1.6em;
    color: #34495e;
    margin-bottom: 15px;
    min-height: 2.8em;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-grow: 1;
    font-weight: 600;
}

.download-card .file-description {
    font-size: 1em;
    color: #666;
    margin-bottom: 25px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.download-buttons-group {
    display: flex;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: auto;
    padding-top: 10px;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    padding: 10px 18px; /* Reducido el padding para hacer el botón un poco más compacto */
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.95em; /* Ajustado a un tamaño de fuente más pequeño */
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    min-width: 120px; /* Reducido el ancho mínimo para adaptarse al texto más pequeño */
    box-sizing: border-box;
    white-space: nowrap;
    border: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.download-btn.excel-btn {
    background-color: #27ae60; /* VERDE para Excel */
}
.download-btn.excel-btn:hover {
    background-color: #229954;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.download-btn.csv-btn {
    background-color: #f1c40f; /* AMARILLO para CSV */
}
.download-btn.csv-btn:hover {
    background-color: #e6b10a;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.download-btn i {
    margin-right: 8px; /* Ligeramente reducido el margen para el ícono */
    font-size: 1em; /* Ajustado el tamaño del ícono para que sea proporcional al texto */
}

.no-files-message {
    text-align: center;
    width: 100%; /* Ensure it spans the carousel width */
    font-size: 1.3em;
    color: #7f8c8d;
    padding: 60px 0;
    /* grid-column: 1 / -1; Removido porque no estamos en grid puro para este mensaje */
}
/* --- Estilos del Carrusel --- */
.carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
}

.carousel-button {
    background-color: rgb(241, 34, 162);
    color: white;
    border: none;
    border-radius: 50%;
    width: 55px;
    height: 55px;
    display: flex; /* Importante para centrar el icono y para que JavaScript lo pueda ocultar/mostrar */
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    position: absolute; /* Esto las posiciona con respecto a .carousel-wrapper */
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.carousel-button:hover {
    background-color: rgb(247, 126, 206);
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.carousel-button:active {
    transform: translateY(-50%) scale(0.98);
}

.carousel-button:disabled {
    background-color: rgba(241, 34, 162, 0.4);
    cursor: not-allowed;
    box-shadow: none;
}

.carousel-button.prev {
    left: -25px; /* Ajusta este valor si quieres que esté más cerca o lejos del carrusel */
}

.carousel-button.next {
    right: -25px; /* Ajusta este valor si quieres que esté más cerca o lejos del carrusel */
}

/* Para pantallas pequeñas, asegurate de que no se oculten por alguna media query */
@media (max-width: 768px) {
    .carousel-button {
        /* Puedes decidir ocultarlas en móvil si las tarjetas se apilan */
        /* display: none; */
        /* O ajustar su posición si quieres que se vean */
        width: 45px;
        height: 45px;
        font-size: 1.5rem;
        left: 5px; /* Ajuste para móvil */
        right: 5px; /* Ajuste para móvil */
    }
    /* Asegúrate de que ambas flechas se muestren si no las quieres ocultar */
    .carousel-button.prev,
    .carousel-button.next {
        display: flex; /* Forzarlas a mostrarse en móvil si no están "display: none" */
    }
}
/* Media Queries for responsiveness */
@media (max-width: 1200px) { /* Adjust for 3 cards on smaller desktops */
    .download-card {
        width: calc(33.333% - (2 * 35px / 3)); /* 3 cards per row */
    }
}

@media (max-width: 992px) { /* Adjust for 2 cards on tablets */
    .download-card {
        width: calc(50% - (1 * 35px / 2)); /* 2 cards per row */
    }
}

@media (max-width: 768px) { /* Mobile: single column */
    h1 {
        font-size: 2.2em;
    }

    .container {
        margin: 20px auto;
        padding: 25px;
    }

    .search-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-bar input[type="text"] {
        max-width: 100%;
    }

    .search-bar button {
        width: 100%; /* Buttons take full width */
    }

    .carousel-wrapper {
        margin: 20px 0; /* Less margin on mobile */
    }

    .carousel-track {
        flex-direction: column; /* Stack cards vertically */
        align-items: center; /* Center stacked cards */
        gap: 25px; /* Adjusted gap */
    }

    .download-card {
        width: 90%; /* Occupy most of the width */
        min-height: auto;
        padding: 25px;
    }

    .download-buttons-group {
        flex-direction: column; /* Stack buttons vertically */
        align-items: stretch; /* Stretch buttons to fill width */
    }

    .download-btn {
        width: 100%;
        min-width: auto;
        padding: 10px 15px; /* Ajustado el padding para el móvil */
        font-size: 0.9em; /* Ajustado el tamaño de fuente para el móvil */
    }

    .carousel-button {
        display: none; /* Hide carousel buttons on small screens if cards are stacked */
    }

    .no-files-message {
        width: 100%;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2em;
    }
    .intro-text {
        font-size: 1.05em;
    }
    .icon-group {
        font-size: 4em;
    }
    .file-title {
        font-size: 1.4em;
    }
    .download-btn {
        font-size: 0.85em; /* Aún más pequeño para pantallas muy chicas */
        padding: 8px 12px; /* Más pequeño el padding también */
    }
}
.back-link {
    display: block;
    text-align: center;
    margin-top: 40px;
    font-size: 1.2rem;
    color: #d82e88; /* Color rosado */
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease, transform 0.2s ease;
}