/********** Template CSS **********/
:root {
    --primary: #25bd39;
    --secondary: #34AD54;
    --light: #EEF9FF;
    --dark: #34AD54;
}


/*** Spinner ***/
.spinner {
    width: 40px;
    height: 40px;
    background: var(--primary);
    margin: 100px auto;
    -webkit-animation: sk-rotateplane 1.2s infinite ease-in-out;
    animation: sk-rotateplane 1.2s infinite ease-in-out;
}

@-webkit-keyframes sk-rotateplane {
    0% {
        -webkit-transform: perspective(120px)
    }
    50% {
        -webkit-transform: perspective(120px) rotateY(180deg)
    }
    100% {
        -webkit-transform: perspective(120px) rotateY(180deg) rotateX(180deg)
    }
}

@keyframes sk-rotateplane {
    0% {
        transform: perspective(120px) rotateX(0deg) rotateY(0deg);
        -webkit-transform: perspective(120px) rotateX(0deg) rotateY(0deg)
    }
    50% {
        transform: perspective(120px) rotateX(-180.1deg) rotateY(0deg);
        -webkit-transform: perspective(120px) rotateX(-180.1deg) rotateY(0deg)
    }
    100% {
        transform: perspective(120px) rotateX(-180deg) rotateY(-179.9deg);
        -webkit-transform: perspective(120px) rotateX(-180deg) rotateY(-179.9deg);
    }
}

#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}


/*** Heading ***/
h1,
h2,
.fw-bold {
    font-weight: 800 !important;
}

h3,
h4,
.fw-semi-bold {
    font-weight: 700 !important;
}

h5,
h6,
.fw-medium {
    font-weight: 600 !important;
}


/*** Button ***/
.btn {
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    transition: .5s;
}

.btn-primary,
.btn-secondary {
    color: #FFFFFF;
    box-shadow: inset 0 0 0 50px transparent;
}

.btn-primary:hover {
    box-shadow: inset 0 0 0 0 var(--primary);
}

.btn-secondary:hover {
    box-shadow: inset 0 0 0 0 var(--secondary);
}

.btn-square {
    width: 36px;
    height: 36px;
}

.btn-sm-square {
    width: 30px;
    height: 30px;
}

.btn-lg-square {
    width: 48px;
    height: 48px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding-left: 0;
    padding-right: 0;
    text-align: center;
}

.logo
{
    position: relative;
    max-width: 90px;
    margin: 20px;
    padding: 2px;
}

.logo1
{
    position: relative;
    max-width: 150px;
    margin: 20px;
    padding: 2px;
}

/*** Navbar ***/
.navbar-dark .navbar-nav .nav-link {
    font-family: 'Nunito', sans-serif;
    position: relative;
    margin-left: 25px;
    padding: 35px 0;
    color: #FFFFFF;
    font-size: 18px;
    font-weight: 600;
    outline: none;
    transition: .5s;
}

.sticky-top.navbar-dark .navbar-nav .nav-link {
    padding: 20px 0;
    color: var(--dark);
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
    color: var(--primary);
}

.navbar-dark .navbar-brand h1 {
    color: #FFFFFF;
}

.navbar-dark .navbar-toggler {
    color: var(--primary) !important;
    border-color: var(--primary) !important;
}

@media (max-width: 991.98px) {
    .sticky-top.navbar-dark {
        position: relative;
        background: #FFFFFF;
    }

    .navbar-dark .navbar-nav .nav-link,
    .navbar-dark .navbar-nav .nav-link.show,
    .sticky-top.navbar-dark .navbar-nav .nav-link {
        padding: 10px 0;
        color: var(--dark);
    }

    .navbar-dark .navbar-brand h1 {
        color: var(--primary);
    }
}

@media (min-width: 992px) {
    .navbar-dark {
        position: absolute;
        width: 100%;
        top: 0;
        left: 0;
        border-bottom: 1px solid rgba(37, 189, 57, .1);
        z-index: 999;
    }
    
    .sticky-top.navbar-dark {
        position: fixed;
        background: #FFFFFF;
    }

    .navbar-dark .navbar-nav .nav-link::before {
        position: absolute;
        content: "";
        width: 0;
        height: 2px;
        bottom: -1px;
        left: 50%;
        background: var(--primary);
        transition: .5s;
    }

    .navbar-dark .navbar-nav .nav-link:hover::before,
    .navbar-dark .navbar-nav .nav-link.active::before {
        width: 100%;
        left: 0;
    }

    .navbar-dark .navbar-nav .nav-link.nav-contact::before {
        display: none;
    }

    .sticky-top.navbar-dark .navbar-brand h1 {
        color: var(--primary);
    }
}


