/* ========== IMPORTS ========== 
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@300;400;500;600;700&display=swap');
*/
/* Glacial Indifference - Font local o CDN alternativo */
@font-face {
    font-family: 'Glacial Indifference';
    src: url('https://fonts.cdnfonts.com/css/glacial-indifference') format('woff2');
    font-weight: 300 700;
    font-display: swap;
}

/* ========== VARIABLES CSS ========== */
:root {
    /* Paleta de colores del brochure Chiesa & Chiesa */
    --brand-black: #1a1a1a;
    --brand-dark-gray: #3a3a3a;
    --brand-medium-gray: #6a6a6a;
    --brand-light-gray: #9a9a9a;
    --brand-beige: #9eb597;
    --brand-light-beige: #9eb597;
    --brand-white: #ffffff;
    --brand-craim: #ced6cc;
    
    /* Colores principales actualizados con la paleta */
    --primary-color: var(--brand-black);
    --primary-hover: var(--brand-dark-gray);
    --primary-active: var(--brand-medium-gray);
    --secondary-color: var(--brand-beige);
    --accent-color: var(--brand-light-beige);
    --light-color: #f8f9fa;
    --dark-color: var(--brand-black);
    --white: var(--brand-white);
    --black: var(--brand-black);
    
    /* Spacing */
    --section-padding: 80px;
    --card-padding: 2rem;
    --border-radius: 0.5rem;
    --border-radius-sm: 0.25rem;
    --border-radius-lg: 50px;
    
    /* Transitions */
    --transition-fast: all 0.2s ease;
    --transition-normal: all 0.3s ease;
    --transition-slow: all 0.6s ease;
    
    /* Shadows con tonos de la paleta */
    --shadow-sm: 0 2px 4px rgba(26, 26, 26, 0.1);
    --shadow: 0 4px 8px rgba(26, 26, 26, 0.1);
    --shadow-lg: 0 8px 20px rgba(26, 26, 26, 0.15);
    --shadow-hover: 0 10px 25px rgba(26, 26, 26, 0.2);
}

/* ========== RESET Y BASE ========== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body, main, section, .container, .container-fluid {
    transform: none !important;
    font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    font-family: 'Be Vietnam Pro', sans-serif;
    color: var(--brand-dark-gray);
    line-height: 1.6;
    background-color: var(--white);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Glacial Indifference', Georgia, serif;
    font-weight: 200;
    margin-bottom: 1rem;
    color: var(--brand-black);
}

a {
    text-decoration: none;
    transition: var(--transition-normal);
    color: var(--brand-black);
}

a:hover {
    color: var(--brand-beige);
}

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

/* ========== COMPONENTES GLOBALES ========== */

/* Botones con paleta de marca */
.btn {
    padding: 0.5rem 1.5rem;
    border-radius: var(--border-radius-sm);
    transition: var(--transition-normal);
    font-weight: 500;
    border: none;
    cursor: pointer;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: var(--brand-black);
    color: var(--white);
    border: 2px solid var(--brand-black);
}

