html {
    background: #fff;
}

body {
    margin: 0;
}

main {
    width: 100%;
}

.site-header {
    background: #f5fbff;
}

.header-art {
    position: relative;
    background: #fff;
}

.template-image {
    display: block;
    width: 100%;
    height: auto;
}

.mobile-header-brand,
.mobile-header-details,
.mobile-menu-slogan {
    display: none;
}

.service-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: clamp(130px, 10vw, 190px);
    grid-template-columns: none;
    grid-template-rows: 1fr;
    justify-content: safe center;
    gap: 0.75rem;
    padding: 1rem;
    overflow-x: auto;
    scroll-snap-type: x proximity;
}

.service-card {
    position: relative;
    display: block;
    aspect-ratio: 1;
    overflow: hidden;
    border: 1px solid #d8e3eb;
    border-radius: 8px;
    background-color: #e7edf0;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    box-shadow: 0 2px 8px rgb(8 60 101 / 12%);
    transition: transform 150ms ease, box-shadow 150ms ease;
    scroll-snap-align: start;
}

.service-card::before {
    position: absolute;
    inset: 45% 0 0;
    background: linear-gradient(transparent, rgb(5 25 34 / 78%));
    content: "";
    pointer-events: none;
}

.service-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgb(8 60 101 / 20%);
}

.service-card:focus-visible {
    outline: 3px solid #083c65;
    outline-offset: 3px;
}

.service-electricity { background-image: url("../img/servicio-electricidad.jpg"); }
.service-water { background-image: url("../img/servicio-agua.jpg"); }
.service-gas { background-image: url("../img/servicio-gas.jpg"); }
.service-heating { background-image: url("../img/servicio-climatizacion.jpg"); }
.service-boilers { background-image: url("../img/servicio-calderas.jpg"); }
.service-solar { background-image: url("../img/servicio-solar.jpg"); }
.service-meters { background-image: url("../img/servicio-contadores.jpg"); }
.service-security { background-image: url("../img/servicio-videoporteros-camaras.jpg"); }

.service-paint {
    background-image: url("../../Parkcolor.jpg");
    background-position: center 60%;
    text-decoration: none;
}

.service-card-caption {
    position: absolute;
    inset: auto 0 0;
    z-index: 1;
    padding: 0.8rem 0.65rem;
    color: #fff;
    font-size: clamp(0.75rem, 0.9vw, 1rem);
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 0 1px 3px rgb(0 0 0 / 85%);
}

.project-showcase {
    margin-top: 1.5rem;
    padding: clamp(2rem, 4vw, 4rem) 1rem;
    border-top: 1px solid #dce7eb;
    background: #f4f8f9;
}

.project-showcase-inner,
.service-contact-inner {
    width: min(1120px, 100%);
    margin: 0 auto;
}

.project-showcase-heading {
    max-width: 700px;
    margin: 0 auto 1.75rem;
    text-align: center;
}

.project-showcase-eyebrow {
    margin: 0 0 0.4rem;
    color: #087cae;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.project-showcase-heading h2,
.service-contact-inner h2 {
    margin: 0;
    color: #083c65;
    font-size: clamp(1.45rem, 2.3vw, 2rem);
    line-height: 1.2;
}

.project-showcase-heading > p:last-child,
.service-contact-inner > div:first-child > p:last-child {
    margin: 0.65rem 0 0;
    color: #52616b;
    line-height: 1.55;
}

.project-showcase-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(0.75rem, 2vw, 1.5rem);
    max-width: 960px;
    margin: 0 auto;
}

.company-gallery {
    min-width: 0;
}

.gallery-cover,
.gallery-empty {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    padding: 0;
    border: 1px solid #d5e0e6;
    border-radius: 8px;
    background: #e9eff2;
}

.gallery-cover:focus-visible {
    outline: 3px solid #087cae;
    outline-offset: 3px;
}

.gallery-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-count {
    position: absolute;
    right: 0.65rem;
    bottom: 0.65rem;
    padding: 0.3rem 0.55rem;
    border-radius: 4px;
    background: rgb(0 0 0 / 72%);
    color: #fff;
    font-size: 0.85rem;
}

