/* proyectos.css - Estilos para la página de Proyectos - MCA Ingeniería */

/* ========== VARIABLES (heredadas de style.css) ========== */
:root {
    --azul-mca: #003f8c;
    --azul-oscuro: #002856;
    --rojo-mca: #e30613;
    --gris-claro: #f5f7fa;
    --blanco: #ffffff;
    --negro: #1e1e2a;
    --sombra: 0 15px 35px rgba(0,63,140,0.08);
    --sombra-hover: 0 20px 40px rgba(0,63,140,0.15);
    --border-radius: 20px;
}

/* ========== HERO DE PÁGINA INTERNA ========== */
.page-hero {
    background: linear-gradient(135deg, var(--azul-oscuro) 0%, var(--azul-mca) 100%);
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--blanco);
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.page-hero::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 400px;
    height: 400px;
    background: rgba(227,6,19,0.1);
    border-radius: 50%;
}

.page-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

.page-hero h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 3.2rem;
    font-weight: 800;
    margin-bottom: 10px;
    text-transform: uppercase;
    line-height: 1.2;
    color: var(--blanco);
}

.page-hero p {
    font-size: 1.2rem;
    opacity: 0.95;
    font-weight: 400;
    color: rgba(255,255,255,0.95);
}

/* ========== FILTROS DE PROYECTOS - STICKY CORREGIDO ========== */
.projects-filters {
    padding: 20px 0;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid rgba(0,63,140,0.08);
    position: sticky;
    top: 110px;
    z-index: 850;
    box-shadow: 0 4px 20px rgba(0,63,140,0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 0 15px;
    max-width: 1200px;
    margin: 0 auto;
}

.filter-btn {
    padding: 10px 24px;
    background: var(--gris-claro);
    border: 2px solid transparent;
    border-radius: 50px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--azul-mca);
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--azul-mca);
    color: var(--blanco);
    border-color: var(--azul-mca);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,63,140,0.2);
}

.filter-btn.active {
    font-weight: 700;
}

/* Espaciador para compensar filtros sticky */
.projects-grid-section {
    padding-top: 100px;
    background: var(--gris-claro);
}

/* ========== GRID DE PROYECTOS ========== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 35px;
    margin-top: 20px;
}

.project-card {
    background: var(--blanco);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--sombra);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    opacity: 1;
    transform: translateY(0);
}

.project-card:hover {
    transform: translateY(-10px) scale(1.01);
    box-shadow: var(--sombra-hover);
    z-index: 10;
}

.project-card.featured {
    grid-column: span 2;
    border: 2px solid var(--azul-mca);
    box-shadow: 0 25px 50px rgba(0,63,140,0.25);
}

.project-card.featured:hover {
    transform: translateY(-12px) scale(1.02);
}

.project-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.project-category-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--azul-mca);
    color: white;
    padding: 6px 16px;
    border-radius: 30px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.project-category-badge.featured-badge {
    background: linear-gradient(135deg, var(--azul-mca), var(--azul-oscuro));
    padding: 8px 20px;
    font-size: 0.9rem;
    top: 20px;
    left: 20px;
}

.project-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-content h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--azul-mca);
    margin-bottom: 8px;
    line-height: 1.3;
}

.project-client {
    font-weight: 600;
    color: var(--azul-oscuro);
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.project-description {
    color: #4a4a5a;
    line-height: 1.7;
    margin-bottom: 20px;
    flex-grow: 1;
    font-size: 0.95rem;
}

.project-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 15px 0 20px;
    padding-top: 15px;
    border-top: 1px dashed rgba(0,63,140,0.15);
}

.project-specs span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--azul-mca);
    font-weight: 600;
}

.project-specs i {
    font-size: 0.9rem;
    color: var(--azul-mca);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--azul-mca);
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: auto;
    font-size: 0.95rem;
}

.project-link:hover {
    color: var(--rojo-mca);
    gap: 12px;
}

.project-link i {
    transition: transform 0.3s ease;
}

.project-link:hover i {
    transform: translateX(4px);
}

/* ========== ESTADÍSTICAS DE PROYECTOS ========== */
.projects-stats {
    padding: 70px 0;
    background: var(--blanco);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    text-align: center;
}

.stat-card {
    padding: 30px 20px;
    border-radius: var(--border-radius);
    background: var(--gris-claro);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--azul-mca), var(--azul-oscuro));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 1.8rem;
}

.stat-number {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--azul-mca);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-weight: 600;
    color: var(--azul-oscuro);
    font-size: 1.05rem;
}

