/* Base settings and utility classes */
@layer utilities {
    .glass-panel {
        @apply bg-space-900/40 backdrop-blur-md border border-white/10;
    }

    .tech-grid {
        background-image: linear-gradient(to right, #ffffff08 1px, transparent 1px),
            linear-gradient(to bottom, #ffffff08 1px, transparent 1px);
        background-size: 40px 40px;
    }
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #060B14;
}

::-webkit-scrollbar-thumb {
    background: #131E36;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3B82F6;
}

/* Primary Button with Glow */
.btn-primary {
    @apply relative inline-flex items-center justify-center px-6 py-3 rounded-lg font-semibold text-white bg-gradient-to-r from-space-blue to-space-purple overflow-hidden transition-all duration-300;
    box-shadow: 0 4px 15px rgba(112, 0, 255, 0.3);
}

.btn-primary::before {
    content: '';
    @apply absolute inset-0 bg-gradient-to-r from-space-accent to-space-blue opacity-0 transition-opacity duration-300;
}

.btn-primary:hover {
    box-shadow: 0 6px 25px rgba(0, 210, 255, 0.4);
}

.btn-primary:hover::before {
    @apply opacity-100;
}

.btn-primary>* {
    @apply relative z-10;
}

/* Animations - Orbits */
.orbit {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transform-origin: center center;
}

.orbit.ring-1 {
    width: 300px;
    height: 300px;
    border-top-color: rgba(0, 210, 255, 0.5);
    animation: spin 20s linear infinite;
}

.orbit.ring-2 {
    width: 500px;
    height: 500px;
    border-right-color: rgba(112, 0, 255, 0.3);
    animation: spin 30s linear infinite reverse;
}

.orbit.ring-3 {
    width: 800px;
    height: 800px;
    border-bottom-color: rgba(59, 130, 246, 0.2);
    animation: spin 45s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Scroll Reveals */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal.fadeInLeft {
    transform: translateX(-30px);
}

.reveal.fadeInRight {
    transform: translateX(30px);
}

.reveal.active.fadeInLeft,
.reveal.active.fadeInRight {
    transform: translateX(0);
}

.delay-100 {
    transition-delay: 100ms;
}

.delay-200 {
    transition-delay: 200ms;
}

.delay-300 {
    transition-delay: 300ms;
}

.delay-400 {
    transition-delay: 400ms;
}

.delay-500 {
    transition-delay: 500ms;
}

/* Challenges Cards Explorer */
.challenge-card {
    @apply relative overflow-hidden rounded-xl bg-space-900 border border-white/5 transition-all duration-300;
}

.challenge-card::before {
    content: '';
    @apply absolute inset-0 bg-gradient-to-b from-transparent to-black/50 z-0 pointer-events-none;
}

.challenge-card:hover {
    @apply border-white/20 transform -translate-y-1;
    box-shadow: 0 10px 30px -10px rgba(0, 210, 255, 0.15);
}

.card-content {
    @apply relative z-10 p-6 h-full flex flex-col;
}

.tag {
    @apply text-[10px] font-display uppercase tracking-wider text-slate-400 bg-white/5 px-2 py-1 rounded;
}


/* Agenda System */
.agenda-item {
    @apply flex flex-col sm:flex-row sm:items-center gap-4 sm:gap-6 p-4 rounded-xl border border-slate-100 bg-white transition-shadow hover:shadow-md;
}

.agenda-item .time {
    @apply font-display font-bold text-xl text-slate-900 min-w-[80px];
}

.agenda-item .details h4 {
    @apply font-bold text-slate-900;
}

.agenda-item .details span {
    @apply text-sm text-slate-500;
}

.agenda-tag {
    @apply sm:ml-auto px-3 py-1 rounded-full text-xs font-semibold whitespace-nowrap;
}

/* =========================================================
   ROLES / DISCIPLINAS
   ========================================================= */

.roles-section {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

/* Glow ambiental muy sutil */
.roles-section::before {
    content: "";
    position: absolute;
    width: 650px;
    height: 650px;
    left: 50%;
    top: 35%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle,
            rgba(0, 212, 255, 0.055) 0%,
            rgba(0, 212, 255, 0.02) 32%,
            transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.roles-container {
    position: relative;
    z-index: 1;
}

/* Texto introductorio */
.roles-description {
    color: rgb(148 163 184);
    line-height: 1.75;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

/* Contenedor de chips */
.roles-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    max-width: 950px;
    margin: 0 auto;
}

/* Chip */
.role-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 42px;
    padding: 0.65rem 1rem;

    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 9999px;

    background:
        linear-gradient(135deg,
            rgba(255, 255, 255, 0.055),
            rgba(255, 255, 255, 0.025));

    color: rgb(203 213 225);

    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1;

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    transition:
        transform 0.3s ease,
        background 0.3s ease,
        border-color 0.3s ease,
        color 0.3s ease,
        box-shadow 0.3s ease;

    cursor: default;
}

/* Línea luminosa superior */
.role-chip::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;

    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.14),
            transparent 45%,
            rgba(0, 212, 255, 0.08));

    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);

    -webkit-mask-composite: xor;
    mask-composite: exclude;

    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Hover */
.role-chip:hover {
    transform: translateY(-3px);

    color: #ffffff;

    background:
        linear-gradient(135deg,
            rgba(255, 255, 255, 0.09),
            rgba(0, 212, 255, 0.055));

    border-color: rgba(255, 255, 255, 0.18);

    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.2),
        0 0 20px rgba(0, 212, 255, 0.045);
}