.btn-primary:hover {
    background-color: var(--brand-beige);
    border-color: var(--brand-beige);
    color: var(--brand-black);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline-primary {
    color: var(--brand-black);
    border: 2px solid var(--brand-black);
    background: transparent;
}

.btn-outline-primary:hover {
    background-color: var(--brand-black);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* ========== BOTONES MINIMALISTAS +INFO ========== */

/* Reemplazar estilo de botones +info con diseño minimalista */
.btn-outline-primary.btn-sm {
    background: rgba(53, 161, 20, 0.10);
    border: none !important;
    padding: 0.5rem 1rem;
    margin-top: 0.5rem;
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--brand-black);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.2, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    box-shadow: none;
}

/* Efecto hover minimalista */
.btn-outline-primary.btn-sm:hover {
    background: rgba(158, 181, 151, 0.40);
    transform: scale(1.1);
    color: var(--brand-black);
    text-decoration: none;
    box-shadow: 0 3px 8px rgba(158, 181, 151, 0.2);
}

/* Efecto active (click) - achica el botón */
.btn-outline-primary.btn-sm:active {
    transform: scale(0.98);
    transition: all 0.1s ease;
    background: rgba(158, 181, 151, 0.12);
}

/* Efecto focus para accesibilidad */
.btn-outline-primary.btn-sm:focus {
    outline: 2px solid var(--brand-beige);
    outline-offset: 2px;
    background: rgba(158, 181, 151, 0.12);
}

/* Animación sutil del icono */
.btn-outline-primary.btn-sm .fas,
.btn-outline-primary.btn-sm .fa {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.btn-outline-primary.btn-sm:hover .fas,
.btn-outline-primary.btn-sm:hover .fa {
    transform: translateX(2px);
}

.card-footer .text-end {
    text-align: right !important; 
    padding-right: 2rem; 
    padding-bottom: 2rem;
}

/* Posición más cerca del texto */
.card-footer.bg-transparent.border-0 {
    padding: 0.5rem 0 0 0;
    margin-top: auto;
}

.card-footer .text-end {
    margin-top: 0;
}

/* Override Bootstrap para eliminar bordes */
.btn-outline-primary.btn-sm:not(:disabled):not(.disabled):active,
.btn-outline-primary.btn-sm:not(:disabled):not(.disabled).active {
    transform: scale(0.98);
    box-shadow: none !important;
    border: none !important;
    background: rgba(158, 181, 151, 0.12);
    color: var(--brand-black);
}

/* Estado disabled si es necesario */
.btn-outline-primary.btn-sm:disabled,
.btn-outline-primary.btn-sm.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    background: rgba(158, 181, 151, 0.03);
}

.btn-outline-primary.btn-sm:disabled:hover,
.btn-outline-primary.btn-sm.disabled:hover {
    transform: none !important;
    background: rgba(158, 181, 151, 0.03);
}

/* ========== SERVICIOS - AJUSTE DE LAYOUT ========== */
#servicios .card {
    background: linear-gradient(135deg, var(--white) 0%, #faf8f5 100%);
    display: flex;
    flex-direction: column;
    height: 100%;
}


#servicios h2 {
    font-family: 'Glacial Indifference', sans-serif;
    color: var(--brand-black);
    text-shadow: 5px 5px 15px rgba(0, 0, 0, 0.7);
}

#servicios .card-body {
    flex: 1;
    padding-bottom: 1rem;
}

#servicios .card:hover {
    background: linear-gradient(135deg, var(--brand-light-beige) 0%, var(--white) 100%);
}

/* Cards con estilo elegante */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
    background: var(--white);
    overflow: hidden;
    border: 1px solid var(--brand-light-beige);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--brand-beige);
}

.card-body {
    padding: var(--card-padding);
}

/* Secciones */
section {
    padding: var(--section-padding) 0;
    position: relative;
}

.bg-light {
    background-color: var(--brand-light-beige) !important;
}

.bg-dark {
    background-color: var(--brand-black) !important;
    color: var(--white);
}

/* ========== HERO SECTION CON VIDEO ========== */
#hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    overflow: hidden;
    padding: 0;
    margin: 0;
}

/* ========== HERO VIDEO CON ANIMACIÃ"N SINCRONIZADA Y CORREGIDA ========== */
.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    opacity: 1;
    transition: opacity 0.3s ease;
    /* Asegurar que el contenido del video estÃ© por encima */
    background: transparent;
}

/* Ocultar imagen de fallback dentro del video */
.hero-video img {
    display: none !important;
}

/* AnimaciÃ³n que se activa solo cuando JavaScript lo indique */
.hero-video.video-animation-ready {
    animation: videoFadeLoop 17.4s ease-in-out infinite;
}

/* Solo mostrar imagen de fallback cuando hay error real */
.hero-video.video-error {
    display: none;
}

.hero-video.video-error + .hero-fallback {
    display: block;
}

/* Estados de carga del video */
.hero-video.loading {
    opacity: 0.8;
}

.hero-video.loaded {
    opacity: 1;
}

/* Fallback background para el hero section en caso de error */
.hero-video-error #hero {
    background: url('assets/hero4.jpg') no-repeat center center;
    background-size: cover;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.6) 0%, rgba(184, 168, 150, 0.3) 100%);
    z-index: 2;
}

#hero .container {
    position: relative;
    z-index: 3;
    text-align: center;
}

.hero-logo  {
    height: auto;
    max-width: 250px;
    margin: 20px;
    width: 100%;
    filter: drop-shadow(6px 4px 6px rgba(0, 0, 0, 0.7));
    z-index: 20;
}

.hero-subtitles {
    max-width: 700px;
    margin: 0 auto 2rem;
    position: relative;
    min-height: 4rem; /* Altura fija para evitar saltos */
}

.hero-subtitle {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 1.4rem;
    font-weight: 400;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    line-height: 1.5;
    color: var(--brand-white);
    z-index: 3;
    position: absolute;
    width: 100%;
    opacity: 0;
    transform: translateY(30px);
}

.hero-subtitle-1 {
    animation: fadeInOutCycle 12s infinite 0s;
}

.hero-subtitle-2 {
    animation: fadeInOutCycle 12s infinite 3s;
}

.hero-subtitle-3 {
    animation: fadeInOutCycle 12s infinite 6s;
}

