/* =====================================================
   A.G. Arquitectura — Custom overrides
   Sobrescribe reglas del template compilado (main.css)
   ===================================================== */

/* Color primario: Midnight Blue */
:root {
    --tl-color-theme-primary: #191970 !important;
}

/* ── Preloader: texto AG en violeta ── */
.site-name span {
    color: #191970 !important;
}

/* ── Footer: ocultar letras decorativas de fondo ── */
.footer-text {
    display: none !important;
}

/* ── Footer: logo visible centrado sobre el copyright ── */
.ag-footer-logo {
    text-align: center;
    padding: 40px 0 24px;
}

.ag-footer-logo img {
    max-height: 220px;
    width: auto;
    object-fit: contain;
}

/* ── Fondo blanco puro en todo el sitio ── */
body,
.tl-bg-color,
.bg-grey {
    background-color: #ffffff !important;
}

/* ── Sección de contadores: fondo blanco ── */
#ag-contadores {
    background-color: #ffffff !important;
}

/* ── Contador: cards redondeadas con doble sombra sólida desplazada ── */
.ag-counter-card {
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 16px;
    padding: 44px 28px 36px;
    text-align: center;
    box-shadow: 5px 5px 0 0 #d0d0d0, 10px 10px 0 0 #ebebeb;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
    height: 100%;
}

.ag-counter-card:hover {
    box-shadow: 5px 5px 0 0 #191970, 10px 10px 0 0 rgba(25, 25, 112, 0.18);
    transform: translate(-2px, -2px);
}

.ag-counter-num {
    font-size: 3.4rem;
    font-weight: 800;
    color: #111111;
    line-height: 1;
    margin-bottom: 18px;
    font-family: inherit;
    letter-spacing: -0.02em;
}

.ag-counter-prefix {
    opacity: 0.4;
    font-weight: 400;
}

.ag-counter-suffix {
    font-size: 1.6rem;
    font-weight: 400;
    opacity: 0.4;
    letter-spacing: 0;
}

.ag-counter-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #888888;
    font-weight: 700;
    margin: 0;
}

@media (max-width: 767px) {
    .ag-counter-num {
        font-size: 2.6rem;
    }

    .ag-counter-card {
        box-shadow: 4px 4px 0 0 #d0d0d0, 8px 8px 0 0 #ebebeb;
    }
}

/* ── Sidebar oscuro: texto blanco en meanmenu (móvil) ── */
#sidebar-area .mean-bar .mean-nav>ul>li>a,
#sidebar-area .mean-bar .mean-nav>ul>li>ul>li>a,
#sidebar-area .mean-bar .mean-nav ul li a {
    color: #ffffff !important;
}

#sidebar-area .mean-bar .mean-nav ul li a.mean-expand,
#sidebar-area .mean-bar .mean-nav ul li a.mean-expand:before,
#sidebar-area .mean-bar .mean-nav ul li a.mean-expand:after {
    color: #ffffff !important;
}

#sidebar-area .mean-bar .mean-nav ul li:not(:last-of-type) {
    border-bottom-color: rgba(255, 255, 255, 0.2) !important;
}

#sidebar-area .sidebar-trigger.close rect {
    fill: #ffffff !important;
}

#sidebar-area .side-menu-about .title,
#sidebar-area .side-menu-contact .side-menu-list li,
#sidebar-area .side-menu-contact .side-menu-list li a {
    color: #ffffff !important;
}

/* ── Títulos: color Midnight Blue y sin sombra ── */
.section-title,
.section-title span,
h2.section-title,
h2.section-title span,
h1.section-title,
h1.section-title span {
    color: #191970 !important;
    text-shadow: none !important;
}

/* ── Hero-8: ocultar bg-shape (diseñado para hero oscuro, innecesario en fondo blanco) ── */
.hero-section-8 .bg-shape,
.hero-section-8 .bg-color {
    display: none !important;
}

/* ── Hero-8: reducir tamaño de título al estilo del resto del sitio ── */
.hero-wrap-8 .hero-content-8 .section-heading .section-title {
    font-size: 48px !important;
}

