/* ========== SERVICIOS ESPECÍFICOS ========== */
.services-container {
    min-height: 80vh;
    background: #ffffff; /* Fondo completamente blanco */
    padding: 0;
}

.services-sidebar {
    background: var(--brand-black);
    color: var(--white);
    min-height: 80vh;
    padding: 2rem 0;
    position: sticky;
    top: 76px;
    transition: transform 0.3s ease;
}

.services-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.services-menu li {
    margin: 0;
}

.service-item {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--white);
    text-decoration: none;
    transition: var(--transition-normal);
    border-left: 3px solid transparent;
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 0.95rem;
    font-weight: 400;
}

.service-item:hover {
    background: var(--brand-dark-gray);
    border-left-color: var(--brand-beige);
    color: var(--white);
    transform: translateX(5px);
}

.service-item.active {
    background: var(--brand-beige);
    color: var(--brand-black);
    border-left-color: var(--brand-black);
    font-weight: 600;
}

/* ========== SIDEBAR MÓVIL - NUEVO ========== */
.services-mobile-toggle {
    display: none;
    position: fixed;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    background: var(--brand-black);
    color: var(--white);
    padding: 20px 10px;
    border-radius: 0 15px 15px 0;
    cursor: pointer;
    z-index: 1050;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    min-height: 140px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.services-mobile-toggle:hover {
    background: var(--brand-beige);
    color: var(--brand-black);
    transform: translateY(-50%) translateX(3px);
}

.services-mobile-toggle.hidden {
    transform: translateY(-50%) translateX(-100%);
    opacity: 0;
    pointer-events: none;
}

.toggle-text {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 600;
    font-size: 12px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    letter-spacing: 1px;
}

.sidebar-close-btn {
    display: none;
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 24px;
    cursor: pointer;
    z-index: 1051;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.sidebar-close-btn:hover {
    background: var(--brand-beige);
    color: var(--brand-black);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
}

/* ========== WRAPPER Y BANNER ========== */
.services-content-wrapper {
    padding: 0;
    position: relative;
    background: #ffffff; /* Asegurar fondo blanco */
}

.services-banner {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.services-content {
    background: var(--white);
    min-height: 80vh;
    padding: 3rem;
    position: relative;
}

.service-detail {
    display: none;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.5s ease-in-out;
}

.service-detail.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.service-detail.fade-out {
    opacity: 0;
    transform: translateY(-30px);
}

.service-title {
    font-family: 'Glacial Indifference', sans-serif;
    color: var(--brand-black);
    font-size: 2.5rem;
    margin-bottom: 2rem;
    font-weight: 700;
}

.service-text {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--brand-dark-gray);
    text-align: justify;
}

.service-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    transition: var(--transition-normal);
}

.service-image:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-hover);
}

/* ========== LAYOUTS ESPECÍFICOS ========== */
.layout-left .row {
    align-items: center;
    display: flex;
    flex-direction: row;
}

.layout-right .row {
    align-items: center;
    display: flex;
    flex-direction: row-reverse;
}

@media (min-width: 768px) {
    .layout-left .row {
        flex-direction: row;
    }
    
    .layout-right .row {
        flex-direction: row-reverse;
    }
}

@media (max-width: 767px) {
    .layout-left .row,
    .layout-right .row {
        flex-direction: column !important;
    }
    
    .layout-right .col-md-6:has(.service-image) {
        order: 1;
    }
    
    .layout-right .col-md-6:has(.service-text) {
        order: 2;
    }
}

.service-highlights {
    background: var(--brand-light-beige);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin: 1.5rem 0;
}

.service-highlights h4 {
    color: var(--brand-black);
    font-family: 'Glacial Indifference', sans-serif;
    font-weight: 600;
    margin-bottom: 1rem;
}

.service-highlights ul {
    margin: 0;
    padding-left: 1.5rem;
}

.service-highlights li {
    margin-bottom: 0.5rem;
    font-weight: 500;
}

/* ========== CTA DE CONTACTO - AGREGADO DESDE NUESTROEQUIPO.CSS ========== */
#team-contact-cta {
    background: linear-gradient(135deg, var(--brand-light-beige) 0%, #f0ebe4 100%);
    text-align: center;
}

#team-contact-cta h3 {
    font-family: 'Glacial Indifference', sans-serif;
    color: var(--brand-black);
    margin-bottom: 1rem;
}

#team-contact-cta .lead {
    color: var(--brand-dark-gray);
    margin-bottom: 2rem;
}

/* ========== BOTÓN WHATSAPP CORREGIDO ========== */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 20px;
    right: 20px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    text-align: center;
    font-size: 24px;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.whatsapp-float:hover {
    background-color: #128C7E;
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
    color: white;
    text-decoration: none;
}

.whatsapp-float.above-footer {
    bottom: 100px; /* Mantiene distancia del footer */
}

.whatsapp-float i {
    font-size: 28px;
}

