/*
  projects.css
  Estilos exclusivos de la sección #projects del portfolio Nauthix.
  ─────────────────────────────────────────────────────────────────
  Depende de:
    • templatemo-neural-style.css  (variables de color, .glass, fuentes base)
    • nauthix-enhancements.css     (.sec-container, .section-subtitle, responsive base)

  Orden de carga en el HTML:
    <link rel="stylesheet" href="css/templatemo-neural-style.css">
    <link rel="stylesheet" href="css/nauthix-enhancements.css">
    <link rel="stylesheet" href="css/projects.css">          ← este archivo
  ─────────────────────────────────────────────────────────────────
  ÍNDICE
    1.  Sección wrapper             (.sec-projects)
    2.  Tabs de filtro              (.filter-tabs / .filter-tab)
    3.  Grid                        (.projects-grid)
    4.  Card base                   (.project-card)
    5.  Badge de categoría          (.project-badge)
    6.  Feature Slider BASE         (.feature-slider)
    7.  Slider dentro de project-card (.project-slider-wrap)
    8.  Icono placeholder           (.project-icon-preview / .project-icon-bg)
    9.  Info del proyecto           (.project-info / .project-info-inner / .project-meta / .project-tags)
    10. Botones de enlace           (.project-links / .project-link)
    11. Responsive
  ─────────────────────────────────────────────────────────────────
*/

/* =============================================
   1. SECCIÓN WRAPPER
   ============================================= */

.sec-projects {
    padding: 100px 0 80px;
    position: relative;
}

/* Separador superior (línea degradada) */
.sec-projects::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(224,163,255,0.3), transparent);
}

/* =============================================
   2. TABS DE FILTRO
   ============================================= */

.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 48px;
}

.filter-tab {
    padding: 9px 22px;
    border-radius: 50px;
    border: 1px solid rgba(224,163,255,0.28);
    background: rgba(255,255,255,0.04);
    color: rgba(209,209,209,0.75);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    backdrop-filter: blur(10px);
    letter-spacing: 0.03em;
}

.filter-tab:hover {
    border-color: rgba(224,163,255,0.55);
    color: #e0a3ff;
    background: rgba(224,163,255,0.08);
}

.filter-tab.active {
    background: linear-gradient(135deg, rgba(224,163,255,0.25), rgba(255,105,180,0.2));
    border-color: rgba(224,163,255,0.7);
    color: #e0a3ff;
    box-shadow: 0 0 18px rgba(224,163,255,0.2);
}

/* =============================================
   3. GRID DE PROYECTOS
   ============================================= */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
    align-items: start;
    position: relative; /* contexto de posicionamiento para cards ocultas */
}

/* Aceleración de transiciones durante el filtrado */
.projects-grid.filtering .project-card {
    transition: opacity 0.25s ease, transform 0.25s ease;
}

/* =============================================
   4. CARD BASE
   ============================================= */

.project-card {
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.35s ease, opacity 0.35s ease, box-shadow 0.3s ease;
    transform-origin: top center;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(224,163,255,0.15);
}

.project-card.card-exit {
    opacity: 0;
    transform: scale(0.94) translateY(8px);
    pointer-events: none;
}
.project-card.hidden {
    display: none;
}
/* =============================================
   5. BADGE DE CATEGORÍA  (movido desde templatemo)
   ============================================= */

.project-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(255,105,180,0.1);
    border: 1px solid rgba(255,105,180,0.3);
    color: var(--clr-accent);
    /* margin-bottom eliminado — no tiene efecto dentro de .project-meta (flex row) */
}

/* =============================================
   6. FEATURE SLIDER BASE  (movido desde templatemo)
      Estilos genéricos; dentro de .project-slider-wrap
      son sobreescritos por la sección 7.
   ============================================= */

.feature-slider {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.3);
}

.feature-slider img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    transition: opacity 1.2s ease-in-out; /* sobreescrito a 0.7s por sección 7 */
    will-change: opacity;
    z-index: 0;
}

