﻿/* --- VARIABLES Y CONFIGURACIÓN BASE --- */
:root {
    --transition-base: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --section-padding-mobile-y: 2.5rem;
    --section-padding-desktop-y: 5.5rem;
    --btn-pill-radius: 999px;
    --icon-bg-contrast: color-mix(in srgb, var(--primary-color) 15%, transparent);
    --icon-fg-contrast: color-mix(in srgb, var(--primary-color) 80%, white 20%);
    --landing-section-bg: #ffffff;
}

[data-bs-theme="dark"] {
    --landing-section-bg: #121212;
}

/* Tema Crema: variante de paleta clara con fondo calido.
   Solo aplica mientras el modo de color es claro (si el visitante
   alterna a oscuro, prevalece el tema oscuro). */
html[data-landing-cream="true"][data-bs-theme="light"] {
    --landing-section-bg: #FAF6EE;
}

html[data-landing-cream="true"][data-bs-theme="light"] body {
    background-color: #FAF6EE;
}

html {
    scroll-behavior: smooth;
}

section:not(.hero-section) {
    padding-top: var(--section-padding-mobile-y) !important;
    padding-bottom: var(--section-padding-mobile-y) !important;
    background-color: var(--landing-section-bg) !important;
}

@media (min-width: 992px) {
    section:not(.hero-section) {
        padding-top: var(--section-padding-desktop-y) !important;
        padding-bottom: var(--section-padding-desktop-y) !important;
    }
}

.premium-card {
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 24px !important;
    background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 30%);
    background-blend-mode: overlay;
}

.btn,
.btn.btn-primary,
.btn.btn-outline-light,
.btn.btn-outline-primary {
    border-radius: var(--btn-pill-radius) !important;
}

/* --- HERO SECTION --- */
.hero-section {
    position: relative;
    border-radius: 0 0 52px 52px;
    min-height: 65vh !important;
    overflow: hidden;
    margin-bottom: 0;
    will-change: transform;
}

.hero-section::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(8, 12, 20, 0.72) 0%, rgba(8, 12, 20, 0.52) 45%, rgba(0, 0, 0, 0.9) 100%);
    pointer-events: none;
}

@media (min-width: 992px) {
    .hero-section {
        border-radius: 0 0 96px 96px;
        min-height: 85vh !important;
        margin-bottom: 0;
    }
}

.hero-section + .section-curved {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.gallery-grid-3 .gallery-grid-item:nth-child(1) {
    grid-column: 1 / -1;
}

.gallery-grid-3 .gallery-grid-item:nth-child(1) .gallery-img-wrapper {
    aspect-ratio: 16 / 9;
}

.gallery-grid-item .gallery-img-wrapper {
    aspect-ratio: 1 / 1;
    border-radius: 24px;
}

@media (min-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .gallery-grid-3 .gallery-grid-item:nth-child(1) {
        grid-column: auto;
    }

    .gallery-grid-3 .gallery-grid-item:nth-child(1) .gallery-img-wrapper {
        aspect-ratio: 1 / 1;
    }
}

.map-embed-container {
    overflow: hidden;
    border-radius: 24px;
}

.map-embed-container iframe {
    width: 100%;
    height: 100%;
    min-height: 400px;
    border: 0;
    display: block;
}

.hero-title {
    color: var(--bs-heading-color);
    line-height: 1.1;
    letter-spacing: -1px;
}

.hero-btn-primary,
.hero-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
}

.hero-logo {
    max-height: 90px;
    width: auto;
    border-radius: 15px;
    object-fit: contain;
}

/* --- TRANSICIONES Y EFECTOS --- */
.transition-up {
    transition: var(--transition-base);
    will-change: transform;
}

.transition-up:hover {
    transform: translateY(-10px);
}

.hover-card {
    transition: var(--transition-base);
    will-change: transform, box-shadow;
}

.hover-card:hover {
    background-color: var(--bs-body-bg);
    box-shadow: 0 15px 30px rgba(0,0,0,0.05);
    transform: translateY(-5px);
}

/* --- ICONOGRAFÍA --- */
.icon-circle {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    font-size: 1.2rem;
}

@media (min-width: 992px) {
    .icon-circle {
        width: 70px;
        height: 70px;
        border-radius: 22px;
        font-size: 1.5rem;
    }
}

.icon-badge {
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    font-size: 1.4rem;
}

.icon-circle.icon-brand,
.icon-badge.icon-brand {
    background-color: var(--icon-bg-contrast) !important;
    color: var(--icon-fg-contrast) !important;
    border: 1px solid color-mix(in srgb, var(--primary-color) 30%, transparent);
}