/* ========== CTA CONTACTO - COMPACTO Y SEPARADO ========== */
.projects-cta {
    padding: 60px 0;
    background: transparent;
    color: var(--azul-mca);
    text-align: center;
    margin: 40px 20px 30px;
}

.cta-wrapper {
    background: linear-gradient(135deg, var(--azul-oscuro) 0%, var(--azul-mca) 100%);
    border-radius: 24px;
    padding: 60px 40px;
    margin: 0 auto;
    box-shadow: 0 20px 40px rgba(0,63,140,0.25);
    position: relative;
    overflow: hidden;
}

.cta-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    pointer-events: none;
}

.cta-wrapper::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -30%;
    width: 150px;
    height: 150px;
    background: rgba(227,6,19,0.15);
    border-radius: 50%;
    pointer-events: none;
}

.cta-content {
    position: relative;
    z-index: 2;
    max-width: 650px;
    margin: 0 auto;
    padding: 0 10px;
}

.cta-content h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 15px;
    line-height: 1.3;
    color: white;
}

.cta-content p {
    font-size: 1.05rem;
    margin-bottom: 25px;
    opacity: 0.95;
    line-height: 1.6;
    color: rgba(255,255,255,0.95);
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-cotizar-grande {
    display: inline-flex;
    align-items: center;
    background: var(--rojo-mca);
    color: white;
    padding: 18px 50px;
    border-radius: 60px;
    font-weight: 800;
    font-size: 1.4rem;
    text-decoration: none;
    transition: 0.3s;
    border: 2px solid transparent;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.btn-cotizar-grande i {
    margin-right: 15px;
    font-size: 1.6rem;
}

.btn-cotizar-grande:hover {
    background: white;
    color: var(--rojo-mca);
    border-color: var(--rojo-mca);
    transform: scale(1.05);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: 50px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--rojo-mca);
    color: white;
}

.btn-primary:hover {
    background: #c40510;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(227, 6, 19, 0.4);
}

.btn-outline {
    background: transparent;
    color: white;
    border-color: white;
}

.btn-outline:hover {
    background: white;
    color: var(--azul-mca);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255,255,255,0.3);
}

/* ========== ANIMACIONES ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-card {
    animation: fadeInUp 0.5s ease forwards;
    animation-delay: calc(var(--i, 0) * 0.1s);
}

.projects-grid .project-card:nth-child(1) { --i: 1; }
.projects-grid .project-card:nth-child(2) { --i: 2; }
.projects-grid .project-card:nth-child(3) { --i: 3; }
.projects-grid .project-card:nth-child(4) { --i: 4; }
.projects-grid .project-card:nth-child(5) { --i: 5; }
.projects-grid .project-card:nth-child(6) { --i: 6; }

/* ========== RESPONSIVE ========== */
@media (max-width: 992px) {
    .project-card.featured {
        grid-column: span 1;
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 25px;
    }
    
    .filter-buttons {
        gap: 8px;
    }
    
    .filter-btn {
        padding: 8px 18px;
        font-size: 0.9rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 768px) {
    .page-hero {
        height: 220px;
    }
    
    .page-hero h1 {
        font-size: 2.4rem;
    }
    
    .page-hero p {
        font-size: 1.05rem;
    }
    
    .projects-filters {
        top: 100px;
        padding: 15px 0;
    }
    
    .filter-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
        margin: 3px;
    }
    
    .projects-grid-section {
        padding-top: 90px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .project-image {
        height: 200px;
    }
    
    .project-content {
        padding: 22px;
    }
    
    .project-content h3 {
        font-size: 1.3rem;
    }
    
    .stat-number {
        font-size: 2.4rem;
    }
    
    .stat-label {
        font-size: 0.95rem;
    }
    
    .projects-cta {
        margin: 30px 15px 20px;
        padding: 40px 0;
    }
    
    .cta-wrapper {
        border-radius: 20px;
        padding: 30px 20px;
    }
    
    .cta-content h2 {
        font-size: 1.7rem;
    }
    
    .cta-content p {
        font-size: 1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
        padding: 12px 28px;
    }
}

@media (max-width: 480px) {
    .project-specs {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
    
    .stat-card {
        padding: 25px 15px;
    }
    
    .stat-number {
        font-size: 2.2rem;
    }
    
    .page-hero h1 {
        font-size: 2rem;
    }
    
    .filter-btn {
        padding: 7px 14px;
        font-size: 0.8rem;
    }
}