/* ==========================================================================
   PLANTILLA MADRID SOSTENIBLE - ESTILOS GENERALES
   ========================================================================== */

.page-madrid-sostenible {
    width: 100%;
    background-color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.page-madrid-sostenible *, 
.page-madrid-sostenible *::before, 
.page-madrid-sostenible *::after {
    box-sizing: border-box;
}

/* ==========================================================================
   1. PORTADA HERO Y BREADCRUMBS INTEGRADOS
   ========================================================================== */

.sostenible-hero-header {
    position: relative;
    width: 100%;
    height: 480px;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 90px;
}

.sostenible-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.40) 100%);
    z-index: 1;
}

.sostenible-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #ffffff;
    padding: 0 20px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Título principal de la portada */
.sostenible-hero-title {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(2rem, 4.5vw, 3.6rem);
    font-weight: 300;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #ffffff !important;
    margin: 0 0 14px 0;
    line-height: 1.15;
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.4);
}

/* Migas de pan centradas */
.sostenible-hero-breadcrumbs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
}

.sostenible-hero-breadcrumbs a {
    color: rgba(255, 255, 255, 0.85) !important;
    text-decoration: none;
    transition: color 0.25s ease;
}

.sostenible-hero-breadcrumbs a:hover {
    color: #ffffff !important;
}

.sostenible-hero-breadcrumbs .sep {
    font-size: 0.8rem;
    opacity: 0.7;
}

.sostenible-hero-breadcrumbs .current {
    color: #ffffff !important;
    font-weight: 600;
}

/* ==========================================================================
   2. SECCIÓN INTRODUCCIÓN Y PILARES ESTRATÉGICOS
   ========================================================================== */

.sostenible-pilares-section {
    padding: 70px 20px;
    background-color: #ffffff;
}

.sostenible-container {
    max-width: 1140px;
    margin: 0 auto;
}

/* Texto Intro */
.sostenible-intro-text {
    text-align: center;
    max-width: 980px;
    margin: 0 auto 35px;
}

.sostenible-intro-text p {
    font-size: 1.15rem;
    line-height: 1.65;
    color: #333333;
    font-weight: 400;
}

.sostenible-intro-text p strong {
    color: #1c1c1c;
    font-weight: 700;
}

/* Divisor sutil corporativo */
.sostenible-divider {
    border: none;
    height: 1px;
    background-color: #b5798c;
    opacity: 0.6;
    margin: 0 auto 45px;
    max-width: 900px;
}

/* Header de la sección de Pilares */
.sostenible-pilares-header {
    text-align: center;
    max-width: 920px;
    margin: 0 auto 60px;
}

.sostenible-pilares-header h2 {
    font-size: 2.2rem;
    font-weight: 800;
    color: #8C1527;
    margin: 0 0 18px 0;
    letter-spacing: 1px;
}

.sostenible-pilares-header p {
    font-size: 1.05rem;
    color: #555555;
    line-height: 1.6;
    margin: 0;
}

/* Grid de Tarjetas de Pilares */
.sostenible-pilares-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    align-items: stretch;
}

