:root {
    --green: #006b45;
    --green-dark: #004e35;
    --green-soft: #eaf5ef;
    --yellow: #e6ba2f;
    --text: #35423d;
    --border: #e5ebe8;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #fff;
    color: var(--text);
    color: #2D2D2D;
    font-family: 'open-sans-light', sans-serif !important;
}

a {
    text-decoration: none;
}

button {
    font-family: inherit;
}

/*
@media (min-width: 1401px) {
    .row {
        width: 1400px !important;
        max-width: calc(100% - 60px);
        margin-left: auto !important;
        margin-right: auto !important;
    }
}
    */

/* Ajuste del contenedor global para Laboratorios */
.container {
    max-width: 1450px !important;
    width: 100% !important;
}

/* =========================================================
   BREADCRUMB
   ========================================================= */

.breadcrumb-custom {
    margin: 0 1.5rem;
    padding: 24px 0 18px;
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 11px;
}

.breadcrumb-custom a {
    color: var(--green);
    font-weight: 600;
}

.breadcrumb-custom span,
.breadcrumb-custom i {
    color: #9aa29e;
}

.breadcrumb-custom i {
    font-size: 8px;
}

/* =========================================================
   HERO
   ========================================================= */

.hero {
    width: 100%;
    height: 280px;
    overflow: hidden;
}

.hero-media {
    width: 100%;
    height: 280px;
    overflow: hidden;
    position: relative;
}

.hero-media img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: 50% center;
}

/* =========================================================
   ESTRUCTURA PRINCIPAL
   ========================================================= */
/*
.row {
    margin-left: 1.5rem;
    margin-right: 1.5rem;
}
    */

.main-content {
    padding-right: 22px;
}

/* =========================================================
   TÍTULO PRINCIPAL
   ========================================================= */

.labs-section {
    padding: 5px 0 55px;
}

.section-title-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.title-icon {
    width: 62px;
    height: 62px;
    flex: 0 0 62px;
    border-radius: 50%;
    background: var(--green-soft);
    color: var(--green);
    display: grid;
    place-items: center;
    font-size: 28px;
}

.section-title-row h2 {
    margin: 2px 0 0;
    color: #0a432f;
    font-size: 24px;
    font-weight: 800;
}

.eyebrow {
    color: var(--green);
    font-size: 12px;
    font-weight: 800;
}

.title-underline {
    width: 37px;
    height: 3px;
    background: var(--green);
    margin-top: 7px;
}

/* =========================================================
   TABS
   ========================================================= */

.lab-tabs-wrapper {
    width: 100%;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 4px;
}

.lab-tab-fixed {
    flex: 0 0 90px;
    padding-top: 1px;
    background: #fff;
    position: relative;
    z-index: 2;
}

.lab-tab-fixed .nav-link {
    width: 90px;
    height: 36px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    border: 1px solid #b7d6c8;
    border-radius: 18px;

    background: #f1f7f4;
    color: var(--green);

    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;

    transition: all .2s ease;
}

.lab-tab-fixed .nav-link i {
    font-size: 10px;
}

.lab-tab-fixed .nav-link:hover {
    background: var(--green-soft);
    border-color: #8fc1aa;
}

.lab-tab-fixed .nav-link.active {
    background: var(--green-dark);
    border-color: var(--green-dark);
    color: #fff;
    box-shadow: 0 2px 7px rgba(0, 78, 53, .2);
}

.lab-tabs-scroll {
    flex: 1;
    min-width: 0;

    overflow-x: auto;
    overflow-y: hidden;

    scroll-behavior: auto;

    padding: 1px 0 7px;

    scrollbar-width: none;

    cursor: grab;
    user-select: none;
}

.lab-tabs-scroll::-webkit-scrollbar {
    display: none;
}

.lab-tabs-scroll.dragging {
    cursor: grabbing;
}

.lab-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;

    width: max-content;
    min-width: 100%;

    margin: 0;
}

.lab-tabs .nav-item {
    flex: 0 0 auto;
    width: auto;
}

.lab-tabs .nav-link {
    width: auto;
    height: 36px;
    padding: 0 12px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--border) !important;
    border-radius: 18px !important;

    background: #fff;
    color: #3d4843;

    font-size: 12px;
    font-weight: 600;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;

    transition: all .2s ease;
}

.lab-tabs .nav-link:hover {
    color: var(--green);
    border-color: #b9d4c7;
    background: var(--green-soft);
}

.lab-tabs .nav-link.active,
.lab-tabs .nav-link.active:focus,
.lab-tabs .nav-link.active:active {
    background: var(--green) !important;
    border-color: var(--green) !important;
    color: #fff !important;
    box-shadow: none !important;
}

.tab-content {
    margin-top: 23px;
}

/* =========================================================
   TARJETAS DE LABORATORIOS
   ========================================================= */

.all-labs-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.lab-summary-card {
    min-width: 0;
    overflow: hidden;

    border: 1px solid #e3ebe7;
    border-radius: 16px;

    background: #fff;

    box-shadow: 0 5px 18px rgba(0, 0, 0, .055);

    cursor: pointer;

    transition:
        transform .25s ease,
        box-shadow .25s ease,
        border-color .25s ease;
}