.role-chip:hover::before {
    opacity: 1;
}


/* =========================================================
   CHIP DESTACADO
   ========================================================= */

.role-chip.role-highlight {
    color: #22d3ee;

    border-color: rgba(34, 211, 238, 0.4);

    background:
        linear-gradient(135deg,
            rgba(34, 211, 238, 0.10),
            rgba(34, 211, 238, 0.035));

    box-shadow:
        0 0 0 1px rgba(34, 211, 238, 0.025),
        0 0 24px rgba(34, 211, 238, 0.055);
}

.role-chip.role-highlight::after {
    content: "✦";
    margin-right: 0.45rem;
    margin-left: 0.4rem;
    font-size: 0.8rem;
    color: #22d3ee;
}

.role-chip.role-highlight:hover {
    color: #67e8f9;

    border-color: rgba(34, 211, 238, 0.65);

    background:
        linear-gradient(135deg,
            rgba(34, 211, 238, 0.14),
            rgba(34, 211, 238, 0.055));

    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.2),
        0 0 28px rgba(34, 211, 238, 0.1);
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 640px) {

    .roles-section {
        padding-top: 4.5rem;
        padding-bottom: 4.5rem;
    }

    .roles-description {
        font-size: 0.95rem;
        line-height: 1.7;
    }

    .roles-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.65rem;
        width: 100%;
    }

    .role-chip {
        width: 100%;
        min-height: 44px;
        padding: 0.65rem 0.55rem;

        font-size: 0.82rem;
        white-space: nowrap;
    }

    .role-chip.role-highlight {
        grid-column: 1 / -1;
        width: fit-content;
        min-width: 210px;
        justify-self: center;
    }
}

@media (max-width: 380px) {

    .roles-list {
        grid-template-columns: 1fr;
    }

    .role-chip.role-highlight {
        grid-column: auto;
        width: 100%;
    }
}


/* FAQ Accordion */
.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease;
}

.faq-item.active .faq-content {
    max-height: 200px;
    /* Suficiente para el contenido */
}

.faq-item.active .faq-btn i {
    transform: rotate(45deg);
}















/* ==========================================================
   ABOUT - SPACE APPS VISUAL
   ========================================================== */

.about-visual {
    position: relative;
    isolation: isolate;
    background: #09103c;
}

/* Imagen principal */
.about-space-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center center;

    display: block;

    transform: scale(1.01);
    transition: transform 700ms ease;
}

/* Zoom muy sutil al pasar el mouse */
.group:hover .about-space-image {
    transform: scale(1.035);
}


/* ==========================================================
   CAPA OSCURA
   ========================================================== */

.about-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;

    background:
        linear-gradient(135deg,
            rgba(3, 8, 25, 0.35) 0%,
            rgba(3, 8, 25, 0.05) 45%,
            rgba(3, 8, 25, 0.45) 100%);

    pointer-events: none;
}


/* ==========================================================
   DEGRADADO AZUL
   ========================================================== */

.about-blue-glow {
    position: absolute;
    inset: 0;
    z-index: 2;

    background:
        radial-gradient(circle at 75% 35%,
            rgba(52, 122, 255, 0.16) 0%,
            rgba(52, 122, 255, 0.04) 35%,
            transparent 65%);

    mix-blend-mode: screen;
    pointer-events: none;
}


/* ==========================================================
   HOVER
   ========================================================== */

.group:hover .about-overlay {
    background:
        linear-gradient(135deg,
            rgba(3, 8, 25, 0.25) 0%,
            rgba(3, 8, 25, 0.03) 45%,
            rgba(3, 8, 25, 0.35) 100%);
}