.hero-subtitle-4 {
    animation: fadeInOutCycle 12s infinite 9s;
}

.hero-button {
    font-size: 1.1rem;
    font-weight: 600;
    padding: 1rem 2.5rem;
    border-radius: var(--border-radius-lg);
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 8px 20px rgba(26, 26, 26, 0.4);
    background: linear-gradient(45deg, var(--brand-black), var(--brand-dark-gray));
    animation: slideUp 1.2s ease-out 0.8s both;
    border: 2px solid var(--brand-beige);
}

.hero-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(184, 168, 150, 0.6);
    background: linear-gradient(45deg, var(--brand-beige), var(--brand-light-beige));
    color: var(--brand-black);
}

/* ========== SECCION NOSOTROS ========== */
#nosotros {
    background: linear-gradient(135deg, var(--brand-light-beige) 0%, #f0ebe4 100%);
    padding-top: var(--section-padding);
}

#nosotros .container {
    background: var(--brand-craim);
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    color: var(--black);
    border: 2px solid var(--brand-beige);
}

#nosotros h2 {
    font-family: 'glacial indiference', sans-serif;
    color: var(--black);
    text-shadow: 5px 5px 15px rgba(0, 0, 0, 0.5);
}

#nosotros p, #filosofia p, #clientes p {
    text-align: justify;
}

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

/* Filosofi­a de Trabajo */
#filosofia {
    background: var(--white);
    padding: 0;
}


#filosofia h2 {
    font-family: 'glacial indiference', sans-serif;
    color: var(--black);
    text-shadow: 5px 5px 15px rgba(0, 0, 0, 0.7);
}

#filosofia p {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--brand-dark-gray);
}

.linea-filosofia{
    width: 30%;
    border: 8px solid var(--brand-light-beige);
    margin: 80px auto ;
    row-gap: 300px;
    opacity: 0.85;
}

/* Nuestros Clientes */
#clientes {
    background: linear-gradient(235deg, var(--brand-light-beige) 0%, #f0ebe4 100%);
}

#clientes h2, #clientes h3 {
    font-family: 'glacial indiference', sans-serif;
    color: var(--black);
    text-shadow: 5px 5px 15px rgba(0, 0, 0, 0.7);
}

#clientes p {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--brand-dark-gray);
}

/* ========== CARROUSEL DE LOGOS ========== */
.clients-carousel-container {
    margin-top: 3rem;
}

.clients-carousel {
    overflow: hidden;
    padding: 2rem 0;
    position: relative;
    max-width: 100%;
}

.clients-track {
    display: flex;
    animation: scrollLogos 25s linear infinite;
    width: max-content; /* Ancho automÃ¡tico basado en el contenido */
}

.client-logo {
    flex: 0 0 auto; /* No encoge ni crece, mantiene su tamaÃ±o natural */
    width: 200px; /* Ancho fijo para cada logo */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 40px; /* Espacio entre logos */
}

.client-logo:last-child {
    margin-right: 0;
}

.client-logo img {
    max-width: 140px;
    max-height: 90px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(0%);
    opacity: 0.7;
    transition: var(--transition-normal);
}

.client-logo:hover img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

