/* assets/css/tareas-publico.css */
/* Archivo único de estilos para la página pública de tareas */

/* ===== ESTILOS PARA TAREAS PÚBLICAS ===== */

/* Banner de página */
.page-banner {
    background-color: #1e40af;
    background-image: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: #fff;
    padding: 6rem 0 3rem;
    margin-top: 70px;
    position: relative;
    overflow: hidden;
}

.page-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/pattern.png');
    opacity: 0.1;
}

.page-banner h1 {
    color: #fff;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.breadcrumbs {
    display: flex;
    align-items: center;
    margin-top: 1rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

.breadcrumbs a {
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.breadcrumbs a:hover {
    color: #facc15;
}

.breadcrumbs span {
    margin: 0 0.5rem;
}

/* Sección de contenido */
.page-content {
    padding: 4rem 0;
}

.section-heading {
    text-align: center;
    margin-bottom: 3rem;
}

.section-heading h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    color: #1e293b;
}

.section-heading h2::after {
    content: '';
    position: absolute;
    width: 70px;
    height: 3px;
    background-color: #facc15;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
}

.section-heading p {
    font-size: 1.1rem;
    color: #64748b;
    max-width: 700px;
    margin: 1.5rem auto 0;
}

/* Información sobre tareas */
.tareas-informacion {
    background-color: #f0f9ff;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    display: flex;
    align-items: flex-start;
    gap: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #e0f2fe;
}

.info-icon {
    background-color: #0284c7;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.3);
}

.info-content h3 {
    color: #0c4a6e;
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 20px;
    font-weight: 700;
}

.info-content p {
    margin: 0 0 18px;
    line-height: 1.7;
    color: #334155;
    font-size: 16px;
}

.info-leyenda {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 15px;
}

.leyenda-item {
    display: flex;
    align-items: center;
    font-size: 15px;
    color: #475569;
    background-color: rgba(255, 255, 255, 0.7);
    padding: 8px 15px;
    border-radius: 30px;
}

.leyenda-item i {
    margin-right: 8px;
    font-size: 14px;
}

/* Filtros de tareas */
.tareas-filtros {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    padding: 25px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    align-items: flex-end;
}

.filtro-grupo {
    flex-grow: 1;
    min-width: 220px;
}

.filtro-grupo label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #1e293b;
    font-size: 16px;
}

.filtro-select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    color: #334155;
    background-color: #f8fafc;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.filtro-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background-color: #1e40af;
    color: white;
    box-shadow: 0 4px 10px rgba(30, 64, 175, 0.3);
}

.btn-primary:hover {
    background-color: #1e3a8a;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(30, 64, 175, 0.4);
}

.btn i {
    margin-right: 8px;
}

/* Tarjetas de tareas */
.tareas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.tarea-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e2e8f0;
}

.tarea-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.tarea-vencida {
    border-left: 5px solid #ef4444;
}

.tarea-proxima {
    border-left: 5px solid #f59e0b;
}

.tarea-activa {
    border-left: 5px solid #22c55e;
}

.tarea-header {
    padding: 25px;
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: white;
    position: relative;
}

.tarea-titulo {
    margin: 0 0 15px;
    font-size: 20px;
    line-height: 1.4;
    font-weight: 700;
}

.tarea-meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.tarea-materia {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
}