/* Tarjeta Individual */
.pilar-card {
    position: relative;
    background: #ffffff;
    border-radius: 18px;
    padding: 65px 28px 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pilar-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

/* Bordes por categoría */
.pilar-card-verde { border: 1.5px solid #6c8a74; }
.pilar-card-oscuro { border: 1.5px solid #2b2b2b; }
.pilar-card-guinda { border: 1.5px solid #8C1527; }

/* Ícono Flotante Superior */
.pilar-icon-wrapper {
    position: absolute;
    top: -45px;
    left: 50%;
    transform: translateX(-50%);
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pilar-icon-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pilar-card-content {
    margin-bottom: 25px;
}

.pilar-card-title {
    font-size: 1.35rem;
    font-weight: 800;
    margin: 0 0 4px 0;
    line-height: 1.2;
}

.pilar-card-verde .pilar-card-title { color: #43644b; }
.pilar-card-oscuro .pilar-card-title { color: #1c1c1c; }
.pilar-card-guinda .pilar-card-title { color: #8C1527; }

.pilar-card-category {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: #888888;
    margin-bottom: 18px;
}

.pilar-card-desc {
    font-size: 0.92rem;
    color: #555555;
    line-height: 1.55;
    margin: 0;
}

.pilar-card-ods {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding-top: 15px;
}

.pilar-card-ods img {
    width: 46px;
    height: 46px;
    object-fit: contain;
}

/* ==========================================================================
   3. SECCIÓN ESTRUCTURA Y ACORDEÓN INTERACTIVO ASG
   ========================================================================== */

.sostenible-asg-section {
    background-color: #e6e6e6;
    padding: 60px 20px;
}

.sostenible-asg-grid {
    display: grid;
    grid-template-columns: 45% 52%;
    gap: 3%;
    align-items: center;
    margin-bottom: 50px;
}

.asg-circulo-wrapper {
    width: 100%;
    text-align: center;
}

.asg-circulo-wrapper img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.asg-accordion-wrapper {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.asg-group {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 12px 16px;
    border-radius: 12px;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.asg-group:hover {
    background: rgba(255, 255, 255, 0.45);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.asg-badge img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    flex-shrink: 0;
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.3s ease;
}

.asg-group:hover .asg-badge img,
.asg-badge:hover img {
    transform: scale(1.12) rotate(3deg);
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.15));
}

.asg-items {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.asg-acc-item {
    border-radius: 6px;
    overflow: hidden;
    transition: background 0.3s ease;
}

.asg-acc-header {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
    cursor: pointer;
    text-align: left;
}

.asg-acc-header .num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.asg-acc-header:hover .num {
    transform: scale(1.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.num-a { background-color: #5c7860; }
.num-g { background-color: #8C1527; }
.num-s { background-color: #433e3c; }

.asg-acc-header .title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.02rem;
    font-weight: 700;
    color: #1c1c1c;
    transition: color 0.25s ease, transform 0.25s ease;
}

.group-a .asg-acc-header:hover .title { color: #43644b; transform: translateX(3px); }
.group-g .asg-acc-header:hover .title { color: #8C1527; transform: translateX(3px); }
.group-s .asg-acc-header:hover .title { color: #433e3c; transform: translateX(3px); }

.asg-acc-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0, 1, 0, 1), padding 0.3s ease;
    padding: 0 0 0 38px;
}

.asg-acc-body p {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.92rem;
    line-height: 1.5;
    color: #444444;
    margin: 4px 0 10px 0;
}

.asg-acc-item.active .asg-acc-body {
    max-height: 300px;
    transition: max-height 0.4s ease-in-out;
}

/* ==========================================================================
   4. CUADRO INFERIOR ODS (MARCA IZQUIERDA CENTRADA EN SU PROPIA MITAD)
   ========================================================================== */

.asg-ods-banner {
    border: 1.5px solid #8C1527;
    border-radius: 20px;
    padding: 28px 35px 22px 35px;
    background-color: rgba(255, 255, 255, 0.5);
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.ods-banner-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 25px;
}

.ods-banner-brand {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    flex-shrink: 0;
    margin: 0 auto;
}

.ods-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.88rem;
    font-weight: 800;
    color: #8C1527;
    margin: 0 0 6px 0;
    letter-spacing: 0.2px;
    line-height: 1.25;
    text-transform: uppercase;
    text-align: center;
}

.ods-logo {
    height: 26px;
    width: auto;
    object-fit: contain;
    margin: 0 auto;
}

.ods-banner-icons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    margin: 0 auto;
}

.ods-banner-icons img {
    width: 58px;
    height: 58px;
    object-fit: contain;
    border-radius: 4px;
    transition: transform 0.2s ease;
}

.ods-banner-icons img:hover {
    transform: translateY(-2px);
}

.ods-banner-footer {
    text-align: center;
    width: 100%;
    margin-top: 2px;
}

.ods-banner-footer p {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.90rem;
    color: #333333;
    margin: 0;
    line-height: 1.35;
    letter-spacing: -0.1px;
}

.ods-banner-footer p strong {
    color: #000000;
    font-weight: 800;
}

/* ==========================================================================
   5. RESPONSIVE AVANZADO Y ADAPTATIVO (TABLETS Y MÓVILES)
   ========================================================================== */

@media (max-width: 992px) {
    /* Hero */
    .sostenible-hero-header {
        height: 380px;
        padding-top: 70px;
    }

    /* Pilares */
    .sostenible-pilares-section {
        padding: 50px 20px;
    }

    .sostenible-pilares-grid {
        grid-template-columns: 1fr;
        gap: 55px;
        max-width: 480px;
        margin: 0 auto;
    }

    .pilar-card {
        padding: 55px 24px 25px;
    }

    /* ASG Acordeón */
    .sostenible-asg-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        margin-bottom: 40px;
    }

    .asg-circulo-wrapper img {
        max-width: 380px;
        margin: 0 auto;
    }

    .asg-accordion-wrapper {
        gap: 20px;
    }

    /* ODS Banner */
    .asg-ods-banner {
        padding: 24px 20px 20px;
    }

    .ods-banner-top {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 18px;
    }

    .ods-banner-brand {
        width: 100%;
    }

    .ods-banner-icons {
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }

    .ods-banner-icons img {
        width: 48px;
        height: 48px;
    }
}

@media (max-width: 576px) {
    /* Hero */
    .sostenible-hero-header {
        height: 280px;
        padding-top: 60px;
    }

    .sostenible-hero-title {
        font-size: 1.6rem;
        letter-spacing: 1.5px;
        margin-bottom: 8px;
    }

    .sostenible-hero-breadcrumbs {
        font-size: 0.72rem;
        letter-spacing: 1px;
        gap: 6px;
    }

    /* Pilares */
    .sostenible-intro-text p {
        font-size: 0.98rem;
        line-height: 1.55;
    }

    .sostenible-pilares-header h2 {
        font-size: 1.6rem;
        margin-bottom: 12px;
    }

    .sostenible-pilares-header p {
        font-size: 0.92rem;
    }

    .pilar-card {
        padding: 48px 18px 22px;
    }

    .pilar-icon-wrapper {
        width: 75px;
        height: 75px;
        top: -38px;
    }

    .pilar-card-title {
        font-size: 1.2rem;
    }

    .pilar-card-desc {
        font-size: 0.88rem;
    }

    .pilar-card-ods img {
        width: 38px;
        height: 38px;
    }

    /* ASG Acordeón */
    .sostenible-asg-section {
        padding: 40px 15px;
    }

    .asg-group {
        padding: 8px 10px;
        gap: 12px;
    }

    .asg-badge img {
        width: 45px;
        height: 45px;
    }

    .asg-acc-header .title {
        font-size: 0.92rem;
    }

    .asg-acc-header .num {
        width: 22px;
        height: 22px;
        font-size: 0.75rem;
    }

    .asg-acc-body {
        padding-left: 32px;
    }

    .asg-acc-body p {
        font-size: 0.85rem;
    }

    /* ODS Banner */
    .asg-ods-banner {
        padding: 18px 14px;
        border-radius: 16px;
        gap: 14px;
    }

    .ods-title {
        font-size: 0.80rem;
    }

    .ods-logo {
        height: 22px;
    }

    .ods-banner-icons img {
        width: 40px;
        height: 40px;
    }

    .ods-banner-footer p {
        font-size: 0.82rem;
        line-height: 1.4;
    }
}