/* Nuestros Profesionales */
.team-section {
    background: url('/assets/team-section_bg.jpg') no-repeat center center;
    background-size: cover;
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.team-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.team-section h2 {
    font-family: 'GLACIAL INDIFERENCE', sans-serif;
    color: var(--white);
    text-shadow: 5px 5px 15px rgba(255, 255, 255, 0.7);
}

.team-section .container {
    position: relative;
    z-index: 2;
}

.team-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.team-member {
    text-align: center;
    transition: all 0.4s ease;
    cursor: pointer;
}

.team-photo-wrapper{
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.8);
    border: 4px solid var(--brand-beige);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.team-photo{
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: all 0.4s ease;
    filter: grayscale(70%) brightness(0.9);
}

.team-overlay {
    position: absolute;
    top: 6rem;
    left: 0;
    right: 0;
    bottom: 0;
    /*background: rgba(26, 26, 26, 0.8);*/
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.view-profile {
    color: var(--white);
    background: rgba(0, 0, 0, 0.7);
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.5rem 1rem;
    border: 2px solid var(--white);
    border-radius: 25px;
    transition: all 0.3s ease;
    text-shadow: none;
}

.team-info {
    transition: all 0.4s ease;
}

.team-name {
    font-family: 'Glacial Indifference', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--white);
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.team-role {
    font-family: 'Be Vietnam Pro', sans-serif;
    color: var(--white);
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
    opacity: 0.9;
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 0;
}

/* === EFECTOS HOVER === */
.team-container:hover .team-member:not(:hover) {
    transform: scale(0.9);
    /*opacity: 0.7;
    filter: blur(3px);*/
}

.team-member:hover {
    transform: scale(1.1);
    z-index: 10;
}

.team-member:hover .team-photo-wrapper {
    transform: scale(1.2);
    /*box-shadow: 0 15px 50px rgba(184, 168, 150, 0.4);*/
    border-color: var(--brand-light-beige);
}

.team-member:hover .team-photo {
    filter: grayscale(0%) brightness(1);
}

.team-member:hover .team-overlay {
    opacity: 1;
    /*background: rgba(26, 26, 26, 0.1)*/
}

.team-member:hover .view-profile {
    /*background: rgba(0, 0, 0, 0.8);*/
    border-color: var(--brand-beige);
    color: var(--white);
    transform: scale(1.05);
}

.team-member:hover .team-name {
    color: var(--brand-beige);
}

.team-member:hover .team-role {
    color: var(--white);
}

/* ========== SERVICIOS ========== */
.service-icon {
    color: var(--brand-beige);
    margin-bottom: 1rem;
    font-size: 3rem;
    transition: var(--transition-normal);
}

.service-icon:hover {
    color: var(--brand-black);
    transform: scale(1.1);
}

.service-img{
    width: 90%;
    opacity: 0.8;
    border-radius: 10px;
}

/* ========== FAQ ========== */
.accordion-button:not(.collapsed) {
    background: linear-gradient(135deg, var(--brand-light-beige) 0%, var(--brand-beige) 100%);
    color: var(--brand-black);
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: var(--brand-beige);
}

.accordion-button {
    color: var(--brand-black);
    background-color: var(--white);
}

.accordion-button:hover {
    background-color: var(--brand-light-beige);
}

.accordion-item {
    border: none;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--brand-light-beige);
}

/* ========== CONTACTO ========== */
.form-control {
    padding: 0.75rem;
    border: 1px solid var(--brand-light-beige);
    border-radius: var(--border-radius-sm);
    transition: var(--transition-fast);
    background-color: var(--white);
}

.form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(184, 168, 150, 0.25);
    border-color: var(--brand-beige);
    outline: none;
}

.form-label {
    color: var(--brand-black);
    font-weight: 500;
}

#contacto {
    background: linear-gradient(135deg, var(--brand-light-beige) 0%, #f0ebe4 100%);
}

#contacto h2 {
        font-family: 'glacial indiference', sans-serif;
        color: var(--black);
        text-shadow: 5px 5px 15px rgba(0, 0, 0, 0.7);
}

/* ========== PDF BROCHURE DOWNLOAD ========== */
.pdf-download-section{
    align-items: center;
}
.pdf-preview-container {
    position: relative;
    background: var(--white);
    border-radius: var(--border-radius-sm);
    padding: 0;
    border: 2px solid var(--brand-light-beige);
    transition: var(--transition-normal);
    overflow: hidden;
}

.pdf-preview-container:hover {
    border-color: var(--brand-beige);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(184, 168, 150, 0.2);
}

.pdf-preview-image {
    position: relative;
    width: 100%;
    height: 160px;
    overflow: hidden;
    border-radius: var(--border-radius-sm);
}

.pdf-preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: var(--transition-normal);
    filter: brightness(0.95);
}

.pdf-preview-container:hover .pdf-preview-image img {
    filter: brightness(1);
    transform: scale(1.05);
}

.pdf-preview-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg, 
        rgba(26, 26, 26, 0.05) 0%, 
        rgba(184, 168, 150, 0.1) 50%,
        rgba(26, 26, 26, 0.05) 100%
    );
    opacity: 0;
    transition: var(--transition-normal);
    pointer-events: none;
}

.pdf-preview-container:hover .pdf-preview-image::after {
    opacity: 1;
}

/* Overlay con etiqueta de vista previa 
.pdf-preview-image::before {
    content: 'Vista previa';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(26, 26, 26, 0.8);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0;
    transform: translateY(-10px);
    transition: var(--transition-normal);
    z-index: 2;
    backdrop-filter: blur(4px);
}*/

.pdf-preview-container:hover .pdf-preview-image::before {
    opacity: 1;
    transform: translateY(0);
}

.pdf-preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 160px;
    opacity: 0.7;
    transition: var(--transition-normal);
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.pdf-preview-container:hover .pdf-preview-placeholder {
    opacity: 1;
}

.pdf-download-section .card {
    background: linear-gradient(135deg, var(--white) 0%, #faf8f5 100%);
    transition: var(--transition-normal);
}

.pdf-download-section .card:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, var(--brand-light-beige) 0%, var(--white) 100%);
}