.gallery-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #52616b;
}

.gallery-empty .bi {
    font-size: 2rem;
}

.gallery-full-image {
    display: block;
    width: 100%;
    height: min(65vh, 680px);
    background: #182126;
    object-fit: contain;
}

.gallery-photo-caption {
    min-height: 5rem;
    padding: 0.75rem 3.5rem;
    text-align: center;
    overflow-wrap: anywhere;
}

.company-gallery-modal .carousel-control-prev,
.company-gallery-modal .carousel-control-next {
    top: 0;
    bottom: auto;
    width: 3rem;
    height: min(65vh, 680px);
}

.company-gallery-modal .carousel-control-prev-icon,
.company-gallery-modal .carousel-control-next-icon {
    border-radius: 4px;
    background-color: rgb(0 0 0 / 55%);
}

.company-gallery h3 {
    margin: 0.75rem 0 0.2rem;
    color: #173d4c;
    font-size: 1rem;
    font-weight: 700;
}

.company-gallery p {
    margin: 0;
    color: #52616b;
    font-size: 0.9rem;
    line-height: 1.4;
}

.partner-band {
    padding: 1.75rem 1rem;
    border-bottom: 1px solid #dce7eb;
    background: #fff;
    text-align: center;
}

.partner-band h2 {
    margin: 0 0 1.5rem;
    color: #52616b;
    font-size: 1.1rem;
    font-weight: 700;
}

.partner-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.partner-logo {
    width: 220px;
    max-width: 100%;
    margin: 0;
}

.partner-logo img {
    display: block;
    width: 100%;
    height: 72px;
    object-fit: contain;
}

.partner-logo figcaption {
    margin-top: 0.65rem;
    color: #52616b;
    font-size: 0.85rem;
}

.service-contact-band {
    padding: clamp(1.75rem, 3vw, 2.75rem) 1rem;
    border-top: 1px solid #dce7eb;
    background: #e8f2f4;
}

.service-contact-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.service-contact-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 0.65rem;
}

#modalConsultaWeb3 .modal-content {
    overflow: hidden;
    border: 0;
    border-radius: 8px;
    box-shadow: 0 18px 52px rgb(0 0 0 / 22%);
}

#modalConsultaWeb3 .modal-header {
    border-bottom-color: #dce7eb;
    background: #f4f8f9;
}

#modalConsultaWeb3 .modal-body {
    padding: 1.25rem;
}

.service-detail-page {
    width: min(1200px, 100%);
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
}

.service-detail-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    color: #5b6a73;
    font-size: 0.875rem;
}

.service-detail-breadcrumb a {
    color: #075f88;
    text-decoration: none;
}

.service-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: start;
    gap: clamp(1.5rem, 3vw, 3rem);
}

.service-detail-photo {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    background: #e7edf0;
    object-fit: cover;
}

.service-detail-category {
    margin: 0 0 0.5rem;
    color: #087cae;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.service-detail-copy h1 {
    margin: 0 0 1rem;
    color: #083c65;
    font-size: 2rem;
    line-height: 1.15;
}

.service-detail-description {
    color: #43535e;
    font-size: 1rem;
    line-height: 1.65;
}

.service-detail-copy h2 {
    margin: 1.5rem 0 0.75rem;
    color: #173d4c;
    font-size: 1.1rem;
}

.service-detail-points {
    display: grid;
    gap: 0.65rem;
    margin: 0;
    padding-left: 1.2rem;
    color: #43535e;
    line-height: 1.5;
}

.service-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.service-detail-attribution {
    margin-top: 1.25rem;
    color: #667780;
    font-size: 0.75rem;
    line-height: 1.5;
}

.service-detail-attribution a {
    color: #075f88;
}

