/* ===================================================================
 *  energia-renovable.css
 *  Estilos específicos y únicos para la página de Energía Renovable.
 * =================================================================== */

/* --- Estilos Generales de Sección --- */
.section-padding {
    padding-top: 100px;
    padding-bottom: 100px;
}

.section-title {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.subtitle {
    display: block;
    color: #011954;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

/* --- Cabecera de Página --- */
#page-header {
    position: relative;
    height: 50vh;
    min-height: 350px;
    background-image: url('../imagenes/cabecera.jpg');
    background-size: cover;
    background-position: center center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

#page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
}

#page-header .page-title {
    position: relative;
    color: white;
    font-weight: 500;
    font-size: 3.5rem;
}

/* --- Sección de Contadores Estilo "Alert" --- */
.counters-alert-section {
    padding-top: 60px;
    padding-bottom: 20px;
}

.counters-alert-box {
    background-color: #011954;
    color: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(1, 25, 84, 0.3);
}

.counters-alert-box .stat-item h3 {
    font-family: 'Rubik', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0;
    color: #ffffff;
}

.counters-alert-box .stat-item p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 5px;
}

/* --- Sección de Beneficios (Tarjetas Superpuestas) --- */
.benefits-stack {
    position: relative;
    padding-top: 20px;
    padding-left: 20px;
}

.benefit-card {
    background-color: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    border: 1px solid #e9ecef;
}

.benefit-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.benefit-card h3 i {
    color: #28a745;
    margin-right: 15px;
}

.benefit-card:nth-child(2) {
    transform: translateX(20px) translateY(-15px) scale(0.95);
    z-index: -1;
    opacity: 0.8;
}

.benefit-card:nth-child(3) {
    transform: translateX(40px) translateY(-30px) scale(0.90);
    z-index: -2;
    opacity: 0.6;
}

/* --- Sección Tipos de Soluciones --- */
.circular-image-wrapper {
    width: 100%;
    padding-top: 100%;
    position: relative;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.circular-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.solutions-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.solutions-list li a {
    display: flex;
    align-items: center;
    padding: 20px;
    margin-bottom: 15px;
    background-color: #fff;
    border-radius: 12px;
    text-decoration: none;
    color: #555;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.solutions-list li a:hover {
    transform: translateX(10px);
    border-color: var(--azul);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.solutions-list .icon-box {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    background-color: #0119541a;
    color: #011954;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-right: 20px;
}

.solutions-list h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

/* --- Sección Final con Imágenes Superpuestas --- */
.final-composition-wrapper {
    position: relative;
    padding-bottom: 100px;
}

.final-image-large {
    width: 65%;
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.final-image-large img {
    width: 100%;
    height: auto;
    display: block;
}

.final-image-stack {
    position: absolute;
    top: 0;
    right: 0;
    width: 45%;
}

.final-image-stack img {
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    display: block;
}

.final-image-stack img:first-child {
    margin-bottom: 1.5rem;
}

.final-text-block {
    position: absolute;
    bottom: 0;
    left: 40%;
    width: 60%;
    background-color: #fff;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.final-text-block .section-title {
    font-size: 2.2rem;
}

@media (max-width: 991px) {

    .final-composition-wrapper,
    .final-image-large,
    .final-image-stack,
    .final-text-block {
        position: relative;
        width: 100%;
        left: auto;
        right: auto;
        bottom: auto;
        top: auto;
    }

    .final-image-stack {
        margin-top: 1.5rem;
    }

    .final-text-block {
        margin-top: -50px;
    }
}

/* --- SECCIÓN CTA FINAL CON CINTA MÓVIL (CORREGIDO) --- */
.final-cta-section {
    padding: 100px 0;
    background-color: #f8f9fa;
}

.final-cta-section .cta-icon {
    font-size: 3rem;
    color: #011954;
    margin-bottom: 1.5rem;
}

.final-cta-section .cta-title {
    font-size: 2.5rem;
    font-weight: 700;
}

.final-cta-section .cta-subtitle {
    font-size: 1.2rem;
    color: #6c757d;
    margin-bottom: 2.5rem;
}

.ticker-wrap {
    max-width: 90%;
    /* Ancho del recuadro */
    margin: 0 auto 2.5rem auto;
    /* Centrado y con margen inferior */
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 1rem 0;
    overflow: hidden;
    /* Oculta el texto que se sale del recuadro */
    white-space: nowrap;
}

.ticker-content {
    display: inline-block;
    animation: ticker-scroll 20s linear infinite;
}

.ticker-content span {
    font-size: 1.2rem;
    font-weight: 500;
    color: #adb5bd;
    padding: 0 2rem;
}

@keyframes ticker-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.final-cta-section .btn-primary {
    background-color: #28a745;
    border-color: #28a745;
    padding: 12px 30px;
    font-weight: 700;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.final-cta-section .btn-primary:hover {
    background-color: #218838;
    border-color: #1e7e34;
    transform: translateY(-2px);
}


/* --- ESTILOS DEL BOTÓN DE VIDEO FIJO --- */
.btn-video {
    display: block;
    background: #e61a21;
    color: #fff;
    text-align: center;
    padding: 10px 0;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.btn-video:hover {
    background-color: #011954;
    color: #fff;
}

.btn-video i {
    margin-right: 8px;
}
/* --- Estilos para el Modal de Video Elegante --- */

/* Fondo semitransparente con efecto blur */
.modal-backdrop {
    background-color: rgba(1, 25, 84, 0.8); /* Azul corporativo oscuro y semitransparente */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.modal-backdrop.show {
    opacity: 1 !important; /* Asegura que el backdrop sea visible */
}

/* Animación de entrada para el fondo */
.modal.fade .modal-backdrop {
    transition: opacity 0.4s ease-out;
}

/* Contenedor del video */
#videoModal .modal-content {
    background: #000; /* Fondo negro para el video */
    border: none;
    border-radius: 16px; /* Bordes redondeados */
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
}

#videoModal .modal-body {
    padding: 0;
    position: relative;
}

/* El iframe del video */
#videoModal iframe {
    border: none;
    border-radius: 16px; /* Asegura que el iframe también tenga bordes redondeados */
    display: block;
}

/* Botón de cerrar mejorado */
#videoModal .btn-close {
    position: absolute;
    top: -40px;      /* Posicionado fuera del modal, arriba a la derecha */
    right: -10px;
    z-index: 1056;     /* Asegura que esté por encima de todo */
    background-color: #fff;
    border-radius: 50%;
    padding: 10px;
    opacity: 0.9;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

#videoModal .btn-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Animación de entrada para el modal */
.modal.fade .modal-dialog {
    transform: translateY(-50px);
    transition: transform 0.4s ease-out;
}
.modal.show .modal-dialog {
    transform: translateY(0);
}

/* Ajuste para móviles */
@media (max-width: 767px) {
    #videoModal .btn-close {
        top: -35px;
        right: 0;
    }
}