@supports not (background: color-mix(in srgb, #000 20%, transparent)) {
    .icon-circle.icon-brand,
    .icon-badge.icon-brand {
        background-color: rgba(255, 255, 255, 0.15) !important;
        color: #ffffff !important;
        border-color: rgba(255, 255, 255, 0.2);
    }
}

.icon-box-small {
    width: 48px;
    height: 48px;
    background-color: var(--primary-soft);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* --- FILTROS DE SERVICIOS --- */
.services-filters-nav-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.35rem;
}

.services-filters-nav-wrapper::-webkit-scrollbar {
    height: 6px;
}

.services-filters-nav-wrapper::-webkit-scrollbar-thumb {
    background-color: color-mix(in srgb, var(--primary-color) 45%, transparent);
    border-radius: 999px;
}

.services-filters-nav {
    gap: 0.5rem;
    flex-wrap: nowrap;
    min-width: max-content;
}

.services-filters-nav .nav-link {
    border-radius: 999px;
    border: 1px solid var(--bs-border-color);
    color: var(--bs-body-color);
    background-color: var(--bs-body-bg);
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.services-filters-nav .nav-link.active,
.services-filters-nav .nav-link:hover {
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* --- CARDS DE SERVICIOS --- */
.service-wrapper {
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    z-index: 1;
    will-change: transform, opacity, filter;
}

.service-filter-transition {
    opacity: 1;
    transition: opacity 0.22s ease;
}

.service-filter-transition.is-fading {
    opacity: 0;
}

.service-character-card {
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: 22px;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.28s ease;
    box-shadow: 0 8px 22px rgba(0,0,0,0.04);
}

.service-card-compact .card-body {
    min-height: 132px;
}

.service-compact-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.service-compact-main {
    min-width: 0;
    max-width: 100%;
}

.service-compact-title {
    font-size: 1.05rem;
    color: var(--bs-heading-color);
    white-space: normal;
    overflow: visible;
    text-overflow: initial;
    word-break: break-word;
}

.service-compact-badge {
    font-size: 0.65rem;
}

.service-compact-description {
    color: var(--bs-body-color);
    font-size: 0.84rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    opacity: 0.9;
}

.service-compact-action {
    min-width: 120px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.service-compact-price {
    font-size: 1.2rem;
    line-height: 1;
    color: var(--bs-heading-color);
    white-space: nowrap;
}

.service-compact-btn {
    min-width: 110px;
    padding: 0.45rem 0.9rem;
    font-size: 0.82rem;
}

@media (max-width: 991.98px) {
    .service-card-compact .card-body {
        min-height: 122px;
    }

    .service-compact-price {
        font-size: 1.1rem;
    }

    .service-compact-action {
        min-width: 108px;
    }
}

@media (max-width: 575.98px) {
    .service-card-compact .card-body {
        gap: 0.75rem;
        flex-wrap: wrap;
    }

    .service-compact-main {
        width: calc(100% - 58px);
    }

    .service-compact-action {
        width: 100%;
        min-width: 0;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .service-compact-btn {
        min-width: 96px;
    }
}

.services-spotlight-grid:hover .service-wrapper {
    opacity: 0.5;
    filter: grayscale(30%);
    transform: scale(0.95);
}

.services-spotlight-grid .service-wrapper:hover {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.08) translateY(-10px);
    z-index: 10;
}

.services-spotlight-grid .service-wrapper:hover .service-character-card {
    border-color: var(--primary-color);
    box-shadow: 0 18px 38px rgba(0,0,0,0.14);
}

/* --- STAFF CARDS --- */
.staff-pro-card {
    position: relative;
    height: 420px;
    border-radius: 35px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    background-color: var(--bs-tertiary-bg);
}

.staff-pro-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: transform;
}

.staff-pro-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem 1.5rem;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.8) 40%, rgba(15, 23, 42, 0) 100%);
    color: white;
    transform: translateY(110px);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.4s;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    will-change: transform;
}

.staff-pro-role {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 0.25rem;
    opacity: 0.9;
}

.staff-pro-name {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0;
    line-height: 1.1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.staff-pro-desc {
    margin-top: 1rem;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease 0.1s;
    height: 85px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    line-height: 1.4;
}

.staff-pro-cta {
    margin-top: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease 0.2s;
}

.staff-pro-card:hover .staff-pro-img {
    transform: scale(1.1);
}

.staff-pro-card:hover .staff-pro-info {
    transform: translateY(0);
    background: linear-gradient(to top, rgba(15, 23, 42, 0.98) 0%, rgba(15, 23, 42, 0.7) 60%, rgba(15, 23, 42, 0.1) 100%);
}

.staff-pro-card:hover .staff-pro-desc,
.staff-pro-card:hover .staff-pro-cta {
    opacity: 1;
    transform: translateY(0);
}

.staff-pro-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bs-secondary-bg);
    font-size: 8rem;
    font-weight: 900;
    color: white;
    text-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Tarjeta de un solo profesional: más grande para que la foto no se vea pequeña */
