/* ========================================= */
/* 6. PROYECTOS / TRABAJOS DESTACADOS         */
/* ========================================= */
main.container {
    padding-top: 100px;
    padding-bottom: 50px;
}

.projects-hero {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 40px;
}

.projects-hero h1 {
    font-size: 1.6rem;
    margin-bottom: 14px;
}

.projects-hero p {
    color: var(--color-text-muted);
    font-size: 1.02rem;
}

.bento-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding-bottom: 30px;
}

.project-card {
    min-width: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border-soft);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    grid-column: span 1;
}

.project-card:hover {
    transform: translateY(-6px);
    border-color: var(--color-accent);
}

.project-visual {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2.1 / 1;
}

.project-card.span-3 .project-visual {
    aspect-ratio: 2513 / 1208;
}

/* Carrusel de fotos (proyectos con imagenes reales) */
.carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.4s ease;
}

.carousel-slide {
    flex: 0 0 100%;
    height: 100%;
    overflow: hidden;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(6, 8, 16, 0.55);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    color: var(--color-text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: background 0.2s ease;
}

.carousel-arrow:hover {
    background: rgba(6, 8, 16, 0.85);
    color: var(--color-accent);
}

.carousel-arrow svg {
    width: 18px;
    height: 18px;
}

.carousel-prev {
    left: 8px;
}

.carousel-next {
    right: 8px;
}

.carousel-dots {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: flex-end;
    gap: 4px;
    z-index: 2;
}

.carousel-dot {
    width: 40px;
    height: 44px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 10px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.carousel-dot::before {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transition: all 0.2s ease;
}

.carousel-dot.active::before {
    background: var(--color-accent);
    width: 16px;
    border-radius: 3px;
}

.project-visual.single-slide .carousel-arrow,
.project-visual.single-slide .carousel-dots {
    display: none;
}

.card-body {
    min-width: 0;
    padding: 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.card-tags .tag {
    background: var(--color-accent-soft);
    color: var(--color-accent);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-family: 'Space Mono', 'Courier New', monospace;
}

.card-body h3 {
    font-size: 1.15rem;
    margin-bottom: 10px;
}

.card-body .desc {
    color: var(--color-text-muted);
    font-size: 0.82rem;
    line-height: 1.65;
    max-width: 68ch;
    margin-bottom: 16px;
}

/* Ver más / Ver menos (resumen en mobile) */
.btn-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 8px 4px;
    margin-bottom: 6px;
    background: transparent;
    border: none;
    color: var(--color-accent);
    font-family: 'Space Mono', 'Courier New', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    align-self: flex-start;
}

.btn-more-chevron {
    width: 14px;
    height: 14px;
    transition: transform 0.3s ease;
}

.btn-more.is-expanded .btn-more-chevron {
    transform: rotate(180deg);
}

.desc-more {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.desc-more.expanded {
    max-height: 4000px;
}

.desc-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
    padding-top: 2px;
}

.desc-list-spaced {
    gap: 22px;
}

.desc-list li {
    position: relative;
    padding-left: 18px;
    color: var(--color-text-muted);
    font-size: 0.82rem;
    line-height: 1.6;
    max-width: 68ch;
}

.desc-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-accent);
}

.desc-list li strong {
    color: var(--color-text);
    font-weight: 600;
}

.desc-list li code {
    background: var(--color-surface-2);
    color: var(--color-accent);
    font-family: 'Space Mono', 'Courier New', monospace;
    font-size: 0.82em;
    padding: 2px 6px;
    border-radius: 4px;
}

.card-footer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-top: auto;
    font-family: 'Space Mono', 'Courier New', monospace;
    font-size: 0.72rem;
    color: var(--color-text-muted);
    border-top: 1px solid var(--color-border-soft);
    padding-top: 14px;
}

.card-footer .cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    color: var(--color-text);
    font-weight: 600;
    letter-spacing: 0.03em;
    border: 1px solid var(--color-border-soft);
    border-radius: 10px;
    padding: 10px 16px;
}

.project-card:hover .card-footer .cta,
.card-footer .cta:hover {
    color: var(--color-accent);
    border-color: var(--color-accent);
}

@media (min-width: 768px) {
    /* Un proyecto por fila, todos a ancho completo */
    .bento-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .project-card { border-radius: 20px; }

    .card-body { padding: clamp(28px, 2.4vw, 44px); }

    .btn-more { font-size: 0.82rem; }

    .card-tags {
        gap: 10px;
        margin-bottom: 18px;
    }

    .card-tags .tag {
        padding: 7px 16px;
        font-size: 0.85rem;
    }

    .card-body h3 {
        font-size: clamp(22px, 1.7vw, 28px);
        margin-bottom: 16px;
    }

    .card-body .desc {
        font-size: clamp(15px, 1.05vw, 17px);
        line-height: 1.65;
        margin-bottom: 22px;
    }

    .desc-list {
        gap: 14px;
        margin-bottom: 22px;
    }

    .desc-list-spaced { gap: 26px; }

    .desc-list li {
        font-size: clamp(14.5px, 1vw, 16px);
        line-height: 1.6;
        padding-left: 22px;
    }

    .desc-list li::before {
        width: 7px;
        height: 7px;
        top: 9px;
    }

    .card-footer {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        font-size: 0.8rem;
        padding-top: 20px;
    }

    .card-footer .cta {
        min-height: auto;
        border: none;
        padding: 0;
    }

    .carousel-arrow {
        width: 52px;
        height: 52px;
    }

    .carousel-arrow svg {
        width: 22px;
        height: 22px;
    }
}

@media (min-width: 1024px) {
    main.container { padding-top: 120px; }
}

/* Intro más grande (PC), misma escala que Inicio/Nosotros */
@media (min-width: 768px) {
    main.container { padding-top: 160px; }

    .projects-hero {
        max-width: 900px;
        margin: 0 auto 64px;
    }

    .projects-hero h1 {
        font-family: 'Copperplate', 'Copperplate Gothic Light', 'Copperplate Gothic Bold', serif;
        font-weight: 700;
        font-size: clamp(32px, 3.4vw, 58px);
        line-height: 1.12;
        letter-spacing: -0.01em;
        margin-bottom: 22px;
    }

    .projects-hero p {
        font-size: clamp(16px, 1.15vw, 19px);
        line-height: 1.6;
        max-width: 48em;
        margin: 0 auto;
    }
}
