.hero {
    display: flex;
    position: relative;
    width: 100vw;
    height: 100vh;
}

.hero::before {
    content: "";
    position: absolute;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
    background-image: url(../assets/hero_image.jpg);
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
}

.hero-content {
    display: flex;
    position: relative;
    width: max-content;
    align-items: flex-end;
    height: 100vh;
    padding-bottom: 80px;
}

.hero-text h2 {
    font-size: 46px;
    font-weight: bolder;
    color: #e4e0e0;
    text-shadow: #2c2b2b 6px 10px 15px;
    margin-top: 60px;
    animation: fadeIn 4s;
}

.hero-text p {
    font-size: 22px;
    font-weight: 400;
    color: #e4e0e0;
    text-shadow: #2c2b2b 6px 10px 15px;
    margin-top: 20px;
    max-width: 600px;
    animation: fadeIn 4s;
}

.proposito {
    display: flex;
    width: 100vw;
    min-height: 105vh;
}

.prop-container {
    display: flex;
    flex-direction: row;
}

.left-section {
    width: 45%;
    height: 700px;
}

.left-section h2 {
    color: black;
    text-align: center;
    margin: 120px 0 60px 0;
}

.left-section p {
    font-size: 22px;
    line-height: 2rem;
    text-align: left;
}

.right-section {
    display: flex;
    width: 48%;
    justify-content: center;
    align-items: center;
    padding: 80px 0 0 80px;
}

.right-section img {
    max-width: 500px;
    border-radius: 10px;
}

.historia {
    position: relative;
    width: 100vw;
    height: 110vh;
}

.historia::before {
    content: "";
    position: absolute;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
    background-image: url(../assets/history_image.jpg);
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.historia-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    text-align: justify;
}

.historia-content h2 {
    font-size: 60px;
    color: white;
    font-weight: bolder;
    text-align: center;
    margin: 100px 0 0 0;
}

.historia-content p {
    font-size: 20px;
    color: white;
    font-weight: normal;
    margin: 80px 160px 0 160px;
    line-height: 36px;
}

/* Estilo para la sección de socios */
.socios {
    padding: 20px 0;
    /* Espaciado superior e inferior */
    background-color: #f8f9fa;
    /* Color de fondo suave */
    display: flex;
    /* Añadido para centrar el contenido */
    justify-content: center;
    /* Centrar horizontalmente */
}

.socios .container {
    max-width: 1200px;
    /* Ancho máximo para el contenedor */
    width: 100%;
    /* Asegurar que ocupe el 100% del ancho disponible */
}

.socios .row {
    margin-bottom: 20px;
    /* Espacio entre filas */
}

.socios .col-sm-3 {
    padding: 10px;
    /* Espacio interno en cada columna */
    transition: transform 0.3s;
    /* Transición suave para efectos */
    border: none;
    /* Eliminado el borde */
    border-radius: 0;
    /* Eliminado el borde redondeado */
    flex: 0 0 25%;
    /* Asegurar que cada columna ocupe el 25% del ancho */
    max-width: 22%;
    /* Asegurar que cada columna ocupe el 25% del ancho */
}

.socios .col-sm-3:hover {
    transform: scale(1.05);
    /* Efecto de aumento al pasar el mouse */
}

.socios h2 {
    color: black;
    text-align: center;
    margin-bottom: 50px;
}

.socios .container {
    padding: 80px 0;
}

.socios .container .row {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #1f1f1f;
    font-weight: 700;
    font-size: 18px;
    gap: 20px;
    width: 100%;
}

@media screen and (max-width: 768px) {
    .socios .col-sm-3 {
        flex: 0 0 50%;
        /* 2 columnas por fila en pantallas móviles */
        max-width: 40%;
    }
}

@media screen and (max-width: 1024px) and (min-width: 769px) {
    .socios .col-sm-3 {
        flex: 0 0 33.33%;
        /* 3 columnas por fila en pantallas de tablet */
        max-width: 33.33%;
        font-size: 22px;
    }
}

/*******************************/
/*********** Team CSS **********/
/*******************************/
.directiva {
    background-color: #B2CEE5;
    width: 100vw;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 20px;
    /* Añadir un poco de espacio inferior */
}

.directiva h2 {
    padding: 80px 0 20px 0;
    text-align: center;
}

.directiva h3 {
    padding: 40px;
    text-align: center;
    font-size: 40px;
    color: white;
}

@media screen and (max-width: 768px) {
    .directiva h3 {
        font-size: 34px;
    }
}

