/* Estilos generales - Paleta monocromática */
:root {
    --black: #000000;
    --dark-gray: #121212;
    --medium-gray: #2d2d2d;
    --light-gray: #4a4a4a;
    --lighter-gray: #7a7a7a;
    --lightest-gray: #e0e0e0;
    --white: #ffffff;
    --green-accent: #4CAF50; /* Añadido para el certificado en progreso */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Courier New', monospace;
    line-height: 1.6;
    color: var(--lightest-gray);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background-color: var(--black);
}

#matrix {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.8;
}

.cv-container {
    max-width: 900px;
    margin: 2rem auto;
    background-color: rgba(18, 18, 18, 0.85);
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--light-gray);
}

/* Encabezado */
.cv-header {
    padding: 2.5rem;
    text-align: center;
    background-color: var(--dark-gray);
    color: var(--white);
    border-bottom: 1px solid var(--light-gray);
}

.cv-header h1 {
    font-size: 2.5rem;
    margin: 0;
    color: var(--white);
    font-weight: 700;
    letter-spacing: 2px;
}

.cv-header h2 {
    font-size: 1.4rem;
    font-weight: 300;
    margin: 0.8rem 0 0;
    color: var(--lighter-gray);
    letter-spacing: 1px;
}

/* Botón de reconocimientos */
.recognition-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background-color: var(--light-gray);
    color: var(--white);
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    border: 1px solid var(--lighter-gray);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.recognition-btn:hover {
    background-color: var(--medium-gray);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.6);
}

.recognition-btn i {
    font-size: 1.1rem;
}

/* Sección de certificados */
.section-title {
    font-size: 1.5rem;
    color: var(--white);
    margin: 2.5rem 2rem 1.5rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid var(--light-gray);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.certificate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 0 2rem 3rem;
}

/* Tarjetas de certificados */
.certificate-card {
    border: 1px solid var(--light-gray);
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: var(--dark-gray);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative; /* Añadido para el badge "En progreso" */
}

.certificate-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.1);
    border-color: var(--lighter-gray);
}

/* --- Modificación para certificados en progreso --- */
.certificate-card.in-progress {
    border-color: var(--green-accent);
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.3);
}

.certificate-card.in-progress::after {
    content: "En progreso";
    position: absolute;
    top: 6px;  /* Reducido de 10px */
    right: 6px;  /* Reducido de 10px */
    background-color: var(--green-accent);
    color: white;
    padding: 2px 6px;  /* Reducido de 3px 8px */
    border-radius: 2px;  /* Reducido de 3px */
    font-size: 0.6rem;  /* Reducido de 0.7rem */
    font-weight: bold;
    z-index: 1;
    opacity: 0.9;  /* Suaviza el contraste */
}
/* ---------------------------------------------- */

.card-content {
    padding: 1.5rem;
    flex-grow: 1;
}

.certificate-card h4 {
    font-size: 1.2rem;
    margin: 0 0 0.8rem;
    color: var(--white);
    font-weight: 600;
}

.institution {
    font-size: 0.95rem;
    color: var(--lighter-gray);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.date {
    font-size: 0.9rem;
    color: var(--light-gray);
}

/* Estilos para la barra de progreso */
.progress-info {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--light-gray);
}

.progress-container {
    width: 100%;
    height: 8px;
    background-color: var(--medium-gray);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-bar {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--lightest-gray), var(--white));
    transition: width 0.5s ease-out;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

/* --- Modificación para la barra de progreso --- */
.in-progress .progress-bar {
    background: linear-gradient(90deg, var(--green-accent), #8BC34A) !important;
}
/* ---------------------------------------------- */

.progress-text {
    font-size: 0.85rem;
    color: var(--lighter-gray);
    text-align: center;
    font-style: italic;
}

/* Botón */
.view-btn {
    display: block;
    text-align: center;
    background-color: var(--medium-gray);
    color: var(--white);
    padding: 1rem;
    margin-top: auto;
    text-decoration: none;
    border: none;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    letter-spacing: 1px;
    border-top: 1px solid var(--light-gray);
}

.view-btn:hover {
    background-color: var(--light-gray);
    color: var(--white);
}

/* --- Modificación para botón deshabilitado --- */
.view-btn.disabled {
    background-color: #2E7D32 !important;
    color: rgba(255, 255, 255, 0.7) !important;
    cursor: not-allowed;
}
/* ---------------------------------------------- */

/* [El resto de tu CSS original (footer, responsive, etc.) se mantiene IDÉNTICO] */

/* Estilo para la página de reconocimientos */
.recognition-container {
    max-width: 1000px;
    margin: 5rem auto 2rem;
    padding: 2rem;
    background-color: rgba(18, 18, 18, 0.85);
    border-radius: 5px;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--light-gray);
}