.lab-summary-card:hover {
    transform: translateY(-4px);
    border-color: #cbded5;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .09);
}

/* =========================================================
   IMAGEN DE LAS TARJETAS
   ========================================================= */

.summary-image {
    width: 100%;
    aspect-ratio: 6000 / 3368;
    position: relative;
    overflow: hidden;
    background: #e7eeeb;
}

.summary-image>img,
.summary-slide img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    image-rendering: auto;
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.summary-slide {
    position: absolute;
    inset: 0;

    opacity: 0;

    transition: opacity .8s ease;
}

.summary-slide.active {
    opacity: 1;
}

.lab-summary-card:hover .summary-slide.active {
    transform: scale(1.02);
}

.summary-image::after {
    content: "";

    position: absolute;
    inset: 0;

    background: linear-gradient(to top,
            rgba(0, 55, 37, .25),
            transparent 60%);

    pointer-events: none;
}

/* =========================================================
   ELEMENTOS OCULTOS
   ========================================================= */

.gallery-thumbs,
.gallery-count,
.gallery-category,
.summary-icon {
    display: none;
}

.gallery-main img {
    transition: opacity .8s ease;
}

/* =========================================================
   CONTENIDO TARJETAS
   ========================================================= */

.summary-body {
    display: flex;
    flex-direction: column;

    min-height: 100px;

    padding: 20px 18px 18px;
}

.summary-body>span {
    color: var(--green);

    font-size: 9px;
    font-weight: 800;

    letter-spacing: .8px;
    line-height: 1.3;
}

.summary-body h3 {
    margin: 0 0 9px;

    color: #025a27;
    ;

    font-size: 15px;
    line-height: 1.4;
    font-weight: 800;
}

.summary-body p {
    margin: 0 0 18px;

    color: #59645f;

    font-size: 13px !important;
    line-height: 1.7;
}

.go-lab {
    display: flex;
    align-items: center;
    gap: 6px;

    width: max-content;

    margin-top: auto;
    padding: 0;

    border: 0;

    background: none;
    color: var(--green);

    font-size: 10px;
    font-weight: 800;

    cursor: pointer;
}

.go-lab i {
    transition: transform .2s ease;
}

.lab-summary-card:hover .go-lab i {
    transform: translateX(4px);
}

/* =========================================================
   CONTROL DE TABS
   ========================================================= */

#labTabsContent>.tab-pane {
    display: none;
}

#labTabsContent>.tab-pane.show.active {
    display: block;
}

/* =========================================================
   DETALLE ANTIGUO
   ========================================================= */

.lab-detail {
    overflow: hidden;

    border: 1px solid var(--border);
    border-radius: 14px;

    background: #fff;

    box-shadow: 0 4px 16px rgba(0, 0, 0, .06);
}

.detail-banner {
    height: 240px;

    position: relative;
    overflow: hidden;
}

.detail-banner::after {
    content: "";

    position: absolute;
    inset: 0;

    background: linear-gradient(90deg,
            rgba(0, 55, 37, .55),
            transparent 65%);
}

.detail-banner img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}

.detail-content {
    padding: 27px 30px 30px;
}

.detail-heading {
    display: flex;
    align-items: center;
    gap: 14px;

    margin-bottom: 18px;
}

.detail-icon {
    width: 55px;
    height: 55px;
    flex: 0 0 55px;

    border-radius: 50%;

    background: var(--green-soft);
    color: var(--green);

    display: grid;
    place-items: center;

    font-size: 25px;
}

.detail-label {
    color: var(--green);

    font-size: 9px;
    font-weight: 800;

    letter-spacing: 1px;
}

.detail-content h2 {
    color: #073f2c;

    font-size: 27px;
    font-weight: 800;

    margin: 3px 0 0;
}

.detail-content h3 {
    color: #0a432f;

    font-size: 17px;
    font-weight: 700;

    margin: 25px 0 10px;
}

.detail-content h4 {
    color: #174b37;

    font-size: 13px;
    font-weight: 700;

    margin: 17px 0 8px;
}

.detail-content p {
    color: #4c5752;

    font-size: 12px;
    line-height: 1.8;

    margin: 0 0 12px;
}

.equipment {
    margin: 0;
    padding-left: 20px;

    columns: 2;

    color: #4c5752;

    font-size: 11px;
    line-height: 1.75;
}

.equipment li {
    break-inside: avoid;
    margin-bottom: 3px;
}

.empty-info {
    padding: 18px;

    border-radius: 10px;

    background: #f5f8f6;
    color: #66716c;

    font-size: 11px;
    line-height: 1.7;
}

/* =========================================================
   SIDEBAR
   ========================================================= */

.sidebar {
    border-left: 1px solid #f1f3f2;

    padding: 39px 0 0 24px;
}

.sidebar h3 {
    color: #123f2e;

    font-size: 20px;
    font-weight: 700;

    margin: 0 0 12px;
}

