/* =================================
   PROJECTS SECTION STYLES
   ================================= */

/* Projects Track Layout */
.projects-track {
    display: flex;
    gap: 2rem;
    padding: 2rem 1rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    /* Firefox */
}

.projects-track::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

/* Projects Card Base */
.projects-card {
    position: relative;
    background: var(--bg-card);
    border-radius: 1.5rem;
    /* padding: 2.5rem;  Removed padding from container to let image bleed */

    /* Estado Base: Limpio y Sutil */
    border: 2px solid var(--border);
    background: linear-gradient(145deg, var(--bg-card), rgba(255, 255, 255, 0.02));
    box-shadow: none;

    /* Transiciones fluidas */
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);

    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    z-index: 1;

    /* Layout: 2 cards per view by default (desktop) */
    min-width: 300px;
    flex: 0 0 calc(50% - 1rem);
    /* 2 columns with gap */
    scroll-snap-align: start;
}

/* EFECTO HOVER */
.projects-card:hover {
    /* Elevación */
    transform: translateY(-10px);

    /* Borde Encendido (3px) */
    border: 2px solid var(--accent);

    /* Sombreado (Glow) Intenso */
    box-shadow: var(--shadow-glow), var(--shadow-glow-pink);
}

/* Imagen del Proyecto */
.projects-image {
    height: 240px;
    width: 100%;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.projects-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.projects-card:hover .projects-image img {
    transform: scale(1.1);
}

.projects-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.projects-card:hover .projects-overlay {
    opacity: 0.3;
}

/* Contenido del Proyecto */
.projects-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Tipografía */
.projects-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.projects-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

/* Lista de Características */
.projects-features {
    list-style: none;
    margin-bottom: 1.5rem;
    padding: 0;
}

.projects-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.projects-features li i {
    color: var(--accent);
    margin-top: 0.25rem;
    flex-shrink: 0;
}

/* Tags de Tecnología */
.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-tag {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.85rem;

    /* Base: Glassy */
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 2rem;
    color: var(--text-secondary);

    position: relative;
    z-index: 1;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: default;
}

/* Capa de Gradiente (Oculta por defecto) */
.tech-tag::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-mid));
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

/* Hover en la Tarjeta: Resalte sutil */
.projects-card:hover .tech-tag {
    border-color: var(--accent);
    color: var(--text-primary);
    background: rgba(0, 102, 255, 0.05);
}

/* Hover en la Etiqueta: Estilo "Destacado" Full */
.tech-tag:hover {
    border-color: transparent !important;
    /* El borde desaparece para dejar ver el gradiente */
    color: white !important;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.4);
    /* Glow intenso */
}

.tech-tag:hover::before {
    opacity: 1;
    /* Muestra el gradiente */
}

/* Botón de Acción */
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text-primary);
    width: 100%;
    margin-top: auto;
}

.btn-secondary:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.3);
}

.btn-secondary svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.btn-secondary:hover svg {
    transform: translateX(4px);
}

/* Responsive */
@media (max-width: 1024px) {
    .projects-card {
        flex: 0 0 100%;
        /* 1 card per view on tablet */
    }
}

@media (max-width: 768px) {

    /* Disable Carousel for Mobile -> Vertical Stack */
    .projects-track {
        display: flex;
        flex-direction: column;
        overflow-x: visible;
        scroll-snap-type: none;
        gap: 2rem;
    }

    .projects-card {
        flex: 0 0 auto;
        width: 100%;
        /* 1 column on mobile */
    }

    .projects-image {
        height: 200px;
    }

    .projects-content {
        padding: 1.5rem;
    }

    /* Hide Carousel Buttons on Mobile for Projects Section */
    #proyectos .carousel-btn {
        display: none !important;
    }
}