.staff-pro-card--single {
    height: 480px;
}

@media (max-width: 768px) {
    .staff-pro-card {
        height: 250px;
        border-radius: 24px;
    }
    .staff-pro-card--single {
        height: 380px;
    }

    .staff-pro-info {
    transform: translateY(0);
    background: linear-gradient(to top, rgba(15, 23, 42, 0.98) 0%, rgba(15, 23, 42, 0.8) 10%, rgba(15, 23, 42, 0.1) 40%);
    padding: 0.85rem 0.75rem;
    }

    }
    .staff-pro-role {
        font-size: 0.7rem;
        letter-spacing: 0.8px;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
    }
    .staff-pro-desc {
        display: none;
    }
    .staff-pro-cta {
        display: none;
    }
    .staff-pro-name {
        font-size: 1.05rem;
        line-height: 1.2;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-shadow: 0 1px 4px rgba(0, 0, 0, 0.75);
    }
    .staff-pro-btn {
        font-size: 0.78rem;
        padding: 0.35rem 0.65rem !important;
    }
}

/* --- PASOS/STEPS --- */
.step-icon-pro {
    width: 85px;
    height: 85px;
    background-color: var(--primary-soft);
    color: var(--primary-color);
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    position: relative;
    transform: rotate(-3deg);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.hover-card:hover .step-icon-pro {
    transform: rotate(0deg) scale(1.05);
}

.step-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 35px;
    height: 35px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    border: 4px solid var(--bs-body-bg);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.step-card {
    border-radius: 35px;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color-translucent);
    z-index: 2;
}

/* --- GALERÍA --- */
.gallery-img-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    transform: translateY(0);
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    background-color: var(--bs-secondary-bg);
    will-change: transform, box-shadow;
}

.gallery-img-wrapper:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    will-change: transform;
}

.gallery-img-wrapper:hover .gallery-img {
    transform: scale(1.05);
}

/* --- HELPERS --- */
.shadow-2xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.12);
}

.bg-soft {
    background-color: var(--bs-tertiary-bg);
}

.text-balance {
    text-wrap: balance;
}

.section-curved {
    border-radius: 40px;
}

.contacto-curved {
    border-radius: 40px 40px 0 0;
}

.mobile-sticky-cta {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    width: min(92%, 420px);
    bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 1090;
}

.mobile-sticky-cta-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0.65rem 0.55rem 0.85rem;
    border-radius: 16px;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color-translucent);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
}

.mobile-sticky-cta-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    color: var(--bs-secondary-color);
    font-size: 0.9rem;
}

.mobile-sticky-cta-meta strong {
    color: var(--bs-heading-color);
    font-size: 1rem;
    font-weight: 700;
}

.mobile-sticky-cta-meta span {
    font-size: 0.82rem;
}

.mobile-sticky-cta-btn {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
    border-radius: 999px;
    letter-spacing: 0.2px;
    flex-shrink: 0;
}

.services-more-btn {
    background-color: transparent;
    border: 1px solid color-mix(in srgb, var(--primary-color) 50%, white 50%);
    color: var(--primary-color);
    box-shadow: none;
}

.services-more-btn:hover,
.services-more-btn:focus-visible {
    background-color: color-mix(in srgb, var(--primary-color) 10%, transparent);
    color: var(--primary-color);
}

/* --- VALORES --- */
.values-card {
    background: var(--bs-body-bg);
}

.values-section {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
}