.tarea-curso-badge {
    background-color: #0369a1;
    color: white;
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.tarea-curso-badge i {
    margin-right: 6px;
    font-size: 12px;
}

.tarea-estado {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.tarea-estado i {
    margin-right: 6px;
}

.estado-activa {
    background-color: rgba(34, 197, 94, 0.2);
    color: #16a34a;
}

.estado-proxima {
    background-color: rgba(245, 158, 11, 0.2);
    color: #d97706;
}

.estado-vencida {
    background-color: rgba(239, 68, 68, 0.2);
    color: #dc2626;
}

.tarea-body {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.tarea-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    background-color: #f8fafc;
    padding: 15px 20px;
    border-radius: 8px;
}

.tarea-fecha, .tarea-profesor {
    display: flex;
    align-items: center;
    font-size: 15px;
    color: #475569;
}

.tarea-fecha i, .tarea-profesor i {
    margin-right: 10px;
    color: #1e40af;
    font-size: 16px;
}

.tarea-fecha strong {
    color: #0f172a;
    font-weight: 600;
}

.tarea-descripcion-breve {
    color: #334155;
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 20px;
    flex-grow: 1;
    position: relative;
    overflow: hidden;
    max-height: 100px;
}

.tarea-descripcion-breve::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background: linear-gradient(transparent, white);
}

.tarea-footer {
    padding: 20px 25px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8fafc;
}

.tarea-archivo-info {
    font-size: 14px;
    color: #64748b;
    display: flex;
    align-items: center;
    font-weight: 500;
}

.tarea-archivo-info i {
    margin-right: 6px;
    color: #1e40af;
}

.btn-ver-detalle {
    padding: 10px 18px;
    background-color: #1e40af;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 5px rgba(30, 64, 175, 0.3);
}

.btn-ver-detalle i {
    margin-right: 8px;
}

.btn-ver-detalle:hover {
    background-color: #1e3a8a;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(30, 64, 175, 0.4);
}

/* Mensaje de carga o error */
.tarea-mensaje {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 30px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.tarea-mensaje i {
    font-size: 48px;
    color: #3b82f6;
    margin-bottom: 20px;
}

.tarea-mensaje p {
    color: #475569;
    font-size: 18px;
    margin: 0;
}

/* Modal para detalles de tareas */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.modal.visible {
    display: block;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 900px;
    margin: 40px auto;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    max-height: 85vh;
    overflow-y: auto;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 25px 30px;
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 12px 12px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.3;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.modal-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 30px;
}

.tarea-detalle-curso-materia {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
}

.tarea-detalle-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 15px;
    color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.badge-curso {
    background-color: #0c4a6e;
}

.badge-materia {
    background-color: #7e22ce;
}

.tarea-detalle-badge i {
    margin-right: 8px;
}

.tarea-detalle-info {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    background-color: #f8fafc;
    padding: 25px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.tarea-detalle-item {
    background-color: white;
    border-radius: 8px;
    padding: 15px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.tarea-detalle-item .label {
    display: block;
    margin-bottom: 8px;
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
}

.tarea-detalle-item .value {
    color: #0f172a;
    font-size: 17px;
    display: flex;
    align-items: center;
    font-weight: 500;
}

.tarea-detalle-item .value i {
    margin-right: 10px;
    color: #1e40af;
}

.tarea-detalle-descripcion, .tarea-detalle-archivo {
    margin-bottom: 30px;
    background-color: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.tarea-detalle-descripcion h3, .tarea-detalle-archivo h3 {
    color: #1e40af;
    font-size: 20px;
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
}

.tarea-detalle-descripcion h3 i, .tarea-detalle-archivo h3 i {
    margin-right: 12px;
}

.tarea-content {
    padding: 25px;
    background-color: #f8fafc;
    border-radius: 8px;
    line-height: 1.8;
    font-size: 17px;
    color: #334155;
}

.tarea-archivo-detalle {
    background-color: #f0f9ff;
    padding: 20px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px dashed #93c5fd;
}

.tarea-archivo-detalle p {
    margin-top: 0;
    margin-bottom: 20px;
    color: #0c4a6e;
    text-align: center;
    font-size: 16px;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 25px;
    background-color: #1e40af;
    color: white;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 16px;
    box-shadow: 0 4px 10px rgba(30, 64, 175, 0.3);
}

.btn-download:hover {
    background-color: #1e3a8a;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(30, 64, 175, 0.4);
}

.btn-download i {
    margin-right: 10px;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #e2e8f0;
    text-align: right;
    background-color: #f8fafc;
    border-radius: 0 0 12px 12px;
}

.btn-close {
    padding: 12px 25px;
    background-color: #64748b;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
}

.btn-close:hover {
    background-color: #475569;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(100, 116, 139, 0.4);
}

.btn-close i {
    margin-right: 8px;
}

/* Botón volver arriba */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #1e40af;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 100;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #1e3a8a;
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* Responsividad */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }

    .tareas-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 992px) {
    .container {
        max-width: 720px;
    }
    
    .tareas-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
    
    .tarea-header {
        padding: 20px;
    }
    
    .tarea-body {
        padding: 20px;
    }
    
    .tarea-footer {
        padding: 15px 20px;
    }
    
    .modal-content {
        max-width: 90%;
        margin: 30px auto;
    }
    
    .modal-body {
        padding: 25px;
    }
}

@media (max-width: 768px) {
    .container {
        max-width: 540px;
        padding: 0 20px;
    }
    
    .page-banner h1 {
        font-size: 2rem;
    }
    
    .section-heading h2 {
        font-size: 1.8rem;
    }
    
    .tareas-informacion {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px;
    }
    
    .info-icon {
        margin-bottom: 15px;
    }
    
    .info-leyenda {
        justify-content: center;
    }
    
    .tareas-filtros {
        flex-direction: column;
        padding: 20px;
    }
    
    .filtro-grupo {
        width: 100%;
    }
    
    #aplicarFiltros {
        width: 100%;
        margin-top: 10px;
    }
    
    .tareas-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .tarea-meta-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .tarea-estado {
        position: static;
        margin-top: 10px;
        width: fit-content;
    }
    
    .tarea-detalle-curso-materia {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .tarea-detalle-info {
        grid-template-columns: 1fr;
    }
    
    .modal-header {
        padding: 20px;
    }
    
    .modal-header h2 {
        font-size: 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .tarea-detalle-descripcion h3, 
    .tarea-detalle-archivo h3 {
        font-size: 18px;
    }
    
    .tarea-content {
        padding: 15px;
        font-size: 16px;
    }
}

@media (max-width: 576px) {
    .page-banner {
        padding: 5rem 0 2rem;
    }
    
    .page-banner h1 {
        font-size: 1.8rem;
    }
    
    .section-heading h2 {
        font-size: 1.6rem;
    }
    
    .info-content h3 {
        font-size: 18px;
    }
    
    .info-content p {
        font-size: 15px;
    }
    
    .tarea-header {
        padding: 15px;
    }
    
    .tarea-titulo {
        font-size: 18px;
        margin-bottom: 10px;
    }
    
    .tarea-body {
        padding: 15px;
    }
    
    .tarea-footer {
        padding: 12px 15px;
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .btn-ver-detalle {
        width: 100%;
        justify-content: center;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px auto;
        max-height: 90vh;
    }
    
    .tarea-detalle-badge {
        width: 100%;
        justify-content: center;
    }
    
    .btn-download, .btn-close {
        width: 100%;
        justify-content: center;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .tarea-detalle-item {
        padding: 12px;
    }
    
    .tarea-detalle-item .label {
        font-size: 12px;
    }
    
    .tarea-detalle-item .value {
        font-size: 15px;
    }
    
    .tarea-descripcion-breve {
        max-height: 80px;
    }
    
    .modal-header h2 {
        font-size: 18px;
    }
}

/* Soporte para modo oscuro (opcional) */
@media (prefers-color-scheme: dark) {
    body.dark-mode {
        background-color: #0f172a;
        color: #f8fafc;
    }
    
    body.dark-mode .tareas-informacion {
        background-color: #1e293b;
        border-color: #334155;
    }
    
    body.dark-mode .info-content h3,
    body.dark-mode .info-content p {
        color: #f8fafc;
    }
    
    body.dark-mode .leyenda-item {
        background-color: #334155;
        color: #e2e8f0;
    }
    
    body.dark-mode .tareas-filtros,
    body.dark-mode .tarea-card,
    body.dark-mode .tarea-detalle-item,
    body.dark-mode .tarea-detalle-descripcion,
    body.dark-mode .tarea-detalle-archivo,
    body.dark-mode .modal-content {
        background-color: #1e293b;
        border-color: #334155;
    }
    
    body.dark-mode .filtro-select {
        background-color: #0f172a;
        border-color: #334155;
        color: #e2e8f0;
    }
    
    body.dark-mode .tarea-info,
    body.dark-mode .tarea-footer,
    body.dark-mode .tarea-content,
    body.dark-mode .modal-footer {
        background-color: #0f172a;
    }
    
    body.dark-mode .tarea-fecha,
    body.dark-mode .tarea-profesor,
    body.dark-mode .tarea-archivo-info {
        color: #cbd5e1;
    }
    
    body.dark-mode .tarea-descripcion-breve,
    body.dark-mode .tarea-content {
        color: #cbd5e1;
    }
    
    body.dark-mode .tarea-descripcion-breve::after {
        background: linear-gradient(transparent, #1e293b);
    }
    
    body.dark-mode .tarea-detalle-item .label {
        color: #94a3b8;
    }
    
    body.dark-mode .tarea-detalle-item .value {
        color: #f1f5f9;
    }
}