.pdf-download-section .btn {
    background: linear-gradient(135deg, var(--brand-black) 0%, var(--brand-dark-gray) 100%);
    border: 2px solid var(--brand-black);
    transition: var(--transition-normal);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.pdf-download-section .btn:hover {
    background: linear-gradient(135deg, var(--brand-beige) 0%, var(--brand-light-beige) 100%);
    border-color: var(--brand-beige);
    color: var(--brand-black);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(184, 168, 150, 0.3);
}
/* ========== NAVEGACIÓN FIXED ========== */
.navbar {
    position: fixed !important;
    top: 0;
    width: 100%;
    z-index: 1030;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--brand-light-beige);
    transition: var(--transition-normal);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: var(--shadow);
}

.navbar-brand {
    font-family: 'Glacial Indifference', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
}

/* Ajustar padding del body para navbar fixed */
body {
    padding-top: 76px; /* Altura aproximada del navbar */
}

.navbar-nav .nav-link {
    position: relative;
    padding: 0.5rem 1rem;
    transition: var(--transition-normal);
    color: var(--brand-black);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--brand-beige);
    transition: var(--transition-normal);
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after {
    width: 80%;
}

.navbar-nav .nav-link:hover {
    color: var(--brand-beige);
}

.navbar_logo{
    height: 60px;
}

.footer-logo {
    height: 200px; 
    margin-bottom: 30px;
}

.footer-links {
    font-size: 1.1rem;
}

.footer-links a {
    transition: var(--transition-normal);
    font-weight: 500;
}

.footer-links a:hover {
    color: var(--brand-beige) !important;
    text-decoration: underline !important;
}

.footer-divider {
    width: 60%;
    border-color: var(--brand-medium-gray);
    border-width: 1px;
}

/* ========== BOTÓN WHATSAPP FLOTANTE ========== */
.whatsapp-float {
    position: fixed;
    bottom: 70px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: var(--transition-normal);
    text-decoration: none;
    border: 2px solid var(--brand-beige);
}

.whatsapp-float:hover {
    background: linear-gradient(135deg, #128c7e 0%, #25d366 100%);
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
    text-decoration: none;
    border-color: var(--brand-light-beige);
}

.whatsapp-float i {
    color: white;
    font-size: 24px;
}

.whatsapp-float.above-footer {
    position: absolute;
    bottom: 40px;
}

/* ========== BLOG PREVIEW ========== */
.article-image {
    height: 200px;
    object-fit: cover;
    filter: grayscale(30%);
    transition: var(--transition-normal);
}

.article-image:hover {
    filter: grayscale(0%);
}

#blog-preview .card {
    background: linear-gradient(135deg, var(--white) 0%, #faf8f5 100%);
}

#blog-preview .card:hover {
    background: linear-gradient(135deg, var(--brand-light-beige) 0%, var(--white) 100%);
}

/* ========== ANIMACIONES ========== */
@keyframes fadeInOutCycle {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    8.33% {
        opacity: 1;
        transform: translateY(0);
    }
    25% {
        opacity: 1;
        transform: translateY(0);
    }
    33.33% {
        opacity: 0;
        transform: translateY(-30px);
    }
    100% {
        opacity: 0;
        transform: translateY(-30px);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Animación que mueve exactamente 10 logos (50% del contenido total) */
@keyframes scrollLogos {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-200px * 10 - 40px * 9)); /* 10 logos + 9 espacios */
    }
}

/* ========== ANIMACIÓN DEL VIDEO HERO CORREGIDA ========== */
@keyframes videoFadeLoop {
    /* Mantener visible durante la mayor parte del tiempo */
    0% { opacity: 1; }
    85% { opacity: 1; }
    
    /* Fade out suave */
    88% { opacity: 0.8; }
    91% { opacity: 0.5; }
    94% { opacity: 0.2; }
    97% { opacity: 0; }
    
    /* Fade in rápido */
    98% { opacity: 0; }
    99% { opacity: 0.3; }
    100% { opacity: 1; }
}

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

/* Large Desktop (1200px+) */
@media (min-width: 1200px) {
    .team-image,
    .video-container {
        height: 320px;
    }
    
    .team-photo-wrapper {
        width: 220px;
        height: 220px;
    }
}

