/* ===== COLEGIO CES SAN ANTONIO ===== */

/* ===== Loader ===== */
#loader-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #042b52;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity .4s;
}
.lds-ring {
    display: inline-block;
    position: relative;
    width: 72px;
    height: 72px;
}
.lds-ring div {
    box-sizing: border-box;
    display: block;
    position: absolute;
    width: 56px;
    height: 56px;
    margin: 8px;
    border: 8px solid #fbd404;
    border-radius: 50%;
    animation: lds-ring 1.2s cubic-bezier(0.5,0,0.5,1) infinite;
    border-color: #fbd404 transparent transparent transparent;
}
.lds-ring div:nth-child(1) { animation-delay: -0.45s; }
.lds-ring div:nth-child(2) { animation-delay: -0.3s; }
.lds-ring div:nth-child(3) { animation-delay: -0.15s; }
@keyframes lds-ring {
    0% { transform: rotate(0deg);}
    100% { transform: rotate(360deg);}
}
.loader-text {
    color: #fff;
    margin-top: 1rem;
    font-weight: 600;
    letter-spacing: 2px;
    font-size: 1.2rem;
}

/* ===== Navbar & Colores institucionales ===== */
.bg-azul, .btn-azul {
    background-color: #042b52 !important;
    color: #fff !important;
}
.text-amarillo { color: #fbd404 !important; }
.btn-amarillo {
    background-color: #fbd404 !important;
    color: #042b52 !important;
    font-weight: bold;
    border: none;
    transition: background 0.2s;
}
.btn-amarillo:hover { background-color: #ffe14c !important; color: #031e36 !important; }
.btn-outline-azul {
    border: 2px solid #042b52 !important;
    color: #042b52 !important;
    background: transparent !important;
}
.btn-outline-azul:hover { background: #042b52 !important; color: #fff !important; }
.text-azul { color: #042b52 !important; }

/* ===== Scrollspy activo ===== */
.navbar-nav .nav-link.active, .navbar-nav .nav-link.show {
    color: #fbd404 !important;
    font-weight: bold;
    background: rgba(251,212,4,0.08);
    border-radius: .25rem;
    transition: background 0.2s;
}

/* ===== Espaciado para slider debajo del menú fijo ===== */
#inicio {
    padding-top: 90px;
}

/* ===== SLIDER (Responsivo y sin salto) ===== */
#mainCarousel .carousel-inner,
#mainCarousel .carousel-item,
#mainCarousel .carousel-item-start,
#mainCarousel .carousel-item-end,
#mainCarousel .carousel-item-next,
#mainCarousel .carousel-item-prev {
    height: 60vh;
    min-height: 340px;
    max-height: 80vh;
}
#mainCarousel img {
    height: 100%;
    width: 100%;
    object-fit: cover;
}
.bg-overlay-slider {
    background: rgba(5, 35, 80, 0.52);
    box-shadow: 0 6px 32px rgba(4,43,82,0.20);
}
.text-shadow { text-shadow: 2px 2px 8px rgba(0,0,0,0.18); }
section { scroll-margin-top: 90px; }

/* ===== BLOQUES (Historia, Proyecto, Misión) ===== */
.seccion-bloques .card {
    min-height: 320px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.seccion-bloques .card:hover {
    transform: translateY(-6px) scale(1.025);
    box-shadow: 0 6px 32px rgba(4,43,82,0.16);
}
.bloque-fondo {
    background-size: cover;
    background-position: center;
    background-blend-mode: multiply;
    position: relative;
}
.bloque-catolica {
    background-image: url('https://www.colegioespiritusanto.cl/sa/includes/img/bloque-catolica.jpg');
    background-color: #042b52;
}

.bloque-comunidad-familia {
    background-image: url('https://www.colegioespiritusanto.cl/sa/includes/img/bloque-familia.jpg');
    background-color: #042b52;
}
.bloque-excelencia {
    background-image: url('https://www.colegioespiritusanto.cl/sa/includes/img/bloque-excelencia.jpeg');
    background-color: #1257a5;
}
.bloque-espiritu {
    background-image: url('https://www.colegioespiritusanto.cl/sa/includes/img/bloque-servicio.jpg');
    background-color: #fbd404;
    color: #042b52 !important;
}
.bloque-mision,
.bloque-mision .card-body,
.bloque-mision h4,
.bloque-mision p,
.bloque-mision .text-amarillo {
    color: #042b52 !important;
}
.bloque-fondo::before {
    content: '';
    position: absolute; inset: 0;
    border-radius: inherit;
    background: rgba(4,43,82,0.38);
    z-index: 1;
}


.dropdown-submenu > a:after {
    content: "";
    /* float: right; */
    font-size: 0.8em;
    margin-left: 6px;
}

.bloque-mision::before {
    background: rgba(251,212,4,0.32);
}
.bloque-fondo .card-body { position: relative; z-index: 2; }

/* ===== SECCION COLEGIO ===== */
.seccion-colegio {
    background: linear-gradient(rgba(4,43,82,0.70),rgba(4,43,82,0.82)), url('https://www.espiritusanto.cl/talcahuano/wp-content/uploads/2023/11/20231026_120250.jpg') center/cover no-repeat;
}
.seccion-colegio h3, .seccion-colegio p, .seccion-colegio a { color: #fff !important; }
.seccion-colegio .btn-amarillo { color: #042b52 !important; }
.seccion-colegio img { border: 5px solid #fff; }

/* ===== SELLOS ===== */
.seccion-sellos {
    background: linear-gradient(90deg, #fbd404 10%, #fff 90%);
}
.icon-block.bg-white,
.icon-block.bg-white h5,
.icon-block.bg-white p,
.icon-block.bg-white i {
    color: #042b52 !important;
}

/* ===== CONTACTO ===== */
.seccion-contacto {
    background: #fbd404;
    color: #042b52 !important;
}
.seccion-contacto input, .seccion-contacto textarea {
    border: 2px solid #042b52;
    background: #fff;
    color: #042b52;
}
.seccion-contacto input:focus, .seccion-contacto textarea:focus {
    border-color: #1257a5;
    outline: none;
    background: #f6f6f6;
}
.seccion-contacto .btn-azul {
    background: #042b52;
    color: #fff;
}
.seccion-contacto .btn-azul:hover { background: #1257a5; }

/* ===== FOOTER ===== */
.site-footer {
    background-size: cover;
    background-position: center;
    background: url('https://www.colegioespiritusanto.cl/sa/includes/img/footer-img.jpeg') center/cover no-repeat;
    position: relative;
    background-color: transparent !important;
}
.site-footer::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(4,43,82,0.7); /* Cambia el color y opacidad aquí */
    z-index: 0;
}
.site-footer > * {
    position: relative;
    z-index: 1;
}
.site-footer .footer-link { color: #fbd404; text-decoration: underline; }
.site-footer .footer-link:hover { color: #fff; }
.site-footer .footer-social { color: #fbd404; transition: color 0.2s; }
.site-footer .footer-social:hover { color: #fff; }

/* ===== UTILITARIOS y RESPONSIVE ===== */
.rounded-4 { border-radius: 1.2rem !important; }
@media (max-width: 900px) {
    .seccion-bloques .card-body,
    .seccion-colegio .col-md-6,
    .seccion-contacto .col-lg-6 {
        padding: 1.5rem !important;
    }
}
@media (max-width: 600px) {
    .seccion-bloques .card { min-height: 220px; }
    .seccion-bloques .card-body { padding: 1.2rem !important; }
    .seccion-colegio .btn-amarillo { font-size: 1rem; }
    .seccion-contacto img { max-height: 180px !important; }
    #mainCarousel, #mainCarousel .carousel-inner, #mainCarousel .carousel-item, #mainCarousel img {
        min-height: 180px;
        height: 32vh;
        max-height: 40vh;
    }
}

/* ===== SCROLL SUAVE ===== */
html {
    scroll-behavior: smooth;
}

/* Extra: Quitar bordes default a imágenes en IE/Edge antiguos */
img { border-style: none; }