/* ============================================================
   proyectos.css — ContentCreators
   Estilos exclusivos para la página de proyectos
   ============================================================ */

body { overflow-x: hidden; }

/* Transición de entrada */
.page-transition {
    position:       fixed;
    inset:          0;
    background:     var(--bg-base);
    z-index:        99999;
    opacity:        1;
    transition:     opacity 0.4s ease;
    pointer-events: none;
}
.page-transition.hidden { opacity: 0; }

/* ============================
   MODAL DE VIDEO
   ============================ */

.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.video-modal.active {
    opacity: 1;
    visibility: visible;
}

.video-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    background: var(--surface);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.video-modal-content video {
    width: 100%;
    height: auto;
    max-height: 80vh;
    display: block;
}

.video-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, transform 0.3s ease;
    z-index: 1001;
}

.video-modal-close:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

/* Responsive */
@media (max-width: 768px) {
    .video-modal-content {
        max-width: 95%;
        max-height: 95%;
    }
    
    .video-modal-close {
        width: 35px;
        height: 35px;
        font-size: 20px;
        top: 10px;
        right: 10px;
    }
}

/* ============================
   HEADER
   ============================ */

.projects-header {
    padding:   120px 0 60px;
    text-align:center;
    position:  relative;
}
.projects-header::before {
    content:  '';
    position: absolute;
    inset:    0;
    background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(91,140,255,0.12), transparent 65%);
    pointer-events: none;
}

.projects-header h1 {
    font-size:     clamp(2.5rem, 5vw, 4rem);
    font-weight:   800;
    letter-spacing:-0.03em;
    margin-bottom: 1rem;
}

.projects-header p {
    font-size: 1.1rem;
    color:     var(--text-secondary);
    max-width: 500px;
    margin:    0 auto;
}

/* Botón volver */
.back-btn {
    display:         inline-flex;
    align-items:     center;
    gap:             8px;
    font-size:       0.9rem;
    font-weight:     600;
    color:           var(--text-secondary);
    text-decoration: none;
    margin-bottom:   2rem;
    transition:      color 0.2s ease, transform 0.2s ease;
    cursor:          pointer;
    background:      none;
    border:          none;
    padding:         0;
}
.back-btn:hover {
    color:     var(--text-primary);
    transform: translateX(-4px);
}

/* ============================
   FILTROS
   ============================ */

.filters-bar {
    display:         flex;
    gap:             0.75rem;
    justify-content: center;
    flex-wrap:       wrap;
    margin-bottom:   3rem;
}

.filter-btn {
    padding:       12px 28px;
    border-radius: 999px;
    border:        1px solid var(--border);
    background:    var(--surface);
    color:         var(--text-secondary);
    font-size:     1rem;
    font-weight:   600;
    cursor:        pointer;
    transition:    all 0.2s ease;
    font-family:   var(--font);
}
.filter-btn:hover {
    border-color: rgba(91,140,255,0.4);
    color:        var(--text-primary);
}
.filter-btn.active {
    background:   var(--accent);
    border-color: var(--accent);
    color:        #fff;
    box-shadow:   0 4px 16px rgba(91,140,255,0.35);
}

/* ============================
   GRID DE PROYECTOS
   ============================ */

.projects-page-grid {
    display:               grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap:                   32px;
    max-width:             1200px;
    margin:                0 auto;
    padding:               0 40px 100px;
}

.project-item {
    position:      relative;
    border-radius: 18px;
    overflow:      hidden;
    cursor:        pointer;
    transition:    transform 0.3s ease, box-shadow 0.3s ease;
    background:    var(--surface);
    border:        1px solid var(--border);
}
.project-item:hover {
    transform:  translateY(-6px);
    box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}

.project-item video {
    width:        100%;
    aspect-ratio: 9 / 16;
    object-fit:   cover;
    display:      block;
}

.project-item-overlay {
    position:    absolute;
    inset:       0;
    background:  linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 50%);
    opacity:     0;
    transition:  opacity 0.3s ease;
    display:     flex;
    align-items: flex-end;
    padding:     1.25rem;
}
.project-item:hover .project-item-overlay { opacity: 1; }

.project-item-category {
    font-size:      0.75rem;
    font-weight:    700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color:          rgba(255,255,255,0.9);
    background:     rgba(91,140,255,0.7);
    padding:        4px 12px;
    border-radius:  999px;
    backdrop-filter:blur(4px);
}

/* Sin resultados */
.no-results {
    text-align:  center;
    padding:     4rem 0;
    color:       var(--text-secondary);
    font-size:   1.1rem;
    grid-column: 1 / -1;
    display:     none;
}
.no-results.visible { display: block; }

/* ============================
   RESPONSIVE
   ============================ */

@media (max-width: 768px) {
    .projects-page-grid {
        grid-template-columns: repeat(2, 1fr);
        gap:     16px;
        padding: 0 16px 80px;
    }
    .projects-header { padding: 100px 20px 40px; }
}

@media (max-width: 480px) {
    .projects-page-grid { grid-template-columns: 1fr; }
}