/* ==========================================
   PROYECTOS PAGE — ESTÉTICA LAMA
   Cohesionado con inicio.css:
   - Secciones alternas: azul oscuro / azul claro
   - Cards blancas con border-top coloreado
   - Acentos dorados en secciones oscuras
   ========================================== */

/* ─── 1. HERO ─────────────────────────────── */

.hero-proyectos {
    position: relative;
    min-height: 72vh;
    background:
        linear-gradient(
            135deg,
            rgba(13, 33, 60, 0.35) 0%,
            rgba(13, 43, 69, 0.20) 50%,
            rgba(0, 20, 40, 0.30) 100%
        ),
        url('../assets/hero-proyectos.png') center center / cover no-repeat;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-proyectos .hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 120px 0 80px;
}

.hero-proyectos .hero-text {
    text-align: center;
    max-width: 820px;
    margin: 0 auto;
}

.hero-proyectos .hero-subtitle {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 3.5px;
    margin-bottom: 1rem;
    background: rgba(227, 178, 60, 0.12);
    border: 1px solid rgba(227, 178, 60, 0.3);
    padding: 0.35rem 1rem;
    border-radius: 20px;
}

.hero-proyectos .hero-main-title {
    font-family: var(--font-display);
    font-size: 3.2rem;
    font-weight: 700;
    color: white;
    line-height: 1.15;
    margin-bottom: 1.25rem;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.2);
}

.hero-proyectos .hero-description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.8;
    margin: 0 auto 2.5rem;
    max-width: 600px;
}

.hero-proyectos .hero-stats {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

/* Divisores entre stats */
.hero-proyectos .hero-stat {
    text-align: center;
    padding: 0 2.5rem;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-proyectos .hero-stat:last-child {
    border-right: none;
}

.hero-proyectos .stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent-color);
    line-height: 1;
    font-family: var(--font-primary);
}

.hero-proyectos .stat-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.65);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.4rem;
}

/* Pills de navegación rápida */
.hero-nav-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: center;
}

.hero-nav-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.2rem;
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    font-family: var(--font-primary);
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.hero-nav-pill i {
    font-size: 0.78rem;
    opacity: 0.8;
}

.hero-nav-pill:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.55);
    color: white;
}

/* ─── 2. CATEGORY NAV BAR (STICKY) ────────── */

.category-nav {
    position: sticky;
    top: 65px;
    z-index: 100;
    background: #1E3A8A;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 2px 12px rgba(30, 58, 138, 0.35);
}

.category-tabs {
    display: flex;
    list-style: none;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0;
    margin: 0;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1.5rem;
}

.category-tabs::-webkit-scrollbar {
    display: none;
}

.category-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 1.4rem;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.65);
    font-family: var(--font-primary);
    font-size: 0.85rem;
    font-weight: 600;
    border-bottom: 3px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.2px;
}

.category-tab i {
    font-size: 0.82rem;
}

.category-tab:hover {
    color: white;
}

.category-tab.is-active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

/* ─── 3. SECCIONES — FONDOS ALTERNADOS ────── */

.projects-section {
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

/* OSCURO: azul oscuro → azul eléctrico (igual que services/projects en inicio) */
.projects-section.bg-azul {
    background: linear-gradient(135deg, var(--inicio-bg-azul, #1E3A8A) 0%, #2563EB 100%);
    color: white;
}

/* Brillo decorativo en secciones oscuras */
.projects-section.bg-azul::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(ellipse 70% 50% at 90% 10%, rgba(37, 99, 235, 0.3) 0%, transparent 60%),
        radial-gradient(ellipse 50% 60% at 5% 90%, rgba(30, 58, 138, 0.4) 0%, transparent 50%);
    pointer-events: none;
}

/* CLARO: azulado muy suave (igual que tech section en inicio) */
.projects-section.bg-light {
    background: linear-gradient(135deg, #F8FAFF 0%, #EEF4FF 100%);
}

/* ─── 4. BLOCK HEADER ─────────────────────── */

.block-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 2rem;
    align-items: center;
    margin-bottom: 3rem;
    position: relative;
    z-index: 2;
}

/* Icono — en oscuro */
.bg-azul .block-icon {
    width: 72px;
    height: 72px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.22);
    flex-shrink: 0;
}

.bg-azul .block-icon i {
    font-size: 2rem;
    color: var(--accent-color);
}

/* Icono — en claro */
.bg-light .block-icon {
    width: 72px;
    height: 72px;
    background: rgba(30, 58, 138, 0.08);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(30, 58, 138, 0.18);
    flex-shrink: 0;
}

.bg-light .block-icon i {
    font-size: 2rem;
    color: var(--primary-color);
}

/* Textos del block-info */
.bg-azul .block-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.15);
}

.bg-azul .block-description {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.6;
    margin: 0;
}

.bg-light .block-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.bg-light .block-description {
    font-size: 1rem;
    color: #4B5563;
    line-height: 1.6;
    margin: 0;
}

/* Stat boxes — en oscuro */
.bg-azul .block-stats {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.bg-azul .stat-box {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius-lg);
    padding: 1rem 1.5rem;
    text-align: center;
    min-width: 110px;
}

.bg-azul .stat-box .stat-number {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--accent-color);
    line-height: 1;
    margin-bottom: 0.3rem;
}

.bg-azul .stat-box .stat-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: rgba(255, 255, 255, 0.65);
}

/* Stat boxes — en claro */
.bg-light .block-stats {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.bg-light .stat-box {
    background: #ffffff;
    border: 1px solid rgba(30, 58, 138, 0.12);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.08);
    padding: 1rem 1.5rem;
    text-align: center;
    min-width: 110px;
}