/* Desktop (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .hero-title {
        font-size: 3.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
    }
    
    .team-container {
        gap: 2rem;
    }
    
    .team-photo-wrapper {
        width: 180px;
        height: 180px;
    }
}

/* Tablet (768px - 991px) */
@media (max-width: 991px) {
    :root {
        --section-padding: 60px;
    }
    
    #hero {
        min-height: 65vh;
        background-attachment: scroll;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
        margin-bottom: 2rem;
        padding: 0 1rem;
    }
    
    .hero-subtitles {
        max-width: 600px;
        min-height: 5rem; /* Más altura en tablet para texto más grande */
    }
    
    .hero-button {
        padding: 0.9rem 2rem;
        font-size: 1rem;
    }

    .team-image,
    .video-container {
        height: 280px;
    }
    
    .team-container {
        gap: 1.5rem;
    }
    
    .team-photo-wrapper {
        width: 160px;
        height: 160px;
    }
    
    .team-name {
        font-size: 1.1rem;
    }
    
    .team-role {
        font-size: 0.9rem;
    }
    
    #nosotros .container {
        padding: 2rem;
    }
    
    .whatsapp-float {
        width: 55px;
        height: 55px;
    }
    
    .whatsapp-float i {
        font-size: 22px;
    }
    
    /* Botones +info responsive en tablet */
    .btn-outline-primary.btn-sm {
        font-size: 0.8rem;
        padding: 0.45rem 0.9rem;
    }
}

/* Mobile Large (576px - 767px) */
@media (max-width: 767px) {
    :root {
        --section-padding: 50px;
        --card-padding: 1.5rem;
    }
    
    body {
        padding-top: 65px; /* Navbar más pequeño en móvil */
    }
    
    #hero {
        min-height: 80vh;
    }
    
    .hero-title {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
        padding: 0 1rem;
    }
    
    .hero-subtitles {
        max-width: 90%;
        min-height: 6rem; /* Más altura en móvil */
    }
    
    .hero-button {
        padding: 0.8rem 1.8rem;
        font-size: 0.95rem;
    }
    
    .hero-logo {
        max-width: 180px;
    }

    .team-image,
    .video-container {
        height: 250px;
    }
    
    .team-section {
        min-height: auto;
        padding: 4rem 0;
    }
    
    .team-container {
        flex-direction: column;
        gap: 2.5rem;
    }
    
    .team-photo-wrapper {
        width: 180px;
        height: 180px;
    }
    
    /* Desactivar efectos hover complejos en móvil */
    .team-container:hover .team-member:not(:hover) {
        transform: none;
        opacity: 1;
        filter: none;
    }
    
    .team-member:hover {
        transform: scale(1.05);
    }
    
    .team-member:hover .team-photo-wrapper {
        transform: scale(1.05);
    }
    
    .team-video:hover {
        transform: translateX(-50%);
        box-shadow: none;
        filter: grayscale(20%);
    }
    
    .card:hover {
        transform: none;
    }
    
    .service-icon:hover {
        transform: none;
    }
    
    .team-image:hover {
        transform: none;
        filter: grayscale(20%);
    }
    
    /* Animaciones más rápidas en móvil */
    .hero-title {
        animation-duration: 1s;
        animation-delay: 0.2s;
    }
    
    .hero-button {
        animation-duration: 1s;
        animation-delay: 0.8s;
    }
    
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 40px;
    }
    
    .whatsapp-float i {
        font-size: 20px;
    }
    
    /* Carrousel mobile */
    .client-logo {
        width: 140px; /* Más pequeño en móvil */
        margin-right: 25px;
    }
    
    .client-logo img {
        max-width: 100px;
        max-height: 65px;
    }
    
    /* Actualizar animación para móvil large */
    @keyframes scrollLogos {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(calc(-140px * 10 - 25px * 9)); /* Ajuste para móvil large */
        }
    }
    
    /* Botones +info responsive en mobile large */
    .btn-outline-primary.btn-sm {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
        margin-top: 0.4rem;
    }
    
    .btn-outline-primary.btn-sm:hover {
        transform: scale(1.01); /* Menos agresivo en móvil */
    }
}