@media (max-width: 767.98px) {
    body {
        display: flex;
        flex-direction: column;
    }

    .site-menu {
        order: -1;
    }

    .site-header .template-image {
        display: none;
    }

    .mobile-header-brand {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 1rem;
    }

    .mobile-header-brand img {
        flex: 0 0 76px;
        width: 76px;
        height: 60px;
        object-fit: contain;
    }

    .mobile-header-brand > div {
        min-width: 0;
    }

    .mobile-header-brand strong {
        display: block;
        color: #143b57;
        font-size: 1.125rem;
        line-height: 1.25;
    }

    .mobile-header-brand span {
        display: block;
        margin-top: 0.35rem;
        color: #52616b;
        font-size: 0.8rem;
        line-height: 1.35;
    }

    .mobile-header-details {
        display: block;
        padding: 0 1rem 0.75rem;
        text-align: center;
    }

    .mobile-group-logos {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-items: center;
        gap: 1rem;
        max-width: 360px;
        margin: 0 auto;
    }

    .mobile-group-logos img {
        display: block;
        width: 100%;
        height: 46px;
        object-fit: contain;
    }

    .mobile-header-details p {
        margin: 0.75rem 0 0;
        color: #52616b;
        font-size: 0.75rem;
        line-height: 1.4;
    }

    .mobile-menu-slogan {
        display: block;
        flex: 1 1 0;
        min-width: 0;
        margin-right: 0.65rem;
    }

    .mobile-menu-slogan img {
        display: block;
        width: 100%;
        max-width: 290px;
        height: 28px;
        object-fit: contain;
        object-position: left center;
    }

    .partner-band {
        padding: 0.75rem 1rem;
        border-top: 1px solid #c8dce4;
    }

    .partner-logos {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-items: center;
        gap: 0.75rem;
    }

    .partner-logo {
        width: auto;
        min-width: 0;
    }

    .partner-logo img {
        height: 34px;
    }

    .partner-logo figcaption {
        margin-top: 0.35rem;
        font-size: 0.7rem;
        line-height: 1.3;
        overflow-wrap: anywhere;
    }

    .service-grid {
        grid-auto-flow: row;
        grid-auto-columns: auto;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: none;
        overflow-x: visible;
        scroll-snap-type: none;
    }

    .service-card {
        aspect-ratio: 4 / 3;
        min-width: 0;
    }

    .service-card-caption {
        padding: 0.6rem;
        font-size: 0.85rem;
    }

    .service-detail-layout {
        grid-template-columns: 1fr;
    }

    .service-detail-copy h1 {
        font-size: 1.6rem;
    }
}

@media (max-width: 575.98px) {
    .service-grid {
        gap: 0.5rem;
        padding: 0.75rem;
    }

    .project-showcase-grid {
        grid-template-columns: 1fr;
    }

    .service-contact-inner {
        align-items: flex-start;
        flex-direction: column;
    }
}

.site-menu {
    padding: 0.4rem 0.6rem;
    border-top: 1px solid rgb(255 255 255 / 70%);
    border-bottom: 0;
    background: linear-gradient(180deg, rgb(255 255 255 / 18%), rgb(255 255 255 / 3%) 46%, rgb(0 0 0 / 6%) 54%, rgb(255 255 255 / 7%)), #075b7b;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 30%), inset 0 -1px 0 rgb(255 255 255 / 22%), inset 1px 0 0 rgb(255 255 255 / 35%), inset -1px 0 0 rgb(255 255 255 / 35%), 0 3px 7px rgb(0 0 0 / 14%);
}

.site-menu .navbar-nav {
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 0.2rem;
}

.site-menu .nav-link {
    padding: 0.65rem 0.4rem;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
}

.site-menu .nav-link:hover,
.site-menu .nav-link.active,
.site-menu .nav-link.show {
    color: #d6f1f5;
}

.site-menu .nav-link > .bi,
.site-menu .access-link > .bi {
    color: #fff;
    font-size: 1rem;
}

.site-menu .dropdown-item > .bi {
    display: inline-block;
    width: 1.25rem;
    color: #007abd;
    text-align: center;
}

.access-link:hover > .bi {
    color: #fff;
}

.site-menu .dropdown-menu {
    min-width: 250px;
    padding: 0.5rem;
    border: 1px solid #dce9f5;
    border-radius: 10px;
    box-shadow: 0 10px 30px #073b6520;
}

.site-menu .dropdown-item {
    padding: 0.6rem;
    border-radius: 6px;
    color: #083c65;
    font-size: 0.85rem;
    white-space: normal;
    overflow-wrap: anywhere;
}