.values-section .container {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* --- VALORES --- */
.values-item {
    background-color: transparent;
}

/* --- FAQ --- */
.accordion-custom .accordion-item {
    border: none;
    border-radius: 20px !important;
    overflow: hidden;
    margin-bottom: 1.2rem;
}

.accordion-custom .accordion-button {
    padding: 1.5rem;
    border-radius: 20px !important;
    font-weight: 700;
}

.accordion-custom .accordion-button:not(.collapsed) {
    background-color: var(--primary-soft);
    color: var(--primary-color);
    box-shadow: none;
}

/* --- RESPONSIVE --- */
@media (min-width: 992px) {
    .section-curved {
        border-radius: 80px;
    }
    .contacto-curved {
        border-radius: 80px 80px 0 0;
    }
}

@media (max-width: 768px) {
    .display-3 {
        font-size: 2.2rem;
    }
    .display-5 {
        font-size: 1.8rem;
    }
    .hero-logo {
        max-height: 60px;
    }
    .hero-btn-primary,
    .hero-btn-secondary {
        padding: 0.7rem 1.25rem !important;
        font-size: 0.95rem !important;
        min-height: 46px;
    }
    .hero-btn-secondary {
        min-width: 0;
    }
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    .p-5 {
        padding: 1.25rem !important;
    }
    .step-card {
        padding: 1rem !important;
        border-radius: 24px;
    }
    .values-section {
        padding-top: 0.25rem !important;
        padding-bottom: 0.25rem !important;
    }
    .values-grid {
        --bs-gutter-y: 0.45rem;
    }
    .values-card {
        display: flex;
        align-items: center;
        gap: 0.7rem;
        text-align: left;
        border-radius: 16px !important;
        padding: 0.62rem 0.72rem !important;
    }
    .values-item .values-icon {
        width: 38px;
        height: 38px;
        border-radius: 12px;
        font-size: 0.95rem;
        margin-bottom: 0 !important;
        flex-shrink: 0;
        box-shadow: none !important;
    }
    .values-title {
        font-size: 0.95rem;
        margin-bottom: 0.1rem !important;
    }
    .values-text {
        font-size: 0.76rem;
        line-height: 1.2;
    }
    .values-card.hover-card:hover {
        transform: none;
        box-shadow: none;
    }
    .step-icon-pro {
        width: 58px;
        height: 58px;
        font-size: 1.5rem;
        border-radius: 18px;
        margin-bottom: 0.9rem !important;
    }
    .step-badge {
        width: 26px;
        height: 26px;
        font-size: 0.75rem;
        top: -8px;
        right: -8px;
        border-width: 2px;
    }
    .step-card h4 {
        font-size: 1rem;
        margin-bottom: 0.5rem !important;
    }
    .step-card p {
        font-size: 0.82rem;
        line-height: 1.25;
    }
    .row.g-4.position-relative.mt-2 {
        --bs-gutter-y: 0.65rem;
    }
    .staff-pro-card {
        height: 220px;
        border-radius: 22px;
    }
    .staff-pro-info {
        transform: translateY(0);
        background: linear-gradient(to top, rgba(15, 23, 42, 0.98) 0%, rgba(15, 23, 42, 0.8) 60%, rgba(15, 23, 42, 0.1) 100%);
        padding: 0.85rem 0.75rem;
    }
    .staff-pro-role {
        font-size: 0.7rem;
        letter-spacing: 0.8px;
    }
    .staff-pro-desc {
        display: none;
    }
    .staff-pro-cta {
        display: none;
    }
    .staff-pro-name {
        font-size: 0.98rem;
        line-height: 1.2;
    }
    .gallery-img-wrapper {
        aspect-ratio: 1 / 1;
        border-radius: 24px;
    }
    .gallery-grid-3 .gallery-grid-item:nth-child(1) {
        grid-column: 1 / -1;
    }
    .gallery-grid-3 .gallery-grid-item:nth-child(1) .gallery-img-wrapper {
        aspect-ratio: 1 / 1;
    }
    .service-wrapper {
        max-width: 320px;
    }
    .service-character-card {
        border-radius: 22px;
    }
    .service-character-card .card-body {
        padding: 0.85rem !important;
    }
    .service-character-card .icon-badge {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    .service-character-card h4 {
        font-size: 1.05rem;
    }
    .service-character-card p {
        font-size: 0.82rem;
        margin-bottom: 0.7rem !important;
    }
    .service-character-card .h4 {
        font-size: 1.3rem;
    }
    .service-character-card .btn {
        min-height: 40px;
        font-size: 0.9rem;
    }
    .services-more-btn {
        display: inline-flex;
        min-width: 220px;
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
        font-size: 0.95rem !important;
        background-color: transparent !important;
        border-color: color-mix(in srgb, var(--primary-color) 45%, white 55%) !important;
    }
    body {
        padding-bottom: 6.5rem;
    }
    .mobile-sticky-cta {
        width: min(94%, 420px);
    }
    .mobile-sticky-cta-shell {
        padding: 0.5rem 0.55rem 0.5rem 0.75rem;
        gap: 0.55rem;
    }
    .mobile-sticky-cta-meta {
        font-size: 0.82rem;
    }
    .mobile-sticky-cta-meta strong {
        font-size: 0.92rem;
    }
    .mobile-sticky-cta-btn {
        min-height: 40px;
        padding: 0.52rem 0.95rem;
        font-size: 0.88rem;
    }
    .services-spotlight-grid {
        padding-bottom: 0.5rem;
    }
}

/* --- OPTIMIZACIÓN DE CARGA --- */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Lazy loading placeholders */
img[loading="lazy"] {
    background-color: var(--bs-secondary-bg);
}