/*** Carousel ***/
.carousel-caption {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(37, 189, 57, 0.145);
    z-index: 1;
}

@media (max-width: 576px) {
    .carousel-caption h5 {
        font-size: 14px;
        font-weight: 500 !important;
    }

    .carousel-caption h1 {
        font-size: 30px;
        font-weight: 600 !important;
    }
}

.carousel-control-prev,
.carousel-control-next {
    width: 10%;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
}


/*** Section Title ***/
.section-title::before {
    position: absolute;
    content: "";
    width: 150px;
    height: 5px;
    left: 0;
    bottom: 0;
    background: var(--primary);
    border-radius: 2px;
}

.section-title.text-center::before {
    left: 50%;
    margin-left: -75px;
}

.section-title.section-title-sm::before {
    width: 90px;
    height: 3px;
}

.section-title::after {
    position: absolute;
    content: "";
    width: 6px;
    height: 5px;
    bottom: 0px;
    background: #FFFFFF;
    -webkit-animation: section-title-run 5s infinite linear;
    animation: section-title-run 5s infinite linear;
}

.section-title.section-title-sm::after {
    width: 4px;
    height: 3px;
}

.section-title.text-center::after {
    -webkit-animation: section-title-run-center 5s infinite linear;
    animation: section-title-run-center 5s infinite linear;
}

.section-title.section-title-sm::after {
    -webkit-animation: section-title-run-sm 5s infinite linear;
    animation: section-title-run-sm 5s infinite linear;
}

@-webkit-keyframes section-title-run {
    0% {left: 0; } 50% { left : 145px; } 100% { left: 0; }
}

@-webkit-keyframes section-title-run-center {
    0% { left: 50%; margin-left: -75px; } 50% { left : 50%; margin-left: 45px; } 100% { left: 50%; margin-left: -75px; }
}

@-webkit-keyframes section-title-run-sm {
    0% {left: 0; } 50% { left : 85px; } 100% { left: 0; }
}


/*** Service ***/
.service-item {
    position: relative;
    height: 300px;
    padding: 0 30px;
    transition: .5s;
}

.service-item .service-icon {
    margin-bottom: 30px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    border-radius: 2px;
    transform: rotate(-45deg);
}

.service-item .service-icon i {
    transform: rotate(45deg);
}

.service-item a.btn {
    position: absolute;
    width: 60px;
    bottom: -48px;
    left: 50%;
    margin-left: -30px;
    opacity: 0;
}

.service-item:hover a.btn {
    bottom: -24px;
    opacity: 1;
}