@media (max-width: 1199px) {
    .hero-wrap-8 .hero-content-8 .section-heading .section-title {
        font-size: 40px !important;
    }
}

@media (max-width: 767px) {
    .hero-wrap-8 .hero-content-8 .section-heading .section-title {
        font-size: 28px !important;
    }
}

/* ── Servicios: tarjetas de tipo de arquitectura ── */
.service-item-3 .service-thumb {
    height: 300px !important;
}

.service-carousel-wrap-3 .service-carousel-3 {
    max-width: 380px !important;
}

/* ── Clientes: logos sueltos sin tarjeta ── */
.gallary-section .gallary-scroll-item {
    width: auto !important;
    height: auto !important;
    background: none !important;
    border-radius: 0 !important;
    padding: 0 30px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: none !important;
}

.gallary-section .gallary-scroll-item img {
    width: auto !important;
    height: 120px !important;
    max-width: 280px !important;
    object-fit: contain !important;
    border-radius: 0 !important;
    filter: none !important;
}

.gallary-section .gallery-scroll-wrap .gallary-scroll-item:nth-child(3n+2) img {
    height: 160px !important;
    max-width: 340px !important;
}

.gallary-section .gallery-scroll-wrap .gallary-scroll-item:nth-child(3n+3) img {
    height: 140px !important;
    max-width: 300px !important;
}

/* ── Portfolio: altura de miniaturas ── */
.project-item-7 {
    position: relative !important;
    background-color: #ffffff !important;
    border-radius: 24px !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    margin-bottom: 30px !important;
}

.project-item-7 .project-thumb {
    height: 460px !important; /* Match project-item-2 thumbnail height */
    border: none !important;
}

.project-item-7 .project-content {
    position: relative !important;
    left: 0 !important;
    bottom: 0 !important;
    right: 0 !important;
    z-index: 5 !important;
    background: #ffffff !important;
    padding: 20px 24px 24px !important;
    margin: 0 !important;
}

.project-item-7 .project-content .title {
    color: #191970 !important; /* Midnight Navy */
    font-size: 22px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    text-transform: none !important;
    text-shadow: none !important;
}

.project-item-7 .project-content p {
    color: #555555 !important;
    font-size: 14px !important;
    margin-bottom: 0 !important;
    text-shadow: none !important;
}

/* ── Footer: email largo no desborda ── */
.footer-widget .footer-address .mail {
    font-size: 15px !important;
    word-break: break-all !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    display: block !important;
    line-height: 1.4 !important;
}

/* ── Equipo (blog carousel): evitar layout shift ──
   El swiper-slide-active sube el .post-thumb de 320px a 560px
   con transition:all, desplazando la sección de Contacto.
   Solución: altura fija en el contenedor + excluir height de la transición. */
.blog-section .blog-carousel-2 {
    height: 620px !important;
    overflow: hidden !important;
}

.blog-carousel-2 .swiper-slide .post-card .post-thumb {
    transition: transform 0.4s ease-in-out,
        opacity 0.4s ease-in-out,
        border-radius 0.4s ease-in-out !important;
}

/* ── Nav: sin mayúscula en cada palabra ── */
.header-menu-wrap .mobile-menu-items a,
.header-menu-wrap .mobile-menu-items ul a,
.mean-bar .mean-nav ul li a {
    text-transform: none !important;
}

/* ── Breadcrumb en banner oscuro: siempre blanco ── */
.page-header .page-header-content .sub-title .inner-page,
.page-header .page-header-content .sub-title .home {
    color: rgba(255, 255, 255, 0.75) !important;
}

/* ── Título del banner (page-header) responsive ── */
.page-header .page-header-content .title {
    font-size: 46px !important;
    line-height: 1.1 !important;
}

/* ── Títulos de sección: sin mayúscula en cada palabra y tamaño reducido ── */
.section-title,
.section-title span,
.section-heading .section-title,
.section-heading .section-title span,
.hero-content .section-title,
.hero-content .section-title span,
.project-left-content-7 .section-title,
.project-left-content-7 .section-title span {
    text-transform: none !important;
}

