/* =========================================
   CREDENCIALES.CSS - Habilidades y Credenciales
   ========================================= */

/* === FONDO MORADO COMPLETO - SIN BLANCO === */
html {
    background: linear-gradient(135deg, #6d28d9 0%, #a855f7 50%, #ec4899 100%) !important;
    min-height: 100vh;
}

body {
    background: linear-gradient(135deg, #6d28d9 0%, #a855f7 50%, #ec4899 100%) !important;
    min-height: 100vh;
}

main {
    background: linear-gradient(135deg, #6d28d9 0%, #a855f7 50%, #ec4899 100%) !important;
    min-height: 100vh;
    margin: 0 !important;
    padding: 80px 0 0 0 !important;
}

/* Fondos unificados morados */
#credenciales,
#skills {
    background: linear-gradient(135deg, #6d28d9 0%, #a855f7 50%, #ec4899 100%) !important;
    color: white;
    margin: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

#skills {
    padding-top: 4rem !important;      
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

#credenciales {
    padding-top: 0 !important;
    padding-bottom: 4rem !important;   
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

#skills .container {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

#credenciales .container {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

#skills .section-title {
    margin-bottom: 3rem;
    padding-top: 0;
    color: white !important;
}

#credenciales .section-title {
    margin-top: 2rem;
    margin-bottom: 3rem;
    padding-top: 2rem;
    color: white !important;
}

#skills .skills-grid {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* === SKILLS GRID CON LOGOS === */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
    margin-bottom: 0 !important;
}

.skill-category {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.skill-category h3 {
    color: var(--primary-color);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.skill-category ul {
    list-style: none;
}

.skill-category li {
    display: flex;
    align-items: center;
    padding: 0.6rem 0;
    color: var(--text-light);
}

.skill-category li i {
    margin-right: 0.6rem;
    font-size: 1.4rem;
    flex-shrink: 0;
}

/* === CREDENTIALS === */
.credentials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.credential-card {
    background: white;
    padding: 2rem;
    padding-bottom: 2.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.credential-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.credential-logo-btn {
    background: transparent;
    border: none;
    padding: 0;
    margin-bottom: 1rem;
    cursor: pointer;
    position: relative;
}

.credential-logo-btn img {
    width: 120px;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.credential-logo-btn:hover img {
    transform: scale(1.08);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.credential-card h3 {
    font-size: 1.25rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.credential-institution {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.credential-year {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.credential-detail {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Tooltip */
.credential-tooltip {
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #1e40af;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.4);
    z-index: 10;
}

.credential-tooltip::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #1e40af;
}

.credential-logo-btn:hover .credential-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Modal */
.diploma-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
}

.diploma-modal-content {
    background: #111827;
    padding: 1rem;
    border-radius: 0.75rem;
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.diploma-modal-content img {
    max-width: 100%;
    max-height: 80vh;
    display: block;
}

.diploma-close {
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 2rem;
    color: #f9fafb;
    cursor: pointer;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .credentials-grid,
    .skills-grid {
        grid-template-columns: 1fr;
    }
}
