/* FITECMA - Estilos Vista Pública de Concursos */
/* Extraído de COFITECMA.html - Preservando diseño exquisito */

/* Reset y Configuración Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif !important;
}

body {
    font-family: 'Poppins', sans-serif !important;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #667eea 100%);
    padding: 3rem 0;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="research-pattern" width="50" height="50" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="2" fill="rgba(255,255,255,0.1)"/><path d="M15,15 Q25,10 35,15 Q40,25 35,35 Q25,40 15,35 Q10,25 15,15" stroke="rgba(255,255,255,0.08)" stroke-width="0.5" fill="none"/><rect x="20" y="5" width="10" height="15" rx="2" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23research-pattern)"/></svg>') repeat;
    opacity: 0.6;
    animation: float-pattern 30s linear infinite;
}

@keyframes float-pattern {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-50px, -50px); }
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
    text-align: center;
}

.header-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    margin: 0 auto 2rem;
    box-shadow: 0 25px 50px rgba(78, 205, 196, 0.4);
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 25px 50px rgba(78, 205, 196, 0.4);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 30px 60px rgba(78, 205, 196, 0.6);
    }
}

.header-title {
    color: white;
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #fff, #4ecdc4, #ffd700, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header-subtitle {
    color: rgba(255,255,255,0.95);
    font-size: 1.4rem;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* Main Content */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Status Banner */
.status-banner {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    color: white;
    padding: 1rem 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    box-shadow: 0 8px 25px rgba(78, 205, 196, 0.3);
}

.status-banner .status-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.status-banner i {
    font-size: 1.5rem;
}

.status-text {
    flex: 1;
}

.status-text h3 {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.status-text p {
    opacity: 0.9;
    font-size: 0.95rem;
}

.status-banner #lastUpdate {
    font-size: 0.9rem;
    opacity: 0.9;
    text-align: right;
    white-space: nowrap;
}

/* Filters Section */
.filters-section {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.filters-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f8f9fa;
}

.filters-header h2 {
    color: #1e3c72;
    font-size: 1.5rem;
    font-weight: 700;
}

.filters-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    align-items: start;
}

.filter-group {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.filter-group:not(.button-group) {
    justify-content: flex-end;
}

.filter-group.button-group {
    justify-content: flex-start;
    align-items: flex-start;
    align-self: end;
    padding-top: 2rem;
}

.filter-label {
    color: #1e3c72;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-input {
    padding: 0.8rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.filter-input:focus {
    outline: none;
    border-color: #4ecdc4;
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.1);
}

.clear-filters-btn {
    background: linear-gradient(45deg, #ff7e5f, #feb47b);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: fit-content;
}

.clear-filters-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 126, 95, 0.3);
}

/* Table Container */
.table-container {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.table-wrapper {
    overflow-x: auto;
}

.concursos-table {
    width: 100%;
    border-collapse: collapse;
}

.concursos-table th,
.concursos-table td {
    padding: 1.2rem 1rem;
    text-align: center;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.concursos-table th:first-child,
.concursos-table td:first-child {
    min-width: 200px;
    width: 200px;
}

.concursos-table th {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    position: sticky;
    top: 0;
    z-index: 10;
}

.concursos-table td {
    font-size: 0.95rem;
    color: #555;
}

.concursos-table tbody tr {
    transition: all 0.3s ease;
}

.concursos-table tbody tr:hover {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.05) 0%, rgba(68, 160, 141, 0.05) 100%);
    transform: scale(1.01);
}

/* Enlaces PDF */
.pdf-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.pdf-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(78, 205, 196, 0.3);
    text-decoration: none;
    color: white;
}