/*** Testimonial ***/
.testimonial-carousel .owl-dots {
    margin-top: 15px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.testimonial-carousel .owl-dot {
    position: relative;
    display: inline-block;
    margin: 0 5px;
    width: 15px;
    height: 15px;
    background: #DDDDDD;
    border-radius: 2px;
    transition: .5s;
}

.testimonial-carousel .owl-dot.active {
    width: 30px;
    background: var(--primary);
}

.testimonial-carousel .owl-item.center {
    position: relative;
    z-index: 1;
}

.testimonial-carousel .owl-item .testimonial-item {
    transition: .5s;
}

.testimonial-carousel .owl-item.center .testimonial-item {
    background: #FFFFFF !important;
    box-shadow: 0 0 30px #DDDDDD;
}


/*** Team ***/
.team-item {
    transition: .5s;
}

.team-social {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .5s;
}

.team-social a.btn {
    position: relative;
    margin: 0 3px;
    margin-top: 100px;
    opacity: 0;
}

.team-item:hover {
    box-shadow: 0 0 30px #DDDDDD;
}

.team-item:hover .team-social {
    background: rgba(37, 189, 57, .7);
}

.team-item:hover .team-social a.btn:first-child {
    opacity: 1;
    margin-top: 0;
    transition: .3s 0s;
}

.team-item:hover .team-social a.btn:nth-child(2) {
    opacity: 1;
    margin-top: 0;
    transition: .3s .05s;
}

.team-item:hover .team-social a.btn:nth-child(3) {
    opacity: 1;
    margin-top: 0;
    transition: .3s .1s;
}

.team-item:hover .team-social a.btn:nth-child(4) {
    opacity: 1;
    margin-top: 0;
    transition: .3s .15s;
}

.team-item .team-img img,
.blog-item .blog-img img  {
    transition: .5s;
}

.team-item:hover .team-img img,
.blog-item:hover .blog-img img {
    transform: scale(1.15);
}


/*** Miscellaneous ***/
@media (min-width: 991.98px) {
    .facts {
        position: relative;
        margin-top: -75px;
        z-index: 1;
    }
}

.back-to-top {
    position: fixed;
    display: none;
    right: 45px;
    bottom: 45px;
    z-index: 99;
}

.bg-header {
    background: linear-gradient(rgba(37, 189, 57, 0.1), rgba(9, 30, 62, .7)), url(../img/coperanarecort.jpg) center center no-repeat;
    background-size: cover;
}

.link-animated a {
    transition: .5s;
}

.link-animated a:hover {
    padding-left: 10px;
}

@media (min-width: 767.98px) {
    .footer-about {
        margin-bottom: -75px;
    }
}

/* ============================================================
   COPERAÑA | Actualización visual, accesibilidad y responsive
   Mantiene la identidad y la estructura de la plantilla original.
   ============================================================ */
:root { --site-ink: #173629; --site-muted: #62736a; --site-edge: #dbe8dd; --site-soft: #f4faf5; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { min-width: 320px; color: #33453a; }
main, section, .container, .container-fluid { min-width: 0; }
img, video, iframe { max-width: 100%; }
img { height: auto; }
a { text-underline-offset: .18em; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid #58bd6d; outline-offset: 3px; }
h1, h2, h3, h4, h5, h6 { overflow-wrap: anywhere; }
p, .footer-contact-number, .footer-identity, .contact-overview-card { overflow-wrap: anywhere; }
.section-title h1 { font-size: clamp(1.8rem, 3vw, 2.55rem); line-height: 1.22; }
.section-title h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); line-height: 1.25; }
.bg-light { background-color: var(--site-soft) !important; }
.btn-primary { border-radius: 7px; }
.btn, .nav-link, .dropdown-item { transition: background-color .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.btn:hover { transform: translateY(-1px); }

/* Navegación estable, con una única instancia del menú colapsable */
.navbar { z-index: 1000; }
.navbar-brand { flex: 0 0 auto; }
.navbar-brand .logo { display: block; width: auto; max-width: 88px; max-height: 76px; object-fit: contain; margin: 6px 0; padding: 0; }
.navbar-dark .navbar-nav .nav-link { margin-left: clamp(12px, 2vw, 25px); white-space: nowrap; }
.navbar-dark .navbar-toggler { padding: .5rem .65rem; }
.navbar-dark .navbar-toggler:focus { box-shadow: 0 0 0 .2rem rgba(37,189,57,.18); }
.navbar-dark .dropdown-menu { border: 1px solid var(--site-edge); border-radius: 8px; box-shadow: 0 12px 30px rgba(4,49,22,.12); }
.navbar-dark .dropdown-item { padding: .65rem 1rem; white-space: normal; }
.navbar-dark .dropdown-item:hover, .navbar-dark .dropdown-item:focus { background: var(--site-soft); color: #166d27; }
.navbar-dark.sticky-top { box-shadow: 0 6px 18px rgba(10,44,26,.08) !important; }

/* Imágenes, bloques y cards flexibles */
.carousel-inner > .carousel-item > img { display: block; height: clamp(420px, 70vh, 730px); object-fit: cover; }
.carousel-caption { background: linear-gradient(90deg, rgba(15,44,28,.68), rgba(15,44,28,.2)); }
.carousel-caption h1 { font-size: clamp(2rem, 5.2vw, 4.9rem); line-height: 1.07; }
.carousel-caption h5 { max-width: 800px; line-height: 1.55; }
.blog-item, .service-item, .team-item { border-radius: 10px !important; }
.blog-item, .team-item { height: 100%; }
.blog-item .blog-img img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.service-item { min-height: 300px; height: auto; padding: 32px 25px; }
.service-item a.btn { bottom: -24px; opacity: 1; }
.service-item:hover a.btn { bottom: -24px; }
.back-to-top { right: 20px; bottom: 20px; display: flex !important; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transform: translateY(8px); pointer-events: none; transition: opacity .2s, visibility .2s, transform .2s; }
.back-to-top.is-visible { opacity: 1; visibility: visible; pointer-events: auto; transform: none; }

/* Contacto: bloques que comparten los datos en Inicio, Contacto y servicios */
.contact-intro { max-width: 740px; }
.contact-intro p { color: var(--site-muted); }
.contact-overview-card { display: flex; align-items: center; gap: 15px; height: 100%; min-height: 104px; padding: 20px; background: var(--site-soft); border: 1px solid var(--site-edge); border-radius: 12px; }
.contact-overview-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 10px; background: #dcefdc; color: #188335; font-size: 1.3rem; flex: 0 0 auto; }
.contact-overview-card .contact-label { font-size: .85rem; color: var(--site-muted); display: block; margin-bottom: 4px; }
.contact-overview-card a, .contact-overview-card span:last-child { font-weight: 700; color: var(--site-ink); }
.contact-panel { padding: clamp(20px, 3vw, 36px); border: 1px solid var(--site-edge); background: #fff; border-radius: 16px; }
.contact-panel-heading { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 30px; margin-bottom: 26px; }
.contact-panel-heading p { color: var(--site-muted); font-size: .92rem; }
.contact-panel-heading h3 { margin: 5px 0 0; font-size: clamp(1.4rem, 2.5vw, 1.8rem); color: var(--site-ink); }
.contact-eyebrow { font-size: .82rem; text-transform: uppercase; letter-spacing: .09em; color: #1e8d40; font-weight: 800; }
.contact-eyebrow i { margin-right: 5px; }
.contact-card { display: flex; align-items: center; gap: 14px; background: var(--site-soft); border: 1px solid var(--site-edge); border-radius: 11px; padding: 17px 18px; min-height: 104px; color: var(--site-ink); text-decoration: none; }
.contact-card-wa:hover { color: var(--site-ink); background: #eef8f0; border-color: #acd6b3; box-shadow: 0 8px 20px rgba(13,68,27,.07); }
.contact-card-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 auto; color: #187d35; background: #dcefdc; border-radius: 10px; font-size: 1.22rem; }
.contact-card-copy { min-width: 0; display: flex; flex: 1 1 auto; flex-direction: column; gap: 4px; }
.contact-card-copy strong { font-size: 1rem; line-height: 1.3; }
.contact-card-copy > span { font-size: .96rem; color: #4b6752; }
.contact-card-action { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; color: #157d36; font-size: .82rem; font-weight: 700; }
.contact-card-action i { font-size: 1.25rem; }
.contact-panel-urgent { border-color: #ebdcbf; background: #fffcf7; }
.contact-panel-urgent .contact-eyebrow { color: #94661b; }
.contact-notice { max-width: 370px; font-weight: 700; color: #855b19 !important; }
.contact-panel-urgent .contact-card { background: #fff; border-color: #f0e4d0; align-items: flex-start; }
.contact-panel-urgent .contact-card-icon { background: #fcf1d8; color: #916a22; }
.emergency-phones { display: flex !important; flex-wrap: wrap; gap: 5px 8px; }
.emergency-phones a { text-decoration: none; font-weight: 750; color: var(--site-ink); }
.emergency-phones a:hover { color: #167b34; text-decoration: underline; }
.phone-sep { color: #7d8980; font-size: .85rem; }
.contact-form { padding: clamp(18px, 3vw, 30px); background: var(--site-soft); border-radius: 12px; }
.contact-form .form-control { min-height: 52px; padding: .85rem 1rem; border: 1px solid var(--site-edge); border-radius: 7px; background: #fff; }
.contact-form textarea.form-control { min-height: 150px; resize: vertical; }
.contact-form .form-label { margin-bottom: 7px; font-size: .91rem; font-weight: 700; color: var(--site-ink); }
.contact-map { display: block; height: 100%; min-height: 415px; border: 0; }
.home-contact .contact-card { height: 100%; }
.home-emergency-strip { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 18px; padding: 20px 24px; color: #fff; background: #234a32; border-radius: 12px; }
.home-emergency-strip .btn { border-color: rgba(255,255,255,.72); white-space: normal; }
.service-contact-info { line-height: 1.7; }
.service-contact-info i { color: #118037; }
.service-contact-summary { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.service-contact-summary > div { display: flex; align-items: flex-start; gap: 13px; padding: 16px; background: var(--site-soft); border-radius: 10px; border: 1px solid var(--site-edge); min-width: 0; }
.service-contact-icon { display: grid; flex: 0 0 38px; place-items: center; width: 38px; height: 38px; border-radius: 8px; color: #187d35; background: #dcefdc; }
.service-contact-icon.emergency-icon { color: #916a22; background: #fcf1d8; }
.service-phone-list a { text-decoration: none; font-weight: 700; }
.service-contact-summary small { color: #536959; }

/* Pie: se organizan de forma clara las oficinas y guardias */
.site-footer { background: #193829 !important; font-size: .93rem; padding-bottom: 60px;}
.site-footer a { color: #e9f4eb; text-decoration: none; }
.site-footer a:hover { color: #80ee99; }
.footer-brand-logo { display: block; max-width: 125px; max-height: 116px; width: auto; object-fit: contain; }
.footer-claim { color: #cde4d2; margin: 16px 0 23px; }
.footer-identity { display: flex; align-items: flex-start; gap: 10px; margin: 10px 0; color: #e5f3e8; }
.footer-identity i { margin-top: 1px; color: #70d388; flex: 0 0 auto; }
.footer-socials { display: flex; gap: 10px; }
.footer-socials a { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; background: rgba(255,255,255,.1); font-size: 1.1rem; }
.footer-heading { font-size: 1.1rem; color: #fff; font-weight: 800; line-height: 1.35; padding-bottom: 13px; border-bottom: 2px solid rgba(112,211,136,.5); margin-bottom: 20px; }
.footer-quicklinks { display: flex; flex-direction: column; align-items: flex-start; gap: 11px; }
.footer-quicklinks a::before { content: '›'; color: #70d388; font-weight: 800; margin-right: 8px; }
.footer-small { color: #cae0d0; }
.footer-small i { color: #70d388; }
.footer-contact-list, .footer-emergency-list { padding: 0; margin: 0; list-style: none; }
.footer-contact-row + .footer-contact-row, .footer-emergency-item + .footer-emergency-item { border-top: 1px solid rgba(255,255,255,.12); }
.footer-contact-row a { display: flex; flex-direction: column; gap: 3px; padding: 10px 0; }
.footer-contact-row:first-child a { padding-top: 0; }
.footer-contact-row a > span:first-child { color: #c5d9cc; font-size: .87rem; }
.footer-contact-number { color: #fff; font-weight: 750; }
.footer-contact-number i { color: #78e494; padding-right: 4px; }
.footer-warning { color: #ffe7ad; font-size: .86rem; line-height: 1.5; font-weight: 700; }
.footer-warning i { margin-right: 3px; }
.footer-emergency-item { padding: 10px 0; }
.footer-emergency-item:first-child { padding-top: 0; }
.footer-emergency-label { color: #f1f8f2; margin-bottom: 4px; font-weight: 700; }
.footer-emergency-label i { margin-right: 4px; color: #88dba1; }
.footer-emergency-phones { display: flex; gap: 4px 8px; flex-wrap: wrap; line-height: 1.7; }
.footer-emergency-phones a { font-weight: 650; }
.footer-emergency-phones .phone-sep { color: #b5ccb9; }
.footer-regulator-logo { max-width: 140px; max-height: 75px; display: block; object-fit: contain; object-position: left center; margin-top: 15px; }
.site-footer-bottom { color: #e3f2e7; background: #10692d; }
.site-footer-bottom a { color: #fff; text-decoration: underline; }

@media (max-width: 1199.98px) {
 .navbar-dark .navbar-nav .nav-link { font-size: 16px; margin-left: 16px; }
 .contact-card-action .d-sm-inline { display: none !important; }
}
@media (max-width: 991.98px) {
 .navbar-dark, .sticky-top.navbar-dark { position: relative; background: #fff; box-shadow: 0 5px 18px rgba(0,0,0,.08); }
 .navbar.navbar-dark { padding: 10px 24px !important; }
 .navbar-brand .logo { max-width: 78px; max-height: 70px; }
 .navbar-dark .navbar-nav .nav-link, .sticky-top.navbar-dark .navbar-nav .nav-link { color: var(--site-ink); margin-left: 0; padding: 12px 8px; }
 .navbar-dark .navbar-nav .nav-link.active { color: #16872f; }
 .navbar-dark .navbar-nav { padding-top: 14px !important; }
 .navbar-dark .dropdown-menu { box-shadow: none; border: none; background: var(--site-soft); padding: 5px; margin: 0 0 8px !important; }
 .navbar-collapse { max-height: min(70vh, 590px); overflow-y: auto; }
 .bg-header { background-position: center center; }
 .contact-map { min-height: 320px; }
 [style*="min-height: 500px"] { min-height: 320px !important; }
}
@media (max-width: 767.98px) {
 .container-fluid.py-5 > .container.py-5 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
 .container-fluid.bg-header { margin-bottom: 30px !important; }
 .carousel-inner > .carousel-item > img { height: 500px; }
 .carousel-caption { padding: 20px 28px; }
 .carousel-caption h5 { font-size: .88rem; }
 .carousel-caption h1 { font-size: clamp(1.8rem, 7vw, 3.1rem); }
 .carousel-caption .btn { margin: 4px !important; font-size: .92rem; padding: 10px 14px; }
 .carousel-control-prev, .carousel-control-next { width: 7%; }
 .carousel-control-prev-icon, .carousel-control-next-icon { width: 1.65rem; height: 1.65rem; }
 .service-contact-summary { grid-template-columns: minmax(0,1fr); }
 .contact-panel-heading { align-items: flex-start; }
 .home-contact .contact-card { min-height: 92px; }
 .back-to-top { right: 13px; bottom: 13px; }
}
@media (max-width: 575.98px) {
 .navbar.navbar-dark { padding: 7px 16px !important; }
 .navbar-brand .logo { max-width: 66px; max-height: 60px; }
 .carousel-caption { padding: 12px 28px; }
 .carousel-caption h5 { font-size: .78rem; }
 .carousel-caption h1 { font-size: 1.85rem; }
 .carousel-inner > .carousel-item > img { height: 470px; }
 .carousel-caption .p-3 { padding: 0 !important; }
 .carousel-control-prev, .carousel-control-next { width: 6%; }
 .section-title::before { width: 115px; }
 .section-title h1 { font-size: 1.65rem; }
 .contact-overview-card { padding: 15px; min-height: 90px; }
 .contact-panel { padding: 17px; }
 .contact-card { gap: 10px; padding: 13px; min-height: 85px; }
 .contact-card-icon { width: 35px; height: 35px; }
 .contact-card-action { font-size: .74rem; }
 .home-emergency-strip { padding: 18px; }
 .footer-regulator-logo { max-width: 120px; }
}
@media (prefers-reduced-motion: reduce) {
 *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Refinamientos finales de contraste y logotipos */
@media (min-width: 992px) {
  .navbar-dark:not(.sticky-top) .navbar-nav .nav-link.active,
  .navbar-dark:not(.sticky-top) .navbar-nav .nav-link:hover,
  .navbar-dark:not(.sticky-top) .navbar-nav .nav-link:focus-visible { color: #fff; }
  .navbar-dark:not(.sticky-top) .navbar-nav .nav-link.active::before,
  .navbar-dark:not(.sticky-top) .navbar-nav .nav-link:hover::before { background: #fff; }
}



/* === Ajustes solicitados: navbar superpuesta, menú móvil y logo ENREGE === */
/* El logo blanco ya tiene transparencia propia: no se dibuja un recuadro. */
.footer-regulator-logo {
    box-sizing: border-box;
    background: transparent;
    padding: 0;
    border-radius: 0;
    max-width: 150px;
    max-height: 75px;
}

/* Al inicio la barra deja ver el encabezado; al desplazarse vuelve al blanco. */
.navbar.navbar-dark:not(.sticky-top):not(.menu-open) {
    background: transparent;
    box-shadow: none !important;
}

/* Inicio: las tres imágenes del carrusel ocupan el 90% del alto de desktop. */
@media (min-width: 992px) {
    #header-carousel .carousel-inner > .carousel-item > img {
        height: 90vh;
        object-fit: cover;
    }
}

@media (max-width: 991.98px) {
    /* La foto/banner comienza por detrás del logo y del botón de navegación. */
    .navbar.navbar-dark {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        background: transparent;
        border: 0;
        box-shadow: none;
        z-index: 1050;
    }
    .navbar.navbar-dark.sticky-top {
        position: fixed;
        top: 0;
        left: 0;
        background: #fff;
        box-shadow: 0 5px 18px rgba(0,0,0,.08);
    }

    /* Botón de tres líneas, construido con CSS (no requiere recursos extra). */
    .navbar-dark .navbar-toggler {
        width: 48px;
        height: 48px;
        border: 1px solid rgba(255,255,255,.75) !important;
        border-radius: 9px;
        padding: 0;
        display: grid;
        place-items: center;
        color: #fff !important;
        background: rgba(0,0,0,.12);
        box-shadow: none;
    }
    .navbar-dark.sticky-top .navbar-toggler,
    .navbar-dark.menu-open .navbar-toggler {
        color: #16872f !important;
        background: transparent;
        border-color: #b2d8b9 !important;
    }
    .navbar-dark .navbar-toggler .fa-bars {
        display: block;
        width: 26px;
        height: 26px;
        position: relative;
        font-size: 0;
        color: inherit;
    }
    .navbar-dark .navbar-toggler .fa-bars::before,
    .navbar-dark .navbar-toggler .fa-bars::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 24px;
        height: 2.5px;
        border-radius: 3px;
        background: currentColor;
        transition: transform .2s ease, opacity .2s ease, box-shadow .2s ease;
    }
    .navbar-dark .navbar-toggler .fa-bars::before {
        transform: translate(-50%, -50%);
        box-shadow: 0 -7px 0 currentColor, 0 7px 0 currentColor;
    }
    .navbar-dark .navbar-toggler .fa-bars::after {
        transform: translate(-50%, -50%);
        opacity: 0;
    }

    /* Menú a pantalla completa: fondo blanco, marca izquierda, cruz derecha. */
    body.mobile-nav-open { overflow: hidden; }
    .navbar.navbar-dark.menu-open {
        position: fixed !important;
        inset: 0;
        height: 100vh;
        height: 100dvh;
        width: 100%;
        padding-bottom: 28px !important;
        background: #fff;
        box-shadow: none !important;
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
        justify-content: flex-start;
        overflow-y: auto;
        overscroll-behavior: contain;
    }
    .navbar.menu-open .navbar-brand { align-self: flex-start; }
    .navbar-dark.menu-open .navbar-toggler {
        position: absolute;
        right: 24px;
        top: 18px;
        z-index: 2;
        border-color: transparent !important;
    }
    .navbar-dark.menu-open .navbar-toggler .fa-bars::before {
        transform: translate(-50%, -50%) rotate(45deg);
        box-shadow: none;
    }
    .navbar-dark.menu-open .navbar-toggler .fa-bars::after {
        transform: translate(-50%, -50%) rotate(-45deg);
        opacity: 1;
    }
    .navbar-dark.menu-open .navbar-collapse {
        width: 100%;
        flex-basis: auto;
        flex-grow: 0;
        max-height: none;
        overflow: visible;
        padding: 30px 4px 32px;
    }
    .navbar-dark.menu-open .navbar-nav { padding-top: 0 !important; }
    .navbar-dark.menu-open .navbar-nav .nav-link {
        display: block;
        padding: 17px 6px;
        border-bottom: 1px solid #e5eee7;
        font-size: clamp(19px, 4vw, 23px);
        font-weight: 700;
        color: var(--site-ink);
    }
    .navbar-dark.menu-open .navbar-nav .nav-link.active { color: #16872f; }
    .navbar-dark.menu-open .dropdown-menu {
        padding: 6px 12px;
        margin: 0 0 8px !important;
        background: #f4faf5;
        border: 0;
        box-shadow: none;
    }
    .navbar-dark.menu-open .dropdown-item { padding: 10px 8px; }
}
@media (max-width: 575.98px) {
    .navbar-dark.menu-open .navbar-toggler { right: 16px; top: 9px; }
}
