@import url("https://fonts.googleapis.com/css?family=Titillium Web");

/* assets/css/styles.css */
:root {
    --primary-color: #549db4;
    --primaryaltern-color: #38778a;
    --secondary-color: #b50018;
    --accent-color: #ffffff;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --info-color: #1b8af1;
    --error-color: #ef4444;
    --card-bg: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --black: #000;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --border-radius: 0.5rem;
    --transition: all 0.3s ease;

    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --white: #ffffff;
    --black: #000;
    --gradient-primary: linear-gradient(135deg, #2b78b5 0%, #1d9ae9 100%);
    --gradient-secondary: linear-gradient(135deg, #ce6339 0%, #b50018 100%);
    --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-image: url("../../assets/img//hero-bg-light.webp");
    font-family: "Titillium Web", -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, sans-serif;
    color: var(--gray-800);
    line-height: 1.6;
    margin: 0;
    padding-top: 70px;
    background-size: cover;

    /* Centra la imagen */
    background-position: center center;

    /* Evita que la imagen se repita */
    background-repeat: no-repeat;

    /* Fija la imagen para que no se mueva al hacer scroll */
    background-attachment: fixed;

    /* Asegura que el fondo cubra todo el viewport */
    min-height: 100vh;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.664);
    /* Capa blanca semitransparente */
    z-index: -1;
    pointer-events: none;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color));
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

@media (max-width: 768px) {
    .header-left span {
        font-size: 20px;
        /* Reducir tamaño de fuente */
        line-height: 1.2;
        /* O si prefieres ocultarlo completamente: */
        /* display: none; */
    }
}

/* Para pantallas muy pequeñas (móviles) */
@media (max-width: 480px) {
    .header-left span {
        font-size: 14px;
        /* O texto más corto: */
        /* content: "Concurso Innovación"; */
    }
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--white);
    font-size: 1.25rem;
    font-weight: normal;
}

.logo img {
    height: 50px;
    /* Ajusta la altura según el tamaño de tu logotipo */
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.932));
}

.header-right .btn-primary {
    background: #549db4;
    border: 1px solid rgb(255, 255, 255);
    color: var(--white);
    padding: 0.625rem 1.25rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-right .btn-primary:hover {
    background: #daedf3;
    transform: translateY(-1px);
    color: var(--black);
}


.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header */
.header-repositorio {
    background: linear-gradient(135deg, var(--primary-color), var(--primaryaltern-color));
    color: white;
    padding: 2rem 1rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.header-repositorio::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: float 20s infinite linear;
}

@keyframes float {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.header-content h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

.search-container {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    max-width: 500px;
}

.search-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.search-btn {
    font-size: 1.8em;
    color: white;
    cursor: pointer;

}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Filters */
.filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    box-shadow: var(--shadow-md);
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* View Toggle */
.view-toggle {
    position: absolute;
    right: 2rem;
    top: 2rem;
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    margin-top: 50px;
    padding: 0.75rem;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-md);

}

.view-btn.active,
.view-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    
}

/* Document Gallery */
.document-gallery {
    display: grid;
    gap: 2rem;
    margin-bottom: 3rem;
}

.grid-view {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.list-view {
    grid-template-columns: 1fr;
}

.document-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    
}

.document-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--primaryaltern-color));
}

.document-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.list-view .document-card {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.file-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.list-view .file-icon {
    margin-bottom: 0;
    font-size: 2.5rem;
}

.file-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.file-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.file-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.file-actions {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.btn-secondary {
    cursor:auto;
    background: #ffffff;
    color: #ffffff;
}

.btn-secondary:hover {
    background: #ffffff;
}

/* Stats */
.stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 15px;
    box-shadow: var(--shadow-md);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
}

.stat-item i {
    font-size: 2rem;
    color: var(--primary-color);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--card-bg);
    margin: 5% auto;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.close:hover {
    color: var(--text-primary);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .header-content h1 {
        font-size: 2rem;
    }
    
    .grid-view {
        grid-template-columns: 1fr;
    }
    
    .list-view .document-card {
        flex-direction: column;
        text-align: center;
    }
    
    .stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .view-toggle {
        position: static;
        margin-bottom: 1rem;
    }
}

/* File type colors */
.pdf { color: #dc2626; }
.doc, .docx { color: #2563eb; }
.xls, .xlsx { color: #16a34a; }
.ppt, .pptx { color: #ea580c; }
.img { color: #9333ea; }
.txt { color: #64748b; }
.zip { color: #f59e0b; }

/* 📌 Solo para vista GRID: footer siempre abajo */
.grid-view .document-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.grid-view .file-info {
    flex-grow: 1;
    margin-bottom: 1rem;
}

.grid-view .card-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.grid-view .file-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.grid-view .file-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.grid-view .file-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.grid-view .file-actions .btn {
    flex: 1 1 120px;
    justify-content: center;
}

/* 📌 En móvil, botones apilados solo en grid */
@media (max-width: 400px) {
    .grid-view .file-actions .btn {
        flex: 1 1 100%;
    }
}