.sidebar-line {
    width: 29px;
    height: 2px;

    background: #e4e9e6;

    margin-bottom: 15px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
}

.sidebar-nav>a {
    display: flex;
    align-items: center;
    gap: 11px;

    color: #414b47;

    font-size: 10px;

    padding: 7px 9px;

    border-radius: 3px;
}

.sidebar-nav>a span {
    width: 7px;
    height: 7px;

    background: var(--yellow);

    flex: 0 0 7px;
}

.sidebar-nav>a:hover {
    color: var(--green);
}

.sidebar-nav>a.active {
    background: var(--green);
    color: #fff;

    padding-top: 9px;
    padding-bottom: 9px;
}

.submenu {
    padding-left: 35px;

    display: flex;
    flex-direction: column;
}

.submenu a {
    position: relative;

    padding: 6px 0;

    color: #414b47;

    font-size: 9px;
}

.submenu a::before {
    content: "";

    width: 6px;
    height: 6px;

    background: var(--yellow);

    position: absolute;

    left: -15px;
    top: 11px;
}

/* =========================================================
   DETALLE MODERNO DE LABORATORIOS
   ========================================================= */

.lab-detail-modern {
    width: 100%;
    background: #fff;
}

/* =========================================================
   ENCABEZADO DEL DETALLE
   ========================================================= */

.lab-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 24px;
}

.lab-back-link {
    display: inline-flex;
    align-items: center;

    gap: 8px;

    color: var(--green-dark);

    font-size: 11px;
    font-weight: 600;
}

.lab-back-link:hover {
    color: var(--green);
}

.lab-share-btn {
    display: inline-flex;
    align-items: center;

    gap: 8px;

    padding: 9px 14px;

    border: 1px solid #d4ddd8;
    border-radius: 7px;

    background: #fff;
    color: #303936;

    font-size: 10px;

    cursor: pointer;

    transition: all .2s ease;
}

.lab-share-btn:hover {
    color: var(--green);

    border-color: #a8cbb8;

    background: #f8fbf9;
}

/* =========================================================
   TÍTULO DEL DETALLE
   ========================================================= */

.lab-detail-title {
    margin-bottom: 22px;
}

.lab-detail-category {
    display: block;

    margin-bottom: 6px;

    color: var(--green);

    font-size: 10px;
    font-weight: 800;

    letter-spacing: .9px;
}

.lab-detail-title h2 {
    margin: 0;

    color: #101d25;

    font-size: 30px;
    line-height: 1.15;
    font-weight: 800;
}

.lab-detail-title p {
    margin: 9px 0 0;

    color: var(--green);

    font-size: 12px;
    line-height: 1.6;
    font-weight: 600;
}

/* =========================================================
   IMAGEN PRINCIPAL DEL LABORATORIO
   ========================================================= */

.lab-detail-cover::after {
    content: "";

    position: absolute;

    inset: auto 0 0;

    height: 35%;

    background: linear-gradient(to top,
            rgba(0, 45, 30, .35),
            transparent);

    pointer-events: none;
}

.lab-detail-cover {
    position: relative;
    width: 100%;
    aspect-ratio: 6000 / 3368;
    height: auto;
    min-height: 0;
    border-radius: 16px;
    overflow: hidden;
    background: #e7eeeb;
}

@media (min-width: 768px) {
    .lab-detail-cover {
        width: 90%;
        max-width: 1100px;
        margin-left: auto;
        margin-right: auto;
    }
}

.lab-detail-cover .summary-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    transition: opacity 1.5s ease;
    image-rendering: auto;
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.lab-detail-cover .summary-slide.active {
    opacity: 1;
}

/* =========================================================
   INFORMACIÓN SOBRE EL BANNER
   ========================================================= */

.lab-cover-info {
    position: absolute;

    left: 20px;
    bottom: 20px;

    display: flex;
    align-items: center;

    gap: 0;

    padding: 13px 16px;

    background: rgba(31, 82, 64, 0.90);

    border: 1px solid rgba(255, 255, 255, 0.15);

    border-radius: 10px;

    color: #fff;

    z-index: 2;
}

.lab-cover-info-item {
    display: flex;
    align-items: center;

    gap: 10px;

    padding: 0 18px;
}

.lab-cover-info-item+.lab-cover-info-item {
    border-left: 1px solid rgba(255, 255, 255, 0.20);
}

.lab-cover-info-item>i {
    font-size: 23px;
    color: var(--yellow);
}

.lab-cover-info-item div {
    display: flex;
    flex-direction: column;

    gap: 3px;
}

.lab-cover-info-item span {
    font-size: 12px;

    color: rgba(255, 255, 255, 0.72);
}

.lab-cover-info-item strong {
    font-size: 14px;

    color: #fff;

    font-weight: 700;
}

/* =========================================================
   DESCRIPCIÓN + INFORMACIÓN
   ========================================================= */

.lab-detail-intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 30px;
    align-items: start;
    margin-top: 18px;
}

.lab-detail-description {
    margin: 0 0 13px;
    color: #424c48;
    font-size: 15px !important;
    text-align: justify;
    line-height: 1.7;
}