.section-title,
.section-heading .section-title,
.hero-content .section-title,
.project-left-content-7 .section-title {
    font-size: 46px !important;
    line-height: 1.15 !important;
}

@media (max-width: 992px) {
    .page-header .page-header-content .title {
        font-size: 34px !important;
    }

    .section-title,
    .section-heading .section-title,
    .hero-content .section-title,
    .project-left-content-7 .section-title {
        font-size: 34px !important;
    }
}

/* ── Alineación fija para la sección de contadores en la página principal ── */
.service-9 .counter-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 190px;
    padding: 18px 12px 8px;
}

/* ── Marca de referencia en las miniaturas de proyectos de los tipos de arquitectura ── */
.project-section-inner .project-thumb {
    position: relative;
    overflow: hidden;
}

.project-section-inner .project-thumb::after {
    content: "";
    position: absolute;
    right: 14px;
    bottom: 14px;
    width: 90px;
    height: 90px;
    background: url("../img/referencia/ref.png") no-repeat center center;
    background-size: contain;
    pointer-events: none;
    z-index: 2;
    opacity: 0.95;
}

.project-section-inner .project-thumb.no-ref::after {
    display: none !important;
}

@media (max-width: 767px) {
    .project-section-inner .project-thumb::after {
        width: 64px;
        height: 64px;
        right: 10px;
        bottom: 10px;
    }
}

.service-9 .counter-item .title {
    display: inline-flex !important;
    align-items: baseline !important;
    justify-content: center !important;
    gap: 0.35rem;
    padding-bottom: 0 !important;
    margin-bottom: 0.75rem !important;
    border-bottom: none !important;
    font-size: clamp(2rem, 4vw, 3rem) !important;
    line-height: 1 !important;
}

.service-9 .counter-item .title .icon {
    font-size: 1.1em;
    line-height: 1;
}

.service-9 .counter-item .title .odometer {
    display: inline-flex;
    align-items: baseline;
}

.service-9 .counter-item .counter-unit {
    font-size: 0.55em;
    font-weight: 600;
    line-height: 1;
    display: inline-flex;
    align-items: baseline;
    margin-left: 0.12rem;
}

.service-9 .counter-item .sub-title {
    font-size: 1.0rem !important;
    font-weight: 600 !important;
    margin: 0 !important;
    text-transform: none !important;
    line-height: 1.2 !important;
}

@media (max-width: 767px) {
    .service-9 .counter-item {
        min-height: auto;
        padding: 20px 10px;
    }

    .service-9 .counter-item .title {
        font-size: clamp(1.8rem, 5vw, 2.6rem) !important;
    }

    .service-9 .counter-item .sub-title {
        font-size: 0.94rem !important;
    }
}

@media (max-width: 767px) {
    .page-header .page-header-content .title {
        font-size: 26px !important;
        line-height: 1.15 !important;
    }

    .section-title,
    .section-heading .section-title,
    .hero-content .section-title,
    .project-left-content-7 .section-title {
        font-size: 26px !important;
    }
}

/* ── Responsive ── */
@media (max-width: 992px) {
    .header .primary-header-inner .header-logo img {
        max-width: 65px !important;
    }

    .project-item-7 .project-thumb {
        height: 360px !important;
    }
    .project-item-7 .project-content {
        padding: 16px 20px 20px !important;
    }
    .project-item-7 .project-content .title {
        font-size: 18px !important;
    }

    .service-item-3 .service-thumb {
        height: 240px !important;
    }
}

