/*======================================
        COSMIC PROJECTS - ESTILOS
======================================*/

/* RESET Y BASE */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: Arial, Helvetica, sans-serif;
    background-image: url("../img/cosmiccrystal.jpg");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    overflow-x: hidden;
    min-height: 100vh;
}

/* OVERLAY Y SCROLLBAR */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: -2; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #101522; }
::-webkit-scrollbar-thumb { background: cyan; border-radius: 30px; }

/* NAVBAR */
.navbar {
    position: fixed; top: 0; width: 100%; display: flex; justify-content: space-between;
    align-items: center; padding: 18px 60px; background: rgba(15,20,40,.65);
    backdrop-filter: blur(14px); border-bottom: 1px solid rgba(0,255,255,.25); z-index: 999;
}
.logo { font-size: 1.6rem; font-weight: bold; text-shadow: 0 0 10px cyan; }
.navbar nav { display: flex; gap: 35px; }
.navbar nav a { color: white; text-decoration: none; font-weight: bold; transition: .3s; }
.navbar nav a:hover { color: cyan; }

/* CONTENEDOR Y HERO */
.container { width: 100%; max-width: 1300px; margin: auto; padding: 120px 30px 80px; }
.hero { text-align: center; margin-bottom: 70px; animation: aparecer .8s ease; }
.titulo { font-size: 4rem; letter-spacing: 4px; margin-bottom: 18px; text-shadow: 0 0 15px cyan, 0 0 35px blue; }

/* ACORDEONES (CATEGORÍAS) */
.categorias { width: 100%; max-width: 900px; margin: auto; }
.categoria { margin-bottom: 22px; border-radius: 18px; overflow: hidden; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); transition: .35s; }
.categoria-btn { width: 100%; border: none; background: transparent; color: white; cursor: pointer; display: flex; align-items: center; padding: 22px 28px; font-size: 1.2rem; }
.contenido { max-height: 0; overflow: hidden; transition: max-height .45s ease; background: rgba(0,0,0,.25); }
.contenido a { display: block; text-decoration: none; color: white; padding: 18px 35px; border-top: 1px solid rgba(255,255,255,.06); }
.contenido a:hover { background: rgba(0,255,255,.18); color: #6feeff; }

/* CARRUSEL Y TARJETAS */
.proyectos { margin-top: 90px; text-align: center; }
.card {
    background: rgba(255,255,255,.06); border: 1px solid cyan;
    border-radius: 20px; padding: 30px; transition: .35s; text-align: center;
    min-width: 250px;
}
.card:hover { transform: translateY(-8px); box-shadow: 0 0 20px cyan; }
.preview-btn { margin-top: 15px; background: rgba(0,255,255,.2); border: none; color: white; padding: 10px 20px; border-radius: 10px; cursor: pointer; }
.preview-btn:hover { background: cyan; color: black; }

/* SECCIÓN SUBIDA */
.upload-section { margin-bottom: 40px; padding: 20px; background: rgba(0,0,0,0.3); border-radius: 15px; }
.btn-subir { padding: 10px 20px; background: transparent; border: 2px solid cyan; color: white; border-radius: 10px; cursor: pointer; margin-left: 10px; }
.btn-subir:hover { background: cyan; color: black; }

/* BOTÓN VOLVER Y FOOTER */
.earth { display: inline-block; padding: 18px 40px; border-radius: 40px; border: 2px solid cyan; text-decoration: none; color: white; transition: .35s; }
.earth:hover { background: cyan; color: #09111f; box-shadow: 0 0 20px cyan; }
footer { margin-top: 100px; padding: 45px; text-align: center; background: rgba(10,15,30,.75); border-top: 1px solid rgba(255,255,255,.08); }

/* ANIMACIONES */
@keyframes aparecer { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

/* RESPONSIVE */
@media(max-width:768px) {
    .navbar { flex-direction: column; padding: 20px; }
    .titulo { font-size: 2.5rem; }
}

/* CORRECCIÓN DE TAMAÑO CATEGORÍAS */
.categoria {
    width: 100%; 
    max-width: 900px; 
    margin: 10px auto; /* Centrado y con margen */
}

.categoria-btn {
    width: 100%;
    padding: 15px 25px; /* Reducido para que no se vea enorme */
    font-size: 1.1rem;
}

.categoria-btn img {
    width: 30px !important; /* Fuerza un tamaño pequeño a los iconos */
    height: 30px;
    margin-right: 15px;
}

/* FORZAR ESTILOS DEL CARRUSEL 3D */
.swiper {
    width: 100%;
    padding-top: 50px;
    padding-bottom: 50px;
    perspective: 1400px; /* Necesario para el efecto 3D */
}
.swiper-slide {
    width: 250px;
    height: 350px;
    background: rgba(255,255,255,.06);
    border: 1px solid cyan;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .5s;
}

/* ASEGURAR QUE LOS BOTONES FUNCIONEN */
.categoria-btn {
    pointer-events: auto; /* Fuerza que el botón reciba clics */
    z-index: 10;
    cursor: pointer;
}
.contenido {
    pointer-events: none; /* Se activa al hacer clic en el padre */
    transition: max-height 0.3s ease;
}
.categoria-btn.active + .contenido {
    pointer-events: auto;
}