/* ============================================== */
/* SECCIÓN OBJETIVO - CONSTELACIÓN DE CONOCIMIENTOS */
/* ============================================== */

.objective-section {
    margin-top: 60px;
    padding: 3rem 0;
    border-top: 1px solid #30363d;
    position: relative;
    overflow: hidden;
}

/* Fondo estelar */
.objective-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(1px 1px at 10% 15%, #fff, transparent),
        radial-gradient(1px 1px at 25% 40%, #58a6ff, transparent),
        radial-gradient(2px 2px at 40% 70%, #b15bff, transparent),
        radial-gradient(1px 1px at 60% 20%, #8957e5, transparent),
        radial-gradient(2px 2px at 75% 55%, #58a6ff, transparent),
        radial-gradient(1px 1px at 90% 85%, #b15bff, transparent),
        radial-gradient(1px 1px at 15% 90%, #3b82f6, transparent),
        radial-gradient(2px 2px at 50% 45%, #8b5cf6, transparent),
        radial-gradient(1px 1px at 85% 10%, #58a6ff, transparent),
        radial-gradient(2px 2px at 30% 25%, #b15bff, transparent);
    background-size: 100% 100%;
    background-repeat: no-repeat;
    opacity: 0.15;
    pointer-events: none;
    animation: star-field 8s ease-in-out infinite alternate;
}

@keyframes star-field {
    0%, 100% { opacity: 0.1; }
    50% { opacity: 0.2; }
}

/* Contenedor principal */
.objective-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

/* ============================================== */
/* CABECERA CON ÍCONO ORBITAL                     */
/* ============================================== */
.objective-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.objective-icon-wrapper {
    position: relative;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.objective-orbit {
    position: absolute;
    width: 100%;
    height: 100%;
}

.orbit-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1px solid rgba(88, 166, 255, 0.2);
    animation: orbit-rotate 4s linear infinite;
}

.orbit-ring:nth-child(1) {
    width: 100%;
    height: 100%;
    border-color: rgba(88, 166, 255, 0.3);
    animation-duration: 4s;
}

.orbit-ring:nth-child(2) {
    width: 80%;
    height: 80%;
    border-color: rgba(177, 91, 255, 0.25);
    animation-duration: 3s;
    animation-direction: reverse;
}

.orbit-ring:nth-child(3) {
    width: 60%;
    height: 60%;
    border-color: rgba(137, 87, 229, 0.2);
    animation-duration: 2s;
}

@keyframes orbit-rotate {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.objective-icon {
    font-size: 2rem;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 0 10px rgba(88, 166, 255, 0.5));
    animation: icon-pulse 2s ease-in-out infinite;
}

@keyframes icon-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.objective-title {
    font-size: 2.2rem;
    margin: 0;
    background: linear-gradient(135deg, #e6edf3 0%, #58a6ff 50%, #b15bff 100%);
    background-size: 200% 200%;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    text-shadow: 0 0 30px rgba(88, 166, 255, 0.3);
    animation: title-gradient 6s ease infinite;
}

@keyframes title-gradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ============================================== */
/* DESCRIPCIÓN                                    */
/* ============================================== */
.objective-description {
    background: linear-gradient(145deg, 
        rgba(22, 27, 34, 0.8), 
        rgba(13, 17, 23, 0.9)
    );
    border: 1px solid rgba(88, 166, 255, 0.15);
    border-radius: 20px;
    padding: 25px 30px;
    margin-bottom: 35px;
    backdrop-filter: blur(5px);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.objective-description::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        #58a6ff, 
        #b15bff, 
        transparent
    );
}

.objective-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #c9d1d9;
    margin: 0;
    text-align: center;
}

.highlight-text {
    font-weight: 700;
    background: linear-gradient(135deg, #58a6ff, #b15bff);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    font-size: 1.2rem;
}

.objective-text strong {
    color: #58a6ff;
    font-weight: 600;
}

/* ============================================== */
/* ETIQUETA DE CONTENIDO                          */
/* ============================================== */
.objective-content-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.label-line {
    flex: 1;
    height: 1px;
    max-width: 100px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(88, 166, 255, 0.5), 
        transparent
    );
}

.label-text {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #8b949e;
    font-weight: 500;
}

/* ============================================== */
/* LISTA CONSTELACIÓN                             */
/* ============================================== */
.constellation-list {
    list-style: none;
    padding: 0;
    margin: 0 0 35px 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px 15px;
    position: relative;
}

/* Líneas de conexión entre elementos */
.constellation-list::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 5%, 
        rgba(88, 166, 255, 0.15) 20%, 
        rgba(177, 91, 255, 0.2) 50%, 
        rgba(88, 166, 255, 0.15) 80%, 
        transparent 95%
    );
    pointer-events: none;
    z-index: 1;
}

/* ============================================== */
/* ITEMS DE LA CONSTELACIÓN                       */
/* ============================================== */
.constellation-item {
    position: relative;
    display: flex;
    justify-content: center;
    animation: item-float 3s ease-in-out infinite;
    animation-delay: var(--delay, 0s);
}

/* Delays individuales */
.constellation-item:nth-child(1) { --delay: 0s; }
.constellation-item:nth-child(2) { --delay: 0.3s; }
.constellation-item:nth-child(3) { --delay: 0.6s; }
.constellation-item:nth-child(4) { --delay: 0.9s; }
.constellation-item:nth-child(5) { --delay: 1.2s; }
.constellation-item:nth-child(6) { --delay: 1.5s; }

@keyframes item-float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

/* Contenido del item */
.item-content {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: linear-gradient(145deg, 
        rgba(22, 27, 34, 0.9), 
        rgba(13, 17, 23, 0.95)
    );
    border: 1px solid rgba(88, 166, 255, 0.2);
    border-radius: 40px;
    backdrop-filter: blur(5px);
    box-shadow: 
        0 5px 15px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    cursor: default;
}

.constellation-item:hover .item-content {
    transform: scale(1.05);
    border-color: #58a6ff;
    box-shadow: 
        0 10px 25px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(88, 166, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Ícono */
.item-icon {
    font-size: 1.2rem;
    filter: drop-shadow(0 0 5px rgba(88, 166, 255, 0.4));
}

/* Texto */
.item-text {
    font-size: 0.9rem;
    color: #c9d1d9;
    font-weight: 500;
}

/* Brillo del item */
.item-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(
        circle,
        rgba(88, 166, 255, 0.1) 0%,
        transparent 70%
    );
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.constellation-item:hover .item-glow {
    opacity: 1;
}

/* ============================================== */
/* ITEM DESTACADO (Proyectos de desarrollo)       */
/* ============================================== */
.constellation-item.highlight .item-content {
    background: linear-gradient(145deg, 
        rgba(88, 166, 255, 0.1), 
        rgba(177, 91, 255, 0.05)
    );
    border-color: rgba(177, 91, 255, 0.4);
}

.constellation-item.highlight .item-text {
    color: #e6edf3;
    font-weight: 600;
}

.constellation-item.highlight .item-icon {
    font-size: 1.4rem;
    filter: drop-shadow(0 0 10px rgba(177, 91, 255, 0.6));
}

/* Pulso especial para el item destacado */
.item-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 40px;
    border: 1px solid rgba(177, 91, 255, 0.3);
    animation: highlight-pulse 2s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes highlight-pulse {
    0%, 100% {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1.05);
    }
}

/* ============================================== */
/* FOOTER CON MENSAJE INSPIRADOR                  */
/* ============================================== */
.objective-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(48, 54, 61, 0.5);
}

.footer-star {
    color: #58a6ff;
    font-size: 1rem;
    opacity: 0.6;
    animation: star-twinkle 2s ease-in-out infinite;
}

.footer-star:last-child {
    animation-delay: 1s;
}

@keyframes star-twinkle {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

.footer-text {
    font-size: 0.95rem;
    color: #8b949e;
    margin: 0;
    font-style: italic;
}

/* ============================================== */
/* RESPONSIVE                                    */
/* ============================================== */

@media (max-width: 700px) {
    .constellation-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .objective-title {
        font-size: 1.8rem;
    }
    
    .objective-icon-wrapper {
        width: 50px;
        height: 50px;
    }
    
    .objective-icon {
        font-size: 1.5rem;
    }
}

@media (max-width: 500px) {
    .objective-section {
        margin-top: 40px;
        padding: 2rem 0;
    }
    
    .objective-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .objective-title {
        font-size: 1.5rem;
        text-align: center;
    }
    
    .objective-description {
        padding: 20px 18px;
    }
    
    .objective-text {
        font-size: 1rem;
    }
    
    .constellation-list {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .item-content {
        width: 100%;
        justify-content: flex-start;
        padding: 14px 20px;
    }
    
    .constellation-list::before {
        display: none;
    }
    
    .objective-footer {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .footer-text {
        font-size: 0.85rem;
    }
}

@media (max-width: 400px) {
    .objective-title {
        font-size: 1.3rem;
    }
    
    .item-text {
        font-size: 0.85rem;
    }
    
    .highlight-text {
        font-size: 1.05rem;
    }
}

/* ============================================== */
/* ACCESIBILIDAD                                 */
/* ============================================== */
@media (prefers-reduced-motion: reduce) {
    .objective-icon,
    .orbit-ring,
    .constellation-item,
    .item-pulse,
    .footer-star {
        animation: none;
    }
    
    .objective-title {
        animation: none;
    }
    
    .constellation-item:hover .item-content {
        transform: scale(1.02);
    }
}