/* Mobile Small (320px - 575px) */
@media (max-width: 575px) {
    body {
        padding-top: 60px; /* Navbar aún más pequeño */
    }
    
    #hero {
        min-height: 75vh;
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        padding: 0 0.5rem;
        margin-bottom: 1rem;
    }
    
    .hero-subtitles {
        max-width: 95%;
        min-height: 7rem; /* Máxima altura en móvil pequeño */
    }
    
    .hero-button {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    .hero-logo {
        max-width: 150px;
    }

    .team-image,
    .video-container {
        height: 220px;
    }
    
    .team-container {
        gap: 2rem;
    }
    
    .team-photo-wrapper {
        width: 150px;
        height: 150px;
    }
    
    .team-name {
        font-size: 1rem;
    }
    
    .team-role {
        font-size: 0.85rem;
    }
    
    .view-profile {
        font-size: 0.6rem;
        padding: 0.4rem 0.8rem;
    }
    
    #nosotros .container {
        padding: 1.5rem;
        margin: 0.5rem;
        width: auto;
    }
    
    /* Carrousel mobile small */
    .client-logo {
        width: 120px; /* Más pequeño en móvil small */
        margin-right: 20px;
    }
    
    .client-logo img {
        max-width: 90px;
        max-height: 55px;
    }
    
    /* Actualizar animación para móvil small */
    @keyframes scrollLogos {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(calc(-120px * 10 - 20px * 9)); /* Ajuste para móvil small */
        }
    }
    
    /* Botones +info responsive en mobile small */
    .btn-outline-primary.btn-sm {
        font-size: 0.75rem;
        padding: 0.35rem 0.7rem;
        margin-top: 0.3rem;
    }
}

/* Mobile Extra Small (< 400px) */
@media (max-width: 399px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
    }

    .hero-logo {
        max-width: 120px;
    }

    .team-image,
    .video-container {
        height: 200px;
    }
    
    .team-photo-wrapper {
        width: 140px;
        height: 140px;
    }
    
    /* Carrousel muy pequeño */
    .client-logo {
        width: 100px; /* Más pequeño en pantallas muy pequeñas */
        margin-right: 15px;
    }
    
    .client-logo img {
        max-width: 75px;
        max-height: 45px;
    }
    
    /* Actualizar animación para extra small */
    @keyframes scrollLogos {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(calc(-100px * 10 - 15px * 9)); /* Ajuste para extra small */
        }
    }
    
    /* Botones +info responsive en extra small */
    .btn-outline-primary.btn-sm {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }
}

/* ========== HERO VIDEO RESPONSIVE ========== */
/* Media queries para diferentes dispositivos */
@media (max-width: 768px) {
    .hero-video.video-animation-ready {
        /* En móviles, animación más corta para mejor performance */
        animation: videoFadeLoop 15s ease-in-out infinite;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-video.video-animation-ready {
        /* Respetar preferencias de movimiento reducido */
        animation: none;
        opacity: 1;
    }
    
    /* Desactivar efectos de botones +info también */
    .btn-outline-primary.btn-sm:hover {
        transform: none !important;
    }
    
    .btn-outline-primary.btn-sm:active {
        transform: none !important;
    }
}

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

/* Tablet (768px - 991px) */
@media (max-width: 991px) {
    .footer-logo {
        height: 140px;
    }
    
    .footer-links {
        font-size: 1rem;
    }
    
    .footer-links .list-inline-item {
        margin: 0 1.5rem !important;
    }
}

/* Mobile Large (576px - 767px) */
@media (max-width: 767px) {
    .footer-logo {
        height: 120px;
    }
    
    .footer-links .list-inline-item {
        display: block !important;
        margin: 0.5rem 0 !important;
    }
    
    .footer-divider {
        width: 80%;
    }
}

/* Mobile Small (320px - 575px) */
@media (max-width: 575px) {
    .footer-logo {
        height: 100px;
    }
    
    .footer-links {
        font-size: 0.95rem;
    }
    
    .footer-links .list-inline-item {
        margin: 0.75rem 0 !important;
    }
    
    .footer-divider {
        width: 90%;
    }
}

/* Mobile Extra Small (< 400px) */
@media (max-width: 399px) {
    .footer-logo {
        height: 90px;
    }
    
    .footer-links {
        font-size: 0.9rem;
    }
}

/* ========== RESPONSIVE CARROUSEL ========== */
@media (max-width: 480px) {
    .clients-carousel {
        padding: 1rem 0;
    }
    
    .client-logo {
        margin-right: 15px; /* Reducir espacio en móvil muy pequeño */
    }
}

/* ========== PAUSAR ANIMACIONES EN HOVER ========== */
.clients-carousel:hover .clients-track {
    animation-play-state: paused;
}

/* ========== ASEGURAR QUE SE VEAN EXACTAMENTE 5 LOGOS ========== */
@media (min-width: 992px) {
    .clients-carousel {
        width: 100%;
        max-width: 1200px; /* Limitar ancho máximo */
        margin: 0 auto;
    }
}

/* ========== ACCESIBILIDAD ========== */

/* Respetar preferencias de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .team-video:hover,
    .card:hover,
    .btn:hover,
    .service-icon:hover,
    .team-image:hover,
    .team-member:hover,
    .team-photo-wrapper:hover {
        transform: none !important;
    }
    
    .team-container:hover .team-member:not(:hover) {
        transform: none !important;
        filter: none !important;
    }
}

/* Foco visible para navegación por teclado */
.video-container:focus-within,
.card:focus-within,
.btn:focus,
.whatsapp-float:focus,
.team-photo-wrapper:focus-within,
.team-member:focus-within {
    outline: 2px solid var(--brand-beige);
    outline-offset: 2px;
}

/* Alto contraste */
@media (prefers-contrast: high) {
    :root {
        --shadow-sm: 0 2px 4px rgba(26, 26, 26, 0.3);
        --shadow: 0 4px 8px rgba(26, 26, 26, 0.3);
        --shadow-lg: 0 8px 20px rgba(26, 26, 26, 0.4);
    }
    
    .card {
        border: 1px solid var(--brand-medium-gray);
    }
    
    .btn-outline-primary.btn-sm {
        background: rgba(158, 181, 151, 0.15);
        border: 1px solid var(--brand-medium-gray);
    }
}

/* ========== OPTIMIZACIONES DE RENDIMIENTO ========== */

/* Preparar elementos para animaciones */
.team-video,
.card,
.btn,
.service-icon,
.whatsapp-float,
.team-image,
.team-member,
.team-photo-wrapper,
.btn-outline-primary.btn-sm {
    will-change: transform;
}

/* Optimizar rendering */
.video-container,
.team-video,
.team-photo-wrapper {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* ========== UTILIDADES CON PALETA DE MARCA ========== */
.text-primary {
    color: var(--brand-black) !important;
}

.text-secondary {
    color: var(--brand-beige) !important;
}

.bg-primary {
    background-color: var(--brand-black) !important;
}

.bg-secondary {
    background-color: var(--brand-beige) !important;
}

.shadow-sm {
    box-shadow: var(--shadow-sm) !important;
}

.shadow {
    box-shadow: var(--shadow) !important;
}

.shadow-lg {
    box-shadow: var(--shadow-lg) !important;
}

/* ========== ELEMENTOS ADICIONALES DE MARCA ========== */

/* Separadores elegantes */
.section-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--brand-beige) 50%, transparent 100%);
    margin: 2rem 0;
}