.directiva-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    max-width: 1200px;
    /* Limitar el ancho máximo */
    padding: 20px;
    /* Añadir un poco de espacio interno */
}

.directiva-container .card {
    width: 330px;
    height: 320px;
    padding: 45px 30px;
    margin: 20px;
    background: #f2f3f7;
    border-radius: 20px;
}

.directiva-container .card .content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.directiva-container .card .content .imgBx {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    position: relative;
    margin-bottom: 20px;
    overflow: hidden;
}

.directiva-container .card .content .imgBx img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.directiva-container .card .content .contentBx h4 {
    color: #135daa;
    font-size: 1.7rem;
    font-weight: bold;
    text-align: center;
    letter-spacing: 1px;
}

.directiva-container .card .content .contentBx h5 {
    color: #6c758f;
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
}

.directiva-container .card .content .sci {
    margin-top: 20px;
}

.directiva-container .card .content .sci a {
    text-decoration: none;
    color: #6c758f;
    font-size: 30px;
    margin: 10px;
    transition: color 0.4s;
}

.directiva-container .card .content .sci a:hover {
    color: #0196e3;
}

/*******************************/
/********* Decreto CSS *********/
/*******************************/

.decretos {
    display: flex;
    flex-direction: column;
    width: 100vw;
    min-height: 40vh;
}

@media screen and (max-width: 768px) {
    .decretos {
        min-height: 88vh;
    }
}


.decreto-titulo {
    display: flex;
    width: 100%;
    justify-content: center;
    margin: 10px 0;
    font-size: 50px;
    text-align: center;
    color: #1f1f1f;
}

.decreto-titulo h2 {
    padding: 80px 0 20px 0;
    text-align: center;
    color: #1f1f1f;
}

#decreto,
#estatutos {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-direction: column;
    float: left;
    width: 350px;
    height: 250px;
    z-index: 5;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 10px;
    margin: 50px 120px;
}

#decreto {
    cursor: pointer;
}


#decreto h2 {
    color: #1f1f1f;
    font-size: 50px;
    padding-bottom: 10px;
}

#decreto h3 {
    font-size: 34px;
    padding-bottom: 10px;
}

#estatutos h2 {
    font-size: 48px;
    padding: 0 0 40px 0;
    color: #1f1f1f;
}

#decreto,
#estatutos h4 {
    color: #1f1f1f;
    font-size: 18px;
}

/*******************************/
/********* Contact CSS *********/
/*******************************/
.contact {
    position: relative;
    width: 100%;
    padding: 15px 0;
    background-color: #CDE1F1;
}

.contact .contact-info {
    position: relative;
    display: flex;
    padding: 30px;
    max-width: 500px;
    background-color: #FFF;
    border: 1px solid rgba(0, 0, 0, .1);
    border-radius: 10px;
    margin-bottom: 30px;
    transition: .3s;
}

.contact .contact-info:hover {
    border-color: transparent;
    box-shadow: 0 0 30px rgba(0, 0, 0, .1);
}

.contact .contact-icon {
    position: relative;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, .1);
    border-radius: 30px;
}

.contact .contact-icon i {
    font-size: 18px;
    color: #135daa;
    ;
}

.contact .contact-text {
    position: relative;
    display: flex;
    flex-direction: column;
    padding-left: 15px;
}

.contact .contact-text h3 {
    font-size: 16px;
    font-weight: 400;
    color: #092a49;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.contact .contact-text p {
    margin: 0;
    font-size: 16px;
}

.contact .contact-form {
    position: relative;
    padding: 20px 38px;
    border: 1px solid rgba(0, 0, 0, .1);
    border-radius: 10px;
    background-color: #fff;
    margin-bottom: 30px;
    transition: .3s;
}

.control-group {
    margin-bottom: 20px;
}

.control-group label,
p {
    font-size: 16px;
    color: #1f1f1f;
    margin-bottom: 7px;
}

.contact .contact-form:hover {
    border-color: transparent;
    box-shadow: 0 0 30px rgba(0, 0, 0, .1);
}

.contact .contact-form input {
    height: 40px;
    border-radius: 5px;
    border: 2px solid #DFDFDF;
    padding: 15px;
    background: none;
}

.contact .contact-form textarea {
    height: 100px;
    padding: 8px 15px;
    background: none;
    border-radius: 5px;
    border: 2px solid #DFDFDF;
    resize: none;
}