.feature-slider img.active {
    opacity: 1;
    z-index: 1;
}

/* =============================================
   7. SLIDER DENTRO DE PROJECT-CARD
      Sobreescribe sección 6 para el contexto
      de .project-slider-wrap.
   ============================================= */

.project-slider-wrap {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    position: relative;
    background: rgba(0,0,0,0.3);
    flex-shrink: 0;
}

.project-slider-wrap .feature-slider {
    width: 100%;
    height: 100%;
    position: relative;
}

.project-slider-wrap img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.7s ease;
}

.project-slider-wrap img.active {
    opacity: 1;
}

/* =============================================
   8. ICONO PLACEHOLDER (proyectos sin imágenes)
   ============================================= */

.project-icon-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.25);
}

.project-icon-bg {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: rgba(209,209,209,0.5);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.project-icon-bg svg {
    opacity: 0.7;
    filter: drop-shadow(0 0 12px currentColor);
}

/* =============================================
   9. INFO DEL PROYECTO — ACORDEÓN
   ─────────────────────────────────────────────
   Técnica: grid-template-rows 0fr → 1fr
   • .project-info       → contenedor del acordeón (sin padding aquí)
   • .project-info-inner → contenido real con padding animado
   ============================================= */

/* Contenedor acordeón: altura colapsada por defecto */
.project-info {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.4s ease;
}

/* Hover en la card → info se expande hacia abajo */
.project-card:hover .project-info {
    grid-template-rows: 1fr;
}

/* Inner: overflow:hidden es lo que hace que el contenido
   quede invisible cuando el padre mide altura 0 */
.project-info-inner {
    overflow: hidden;
    min-height: 0;
    padding: 0 22px;          /* sin padding vertical al estar colapsado */
    transition: padding 0.4s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Hover → el padding vertical aparece junto con la expansión */
.project-card:hover .project-info-inner {
    padding: 20px 22px 22px;
}

/* Fila badge + año */
.project-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.project-year {
    font-size: 0.78rem;
    color: rgba(209,209,209,0.45);
    font-weight: 500;
    margin-left: auto;
}

/* Título */
.project-info h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #e0a3ff;
    margin: 0;
}

/* Descripción */
.project-info p {
    font-size: 0.88rem;
    color: rgba(209,209,209,0.78);
    line-height: 1.55;
    margin: 0;
}

/* Tags de tecnologías */
.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px;
}

.project-tags span {
    font-size: 0.73rem;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(147,112,219,0.18);
    border: 1px solid rgba(147,112,219,0.3);
    color: rgba(209,209,209,0.8);
    letter-spacing: 0.02em;
}

/* =============================================
   10. BOTONES DE ENLACE
   ============================================= */

.project-links {
    margin-top: auto;
    padding-top: 10px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
    letter-spacing: 0.03em;
}

/* Variante principal (morado) */
.project-link.primary {
    background: linear-gradient(135deg, rgba(224,163,255,0.22), rgba(255,105,180,0.18));
    border: 1px solid rgba(224,163,255,0.5);
    color: #e0a3ff;
}

.project-link.primary:hover {
    background: linear-gradient(135deg, rgba(224,163,255,0.38), rgba(255,105,180,0.3));
    box-shadow: 0 0 20px rgba(224,163,255,0.25);
    transform: translateY(-2px);
}

/* =============================================
   11. RESPONSIVE
   ============================================= */

/* Tablet y móvil grande */
@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .filter-tabs {
        gap: 8px;
    }

    .filter-tab {
        padding: 7px 16px;
        font-size: 0.8rem;
    }
}

/* Móvil pequeño */
@media (max-width: 480px) {
    .filter-tab {
        padding: 6px 13px;
        font-size: 0.76rem;
    }

    .project-info h3 {
        font-size: 1rem;
    }
}

/* Pantallas táctiles (sin mouse) — info siempre visible */
@media (hover: none) {
    .project-info {
        grid-template-rows: 1fr;
    }

    .project-info-inner {
        padding: 20px 22px 22px;
    }
}