/* Texto destacado */
.text-highlight {
    background: linear-gradient(135deg, var(--brand-light-beige) 0%, var(--brand-beige) 100%);
    padding: 0.2rem 0.5rem;
    border-radius: var(--border-radius-sm);
    color: var(--brand-black);
    font-weight: 500;
}

/* Bordes decorativos */
.border-brand {
    border: 2px solid var(--brand-beige) !important;
}

.border-brand-light {
    border: 1px solid var(--brand-light-beige) !important;
}

/* ========== LAZY LOADING STYLES ========== */

/* Estilos para imágenes en proceso de carga */
.lazy {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    background-color: #f8f9fa;
    min-height: 200px; /* Evita layout shift */
}

/* Imágenes cargadas */
.lazy-loaded {
    opacity: 1;
}

/* Placeholder para imágenes del equipo */
.team-photo.lazy {
    min-height: 200px;
    min-width: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f1f3f4 0%, #e8eaed 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Placeholder para imágenes de servicios */
.service-img.lazy {
    min-height: 180px;
    border-radius: 10px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* Placeholder para imágenes de sección */
.lazy.img-fluid {
    min-height: 250px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* Animación sutil para cuando aparecen las imágenes */
.lazy-loaded {
    animation: fadeInImage 0.4s ease-out;
}

@keyframes fadeInImage {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading spinner para imágenes importantes */
.lazy::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--brand-beige);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1;
}

.lazy-loaded::before {
    display: none;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Estilos específicos para logos de clientes */
.client-logo img.lazy {
    min-height: 60px;
    background: rgba(248, 249, 250, 0.8);
    border-radius: 8px;
}

/* Evitar layout shift en el carrousel */
.clients-track .lazy {
    width: 140px;
    height: 90px;
    object-fit: contain;
}

/* Responsive lazy loading */
@media (max-width: 768px) {
    .lazy {
        min-height: 150px;
    }
    
    .service-img.lazy {
        min-height: 140px;
    }
    
    .team-photo.lazy {
        min-height: 160px;
        min-width: 160px;
    }
    
    .lazy.img-fluid {
        min-height: 200px;
    }
}

@media (max-width: 480px) {
    .lazy {
        min-height: 120px;
    }
    
    .clients-track .lazy {
        width: 100px;
        height: 65px;
    }
}

/* Mejoras para rendimiento */
.lazy {
    will-change: opacity;
    backface-visibility: hidden;
}

/* Fallback para navegadores sin soporte de Intersection Observer */
.no-js .lazy {
    opacity: 1;
}

.no-js .lazy[data-src] {
    background-image: attr(data-src);
}