.lab-info-card {
    padding: 17px 18px;

    border: 1px solid #dce7dd;

    border-radius: 10px;

    background: linear-gradient(145deg,
            #f3f8f2,
            #e9f2e9);
}

.lab-info-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--green-dark);
    font-size: 14px;
    font-weight: 800;
}

.lab-info-title i {
    font-size: 17px;
}

.lab-info-row {
    display: grid;

    grid-template-columns: 75px 1fr;

    gap: 10px;

    margin-top: 10px;

    color: #414a46;

    font-size: 13px;

    line-height: 1.5;
}

.lab-info-row strong {
    font-weight: 700;
}

.lab-info-row span {
    font-weight: 500;
}

/* =========================================================
   SECCIONES
   ========================================================= */

.lab-detail-section {
    margin-top: 34px;
}

.lab-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 14px;
}

.lab-section-heading h3 {
    margin: 0;
    color: #025a27;
    font-size: 20px;
    font-weight: 700;
}

.lab-section-link {
    display: inline-flex;
    align-items: center;

    gap: 8px;

    padding: 0;

    border: 0;

    background: none;

    color: var(--green);

    font-size: 12px;
    font-weight: 700;

    cursor: pointer;
}

.lab-section-link i {
    transition: transform .2s ease;
}

.lab-section-link:hover i {
    transform: translateX(4px);
}

/* =========================================================
   EQUIPAMIENTO
   ========================================================= */

.lab-equipment-grid {
    display: grid;

    grid-template-columns: repeat(6, minmax(0, 1fr));

    gap: 11px;
}

.lab-equipment-card {
    min-height: 125px;

    padding: 16px 8px 13px;

    border: 1px solid #e0e7e3;

    border-radius: 9px;

    background: #fff;

    text-align: center;

    transition: all .2s ease;
}

.lab-equipment-card:hover {
    border-color: #a9cdb7;

    box-shadow: 0 8px 20px rgba(0, 60, 40, .07);

    transform: translateY(-2px);
}

.lab-equipment-icon {
    height: 45px;

    display: grid;
    place-items: center;

    margin-bottom: 9px;

    color: var(--green);

    font-size: 29px;
}

.lab-equipment-card h4 {
    margin: 0;

    color: #29332f;

    font-size: 14px;
    line-height: 1.4;

    font-weight: 100;
}

.lab-equipment-more {
    display: none;

    margin-top: 12px;

    padding: 14px 18px;

    border-radius: 8px;

    background: #f4f8f5;
}

.lab-equipment-more.open {
    display: block;
}

.lab-equipment-more ul {
    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 5px 30px;

    margin: 0;

    padding-left: 18px;

    color: #4c5752;

    font-size: 13px;
    line-height: 1.7;
}

/* =========================================================
   ACTIVIDADES
   ========================================================= */

.lab-services-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 285px;
    gap: 30px;
    align-items: start;
}

.lab-services-image {
    margin-top: 17px;
}

.lab-services-content h3 {
    margin: 0 0 17px;

    color: #025a27;

    font-size: 20px;
    font-weight: 700;
}

.lab-services-list {
    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 9px 24px;

    margin: 0;
    padding: 0;

    list-style: none;
}

.lab-services-list li {
    display: flex;
    align-items: flex-start;

    gap: 8px;

    color: #424c48;

    font-size: 14px;
    line-height: 1.5;
}

.lab-services-list i {
    flex: 0 0 auto;

    margin-top: 2px;

    color: var(--green);

    font-size: 15px;
}

.lab-services-image {
    width: 100%;
    aspect-ratio: 6000 / 3368;
    position: relative;
    overflow: hidden;
    background: #e7eeeb;
    border-radius: 10px;
    transform: translateY(35px);
}

@media (max-width: 767px) {
    .lab-services-image {
        transform: none;
    }
}

.lab-services-image>img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    image-rendering: auto;
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* =========================================================
   GALERÍA - CARRUSEL AUTOMÁTICO
   ========================================================= */

