/* MAIN */
body {
    font-family: DM Sans, sans-serif;
    font-size: 1.1rem;
    line-height: 1.6;
}

:root {
    --bs-font-sans-serif: 'Inter', sans-serif;
    --rs-blue-900: #062b55;
    --rs-blue-800: #063971;
    --rs-blue-700: #0050a0;
    --rs-blue-600: #1e40b4;
    --rs-blue-500: #4562d4;
    --rs-surface: #ffffff;
    --rs-surface-soft: #f3f6f8;
    --rs-border: #d9e2ec;
    --rs-text: #1f2933;
    --rs-muted: #52606d;
    --rs-shadow-sm: 0 0.5rem 1.25rem rgba(15, 23, 42, 0.08);
    --rs-shadow-md: 0 1rem 2.5rem rgba(15, 23, 42, 0.12);
}

body {
    font-family: var(--bs-font-sans-serif);
    color: var(--rs-text);
    text-rendering: optimizeLegibility;
    background: #fff;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    text-underline-offset: 0.18em;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    letter-spacing: 0;
}

h1 {
    line-height: 1.08;
}

p {
    color: inherit;
}

.container.text-center > p,
.container > p.text-center,
.text-center > p {
    margin-left: auto;
    margin-right: auto;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.btn:focus-visible,
.nav-link:focus-visible,
.dropdown-item:focus-visible {
    outline: 3px solid #80b7ff;
    outline-offset: 3px;
    box-shadow: none;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: 1rem;
    z-index: 1100;
    transform: translateY(-150%);
    background: #063971;
    color: #fff;
    padding: .65rem .9rem;
    border-radius: .35rem;
    text-decoration: none;
}

.skip-link:focus {
    transform: translateY(0);
}

main:focus {
    outline: none;
}

/* MAIN MENU */
.navbar-nav .nav-link {
    color: #111827!important;
    transition: background-color 0.1s ease;
    padding: 8px 8px;
    border-radius: 4px;
}

.navbar-nav .nav-item.dropdown {
    display: flex;
    align-items: center;
    gap: 3px;
}

.navbar-nav .nav-dropdown-link {
    flex: 1 1 auto;
}

.navbar-nav .nav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border: 0;
    background: transparent;
    min-height: 40px;
}

.navbar-nav .nav-dropdown-toggle::after {
    margin-left: 0;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--rs-blue-900)!important;
    background-color: #e2ebf7;
}

@media (min-width: 992px) {
    .navbar-expand-lg .navbar-nav .nav-item.dropdown {
        display: block;
    }

    .navbar-expand-lg .navbar-nav {
        gap: 4px;
    }

    .navbar-expand-lg .navbar-nav .nav-link {
        padding-left: 12px;
        padding-right: 12px;
    }

    .navbar-expand-lg .navbar-nav .nav-dropdown-toggle {
        display: none;
    }

    .navbar-expand-lg .navbar-nav .nav-dropdown-link.dropdown-toggle::after {
        margin-left: .45rem;
    }
}

@media (min-width: 992px) and (hover: hover) and (pointer: fine) {
    .navbar-nav .nav-item.dropdown:hover > .nav-link:focus-visible {
        outline: 0;
        box-shadow: none;
    }

    .navbar-nav .dropdown-menu {
        margin-top: 0;
    }
}

@media (max-width: 991.98px) {
    .navbar-nav .nav-dropdown-link.dropdown-toggle::after {
        display: none;
    }

    .navbar-nav .nav-item.dropdown {
        flex-wrap: wrap;
        width: 100%;
    }

    .navbar-nav .nav-item.dropdown .dropdown-menu {
        flex: 0 0 100%;
        width: 100%;
        margin-top: 4px;
    }

    .navbar-nav .nav-dropdown-toggle {
        width: 48px;
        min-height: 44px;
        padding-left: 0;
        padding-right: 0;
    }

    .navbar-nav .nav-dropdown-toggle:hover {
        background-color: transparent;
    }
}

.dropdown-menu {
    border-top: 4px solid #1e40b4;
    border-radius: 0;
    box-shadow: 0 0.75rem 1.5rem rgba(15, 23, 42, 0.12);
}

.dropdown-menu .dropdown-item {
    color: #111827;
    transition: background-color 0.1s ease;
    padding: 10px 20px;
}

.dropdown-menu .dropdown-item:hover {
    background-color: #e2ebf7;
}

.hero-bg {
    background-attachment: fixed;
}

header.position-relative .bg-dark-blue {
    background: linear-gradient(90deg, rgba(4, 21, 42, 0.78), rgba(4, 21, 42, 0.44) 52%, rgba(4, 21, 42, 0.18));
    opacity: 1!important;
}

header .bg-dark-blue-overlay {
    background: transparent;
}