.contact .contact-form .btn {
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
    color: #092a49;
    background: none;
    border: 2px solid #092a49;
    border-radius: 5px;
    transition: .3s;
}

.contact .contact-form .btn:hover {
    color: white;
    background: #092a49;
}

.contact .help-block ul {
    margin: 0;
    padding: 0;
    list-style-type: none;
}

/**************************************/
/************* PopUp CSS **************/
/**************************************/

.popup {
    width: 400px;
    background: #fff;
    border-radius: 6px;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.1);
    text-align: center;
    padding: 0 30px 30px;
    visibility: hidden;
    transition: transform 0.4s, top 0.4s;
}

.open-popup {
    top: 50%;
    transform: translate(-50%, -50%) scale(1);
    visibility: show;
}

.popup img {
    width: 100px;
    margin-top: -50%;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.popup h2 {
    color: #1f1f1f;
    font-size: 38px;
    font-weight: 500;
    margin: 30px 0 10px;
}

.popup p {
    margin: 20px 0;
}

.btn-popup {
    width: 100%;
    margin-top: 50px;
    padding: 10px 0;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
    background: #6fd649;
    border: 1px solid #092a49;
    border-radius: 5px;
    transition: .3s;
}

.btn-popup:hover {
    color: white;
    background: #092a49;
}

.cont-title {
    padding-top: 65px;
    text-align: center;
    width: 100%;
}

.cont-title h2 {
    color: #1f1f1f;
}

.cont-title p {
    font-size: 12px;
    color: #1f1f1f;
    margin-bottom: 65px;
}

.contacto-container {
    display: flex;
    flex-direction: column;
}

.contact-forms {
    display: flex;
    flex-direction: row;
    margin: 0 100px;
}

.cont-left-side {
    width: 50%;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
}

.contact-info {
    display: flex;
    flex-direction: row;
}

.contact-info i {
    color: #2c2b2b;
    justify-content: center;
    align-items: center;
}

.contact-info p {
    margin-left: 20px;
}

.cont-right-side {
    background-color: white;
    padding: 20px 38px;
    border-radius: 10px;
}

#info div {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

#info div label {
    font-size: 16px;
    color: #1f1f1f;
    margin-bottom: 7px;
}

#info div input {
    height: 40px;
    border-radius: 5px;
    border: 2px solid #DFDFDF;
}

.message p {
    font-size: 16px;
    color: #1f1f1f;
    margin-bottom: 7px;
}

.message textarea {
    border-radius: 5px;
    border: 2px solid #DFDFDF;
    resize: none;
}

#buttons {
    float: right;
    margin-top: 31px;
}

.btn-send {
    background-color: #005DAA;
    font-size: 16px;
    font-weight: normal;
    color: #FFF;
    border-radius: 5px;
    padding: 10px 35px;
    border: 1px solid transparent;
}

.map {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 40px 0;
}

.map iframe {
    border-radius: 10px;
}

.back-to-top {
    position: fixed;
    display: none;
    background: #135daa;
    width: 44px;
    height: 44px;
    text-align: center;
    border-radius: 25px;
    line-height: 1;
    font-size: 22px;
    right: 15px;
    bottom: 15px;
    transition: background 0.5s;
    z-index: 9;
}

.back-to-top i {
    color: #f5f5f5;
    padding-top: 10px;
}

.back-to-top:hover {
    background: #092a49;
}

.back-to-top:hover i {
    color: #2188f6;
}

@media screen and (max-width: 768px) {
    .hero::before {
        background-position-x: -120px;
    }

    .hero-content {
        width: 100%;
    }

    .hero-text h2 {
        font-size: 40px;
        font-weight: bolder;
        color: #e4e0e0;
        text-shadow: #2c2b2b 6px 10px 15px;
        margin-top: 60px;
        animation: fadeIn 4s;
    }

    .hero-text p {
        font-size: 16px;
        font-weight: 400;
        color: #e4e0e0;
        margin-top: 20px;
        max-width: 600px;
        animation: fadeIn 4s;
    }

    .prop-container {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .left-section {
        width: 100%;
        height: 450px;
    }

    .left-section h2 {
        margin: 100px 0 40px 0;
        font-size: 42px;
    }

    .left-section p {
        font-size: 16px;
        margin: 30px 20px;
    }

    .right-section {
        width: 100%;
        padding: 100px 0;
    }

    .right-section img {
        max-width: 350px;
    }

    .historia {
        height: auto;
    }

    .historia-content h2 {
        font-size: 42px;
        margin: 40px 0 0 0;
    }

    .historia-content p {
        font-size: 16px;
        margin: 20px;
    }

    .col-6 {
        padding-bottom: 25px;
    }

    .socios {
        height: auto;
    }

    .socios h2 {
        font-size: 42px;
    }

    .socios .container .row {
        font-size: 16px;
        margin: 0 auto;
    }

    .directiva {
        height: 292vh;
        min-height: auto;
        /* Ajustar la altura automáticamente */
        padding-bottom: 20px;
        /* Añadir un poco de espacio inferior */
    }

    .directiva h2 {
        padding: 40px 0 20px 0;
        font-size: 42px;
    }

    .decreto {
        flex-direction: column;
        justify-content: center;
        padding-top: 500px;
    }

    .decretos .container {
        display: flex;
        flex-direction: column;
    }

    #decreto,
    #estatutos {
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        margin: 40px auto;
    }

    .cont-title {
        padding-top: 30px;
    }
}