.lab-gallery-carousel {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.lab-gallery-track {
    display: flex;
    gap: 18px;
    width: max-content;
    transition: transform 0.25s ease;
    will-change: transform;
}

.lab-gallery-item {
    flex: 0 0 260px;
    width: 260px;
    aspect-ratio: 6000 / 3368;
    height: auto;
    padding: 0;
    border: 0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    background: #e8efeb;
    cursor: default;
    box-shadow: none;
}

.lab-gallery-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    image-rendering: auto;
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Sin efecto de clic ni icono de reproducción */
.lab-gallery-item::before,
.lab-gallery-item::after {
    display: none !important;
    content: none !important;
}

.lab-gallery-item i,
.lab-gallery-item .bi,
.lab-gallery-item span {
    display: none !important;
}

/* Las imágenes no hacen zoom al pasar el mouse */
.lab-gallery-item:hover img {
    transform: none;
}

/* Controles */
.lab-gallery-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lab-gallery-prev,
.lab-gallery-next {
    width: 36px;
    height: 36px;
    border: 1px solid #dce5e1;
    border-radius: 50%;
    background: #fff;
    color: #176b4d;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
}

.lab-gallery-prev:hover,
.lab-gallery-next:hover {
    background: #176b4d;
    color: #fff;
}

.lab-gallery-prev:disabled,
.lab-gallery-next:disabled {
    opacity: 0.35;
    cursor: default;
}

.lab-gallery-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lab-react-gallery-prev,
.lab-react-gallery-next {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: #f1f3f5;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    padding: 0;
}

.lab-react-gallery-prev i,
.lab-react-gallery-next i {
    font-size: 18px;
}

.lab-react-gallery-prev:hover,
.lab-react-gallery-next:hover {
    background: #e2e6ea;
    transform: translateY(-1px);
}

.lab-react-gallery-prev:disabled,
.lab-react-gallery-next:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1200px) {

    .lab-gallery-item {
        flex-basis: 230px;
        width: 230px;
        height: auto;
        aspect-ratio: 6000 / 3368;
    }

}

@media (max-width: 767px) {

    .lab-gallery-track {
        gap: 14px;
    }

    .lab-gallery-item {
        flex: 0 0 210px;
        width: 210px;
        height: auto;
        aspect-ratio: 6000 / 3368;
    }

}

@media (max-width: 575px) {
    .lab-gallery-carousel {
        width: 100%;
        overflow: hidden;
    }

    .lab-gallery-track {
        display: flex;
        gap: 12px;
        width: max-content;
    }

    .lab-gallery-item {
        flex: 0 0 180px !important;
        width: 180px !important;
        min-width: 180px !important;
        max-width: 180px !important;
        height: auto !important;
        aspect-ratio: 6000 / 3368;
    }

    .lab-gallery-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

}