@media (max-width: 767px) {
    .project-item-7 .project-thumb {
        height: 280px !important;
    }

    .project-item-7:not(:last-of-type) {
        margin-bottom: 20px !important;
    }

    .project-item-7 .project-content {
        padding: 12px 16px 16px !important;
    }

    .project-item-7 .project-content .title {
        font-size: 15px !important;
        line-height: 1.3 !important;
    }

    .project-item-7 .project-content p {
        font-size: 12px !important;
    }

    .service-item-3 .service-thumb {
        height: 220px !important;
    }

    .project-section-7.pt-75 {
        padding-top: 60px !important;
    }

    .project-section-7.pb-75 {
        padding-bottom: 60px !important;
    }

    .blog-section .blog-carousel-2 {
        height: auto !important;
        min-height: 560px !important;
    }

    /* Logos de clientes en móvil */
    .gallary-section .gallary-scroll-item {
        padding: 0 18px !important;
    }

    .gallary-section .gallary-scroll-item img {
        height: 80px !important;
        max-width: 180px !important;
    }

    .gallary-section .gallery-scroll-wrap .gallary-scroll-item:nth-child(3n+2) img {
        height: 90px !important;
        max-width: 200px !important;
    }

    .gallary-section .gallery-scroll-wrap .gallary-scroll-item:nth-child(3n+3) img {
        height: 85px !important;
        max-width: 190px !important;
    }
}

/* ── Servicios: fondo blanco, textos oscuros ── */
.about-section .about-bg {
    display: none !important;
}

.about-section .about-text {
    display: none !important;
}

.about-section {
    background-color: #ffffff !important;
    padding: 80px 0 !important;
}

.about-section+.about-section {
    border-top: 1px solid #e8e8e8 !important;
}

/* Textos en negro */
.about-section .about-content p,
.about-section .about-content ul li {
    color: #222222 !important;
}

/* Títulos en azul */
.about-section .about-content .section-title {
    color: #191970 !important;
    text-shadow: none !important;
}

.about-section .about-content .section-title span {
    color: #191970 !important;
    text-shadow: none !important;
}

.about-section .about-content .sub-heading {
    color: #555555 !important;
}

/* Foto sin recorte, imagen completa */
.about-section .about-img {
    height: auto !important;
    max-width: 100% !important;
}

.about-section .about-img img {
    border-radius: 20px !important;
    box-shadow: none !important;
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
}

/* ═══════════════════════════════════════════════
   AG — Tarjetas de proyectos: contenido debajo
   ═══════════════════════════════════════════════ */

/* La tarjeta pasa de position:relative a flex column */
.service-item-3 {
    display: flex !important;
    flex-direction: column !important;
}

/* La miniatura ya no tiene margin-bottom y el gradiente negro se elimina */
.service-item-3 .service-thumb {
    margin-bottom: 0 !important;
    flex-shrink: 0;
}

/* Quitamos el gradiente oscuro del template */
.service-item-3 .service-thumb::before {
    display: none !important;
}

/* El número vuelve a ser visible sobre la imagen (sin gradiente) —
   le damos una sombra para que contraste con cualquier foto */
.service-item-3 .service-thumb .number {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55) !important;
}

/* Sacamos el contenido de posición absoluta y lo ponemos debajo */
.service-item-3 .service-content {
    position: static !important;
    background: #ffffff !important;
    padding: 22px 26px 26px !important;
    border-radius: 0 0 24px 24px !important;
    border: 1px solid #ececf2 !important;
    border-top: none !important;
    margin-top: 0 !important;
}

/* Título ahora en azul oscuro sobre fondo blanco */
.service-item-3 .service-content .title {
    color: #101044 !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    margin-bottom: 8px !important;
    line-height: 1.35 !important;
}

.service-item-3 .service-content .title a {
    color: #101044 !important;
}

.service-item-3 .service-content .title a:hover {
    color: #191970 !important;
}

/* Párrafo en gris oscuro legible */
.service-item-3 .service-content p {
    color: #52526a !important;
    font-size: 14px !important;
    line-height: 1.7 !important;
    margin-bottom: 0 !important;
}

/* "Ver galería" ahora en azul brillante sobre fondo blanco — se lee bien */
.service-item-3 .service-content p strong[style] {
    color: #191970 !important;
}

/* Hover sutil en la imagen */
.service-item-3:hover .service-thumb img {
    transform: scale(1.04) !important;
}