@media screen and (max-width: 1024px) {
    .col-sm-2 {
        font-size: 16px;
    }
}

@media screen and (min-width: 768px) {
    .historia-content p {
        margin: 80px 0 0 0;
    }

    .grid {
        display: grid;
        grid-gap: 16px;
        grid-template-columns: repeat(4, 1fr);
    }
}

@media screen and (min-width: 1024px) {
    .hero-text h2 {
        font-size: 72px;
        font-weight: bolder;
        color: #e4e0e0;
        text-shadow: #2c2b2b 6px 10px 15px;
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

/* Grow */
.hvr-grow {
    display: inline-block;
    vertical-align: middle;
    transform: translateZ(0);
    box-shadow: 0 0 1px rgba(0, 0, 0, 0);
    backface-visibility: hidden;
    -moz-osx-font-smoothing: grayscale;
    transition-duration: 0.3s;
    transition-property: transform;
}

.hvr-grow:hover,
.hvr-grow:focus,
.hvr-grow:active {
    transform: scale(1.1);
}

/**************************************/
/************* Instagram **************/
/**************************************/

.ig-header {
    text-align: center;
    margin-bottom: 20px;
}

.ig-header img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.grid-item {
    background-color: #fff;
    border: 1px solid #dbdbdb;
    border-radius: 3px;
    overflow: hidden;
}

.grid-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.grid-item-content {
    padding: 10px;
}

.grid-item-title {
    font-weight: bold;
    margin-bottom: 5px;
}

.load-more {
    display: block;
    width: 200px;
    margin: 20px auto;
    padding: 10px;
    background-color: #0095f6;
    color: #fff;
    text-align: center;
    text-decoration: none;
    border-radius: 5px;
}

/**************************************/
/********** Optocon Popup CSS *********/
/**************************************/

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    /* Smooth fade out: 1s duration, visibility waits 1s before hiding */
    transition: opacity 1s ease, visibility 0s 1s;
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
    /* Faster fade in: 0.3s, visibility changes immediately */
    transition: opacity 0.3s ease, visibility 0s;
}


.popup-content {
    position: relative;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.4);
    max-width: 500px; /* Reduced width for better text layout */
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center; /* Center all text */
    animation: popupSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes popupSlideUp {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 768px) {
    .popup-content {
        width: 85%;
        max-width: 340px;
        padding: 25px 20px;
    }

    .popup-logo {
        max-width: 160px;
        margin-bottom: 15px;
    }

    .popup-title {
        font-size: 20px;
        margin-bottom: 15px;
    }

    .popup-subtitle {
        font-size: 16px;
        margin-bottom: 15px;
    }

    .popup-date {
        font-size: 18px;
    }
}

.popup-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.popup-title {
    font-size: 24px;
    font-weight: normal;
    color: #000;
    margin-bottom: 20px;
    font-family: sans-serif;
}

.popup-logo {
    max-width: 250px;
    height: auto;
    display: block;
}

.popup-subtitle {
    font-size: 20px;
    font-weight: 700;
    color: #1f1f1f;
    margin-bottom: 25px;
    text-transform: uppercase;
    line-height: 1.3;
}

.popup-date {
    font-size: 22px;
    margin-bottom: 20px;
    color: #1f1f1f;
}

.popup-location {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #1f1f1f;
}

.popup-city {
    font-size: 16px;
    font-weight: normal;
    color: #1f1f1f;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 32px;
    border: none;
    background: none;
    cursor: pointer;
    color: #666;
    z-index: 10;
    line-height: 1;
}

.close-btn:hover {
    color: #000;
}