.site-menu .dropdown-item:hover,
.site-menu .dropdown-item:focus {
    background: #e9f5ff;
}

.access-links {
    display: flex;
    gap: 0.8rem;
}

.access-link {
    padding: 0.55rem 0.6rem;
    border: 1px solid rgb(255 255 255 / 48%);
    border-radius: 7px;
    background: transparent;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
}

.access-link:hover {
    background: #fff;
    color: #075b7b;
}

.access-link-whatsapp,
.access-link-whatsapp:hover {
    border-color: #25d366;
    background: #25d366;
    color: #fff;
}

.access-link-whatsapp:hover {
    border-color: #1ebe5d;
    background: #1ebe5d;
}

.admin-login-dialog {
    max-width: 420px;
}

.admin-login-dialog .modal-content {
    position: relative;
    overflow: hidden;
    border: 0;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 52px rgb(0 0 0 / 25%);
}

.admin-login-close {
    position: absolute;
    z-index: 2;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.5rem;
    border-radius: 50%;
    background-color: #eef5f7;
    opacity: 0.9;
}

.admin-login-card {
    padding: 3.25rem clamp(1.25rem, 5vw, 2.5rem) 2rem;
}

.admin-login-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.75rem;
    color: #083c65;
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
}

.admin-login-logo {
    display: block;
    width: 120px;
    max-width: 100%;
    height: 95px;
    object-fit: contain;
}

.propietarios-registro .admin-login-dialog {
    max-width: 680px;
}

.propietarios-registro .admin-login-card {
    padding: 2rem 1.5rem 1.25rem;
}

.propietarios-registro .admin-login-brand {
    display: grid;
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 0.25rem 1rem;
    margin-bottom: 1rem;
    text-align: left;
}

.propietarios-registro .admin-login-logo {
    grid-row: 1 / 3;
    width: 80px;
    height: 64px;
}

.propietarios-registro .admin-login-brand h2 {
    align-self: end;
}

.propietarios-registro .admin-login-brand p {
    align-self: start;
}

.admin-login-card .form-label {
    color: #334c60;
    font-size: 0.9rem;
    font-weight: 600;
}

.admin-login-card .form-control {
    min-height: 46px;
    border-color: #c8d6dc;
    border-radius: 6px;
}

.admin-login-card .form-control:focus {
    border-color: #087cae;
    box-shadow: 0 0 0 0.2rem rgb(8 124 174 / 16%);
}

.admin-login-card .input-group > .form-control {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.admin-login-card .btn-primary {
    min-height: 46px;
    border-radius: 6px;
    background: #143b57;
    border-color: #143b57;
    font-weight: 700;
}

.propietarios-actions > .btn {
    flex: 1 1 140px;
    min-height: 46px;
    border-radius: 6px;
    font-weight: 600;
}

.admin-portal-dialog {
    width: calc(100% - 3rem);
    max-width: 1320px;
    height: calc(100dvh - 3rem);
    max-height: 900px;
    margin: 1.5rem auto;
}

.admin-portal-dialog .modal-content {
    display: flex;
    height: 100%;
    overflow: hidden;
    border: 0;
    border-radius: 10px;
}

.admin-portal-dialog .modal-body {
    display: flex;
    min-height: 0;
    overflow: hidden;
}

.admin-portal-header {
    display: flex;
    flex: 0 0 52px;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    border-bottom: 1px solid #dce7eb;
    background: #fff;
    color: #083c65;
}

.admin-portal-header h2 {
    font-size: 1rem;
    font-weight: 700;
}

.admin-portal-frame {
    display: block;
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    min-height: 0;
    border: 0;
}

.admin-portal-view {
    min-height: 100vh;
    background: #f4f8f9;
    color: #263b46;
}

.admin-portal-view[hidden] {
    display: none !important;
}

.admin-portal-state {
    padding: 2rem;
    color: #52616b;
    text-align: center;
}

.admin-portal-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid #dce7eb;
    background: #fff;
}

