/* ============================================
   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;
    text-decoration: none;
    color: inherit;
    display: block;
}

.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);
    }
}

/* ============================================
   Proyecto — Pagina de detalle
   ============================================ */

.proyecto-detalle-main {
    max-width: 860px;
    margin: 0 auto;
    padding: 50px 30px 80px;
}

/* Header */
.proyecto-detalle-header {
    margin-bottom: 35px;
    padding-bottom: 30px;
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(to right, #3b6fa0, #a8c528, #ecb94a) 1;
}

.proyecto-detalle-header .proyecto-tag {
    display: inline-block;
    background-color: #3b6fa0;
    color: #fff;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 5px 14px;
    border-radius: 3px;
    margin-bottom: 18px;
}

.proyecto-detalle-header h1 {
    font-family: 'Raleway', Arial, sans-serif;
    font-size: 2.4em;
    font-weight: 600;
    color: #1a2d42;
    line-height: 1.25;
    margin: 0;
}

/* Imagen destacada */
.proyecto-detalle-imagen {
    margin-bottom: 40px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

.proyecto-detalle-imagen img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 480px;
    object-fit: cover;
}

/* Contenido */
.proyecto-detalle-contenido {
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 1.05em;
    line-height: 1.85;
    color: #444;
    margin-bottom: 40px;
}

.proyecto-detalle-contenido p {
    margin-bottom: 1.4em;
}

.proyecto-detalle-contenido h2 {
    font-family: 'Raleway', Arial, sans-serif;
    font-size: 1.5em;
    font-weight: 600;
    color: #3b6fa0;
    margin-top: 2.2em;
    margin-bottom: 0.8em;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
}

.proyecto-detalle-contenido h2:first-child {
    margin-top: 0;
}

.proyecto-detalle-contenido h3 {
    font-family: 'Raleway', Arial, sans-serif;
    font-size: 1.2em;
    font-weight: 600;
    color: #1a2d42;
    margin-top: 1.8em;
    margin-bottom: 0.6em;
}

.proyecto-detalle-contenido ul,
.proyecto-detalle-contenido ol {
    padding-left: 28px;
    margin-bottom: 1.4em;
}

.proyecto-detalle-contenido li {
    margin-bottom: 0.5em;
    line-height: 1.7;
}

.proyecto-detalle-contenido img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 25px 0 35px;
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid #eee;
}

.proyecto-detalle-contenido a {
    color: #3b6fa0;
}

.proyecto-detalle-contenido a:hover {
    text-decoration: underline;
}

.proyecto-detalle-contenido blockquote {
    border-left: 4px solid #a8c528;
    padding: 12px 20px;
    margin: 1.5em 0;
    font-style: italic;
    color: #666;
    background: #f9f9f9;
    border-radius: 0 6px 6px 0;
}

/* Boton visitar proyecto */
.proyecto-detalle-enlace {
    margin: 40px 0 50px;
    padding: 30px;
    background: linear-gradient(135deg, #f8fdf0, #f0f7ff);
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e8f0e0;
}

.btn-visitar-proyecto {
    display: inline-block;
    background-color: #a8c528;
    color: #fff;
    padding: 14px 36px;
    border-radius: 4px;
    text-decoration: none;
    font-family: 'Raleway', Arial, sans-serif;
    font-weight: 700;
    font-size: 1.05em;
    letter-spacing: 0.5px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-visitar-proyecto:hover {
    background-color: #8faa1e;
    transform: translateY(-2px);
}

/* Otros proyectos */
.otros-proyectos {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #eee;
}

.otros-proyectos h2 {
    font-family: 'Raleway', Arial, sans-serif;
    font-size: 1.4em;
    font-weight: 600;
    color: #333;
    margin-bottom: 25px;
}

.otros-proyectos .proyectos-grid {
    max-width: 100%;
}

/* Volver */
.volver-proyectos {
    margin-top: 50px;
    padding-top: 25px;
    border-top: 1px solid #eee;
}

.volver-proyectos .btn-volver {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #666;
    text-decoration: none;
    font-size: 0.95em;
    font-weight: 500;
    transition: color 0.3s ease;
}

.volver-proyectos .btn-volver:hover {
    color: #3b6fa0;
}

/* Responsive detalle — Tablet */
@media (max-width: 1024px) {
    .proyecto-detalle-main {
        padding: 40px 25px 60px;
    }
}

/* Responsive detalle — Mobile */
@media (max-width: 768px) {
    .proyecto-detalle-header h1 {
        font-size: 1.7em;
    }

    .proyecto-detalle-main {
        padding: 25px 16px 40px;
    }

    .proyecto-detalle-contenido h2 {
        font-size: 1.3em;
        margin-top: 1.8em;
    }

    .proyecto-detalle-contenido h3 {
        font-size: 1.1em;
    }

    .proyecto-detalle-enlace {
        padding: 20px;
    }

    .btn-visitar-proyecto {
        padding: 12px 28px;
        font-size: 1em;
    }

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

    .proyecto-detalle-contenido img {
        margin: 18px 0 25px;
        border-radius: 6px;
    }
}
