﻿/* Hero Section */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/images/desarrollo_territorial/desarrollo_terrritorial.webp');
    background-size: cover;
    background-position: center;
    z-index: 1;
}

    .hero-background::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.4);
    }

.hero-title {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    padding: 0 20px;
    max-width: 1200px;
}

    .hero-title h1 {
        font-size: 4rem;
        font-weight: 800;
        text-transform: uppercase;
        text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
        margin-bottom: 20px;
        letter-spacing: 3px;
    }

/* Secciones generales */
.section-padding {
    padding: 80px 40px;
}

.bg-light {
    background-color: transparent;
}

.bg-white {
    background-color: transparent;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Sección con imagen y texto */
.image-text-section {
    display: flex;
    gap: 40px;
    align-items: center;
    margin-bottom: 80px;
}

    .image-text-section.reverse {
        flex-direction: row-reverse;
    }

    .image-text-section .text-content {
        flex: 1;
        background-color: white;
        padding: 40px;
        border-radius: 15px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }

    .image-text-section .image-content {
        flex: 0 0 500px;
    }

        .image-text-section .image-content img {
            width: 100%;
            height: auto;
            border-radius: 15px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
        }

.text-content h2 {
    color: #2c3e50;
    font-size: 2.2rem;
    margin-bottom: 25px;
    font-weight: 700;
    padding-bottom: 10px;
    border-bottom: 3px solid #27ae60;
}

.text-content p {
    color: #444;
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 20px;
}

/* Sección de proyectos */
.projects-section {
    padding: 80px 40px;
    background-color: transparent;
}

.projects-title {
    text-align: center;
    color: #27ae60;
    font-size: 2.5rem;
    margin-bottom: 60px;
    font-weight: 700;
    text-transform: uppercase;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto 40px;
}

.project-card {
    background-color: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

    .project-card:hover {
        transform: translateY(-5px);
    }

.project-image-container {
    width: 100%;
    height: 280px;
    overflow: hidden;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

    .project-image-container img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        max-width: 100%;
        max-height: 100%;
    }

.project-card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-card h3 {
    color: #27ae60;
    font-size: 1.4rem;
    margin-bottom: 15px;
    font-weight: 700;
    line-height: 1.3;
}

.project-card p {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
    flex-grow: 1;
}

/* =========================
   NOTICIAS DESARROLLO TERRITORIAL
   ========================= */

.news-section {
    padding: 80px 0;
    background-color: #f5f5f5;
}

.news-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.news-title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 50px;
}

/* GRID */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* CARD */
.news-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* IMAGEN */
.news-image-container {
    width: 100%;
    height: 220px;
    overflow: hidden;
}

    .news-image-container img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

/* CONTENIDO */
.news-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
}

    .news-card-content h3 {
        font-size: 18px;
        text-align: left; 
        margin-bottom: 15px;
    }

.news-button {
    display: inline-block;
    background-color: #27ae60;
    color: white;
    padding: 10px 25px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
    align-self: flex-start;
}

    .news-button:hover {
        background-color: #219653;
    }

/* 🔥 CARD 4 CENTRADA (MISMO ANCHO) */
.news-grid .news-card:nth-child(4) {
    grid-column: 1;
}


/* Responsividad */
@media (max-width: 1200px) {
    .hero-title h1 {
        font-size: 3rem;
    }

    .image-text-section {
        flex-direction: column;
    }

        .image-text-section .image-content {
            flex: 0 0 auto;
            width: 100%;
            max-width: 600px;
        }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .news-last-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .project-image-container {
        height: 250px;
    }

    .project-card h3 {
        font-size: 1.3rem;
    }
}

@media (max-width: 768px) {
    .hero-title h1 {
        font-size: 2.2rem;
        letter-spacing: 2px;
    }

    .section-padding,
    .projects-section,
    .news-section {
        padding: 40px 20px;
    }

    .text-content h2,
    .projects-title,
    .news-title {
        font-size: 1.8rem;
        margin-bottom: 40px;
    }

    .text-content p,
    .project-card p {
        font-size: 1rem;
    }

    .text-content,
    .project-card-content,
    .news-card-content {
        padding: 20px;
    }

    .project-image-container {
        height: 220px;
    }

    .news-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .news-last-row {
        grid-template-columns: 1fr;
    }

    .image-text-section .image-content img {
        max-height: 400px;
        object-fit: cover;
    }
}

@media (max-width: 576px) {
    .hero-title h1 {
        font-size: 1.8rem;
        letter-spacing: 1px;
    }

    .text-content h2,
    .projects-title,
    .news-title {
        font-size: 1.6rem;
    }

    .project-card h3 {
        font-size: 1.2rem;
    }

    .news-card h3 {
        font-size: 1.1rem;

    }

    .image-text-section {
        gap: 30px;
        margin-bottom: 50px;
    }

    .project-image-container {
        height: 200px;
    }

    .news-image-container {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .hero-title h1 {
        font-size: 1.6rem;
    }

    .section-padding {
        padding: 30px 15px;
    }

    .projects-title {
        font-size: 1.4rem;
    }

    .project-card h3 {
        font-size: 1.1rem;
    }

    .project-image-container {
        height: 180px;
        padding: 10px;
    }

    .news-button {
        width: 100%;
        padding: 12px;
    }
}