.admin-portal-toolbar-controls,
.admin-portal-user {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.admin-portal-toolbar-controls .form-select {
    width: min(420px, 48vw);
}

.admin-portal-user > span {
    color: #52616b;
    font-size: 0.9rem;
    font-weight: 600;
}

.admin-portal-content {
    display: grid;
    gap: 1rem;
    max-width: 1440px;
    margin: 0 auto;
    padding: 1.25rem;
}

.admin-portal-section {
    min-width: 0;
    padding: 1rem 1.1rem;
    border: 1px solid #dce7eb;
    border-radius: 8px;
    background: #fff;
}

.admin-portal-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.9rem;
}

.admin-portal-section-heading h1,
.admin-portal-section-heading h2 {
    margin: 0;
    color: #083c65;
    font-size: 1.1rem;
    font-weight: 700;
}

.admin-portal-section-heading p {
    margin-top: 0.25rem;
    font-size: 0.85rem;
}

.admin-portal-section .table {
    min-width: 720px;
    margin: 0;
    font-size: 0.88rem;
}

.admin-portal-view .modal-content {
    border: 0;
    border-radius: 8px;
}

.site-footer {
    padding: 1.5rem 1rem;
    background: #102e3c;
    color: #eaf3f5;
}

.site-footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 2rem;
    width: min(1200px, 100%);
    margin: 0 auto;
}

.site-footer-brand {
    display: grid;
    gap: 0.2rem;
}

.site-footer-brand strong {
    font-size: 1rem;
}

.site-footer-brand span,
.site-footer-copyright {
    color: #bfd1d8;
    font-size: 0.8rem;
}

.site-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}

.site-footer-links a {
    color: #eaf3f5;
    font-size: 0.85rem;
    text-decoration: none;
}

.site-footer-links a:hover {
    text-decoration: underline;
}

.site-menu .navbar-toggler {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
    border-color: rgb(255 255 255 / 65%);
    color: #fff;
}

.site-menu .navbar-toggler-icon {
    filter: brightness(0) invert(1);
}

.menu-label {
    font-size: 0.9rem;
    font-weight: 600;
}

@media (min-width: 1400px) {
    .site-menu .offcanvas-xxl {
        flex: 1 1 auto;
        min-width: 0;
    }

    .site-menu .navbar-toggler {
        display: none;
    }
}

@media (max-width: 1399.98px) {
    .site-menu .offcanvas-xxl {
        --bs-offcanvas-width: min(360px, calc(100vw - 2rem));
        --bs-offcanvas-bg: #075b7b;
        --bs-offcanvas-color: #fff;
    }

    .site-menu .offcanvas-header {
        border-bottom: 1px solid rgb(255 255 255 / 25%);
    }

    .site-menu .offcanvas-body {
        min-height: 0;
        padding: 0.5rem;
    }

    .site-menu .navbar-nav {
        align-items: stretch;
        padding-top: 0.5rem;
    }
    .site-menu .nav-link {
        width: 100%;
        padding: 0.75rem;
        text-align: left;
    }
    .site-menu .dropdown-menu {
        min-width: 0;
        margin: 0 0.5rem 0.5rem;
        box-shadow: none;
    }
    .access-links {
        flex-wrap: wrap;
        padding: 0.75rem;
    }

    #mainMenu .access-links {
        flex-direction: column;
        align-items: stretch;
    }

    #mainMenu .access-link {
        display: block;
        width: 100%;
        padding: 0.75rem;
        font-size: 0.85rem;
        text-align: left;
    }
}

@media (max-width: 575.98px) {
    .admin-portal-dialog {
        width: calc(100% - 1rem);
        height: calc(100dvh - 1rem);
        margin: 0.5rem auto;
    }

    .admin-login-card {
        padding: 3rem 1.25rem 1.5rem;
    }

    .site-footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-portal-toolbar {
        align-items: stretch;
        flex-direction: column;
        padding: 0.75rem;
    }

    .admin-portal-toolbar-controls .form-select {
        width: 100%;
        min-width: 0;
    }

    .admin-portal-user {
        justify-content: space-between;
    }

    .admin-portal-content {
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .admin-portal-section {
        padding: 0.75rem;
    }

    .admin-portal-section-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}