/* Galería - móvil horizontal */
@media (max-width: 991px) and (orientation: landscape) {
    .lab-gallery-carousel {
        width: 100%;
        overflow: hidden;
    }

    .lab-gallery-track {
        gap: 14px;
        width: max-content;
    }

    .lab-gallery-item {
        flex: 0 0 260px !important;
        width: 260px !important;
        min-width: 260px !important;
        max-width: 260px !important;
        height: 155px !important;
    }

    .lab-gallery-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

/* =========================================================
   CONTROLES DE GALERÍA
   ========================================================= */

.lab-gallery-controls {
    display: flex;
    align-items: center;

    gap: 7px;
}

.lab-gallery-prev,
.lab-gallery-next {
    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 1px solid #d6e2dc;

    border-radius: 50%;

    background: #fff;

    color: var(--green);

    font-size: 13px;

    cursor: pointer;

    transition:
        background .2s ease,
        color .2s ease,
        border-color .2s ease,
        transform .2s ease;
}

.lab-gallery-prev:hover,
.lab-gallery-next:hover {
    background: var(--green);

    border-color: var(--green);

    color: #fff;

    transform: translateY(-1px);
}

.lab-gallery-prev:disabled,
.lab-gallery-next:disabled {
    opacity: .35;

    cursor: default;

    transform: none;

    background: #f5f7f6;

    color: #77837d;

    border-color: #e1e7e4;
}

/* =========================================================
   LIGHTBOX / VISOR DE IMÁGENES
   ========================================================= */

.lab-lightbox {
    position: fixed;

    inset: 0;

    z-index: 9999;

    display: none;

    align-items: center;
    justify-content: center;

    padding: 30px;

    background: rgba(0, 0, 0, .88);
}

.lab-lightbox.open {
    display: flex;
}

.lab-lightbox-content {
    width: min(1100px, 90vw);

    height: min(720px, 85vh);

    position: relative;

    display: flex;

    align-items: center;
    justify-content: center;
}

.lab-lightbox-image {
    max-width: 100%;
    max-height: 100%;

    width: auto;
    height: auto;

    display: block;

    object-fit: contain;

    border-radius: 6px;

    box-shadow: 0 15px 50px rgba(0, 0, 0, .35);
}

/* =========================================================
   BOTÓN CERRAR LIGHTBOX
   ========================================================= */

.lab-lightbox-close {
    position: absolute;

    top: -18px;
    right: -18px;

    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 1px solid rgba(255, 255, 255, .25);

    border-radius: 50%;

    background: rgba(0, 0, 0, .55);

    color: #fff;

    font-size: 14px;

    cursor: pointer;

    z-index: 5;

    transition:
        background .2s ease,
        transform .2s ease;
}

.lab-lightbox-close:hover {
    background: rgba(0, 107, 69, .9);

    transform: scale(1.05);
}

/* =========================================================
   FLECHAS LIGHTBOX
   ========================================================= */

.lab-lightbox-prev,
.lab-lightbox-next {
    position: absolute;

    top: 50%;

    transform: translateY(-50%);

    width: 44px;
    height: 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 1px solid rgba(255, 255, 255, .25);

    border-radius: 50%;

    background: rgba(0, 0, 0, .5);

    color: #fff;

    font-size: 17px;

    cursor: pointer;

    z-index: 5;

    transition:
        background .2s ease,
        transform .2s ease;
}

.lab-lightbox-prev {
    left: -65px;
}

.lab-lightbox-next {
    right: -65px;
}

.lab-lightbox-prev:hover,
.lab-lightbox-next:hover {
    background: var(--green);
}

.lab-lightbox-prev:hover {
    transform: translateY(-50%) translateX(-2px);
}

.lab-lightbox-next:hover {
    transform: translateY(-50%) translateX(2px);
}

/* =========================================================
   FLECHAS DEL VISOR - MÓVIL
   ========================================================= */

@media (max-width: 767px) {

    .lab-lightbox-mobile-arrow {
        width: 40px !important;
        height: 40px !important;
        padding: 0 !important;

        font-size: 20px !important;

        display: flex;
        align-items: center;
        justify-content: center;
    }

    .lab-lightbox-mobile-arrow i {
        font-size: 18px;
    }
}

/* =========================================================
   CONTADOR LIGHTBOX
   ========================================================= */

.lab-lightbox-counter {
    position: absolute;

    left: 50%;
    bottom: -35px;

    transform: translateX(-50%);

    color: rgba(255, 255, 255, .85);

    font-size: 12px;

    font-weight: 600;

    white-space: nowrap;
}

/* =========================================================
   RESPONSIVE GENERAL
   ========================================================= */

@media (min-width: 1200px) {

    .breadcrumb-custom {
        margin-left: 3rem;
        margin-right: 3rem;
    }

    /*
    .row {
        margin-left: 3rem;
        margin-right: 3rem;
    }
        */
}

@media (max-width: 1400px) {

    .all-labs-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* =========================================================
   RESPONSIVE 1200
   ========================================================= */

@media (max-width: 1200px) {

    .lab-equipment-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .lab-gallery-item {
        flex-basis: calc((100% - 28px) / 3);
        width: calc((100% - 28px) / 3);
    }

    .lab-lightbox-prev {
        left: 10px;
    }

    .lab-lightbox-next {
        right: 10px;
    }
}

/* =========================================================
   RESPONSIVE 991
   ========================================================= */

@media (max-width: 991px) {

    .all-labs-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .main-content {
        padding-right: 0;
    }

    .sidebar {
        border-left: 0;

        border-top: 1px solid #eef1ef;

        padding: 35px 0 50px;
    }

    .lab-detail-intro {
        grid-template-columns: 1fr;
    }

    .lab-info-card {
        width: 100%;
    }

    .lab-services-layout {
        grid-template-columns: 1fr;
    }

    .lab-services-image {
        height: auto;
    }
}

/* =========================================================
   RESPONSIVE 767
   ========================================================= */

@media (max-width: 767px) {

    .hero,
    .hero-media {
        height: 220px;
    }

    .summary-image {
        height: 190px;
    }

    .all-labs-grid {
        grid-template-columns: 1fr;
    }

    .detail-content {
        padding: 22px 18px;
    }

    .detail-content h2 {
        font-size: 22px;
    }

    .equipment {
        columns: 1;
    }

    /* Detalle moderno */

    .lab-detail-title h2 {
        font-size: 18px;
    }

    .lab-detail-cover {
        height: 250px;
    }

    .lab-equipment-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lab-services-list {
        grid-template-columns: 1fr;
    }

    .lab-detail-description {
        width: 100%;
        max-width: 100%;
    }

    .lab-detail-description p {
        font-size: 14px;
        line-height: 1.55;
        margin-bottom: 12px;
    }

    .lab-info-row {
        font-size: 13px;
    }

    .lab-equipment-card h4 {
        font-size: 13px;
    }

    .lab-services-list li {
        font-size: 13px;
    }

    .lab-section-heading h3,
    .lab-services-content h3 {
        font-size: 17px;
        font-weight: 800;
    }

    /* Galería */

    .lab-gallery-item {
        flex-basis: calc((100% - 14px) / 2);
        width: calc((100% - 14px) / 2);

        height: 130px;
    }

    .lab-lightbox {
        padding: 20px;
    }

    .lab-lightbox-content {
        width: 95vw;
        height: 80vh;
    }

    .lab-lightbox-prev {
        left: 5px;
    }

    .lab-lightbox-next {
        right: 5px;
    }
}

/* =========================================================
   RESPONSIVE 575
   ========================================================= */

@media (max-width: 575px) {

    .hero,
    .hero-media {
        height: 200px;
    }

    .summary-image {
        height: 175px;
    }

    .section-title-row h2 {
        font-size: 20px;
    }

    .title-icon {
        width: 54px;
        height: 54px;

        flex-basis: 54px;

        font-size: 24px;
    }

    /* Detalle */

    .lab-detail-header {
        align-items: flex-start;
    }

    .lab-share-btn {
        padding: 8px 10px;

        font-size: 0;
    }

    .lab-share-btn i {
        font-size: 14px;
    }

    .lab-detail-title h2 {
        font-size: 23px;
    }

    .lab-detail-cover {
        height: 210px;
    }

    /* Información sobre banner */

    .lab-cover-info {
        left: 10px;
        right: 10px;
        bottom: 10px;
        width: auto;
        display: grid;
        grid-template-columns: 1fr 1fr;
        padding: 9px 0;
    }

    .lab-cover-info-item {
        min-width: 0;
        padding: 0 10px;
        gap: 6px;
    }

    .lab-cover-info-item+.lab-cover-info-item {
        border-left: 1px solid rgba(255, 255, 255, 0.20);
    }

    .lab-cover-info-item>i {
        flex: 0 0 auto;
        font-size: 18px;
    }

    .lab-cover-info-item span {
        font-size: 9px;
    }

    .lab-cover-info-item strong {
        font-size: 11px;
        white-space: nowrap;
    }

    .lab-detail-description p {
        font-size: 13px;
        line-height: 1.55;
    }

    /* Encabezados */

    .lab-section-heading {
        align-items: flex-start;

        flex-direction: column;

        gap: 8px;
    }

    /* Galería */

    .lab-detail-section:has(.lab-gallery-track) .lab-section-heading {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .lab-detail-section:has(.lab-gallery-track) .lab-section-heading h3 {
        margin: 0;
        flex: 1 1 auto;
    }

    .lab-detail-section:has(.lab-gallery-track) .lab-gallery-controls {
        align-self: center;
        justify-content: flex-end;
        flex-shrink: 0;
    }

    .lab-gallery-track {
        gap: 12px;
    }

    .lab-gallery-item {
        flex: 0 0 180px;
        width: 180px;
        min-width: 180px;
        max-width: 180px;
        height: 101px;
        aspect-ratio: 6000 / 3368;
    }

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

    .lab-gallery-prev,
    .lab-gallery-next {
        width: 34px;
        height: 34px;
        min-width: 34px;
        min-height: 34px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px solid #d6e2dc;
        border-radius: 50%;
        background: #fff;
        color: var(--green);
        font-size: 14px;
        line-height: 1;
    }

    .lab-gallery-prev i,
    .lab-gallery-next i {
        display: block;
        margin: 0;
        font-size: 14px;
        line-height: 1;
    }

    /* Lightbox */

    .lab-lightbox {
        padding: 10px;
    }

    .lab-lightbox-content {
        width: 100%;
        height: 75vh;
    }

    .lab-lightbox-prev,
    .lab-lightbox-next {
        width: 38px;
        height: 38px;

        font-size: 14px;
    }

    .lab-lightbox-prev {
        left: 5px;
    }

    .lab-lightbox-next {
        right: 5px;
    }

    .lab-lightbox-close {
        top: -10px;
        right: -5px;

        width: 34px;
        height: 34px;
    }

    .lab-lightbox-counter {
        bottom: -28px;
    }
}

/* =========================================================
   ACCESIBILIDAD / REDUCIR ANIMACIONES
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .summary-slide,
    .lab-summary-card,
    .go-lab i,
    .lab-gallery-track,
    .lab-gallery-item img,
    .lab-gallery-item::before,
    .lab-gallery-item::after {
        transition: none;
    }
}

/* =========================================================
   VISOR DE IMÁGENES
   ========================================================= */

.lab-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background: rgba(0, 0, 0, 0.88);
}

.lab-lightbox.open {
    display: flex;
}

.lab-lightbox-content {
    position: relative;
    width: min(1100px, 95vw);
    height: min(750px, 90vh);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lab-lightbox-image {
    display: block;
    max-width: calc(100% - 120px);
    max-height: calc(100% - 30px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    user-select: none;
}

.lab-lightbox-close,
.lab-lightbox-prev,
.lab-lightbox-next {
    position: absolute;
    z-index: 2;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
}

.lab-lightbox-close:hover,
.lab-lightbox-prev:hover,
.lab-lightbox-next:hover {
    background: #176b4d;
    border-color: #176b4d;
}

.lab-lightbox-close {
    top: 0;
    right: 0;
}

.lab-lightbox-prev {
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

.lab-lightbox-next {
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.lab-lightbox-counter {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 13px;
}

@media (max-width: 767px) {
    .lab-lightbox {
        padding: 15px;
    }

    .lab-lightbox-content {
        width: 100%;
        height: 85vh;
    }

    .lab-lightbox-image {
        max-width: calc(100% - 80px);
        max-height: calc(100% - 60px);
    }

    .lab-lightbox-close,
    .lab-lightbox-prev,
    .lab-lightbox-next {
        width: 36px;
        height: 36px;
    }

    .lab-lightbox-prev {
        left: 5px;
    }

    .lab-lightbox-next {
        right: 5px;
    }
}

/* =========================================================
   AJUSTES FINALES - ANCHO DE ESCRITORIO Y RESPONSIVE
   ========================================================= */
/*
@media (min-width: 1401px) {
    .row {
        width: 1400px !important;
        max-width: calc(100% - 60px);
        margin-left: auto !important;
        margin-right: auto !important;
    }
}
    */

@media (max-width: 767px) {
    .lab-detail-description {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow-wrap: break-word;
        word-wrap: break-word;
    }

    .lab-detail-description {
        font-size: 13px !important;
        line-height: 1.55;
        margin-bottom: 12px;
    }
}

@media (max-width: 575px) {
    .lab-detail-cover {
        height: 230px;
    }

    .lab-detail-description {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .lab-detail-description {
        font-size: 13px !important;
        line-height: 1.5;
        margin: 0 0 10px;
        overflow-wrap: break-word;
        word-wrap: break-word;
    }
}

/* =========================================================
   CORRECCIÓN GALERÍA - TABLET
   ========================================================= */

@media (min-width: 768px) and (max-width: 1200px) {
    .lab-gallery-item {
        flex: 0 0 230px !important;
        width: 230px !important;
        min-width: 230px !important;
        max-width: 230px !important;
        height: auto !important;
        aspect-ratio: 6000 / 3368;
    }

    .lab-gallery-item img {
        width: 100%;
        height: 100%;
        display: block;
        object-fit: cover;
        object-position: center;
        image-rendering: auto;
        transform: translateZ(0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }
}

/* =========================================================
   EQUIPAMIENTO - MOSTRAR MAS
   ========================================================= */
.lab-equipment-card.equipment-hidden {
    display: none !important;
}

.lab-equipment-grid.equipment-expanded .lab-equipment-card.equipment-hidden {
    display: flex !important;
}

.lab-equipment-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 16px auto 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--green);
    font-family: inherit;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.4;
    cursor: pointer;
    transition: color .2s ease;
}

.lab-equipment-toggle:hover {
    color: var(--green-dark);
}

.lab-equipment-toggle i {
    transition: transform .2s ease;
}

.lab-equipment-toggle:hover i {
    transform: translateX(4px);
}

.lab-equipment-more {
    display: none !important;
}

/* =========================================================
   BUSCADOR DE LABORATORIOS
   ========================================================= */

/* BUSCADOR */

.lab-tabs-header {
    position: relative;
    height: 0;
    z-index: 10;
}

.lab-search-toggle {
    position: absolute;
    right: 0;
    top: -52px;
    width: 38px;
    height: 38px;
    border: 1px solid #dce5e1;
    border-radius: 50%;
    background: #fff;
    color: var(--green);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 17px;
    padding: 0;
}

.lab-search-toggle:hover,
.lab-search-toggle.active {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
}

.lab-search-desktop {
    position: absolute;
    right: 0;
    top: -8px;
    width: 280px;
    z-index: 20;

    padding: 6px;
    background: #fff;
    border-radius: 25px;

    box-shadow: 0 6px 20px rgba(0, 0, 0, .16);
}

.lab-search-mobile {
    display: none;
}

.lab-search {
    position: relative;
    width: 100%;
}

.lab-search>.bi-search {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--green);
    font-size: 17px;
    pointer-events: none;
}

.lab-search input {
    width: 100%;
    height: 38px;
    padding: 0 40px;
    border: 1px solid var(--green);
    border-radius: 20px;
    outline: none;
    background: #fff;
    font-size: 14px;
}

.lab-search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #777;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.lab-search-clear:hover {
    background: #f0f3f1;
    color: var(--green);
}

/* BUSCADOR */

.lab-tabs-header {
    position: relative;
    height: 0;
    z-index: 10;
}

.lab-search-toggle {
    position: absolute;
    right: 0;
    top: -52px;
    width: 38px;
    height: 38px;
    border: 1px solid #dce5e1;
    border-radius: 50%;
    background: #fff;
    color: var(--green);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 17px;
    padding: 0;
}

.lab-search-toggle:hover,
.lab-search-toggle.active {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
}

.lab-search-desktop {
    position: absolute;
    right: 0;
    top: -8px;
    width: 280px;
    z-index: 20;
}

.lab-search-mobile {
    display: none;
}

.lab-search {
    position: relative;
    width: 100%;
}

.lab-search>.bi-search {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--green);
    font-size: 17px;
    pointer-events: none;
}

.lab-search input {
    width: 100%;
    height: 38px;
    padding: 0 40px;
    border: 1px solid var(--green);
    border-radius: 20px;
    outline: none;
    background: #fff;
    font-size: 14px;
}

.lab-search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #777;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.lab-search-clear:hover {
    background: #f0f3f1;
    color: var(--green);
}

@media (max-width: 767px) {
    .lab-tabs-header {
        height: auto;
        margin-bottom: 14px;
    }

    .lab-search-toggle {
        display: none;
    }

    .lab-search-desktop {
        display: none;
    }

    .lab-search-mobile {
        display: block;
        position: relative;
        width: 100%;
    }

    .lab-search {
        width: 100%;
    }

    .lab-search input {
        height: 33px;
        border-color: #dce5e1;
        border-radius: 17px;
        font-size: 14px;
        padding-left: 38px;
        padding-right: 36px;
    }

    .lab-search>.bi-search {
        left: 13px;
        font-size: 18px;
    }

    .lab-search-clear {
        right: 7px;
        width: 24px;
        height: 24px;
    }
}