/* Loading animation */
.loading-service {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.loading-service .spinner-border {
    color: var(--brand-beige);
}

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

/* Large Desktop (1200px+) */
@media (min-width: 1200px) {
    .services-banner {
        height: 220px;
    }
    
    .service-image {
        height: 420px;
    }
}

/* Desktop (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .services-banner {
        height: 200px;
    }
    
    .service-title {
        font-size: 2.2rem;
    }
    
    .service-text {
        font-size: 1.05rem;
    }
    
    .services-content {
        padding: 2.5rem;
    }
}

/* Tablet y móvil - CAMBIOS PRINCIPALES */
@media (max-width: 991px) {
    /* Mostrar botón toggle móvil */
    .services-mobile-toggle {
        display: flex;
    }
    
    /* Sidebar como overlay en móvil */
    .services-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        z-index: 1041;
        min-height: 100vh;
        margin-top: 0;
        padding: 2rem 0;
        transform: translateX(-100%);
        overflow-y: auto;
    }
    
    .services-sidebar.show {
        transform: translateX(0);
        left: 0;
    }
    
    .sidebar-close-btn {
        display: block;
    }
    
    .sidebar-overlay.show {
        display: block;
    }
    
    /* Contenido principal ajustado */
    .services-content-wrapper {
        margin-left: 0;
        width: 100%;
    }
    
    .services-banner {
        height: 150px;
    }
    
    .services-content {
        padding: 2rem;
        min-height: auto;
        margin-left: 0;
    }
    
    .service-title {
        font-size: 2rem;
    }
    
    .service-image {
        height: 250px;
        margin-bottom: 1.5rem;
    }
    
    .service-text {
        font-size: 1rem;
    }
    
    .service-highlights {
        padding: 1.2rem;
        margin: 1.2rem 0;
    }
}

/* Mobile Large (576px - 767px) */
@media (max-width: 767px) {
    .services-mobile-toggle {
        min-height: 100px;
        padding: 12px 6px 12px 10px;
    }
    
    .toggle-text {
        font-size: 12px;
    }
    
    .toggle-icon {
        font-size: 14px;
    }
    
    .services-sidebar {
        width: 260px;
    }
    
    .services-banner {
        height: 120px;
    }
    
    .services-content {
        padding: 1.5rem;
    }
    
    .service-title {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }
    
    .service-text {
        font-size: 1rem;
        text-align: left;
    }
    
    .service-item {
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
    }
    
    .service-image {
        height: 220px;
        margin-bottom: 1.2rem;
    }
    
    .service-highlights {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .service-highlights h4 {
        font-size: 1.1rem;
    }
    
    /* WhatsApp button ajustado para móvil */
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
        font-size: 20px;
    }
    
    .whatsapp-float i {
        font-size: 24px;
    }
    
    /* Desactivar efectos hover en móvil */
    .service-image:hover {
        transform: none;
        box-shadow: var(--shadow-lg);
    }
    
    .service-item:hover {
        transform: none;
    }
}

/* Mobile Small (320px - 575px) */
@media (max-width: 575px) {
    .services-mobile-toggle {
        min-height: 90px;
        padding: 10px 5px 10px 8px;
    }
    
    .toggle-text {
        font-size: 11px;
    }
    
    .services-sidebar {
        width: 240px;
    }
    
    .services-banner {
        height: 100px;
    }
    
    .services-content {
        padding: 1rem;
    }
    
    .service-title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
        line-height: 1.3;
    }
    
    .service-text {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .service-item {
        font-size: 0.85rem;
        padding: 0.6rem 0.8rem;
    }
    
    .service-image {
        height: 200px;
        margin-bottom: 1rem;
    }
    
    .service-highlights {
        padding: 0.8rem;
        margin: 0.8rem 0;
    }
    
    .service-highlights h4 {
        font-size: 1rem;
        margin-bottom: 0.8rem;
    }
    
    .service-highlights ul {
        padding-left: 1.2rem;
    }
    
    .service-highlights li {
        font-size: 0.9rem;
        margin-bottom: 0.4rem;
    }
    
    .whatsapp-float {
        bottom: 10px;
        right: 10px;
    }
}

/* Mobile Extra Small (< 400px) */
@media (max-width: 399px) {
    .services-mobile-toggle {
        min-height: 80px;
    }
    
    .services-sidebar {
        width: 220px;
    }
    
    .services-banner {
        height: 80px;
    }
    
    .services-content {
        padding: 0.8rem;
    }
    
    .service-title {
        font-size: 1.3rem;
        margin-bottom: 0.8rem;
    }
    
    .service-text {
        font-size: 0.9rem;
    }
    
    .service-image {
        height: 180px;
    }
    
    .service-item {
        font-size: 0.8rem;
        padding: 0.5rem 0.6rem;
    }
    
    .services-sidebar h2 {
        font-size: 1.3rem;
    }
}

/* ========== ACCESIBILIDAD ========== */
@media (prefers-reduced-motion: reduce) {
    .service-detail,
    .service-image,
    .service-item,
    .services-sidebar,
    .services-mobile-toggle {
        transition: none !important;
    }
    
    .service-image:hover {
        transform: none !important;
    }
    
    .service-item:hover {
        transform: none !important;
    }
}

.service-item:focus,
.service-image:focus,
.services-mobile-toggle:focus {
    outline: 2px solid var(--brand-beige);
    outline-offset: 2px;
}

@media (prefers-contrast: high) {
    .services-sidebar {
        border-right: 2px solid var(--brand-beige);
    }
    
    .service-item {
        border-bottom: 1px solid var(--brand-dark-gray);
    }
    
    .service-highlights {
        border: 1px solid var(--brand-medium-gray);
    }
}