/* ========================================
   PROYECTOS — Design System
   Dependencies: landing.css (vars, navbar, footer)
======================================== */

/* ── Reset / Base ── */
body {
    background: #f4f6f9;
    color: #0f172a;
}

/* ══════════════════════════════════════
   HERO
══════════════════════════════════════ */
.proy-hero {
    position: relative;
    background: #011e41;
    padding: calc(72px + 1.75rem) 2rem 2.25rem;
    overflow: hidden;
    display: flex;
    align-items: center;
}

/* Grid decorativo de fondo */
.proy-hero-grid-deco {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

/* Glow rojo CRE */
.proy-hero::after {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(243, 51, 63, 0.18) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.proy-hero-inner {
    position: relative;
    z-index: 2;
    max-width: 760px;
}

.proy-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #f5333f;
    background: rgba(245, 51, 63, 0.12);
    border: 1px solid rgba(245, 51, 63, 0.25);
    padding: 0.35rem 0.85rem;
    border-radius: 100px;
    margin-bottom: 0.9rem;
}

.proy-hero-title {
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 800;
    color: #ffffff;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 0.6rem;
}

.proy-hero-sub {
    font-size: 1rem;
    color: rgba(255,255,255,0.65);
    line-height: 1.65;
    max-width: 580px;
    margin-bottom: 0;
}



/* ══════════════════════════════════════
   SECCIÓN GRID
══════════════════════════════════════ */
.proy-section {
    padding: 2.5rem 0 5rem;
}

.proy-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 2rem;
}

.proy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
}

/* ══════════════════════════════════════
   PROJECT CARD  (.pcard)
══════════════════════════════════════ */
.pcard {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0,0,0,0.07), 0 4px 16px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* Entrada animada */
    opacity: 0;
    transform: translateY(28px);
}

.pcard.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease, transform 0.5s ease,
                box-shadow 0.3s ease;
}

.pcard:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 12px 40px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
}

/* ── Top: icono + categoría ── */
.pcard-top {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 1.5rem 0;
}

.pcard-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.pcard:hover .pcard-icon {
    transform: scale(1.08) rotate(-3deg);
}

.pcard-icon img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.pcard-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.pcard-category {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-light);
    border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
    padding: 0.2rem 0.6rem;
    border-radius: 100px;
    display: inline-block;
}

/* ── Body: título + descripción + tags ── */
.pcard-body {
    padding: 1.25rem 1.5rem 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pcard-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
    letter-spacing: -0.01em;
    margin: 0;
}

.pcard-desc {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.7;
    margin: 0;
    flex: 1;
}

/* Acento visual: barra izquierda al hover */
.pcard-body::before {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    transition: width 0.35s ease;
    margin-bottom: 0.25rem;
}

.pcard:hover .pcard-body::before {
    width: 36px;
}

/* Tags */
.pcard-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.pcard-tag {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent);
    background: var(--accent-light);
    padding: 0.25rem 0.65rem;
    border-radius: 100px;
    border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
    transition: background 0.2s ease, color 0.2s ease;
}

.pcard:hover .pcard-tag {
    background: var(--accent);
    color: #fff;
}

/* ── Separador ── */
.pcard-footer {
    padding: 0 1.5rem 1.5rem;
    margin-top: auto;
}

.pcard-footer::before {
    content: '';
    display: block;
    height: 1px;
    background: #f1f5f9;
    margin-bottom: 1.25rem;
}

/* ── Botón ── */
.pcard-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.7rem 1rem;
    background: var(--accent-light);
    color: var(--accent);
    border: 1.5px solid color-mix(in srgb, var(--accent) 22%, transparent);
    border-radius: 10px;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, gap 0.25s ease;
    cursor: pointer;
}

.pcard-btn span {
    flex: 1;
}

.pcard-btn .pcard-arrow {
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.pcard-btn:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.pcard-btn:hover .pcard-arrow {
    transform: translateX(4px);
}

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 1100px) {
    .proy-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 720px) {
    .proy-hero {
        padding: 6.5rem 1.5rem 4rem;
        min-height: auto;
    }

    .proy-hero-title {
        font-size: 2.2rem;
    }

    .proy-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .proy-section {
        padding: 3rem 0 4rem;
    }
}

@media (max-width: 400px) {
    .proy-hero-title {
        font-size: 1.75rem;
    }

    .proy-hero-sub {
        font-size: 0.95rem;
    }
}