/* ═══════════════════════════════════════════════════════
   AG — exp-section con iconos FontAwesome en lugar de imágenes
   ═══════════════════════════════════════════════════════ */

/* Fondo blanco, padding reducido y textos oscuros */
.exp-section {
    background-color: #ffffff !important;
    padding-top: 80px !important;
    padding-bottom: 80px !important;
}

.exp-section .exp-heading {
    margin-bottom: 20px !important;
}

.exp-section .sub-heading,
.exp-section .section-title,
.exp-section .section-title span,
.exp-item .title {
    color: #1a1a1a !important;
}

.exp-item .exp-content p {
    color: #555555 !important;
}

.exp-item .exp-content .line {
    background-color: #cccccc !important;
    opacity: 1 !important;
}

.exp-item .exp-content .line::before {
    background-color: #cccccc !important;
}

/* Icono al lado del título */
.exp-item .exp-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0px;
}

.exp-img.exp-img-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    background: none !important;
    border-radius: 0 !important;
    height: auto !important;
    /* Quita el alto de 180px del template */
    margin-bottom: 0 !important;
    /* Quita el margen inferior */
    flex-shrink: 0;
}

.exp-img.exp-img-icon i {
    font-size: 1.7rem !important;
    color: #191970 !important;
    line-height: 1 !important;
}

.exp-item .exp-header .title {
    margin: 0 !important;
    line-height: 1.2 !important;
    font-size: 1.75rem !important;
    font-weight: 400 !important;
    letter-spacing: -0.01em !important;
    text-transform: none !important;
}

.exp-section .exp-wrap .exp-content,
.exp-section .exp-wrap .exp-content p {
    max-width: 100% !important;
    width: 100% !important;
}

/* ═══════════════════════════════════════════════════════
   AG — project-item-wrap-2 en Bootstrap grid (sin stacking JS)
   Reemplaza el project-item-wrap-2 que apilaba en scroll
   ═══════════════════════════════════════════════════════ */

/* Ocultar texto decorativo "Marbella" solo en móvil */
@media only screen and (max-width: 767px) {
    .project-text {
        display: none !important;
    }
}

/* Evita overflow horizontal en móvil causado por GSAP pin */
/* Usa clip en vez de hidden: hidden promueve overflow-y a auto (CSS spec),
   lo que crea un segundo contenedor con scroll (doble scroll). clip no lo hace. */
.project-section-inner {
    overflow-x: clip !important;
}

#antra-smooth-wrapper,
#antra-smooth-content {
    overflow-x: clip !important;
}

/* Gradiente oscuro inferior en miniaturas para mejorar legibilidad del texto blanco */
/* Restored: project items overlay style with high readability and smaller text */
.project-item-2 {
    position: relative !important;
    background-color: #ffffff !important; /* Pure white card background */
    border-radius: 24px !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important; /* Premium subtle border */
    box-shadow: none !important;
    overflow: hidden !important; /* Clips top image corners */
    display: flex !important;
    flex-direction: column !important;
    margin-bottom: 0 !important;
}

/* Rounded corners for the image thumb */
.project-item-2 .project-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}

/* Disable dark gradient overlay for white backgrounds */
.project-item-2 .project-thumb::before {
    display: none !important;
}

/* Absolute tags layout inside the image thumb */
.project-item-2 .project-thumb ul {
    position: absolute !important;
    top: 40px !important;
    left: 44px !important;
    z-index: 5 !important;
}