.bg-light .stat-box .stat-number {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 0.3rem;
}

.bg-light .stat-box .stat-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #9CA3AF;
}

/* ─── 5. GRID DE TARJETAS ─────────────────── */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 2;
}

/* ─── 6. TARJETA DE PROYECTO ──────────────── */

/* Estilo base — igual a inicio-tech-card */
.project-card {
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow:
        0 8px 24px rgba(30, 58, 138, 0.12),
        0 2px 6px rgba(0, 0, 0, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Borde superior dorado en sección oscura — igual a proy-badge */
.bg-azul .project-card {
    border-top: 4px solid var(--accent-color);
}

/* Borde superior azul en sección clara */
.bg-light .project-card {
    border-top: 4px solid var(--primary-color);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow:
        0 20px 40px rgba(30, 58, 138, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.08);
    will-change: transform;
}

.card-image {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #EFF1F3;
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: block;
    will-change: transform;
}

.project-card:hover .project-img {
    transform: scale(1.05);
}

/* Overlay — gradiente siempre visible (como proy-img-wrap::after) */
.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.85rem 1rem;
    background: linear-gradient(to top, rgba(13, 27, 53, 0.55) 0%, transparent 100%);
    display: flex;
    align-items: flex-end;
}

/* Badge dorado — igual a .proy-badge en inicio */
.project-category {
    display: inline-block;
    background: linear-gradient(135deg, #FFD700 0%, #E3B23C 100%);
    color: #1a202c;
    padding: 0.3rem 0.9rem;
    border-radius: 100px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-family: var(--font-primary);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
}

/* Placeholder cuando no hay imagen */
.img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, #0d1b35 0%, #1E3A8A 100%);
    color: rgba(255, 255, 255, 0.5);
    position: absolute;
    top: 0;
    left: 0;
}

.img-placeholder i {
    font-size: 2.5rem;
    color: rgba(227, 178, 60, 0.5);
}

.img-placeholder span {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Contenido de la tarjeta */
.card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    line-height: 1.35;
}

.project-description {
    font-size: 0.875rem;
    color: #4B5563;
    line-height: 1.7;
    margin-bottom: 1rem;
    flex: 1;
    font-weight: 500;
}

.project-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: auto;
}

/* Tags — igual a proy-tag en inicio */
.metric-tag {
    display: inline-flex;
    align-items: center;
    background: rgba(30, 58, 138, 0.06);
    color: var(--primary-color);
    border-radius: 8px;
    padding: 0.28rem 0.7rem;
    font-size: 0.72rem;
    font-weight: 600;
    font-family: var(--font-primary);
    border: 1px solid rgba(30, 58, 138, 0.12);
    letter-spacing: 0.1px;
}

/* ─── 7. BLOCK FOOTER ─────────────────────── */

.block-footer {
    text-align: center;
    padding-top: 0.5rem;
    position: relative;
    z-index: 2;
}

/* Botón en oscuro */
.bg-azul .view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: var(--border-radius);
    background: rgba(255, 255, 255, 0.08);
    color: white;
    font-family: var(--font-primary);
    font-size: 0.925rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
    letter-spacing: 0.2px;
}

.bg-azul .view-all-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.65);
}

/* Botón en claro */
.bg-light .view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    background: transparent;
    color: var(--primary-color);
    font-family: var(--font-primary);
    font-size: 0.925rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    letter-spacing: 0.2px;
}

.bg-light .view-all-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* ─── 8. CTA FINAL ────────────────────────── */

.proyectos-cta {
    background: linear-gradient(135deg, #1E3A8A 0%, #2563EB 100%);
    padding: 5.5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Brillo decorativo */
.proyectos-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 80%, rgba(227, 178, 60, 0.1) 0%, transparent 55%),
        radial-gradient(ellipse 60% 80% at 80% 20%, rgba(37, 99, 235, 0.3) 0%, transparent 50%);
    pointer-events: none;
}

.proyectos-cta .cta-inner {
    position: relative;
    z-index: 2;
}

.proyectos-cta .cta-eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 1rem;
    background: rgba(227, 178, 60, 0.12);
    border: 1px solid rgba(227, 178, 60, 0.3);
    padding: 0.3rem 0.9rem;
    border-radius: 20px;
}

.proyectos-cta .cta-title {
    font-family: var(--font-display);
    font-size: 2.4rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1.25rem;
    line-height: 1.2;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.proyectos-cta .cta-description {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 560px;
    margin: 0 auto 2.5rem;
    line-height: 1.8;
}

.proyectos-cta .cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Botón principal — igual a servicio-enlace en inicio */
.cta-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2.25rem;
    background: linear-gradient(135deg, #FFF8E1 0%, #FFE082 100%);
    color: #1a202c;
    border: 2px solid var(--accent-color);
    border-radius: 30px;
    font-family: var(--font-primary);
    font-size: 0.975rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
    box-shadow: 0 4px 15px rgba(227, 178, 60, 0.25);
}

.cta-btn-primary:hover {
    background: linear-gradient(135deg, #1E3A8A 0%, #2563EB 100%);
    color: white;
    border-color: #1E3A8A;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(30, 58, 138, 0.4);
}

/* Botón secundario */
.cta-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2.25rem;
    border: 2px solid rgba(255, 255, 255, 0.35);
    color: white;
    border-radius: 30px;
    font-family: var(--font-primary);
    font-size: 0.975rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.cta-btn-secondary:hover {
    border-color: rgba(255, 255, 255, 0.75);
    background: rgba(255, 255, 255, 0.1);
}