header.position-relative .container.text-center {
    max-width: 980px;
}

header.home-hero .container.text-center {
    text-align: left!important;
}

header.position-relative h1 {
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
    font-size: clamp(2.35rem, 5vw, 4.65rem);
    font-weight: 800;
}

header.home-hero h1 {
    margin-left: 0;
    margin-right: 0;
}

header.position-relative p.fs-5,
header.position-relative .fs-5 {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
    color: rgba(255, 255, 255, 0.92);
    font-size: clamp(1.2rem, 1.6vw, 1.4rem)!important;
    line-height: 1.45;
}

header.home-hero p.fs-5,
header.home-hero .fs-5 {
    margin-left: 0;
    margin-right: 0;
}

header.bg-dark-blue {
    background: linear-gradient(135deg, var(--rs-blue-900), var(--rs-blue-700))!important;
}

header.bg-dark-blue .container > p {
    margin-left: auto;
    margin-right: auto;
}

main > header.bg-dark-blue {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding-top: 3.5rem!important;
    padding-bottom: 3.5rem!important;
    background:
        radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.16), transparent 24rem),
        linear-gradient(135deg, var(--rs-blue-900), var(--rs-blue-700))!important;
}

main > header.bg-dark-blue::after {
    content: "";
    position: absolute;
    inset: 0 0 0 52%;
    background: rgba(255, 255, 255, 0.08);
    clip-path: polygon(28% 0, 100% 0, 100% 100%, 0 100%);
    z-index: -1;
}

main > header.bg-dark-blue h1 {
    font-size: clamp(2.1rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 1rem;
}

main > header.bg-dark-blue p {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
}

/* Contenedor de cada servicio con imagen de fondo */
.service-box {
    position: relative;
    background-color: #fff;
    background-size: 0 0;
    background-position: center;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-end;
    padding: 240px 0 0;
    border-radius: 8px;
    overflow: hidden; /* Asegura que la capa no se salga */
    box-shadow: var(--rs-shadow-sm);
    isolation: isolate;
    transform: translateY(0);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.service-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 240px;
    background-image: inherit;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    z-index: 1;
}

/* Caja de contenido con fondo blanco */
.content-box {
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    position: relative;
    background: #fff;
    padding: 1.2rem 1.15rem 1.25rem;
    border-radius: 0;
    box-shadow: none;
    max-width: 100%;
    width: 100%;
    z-index: 2; /* Para asegurarnos de que el texto esté sobre la capa translúcida */
    border-top: 4px solid var(--rs-blue-600);
    box-sizing: border-box; 
    flex: 1 1 auto;
    text-align: left;
}

.content-box h3,
.content-box h4 {
    color: #00345f;
    font-size: 1.35rem!important;
    line-height: 1.2;
}

.content-box p {
    color: #334155;
    font-size: 1.04rem;
    line-height: 1.5;
}

.service-box:hover {
    transform: translateY(-4px);
    box-shadow: var(--rs-shadow-md);
}

.card-img-top {
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.value-icon {
    aspect-ratio: auto;
    object-fit: contain;
}

.about-image {
    border-radius: 8px;
}

.content-box:hover {
    transform: none;
}

.btn-primary {
    background-color: var(--rs-blue-600);
    border-color: var(--rs-blue-600);
    box-shadow: 0 0.35rem 0.9rem rgba(30, 64, 180, 0.18);
    font-weight: 600;
}

.btn-primary:hover {
    background-color: var(--rs-blue-500);
    border-color: var(--rs-blue-500);
    color: #fff;
    box-shadow: 0 0.5rem 1.15rem rgba(30, 64, 180, 0.24);
    transform: translateY(-1px);
}

.btn-outline-primary {
    color: #1e40b4;           /* texto */
    border-color: #1e40b4;    /* borde */
}

.btn-outline-primary:hover {
    background-color: #1e40b4; /* fondo al pasar el ratón */
    color: #fff;               /* texto blanco al hover */
    border-color: #1e40b4;     /* borde igual */
}

.btn-outline-mitsubishi {
    color: #cd1a1a; /* color del texto */
    border-color: #cd1a1a; /* color del borde */
}

.btn-outline-mitsubishi:hover {
    background-color: #cd1a1a; /* color al pasar el cursor */
    color: #fff; /* color del texto al hacer hover */
}


.btn-outline-daikin {
    color: #0097e0; /* color del texto */
    border-color: #0097e0; /* color del borde */
}

.btn-outline-daikin:hover {
    background-color: #0097e0; /* color al pasar el cursor */
    color: #fff; /* color del texto al hacer hover */
}


.btn-outline-climaveneta {
    color: #00519c; /* color del texto */
    border-color: #00519c; /* color del borde */
}

.btn-outline-climaveneta:hover {
    background-color: #00519c; /* color al pasar el cursor */
    color: #fff; /* color del texto al hacer hover */
}

.official-service {
    position: relative;
    overflow: hidden;
}

.official-service::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0));
    pointer-events: none;
}