.pdf-link.valoracion {
    background: linear-gradient(45deg, #667eea, #764ba2);
}

.pdf-link.valoracion:hover {
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    background: white;
    border-top: 1px solid #e9ecef;
}

.pagination-info {
    color: #666;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-info i {
    color: #4ecdc4;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-btn {
    padding: 0.8rem 1rem;
    border: 2px solid #e9ecef;
    background: white;
    color: #666;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    min-width: 45px;
    text-align: center;
}

.pagination-btn:hover {
    border-color: #4ecdc4;
    color: #4ecdc4;
    transform: translateY(-2px);
}

.pagination-btn.active {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    color: white;
    border-color: transparent;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.pagination-btn:disabled:hover {
    border-color: #e9ecef;
    color: #666;
    transform: none;
}

/* Spotlight Modal */
.spotlight-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.spotlight-overlay.active {
    display: flex;
    opacity: 1;
}

.spotlight-container {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    width: 90vw;
    height: 85vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 
        0 25px 100px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    transform: scale(0.8) translateY(50px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.spotlight-overlay.active .spotlight-container {
    transform: scale(1) translateY(0);
}

.spotlight-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #667eea 100%);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.spotlight-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="modal-pattern" width="30" height="30" patternUnits="userSpaceOnUse"><circle cx="15" cy="15" r="1" fill="rgba(255,255,255,0.1)"/><path d="M10,10 Q15,5 20,10 Q25,15 20,20 Q15,25 10,20 Q5,15 10,10" stroke="rgba(255,255,255,0.05)" stroke-width="0.5" fill="none"/></pattern></defs><rect width="100" height="100" fill="url(%23modal-pattern)"/></svg>') repeat;
    opacity: 0.6;
    z-index: 1;
}

.spotlight-header h3 {
    position: relative;
    z-index: 2;
    font-weight: 600;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.spotlight-close {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.8rem;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.spotlight-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.spotlight-content {
    padding: 0;
    text-align: center;
    height: calc(100% - 80px);
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}

.spotlight-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        #4ecdc4 25%, 
        #667eea 50%, 
        #44a08d 75%, 
        transparent 100%
    );
    z-index: 1;
}

.spotlight-iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0;
    background: white;
    position: relative;
    z-index: 2;
}

/* Animaciones de entrada/salida */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes modalFadeOut {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.8) translateY(50px);
    }
}

/* Loading state para PDF */
.spotlight-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    z-index: 3;
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.spotlight-loading .loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(78, 205, 196, 0.3);
    border-radius: 50%;
    border-top-color: #4ecdc4;
    animation: spin 1s ease-in-out infinite;
}

.spotlight-loading p {
    color: #666;
    font-weight: 500;
}

/* Update Notification */
.update-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    color: white;
    padding: 1rem 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(78, 205, 196, 0.3);
    z-index: 9999;
    animation: slideInRight 0.5s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
}

.empty-state i {
    font-size: 4rem;
    color: #4ecdc4;
    margin-bottom: 2rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #1e3c72;
}

.empty-state p {
    font-size: 1rem;
    line-height: 1.6;
}

/* Footer */
.footer {
    background: white;
    padding: 3rem 0 2rem;
    margin-top: 4rem;
    text-align: center;
    border-top: 1px solid #e9ecef;
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-logo {
    max-width: 200px;
    height: auto;
    margin: 0 auto 1.5rem auto;
    display: block;
}

.footer-slogan {
    font-size: 1.1rem;
    color: #666;
    font-weight: 500;
    line-height: 1.6;
}

/* Estilos adicionales para badges y contenedores */
.tipo-badge {
    padding: 0.6rem 1rem;
    border-radius: 25px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: inline-block;
    white-space: nowrap;
    min-width: fit-content;
    text-align: center;
    line-height: 1.2;
}

.tipo-badge.interno {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
}

.tipo-badge.abierto {
    background: linear-gradient(45deg, #56ab2f, #a8e6cf);
    color: white;
}

.fecha-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.fecha-container i {
    color: #4ecdc4;
}

.area-container strong {
    color: #1e3c72;
}

.plaza-container {
    max-width: 300px;
    line-height: 1.4;
    color: #555;
}

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

    .pagination-container {
        flex-direction: column;
        gap: 1rem;
    }

    .spotlight-container {
        width: 95vw;
        height: 90vh;
        border-radius: 20px;
    }

    .spotlight-header {
        padding: 1rem 1.5rem;
    }

    .spotlight-header h3 {
        font-size: 1rem;
    }

    .spotlight-close {
        width: 40px;
        height: 40px;
        padding: 0.6rem;
    }

    .concursos-table th,
    .concursos-table td {
        padding: 0.8rem 0.5rem;
        font-size: 0.85rem;
    }

    .concursos-table th:first-child,
    .concursos-table td:first-child {
        min-width: 180px;
        width: 180px;
    }

    .tipo-badge {
        font-size: 0.7rem;
        padding: 0.4rem 0.8rem;
        letter-spacing: 0.2px;
    }

    .header-title {
        font-size: 2.5rem;
    }

    .main-content {
        padding: 1rem;
    }

    .status-banner {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .status-banner .status-left {
        flex-direction: column;
        text-align: center;
    }

    .status-banner #lastUpdate {
        text-align: center;
    }
}