/* Estilo con contraste para los botones/etiquetas en las miniaturas de los proyectos */
.project-item-2 .project-thumb ul li {
    background: rgba(25, 25, 112, 0.85) !important;
    /* Midnight Blue del tema */
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Relative content flow below image - ensures it is never cut off */
.project-item-2 .project-content {
    position: relative !important;
    left: 0 !important;
    bottom: 0 !important;
    right: 0 !important;
    z-index: 5 !important;
    background: #ffffff !important;
    padding: 20px 24px 24px !important; /* Clean padding inside card border */
    margin: 0 !important;
}

/* Title styling: dark blue text, smaller, high contrast */
.project-item-2 .project-content .title {
    color: #191970 !important; /* Midnight Navy */
    font-size: 22px !important; /* Slightly more compact size for inline flow */
    font-weight: 700 !important;
    line-height: 1.3 !important;
    margin-bottom: 6px !important;
    text-transform: none !important;
    text-shadow: none !important; /* No text-shadow on white backgrounds */
}

/* Location text styling: dark grey */
.project-item-2 .project-content p {
    color: #555555 !important;
    font-size: 14px !important;
    margin-bottom: 0 !important;
    text-shadow: none !important;
}

/* ═══════════════════════════════════════════════════════
   AG — 2 cartas por fila en desktop, mobile intacto
   Solo ≥992px para no interferir con scroll/animaciones mobile
   ═══════════════════════════════════════════════════════ */
@media only screen and (min-width: 992px) {
    .project-item-wrap-2 {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .project-item-wrap-2 .project-item-2 .project-thumb {
        height: 460px !important;
    }
}

@media only screen and (min-width: 992px) and (max-width: 1199px) {
    .project-item-wrap-2 .project-item-2 .project-thumb {
        height: 360px !important;
    }
}

/* ═══════════════════════════════════════════════════════
   AG — Botones flotantes (WhatsApp + Scroll to top)
   ═══════════════════════════════════════════════════════ */
.ag-fab-wrap {
    position: fixed;
    bottom: 28px;
    right: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 9999;
}

/* Botón WhatsApp flotante */
.ag-fab-wa {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25d366;
    color: #ffffff;
    font-size: 1.5rem;
    text-decoration: none;
    box-shadow: 0 4px 18px rgba(37, 211, 102, 0.45);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    animation: ag-fab-pulse 2.5s ease-in-out infinite;
}

.ag-fab-wa:hover {
    background: #1fba58;
    color: #ffffff;
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.6);
    animation: none;
}

/* Botón volver arriba */
.ag-fab-top {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #191970;
    color: #ffffff;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(25, 25, 112, 0.35);
    transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

.ag-fab-top.visible {
    opacity: 1;
    pointer-events: auto;
}

.ag-fab-top:hover {
    background: #0e0e50;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(25, 25, 112, 0.5);
}

/* Pulso suave en el botón de WhatsApp */
@keyframes ag-fab-pulse {

    0%,
    100% {
        box-shadow: 0 4px 18px rgba(37, 211, 102, 0.45);
    }

    50% {
        box-shadow: 0 4px 28px rgba(37, 211, 102, 0.75);
    }
}

/* Responsive: en móvil un poco más pequeños */
@media (max-width: 575px) {
    .ag-fab-wrap {
        bottom: 18px;
        right: 18px;
        gap: 10px;
    }

    .ag-fab-wa {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }

    .ag-fab-top {
        width: 42px;
        height: 42px;
        font-size: 0.9rem;
    }
}

/* ── Posicionar la casa flotante debajo de los contadores en móviles/tablets ── */
@media (max-width: 1023px) {
    .service-9 {
        padding-bottom: 260px !important;
        /* Espacio extra abajo para alojar la casa sin solapamiento */
    }

    .service-9 .service-element {
        position: absolute !important;
        bottom: 25px !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        /* Centrado horizontal */
        width: 85% !important;
        max-width: 380px !important;
        display: block !important;
    }

    .service-9 .service-element .scroll-img {
        width: 100% !important;
        height: auto !important;
        transform: none !important;
        /* Prevenir desfases residuales de animaciones */
    }
}

/* ── Servicios: tarjetas con altura uniforme y fila inferior centrada ── */
.exp-section .exp-wrap>[class*="col-"] {
    display: flex;
    margin-top: 0 !important;
    /* Desactiva el efecto escalera */
    margin-bottom: 40px;
    /* Espacio entre filas */
}

.exp-section .exp-wrap .exp-item {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    max-width: 100%;
}

.exp-section .exp-wrap .exp-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    text-align: left;
}

.exp-section .exp-wrap .exp-content p {
    flex: 1;
    text-align: left;
}

/* ── Contenedor responsive para video de YouTube (16:9) ── */
.ag-video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    /* Relación de aspecto 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    background: #000;
}

.ag-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Mobile responsive scaling for project overlay items */
@media only screen and (max-width: 991px) {
    .project-item-2 .project-thumb {
        height: 380px !important;
    }
    .project-item-2 .project-content {
        position: relative !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        padding: 16px 20px 20px !important;
    }
    .project-item-2 .project-content .title {
        font-size: 18px !important;
    }
    .project-item-2 .project-thumb ul {
        top: 30px !important;
        left: 28px !important;
    }
}

@media only screen and (max-width: 575px) {
    .project-item-2 .project-thumb {
        height: 300px !important;
    }
    .project-item-2 .project-content {
        position: relative !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        padding: 12px 16px 16px !important;
    }
    .project-item-2 .project-content .title {
        font-size: 15px !important;
    }
    .project-item-2 .project-thumb ul {
        top: 20px !important;
        left: 20px !important;
    }
}

/* Reduce vertical padding gaps between sections */
.about-section {
    padding: 50px 0 !important;
}

.about-section + .about-section {
    padding-top: 20px !important; /* reduce gap when sections are stacked */
}

/* Normalize spacing of major index sections on desktop/mobile */
.exp-section,
.video-section,
.project-section-2,
.project-section-7,
.faq-section,
.newsletter-section,
.contact-section {
    padding-top: 80px !important;
    padding-bottom: 80px !important;
}

/* On mobile/tablet, make section spacing even more compact */
@media only screen and (max-width: 767px) {
    .exp-section,
    .video-section,
    .project-section-2,
    .project-section-7,
    .faq-section,
    .newsletter-section,
    .contact-section,
    .project-section-inner {
        padding-top: 50px !important;
        padding-bottom: 50px !important;
    }
}

/* ── Portadas de proyectos enteras sin recortar (object-fit: contain) ── */
.project-item-2 .project-thumb,
.project-item-7 .project-thumb,
.project-item-2 .project-thumb .swiper,
.project-item-7 .project-thumb .swiper,
.project-item-2 .project-thumb .swiper-slide,
.project-item-7 .project-thumb .swiper-slide {
    background-color: #ffffff !important; /* Fondo blanco */
    border: none !important; /* Remove inner border */
    border-radius: 0 !important; /* Remove inner border-radius */
}

.project-item-2 .project-thumb img,
.project-item-7 .project-thumb img {
    object-fit: contain !important;
}

/* Ocultar etiquetas de categorías en las portadas de los proyectos */
.project-item-2 .project-thumb ul,
.project-item-7 .project-thumb ul {
    display: none !important;
}

/* Flechas de navegación de Swiper en color azul oscuro para contrastar en fondo blanco */
.project-item-7 .swiper-button-prev,
.project-item-7 .swiper-button-next {
    color: #191970 !important;
}

/* ── Navegación de Proyectos en Sidebar ── */
.ag-sidebar-nav {
    margin-top: 30px;
    margin-bottom: 30px;
}
.ag-sidebar-nav .nav-title {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: rgba(255, 255, 255, .55) !important;
    margin-bottom: 14px;
    font-weight: 600;
}
.ag-sidebar-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ag-sidebar-nav-list li a {
    font-size: 1.15rem;
    color: #ffffff !important;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
}
.ag-sidebar-nav-list li a i {
    font-size: 0.9rem;
    margin-left: auto;
    color: rgba(255, 255, 255, 0.4);
    transition: all 0.2s ease;
}
.ag-sidebar-nav-list li a:hover {
    color: var(--tl-color-theme-primary) !important;
    padding-left: 5px;
}
.ag-sidebar-nav-list li a:hover i {
    color: var(--tl-color-theme-primary) !important;
    transform: translateX(3px);
}

/* Ocultar la navegación estática del sidebar en celulares/tabletas para evitar duplicación con el menú dinámico */
@media (max-width: 991px) {
    .ag-sidebar-nav {
        display: none !important;
    }
}