.official-service .container {
    position: relative;
}

.official-service-intro {
    max-width: 68ch;
    color: #334155;
    font-size: 1.12rem;
}

.official-service-points {
    display: grid;
    gap: .75rem;
}

.official-service-points span {
    display: flex;
    align-items: center;
    gap: .65rem;
    color: var(--rs-blue-900);
    font-weight: 700;
}

.official-service-points span::before {
    content: "";
    width: .65rem;
    height: .65rem;
    border-radius: 999px;
    background: var(--rs-blue-600);
    box-shadow: 0 0 0 .3rem rgba(30, 64, 180, 0.12);
    flex: 0 0 auto;
}

.mitsubishi-box, .daikin-box, .climaveneta-box {
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    border-radius: 8px!important;
    border: 1px solid var(--rs-border)!important;
    box-sizing: border-box; 
    height: 100%;
    box-shadow: var(--rs-shadow-sm)!important;
}

.brand-service-card {
    display: flex;
    min-height: 285px;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.brand-logo-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 88px;
    margin-bottom: .75rem;
}

.brand-service-logo {
    display: block;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.mitsubishi-box .brand-service-logo {
    height: 68px;
}

.daikin-box .brand-service-logo {
    height: 52px;
}

.climaveneta-box .brand-service-logo {
    height: 48px;
    max-width: 88%;
}

.brand-service-card h3 {
    margin-bottom: .75rem;
    font-weight: 750;
    line-height: 1.2;
}

.brand-service-card p {
    color: #475569;
    margin-bottom: 1.25rem;
}

.mitsubishi-box:hover,
.daikin-box:hover,
.climaveneta-box:hover {
    transform: translateY(-4px);
    box-shadow: var(--rs-shadow-md)!important;
}

.mitsubishi-box:hover {
  border-color: #cd1a1a; /* Rojo Mitsubishi */
}

.daikin-box:hover {
  border-color: #0097e0; /* Azul Daikin */
}

.climaveneta-box:hover {
  border-color: #00519c; /* Azul Climaveneta */
}


.hr-blue {
    width: 112px;
    height: 4px;
    background: linear-gradient(90deg, var(--rs-blue-900), var(--rs-blue-600), #5aa9e6);
    border: none;
    margin: 0.5rem 0;
    border-radius: 2px;
    opacity: 1;
}

.hr-dark {
    width: 112px;
    height: 4px;
    background: linear-gradient(90deg, var(--rs-blue-900), var(--rs-blue-600), #5aa9e6);
    border: none;
    margin: 0.5rem 0;
    border-radius: 2px;
    opacity: 1;
}

.bg-light-gray {
    background-color: #e3e4e5;
}

.bg-light-blue {
    background-color: var(--rs-surface-soft);
}

.bg-dark-blue {
    background-color: var(--rs-blue-700);
}

.bg-dark-blue-overlay {
    background-color: rgba(0, 80, 160, 0.85);
}

.bg-mitsubishi {
    background-color: #cd1a1a;
}

.bg-daikin {
    background-color: #0097e0;
}

.bg-climaveneta {
    background-color: #00519c;
}

.text-dark-blue {
    color: var(--rs-blue-800);
}

.card {
    border-radius: 8px!important;
}

.archive-card,
.project-card {
    height: 100%;
    border: 1px solid var(--rs-border)!important;
    box-shadow: var(--rs-shadow-sm)!important;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.archive-card:hover,
.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--rs-shadow-md)!important;
}

.archive-card .card-img-top,
.project-card .card-img-top {
    aspect-ratio: 3 / 2;
    object-position: center;
    border-radius: 0!important;
    margin: -1rem -1rem 0;
    width: calc(100% + 2rem);
    max-width: calc(100% + 2rem);
}

.archive-card .card-body,
.project-card .card-body {
    display: flex;
    flex-direction: column;
    text-align: left!important;
    min-height: 185px;
    padding-bottom: 1rem;
    padding-left: 1rem;
    padding-right: 1rem;
}

.archive-card h5,
.project-card h5,
.project-card h3 {
    color: var(--rs-blue-900);
    font-weight: 700;
    line-height: 1.25;
}

.archive-card p,
.project-card p {
    color: var(--rs-muted);
    flex-grow: 1;
    font-size: 1rem;
    line-height: 1.5;
}

.archive-card .btn,
.project-card .btn {
    align-self: flex-start;
}

.text-mitsubishi {
    color: #cd1a1a;
}

.text-daikin {
    color: #0097e0;
}

.text-climaveneta {
    color: #00519c;
}

.service-brand-intro .container {
    text-align: center;
}

.service-brand-intro h2,
.service-brand-intro p {
    margin-left: auto;
    margin-right: auto;
}

.service-brand-intro h2 {
    max-width: 820px;
}

.service-brand-intro p {
    max-width: 860px;
}

.letter-spacing {
    letter-spacing: 1px;
}

.site-footer {
    background:
        radial-gradient(circle at 12% 12%, rgba(255, 255, 255, 0.12), transparent 22rem),
        linear-gradient(135deg, #081f3d, #0b376a 62%, #102840);
}

.footer-brand {
    font-size: 1.65rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.footer-summary {
    max-width: 36ch;
    color: rgba(255, 255, 255, 0.78);
}

.footer-contact-list {
    margin-top: 1.25rem;
}

.footer-contact {
    display: flex;
    flex-wrap: wrap;
    gap: .85rem;
    align-items: center;
    margin-top: 1.5rem;
}

.footer-contact span {
    color: rgba(255, 255, 255, 0.72);
    font-size: .95rem;
}

.footer-small,
.footer-link {
    font-size: 15px;
}

.site-footer h6 {
    color: rgba(255, 255, 255, 0.78);
    margin-bottom: 1rem;
}

.site-footer li + li {
    margin-top: .55rem;
}

.footer-link {
    color: rgba(255, 255, 255, 0.82)!important;
}

.footer-link:hover,
.footer-link:focus-visible,
.footer-legal a:hover,
.footer-legal a:focus-visible {
    text-decoration: underline!important;
    color: #fff!important;
}

.footer-legal-bar {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem max(1rem, calc((100vw - 1320px) / 2));
    background: rgba(2, 12, 27, 0.35);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-legal {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.76);
}

/* Paginación colores primary */
.pagination .page-link {
    color: #1e40b4;        /* color de los números y enlaces */
    border-color: #1e40b4; /* borde */
}

.pagination .page-link:hover {
    background-color: #1e40b4; /* fondo al pasar el ratón */
    color: #fff;               /* texto blanco */
    border-color: #1e40b4;
}

.pagination .page-item.active .page-link {
    background-color: #1e40b4; /* fondo del número activo */
    color: #fff;               /* texto blanco */
    border-color: #1e40b4;
}

.bg-cover {
    background-size: cover;
}

.bg-center {
    background-position: center;
}

.parallax-layer {
    background-attachment: fixed;
}

/* Scale-in-center animation */
.hidden-scale-in-center {
  opacity: 0;
  transform: translateY(16px);
}

.scale-in-center {
  animation: scale-in-center 0.42s ease-out both;
}

@keyframes scale-in-center {
  0% {
    transform: translateY(16px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Scale-in-left animation */
.hidden-scale-in-left {
  opacity: 0;
}

.scale-in-left {
  animation: scale-in-left 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

@keyframes scale-in-left {
  0% {
    transform: scale(0);
    transform-origin: 0 50%;
    opacity: 1;
  }
  100% {
    transform: scale(1);
    transform-origin: 0 50%;
    opacity: 1;
  }
}

/* TINY SLIDER */
.tns-outer [data-controls=prev] {
    margin-right: 10px
}

.tns-controls button {
    color: #343a40!important;
    background-color: transparent!important;
    border: 1px solid #343a40!important;
    padding: 5px 20px
}

.tns-controls button:hover {
    color: #fff!important;
    background-color: #343a40!important;
    border: 1px solid #343a40!important
}

@media (max-width: 767.98px) {
    body {
        font-size: 1rem;
    }

    .navbar-brand img {
        width: 220px;
        height: auto;
    }

    .hero-bg,
    .parallax-layer,
    header .bg-cover {
        background-attachment: scroll!important;
    }

    header h1 {
        font-size: clamp(2rem, 10vw, 2.6rem);
    }

    header.position-relative .container.text-center {
        text-align: center!important;
    }

    header.position-relative p.fs-5,
    header.position-relative .fs-5 {
        font-size: 1.12rem!important;
        line-height: 1.45;
    }

    main > header.bg-dark-blue {
        padding-top: 2.75rem!important;
        padding-bottom: 2.75rem!important;
    }

    .official-service-points {
        gap: .6rem;
    }

    .service-box {
        padding-top: 215px;
    }

    .service-box::before {
        height: 215px;
    }

    .content-box {
        max-width: 100%;
        padding: 1.1rem;
    }

    .archive-card .card-body,
    .project-card .card-body {
        min-height: 0;
    }

    .footer-legal-bar {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms!important;
        animation-iteration-count: 1!important;
        scroll-behavior: auto!important;
        transition-duration: .01ms!important;
    }

    .hidden-scale-in-center,
    .hidden-scale-in-left {
        opacity: 1;
    }
}
