/* ============================================
   FORDEMA — Proyectos / Casos de Éxito
   Grid 3 cols de cards con imagen + overlay hover
   ============================================ */

/* Hero */
.proyectos-hero {
    position: relative;
    min-height: 320px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    background-color: #1a2d42;
}

.proyectos-hero .hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.proyectos-hero .hero-dark-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.proyectos-hero .video-overlay {
    z-index: 1;
}

.proyectos-hero .hero-content {
    position: relative;
    z-index: 2;
}

.proyectos-hero h2 {
    font-family: 'Raleway', Arial, sans-serif;
    font-size: 2.2em;
    font-weight: 300;
    margin: 0 0 10px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.proyectos-hero p {
    font-size: 1.05em;
    font-weight: 300;
    color: #ddd;
}

/* Proyectos Section */
.proyectos-section {
    padding: 60px 5%;
    background-color: #1a2d42;
}

.proyectos-section-title {
    text-align: center;
    color: #fff;
    font-family: 'Raleway', Arial, sans-serif;
    font-size: 2em;
    font-weight: 300;
    margin-bottom: 50px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.proyectos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Proyecto Card */
.proyecto-card {
    position: relative;
    height: 300px;
    overflow: hidden;
    border-radius: 4px;
    cursor: pointer;
}

.proyecto-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.6);
    transition: filter 0.4s ease, transform 0.4s ease;
}

.proyecto-card:hover img {
    filter: brightness(0.75);
    transform: scale(1.08);
}

.proyecto-card .proyecto-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 25px;
    z-index: 1;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
    transition: background 0.4s ease;
}

.proyecto-card:hover .proyecto-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 60%, rgba(0,0,0,0.2) 100%);
}

.proyecto-overlay .proyecto-tag {
    display: inline-block;
    background-color: #a8c528;
    color: #fff;
    font-size: 0.7em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 2px;
    margin-bottom: 10px;
    width: fit-content;
}

.proyecto-overlay h3 {
    font-family: 'Raleway', Arial, sans-serif;
    font-size: 1.1em;
    font-weight: 600;
    color: #fff;
    margin-bottom: 6px;
    line-height: 1.3;
}

.proyecto-overlay p {
    font-size: 0.85em;
    color: #ccc;
    line-height: 1.5;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.proyecto-card:hover .proyecto-overlay p {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive — Tablet */
@media (max-width: 1024px) {
    .proyectos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Responsive — Mobile */
@media (max-width: 768px) {
    .proyectos-hero h2 {
        font-size: 1.4em;
    }

    .proyectos-section {
        padding: 40px 20px;
    }

    .proyectos-grid {
        grid-template-columns: 1fr;
    }

    .proyecto-card {
        height: 250px;
    }

    .proyecto-overlay p {
        opacity: 1;
        transform: translateY(0);
    }
}