.recognition-title {
    text-align: center;
    color: var(--white);
    font-size: 2.2rem;
    margin-bottom: 3rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    border-bottom: 1px solid var(--light-gray);
    padding-bottom: 1rem;
}

.recognition-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 3rem;
}

.recognition-item {
    width: 300px;
    height: 400px;
    position: relative;
    perspective: 1000px;
}

.recognition-card {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s ease;
    background-color: var(--dark-gray);
    border: 1px solid var(--light-gray);
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

.recognition-item:nth-child(2) .recognition-card {
    animation-delay: 1s;
}

.recognition-item:nth-child(3) .recognition-card {
    animation-delay: 2s;
}

.recognition-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    transition: transform 0.3s ease;
}

.recognition-card:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.1);
    z-index: 10;
}

.back-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background-color: var(--light-gray);
    color: var(--white);
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    border: 1px solid var(--lighter-gray);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.back-btn:hover {
    background-color: var(--medium-gray);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.6);
}

.back-btn i {
    font-size: 1.1rem;
}

/* Pie de página */
.cv-footer {
    background-color: var(--black);
    color: var(--lighter-gray);
    padding: 2rem 1.5rem;
    text-align: center;
    border-top: 1px solid var(--light-gray);
}

.contact-info {
    font-size: 1rem;
}

.contact-info span {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    gap: 0.8rem;
}

.icon-contact {
    color: var(--lightest-gray);
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

/* Disclaimer */
.disclaimer {
    margin-top: 2rem;
    padding: 1rem;
    background-color: rgba(45, 45, 45, 0.5);
    border-top: 1px dashed var(--lighter-gray);
    font-size: 0.85rem;
    color: var(--lighter-gray);
    text-align: center;
    font-style: italic;
}

.disclaimer i {
    color: var(--lightest-gray);
    margin-right: 0.5rem;
}

.disclaimer p {
    margin: 0;
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 768px) {
    .certificate-grid {
        grid-template-columns: 1fr;
        padding: 0 1.5rem 2rem;
        gap: 1.5rem;
    }
    
    .section-title {
        margin: 2rem 1.5rem 1rem;
        font-size: 1.3rem;
    }
    
    .cv-header h1 {
        font-size: 2rem;
    }
    
    .cv-header h2 {
        font-size: 1.1rem;
    }
    
    .cv-header {
        padding: 2rem 1.5rem;
        margin-top: 2.5rem;
    }
    
    .recognition-btn {
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 0.9rem;
        padding: 8px 12px;
    }
    
    .recognition-btn:hover {
        transform: translateX(-50%) translateY(-2px);
    }
    
    .contact-info span {
        justify-content: flex-start;
        margin-left: 2rem;
    }
    
    .disclaimer {
        font-size: 0.8rem;
        padding: 1rem 0.5rem;
    }
    
    .recognition-grid {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }
    
    .recognition-item {
        width: 90%;
        height: 350px;
    }
    
    .recognition-title {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }
}

@media (max-width: 480px) {
    .cv-container {
        margin: 1rem;
    }
    
    .cv-header h1 {
        font-size: 1.8rem;
    }
    
    .cv-header {
        margin-top: 3rem;
    }
    
    .section-title {
        font-size: 1.2rem;
    }
    
    .certificate-card h4 {
        font-size: 1.1rem;
    }
    
    .contact-info span {
        margin-left: 0;
        font-size: 0.9rem;
    }
    
    .recognition-btn {
        padding: 6px 10px;
        font-size: 0.85rem;
    }
}

/* ===== ESTILOS ESPECÍFICOS PARA RECONOCIMIENTOS.HTML ===== */
.recognition-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.recognition-image {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    border: 1px solid var(--light-gray);
}

.recognition-image img {
    width: 100%;
    height: auto;
    display: block;
    max-width: 600px; /* Ajusta este valor según necesites */
    margin: 0 auto;
}

.recognition-image:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.1);
}

/* ===== ESTILOS MEJORADOS PARA EL MODAL ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    overflow: auto;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    animation: zoomIn 0.3s ease;
    border: 2px solid var(--light-gray);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
}

@keyframes zoomIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.close-modal {
    position: absolute;
    top: 25px;
    right: 25px;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.close-modal:hover {
    color: var(--green-accent);
    transform: rotate(90deg) scale(1.1);
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .modal-content {
        max-width: 95%;
    }
    
    .close-modal {
        top: 15px;
        right: 15px;
        font-size: 30px;
    }
}
