/* ============================================================================
   CARPINTERÍA RUIZ — CSS External (Definitivo y Responsivo)
   ============================================================================ */

/* 1. EFECTO CRISTAL PREMIUM (WAU) */
.glass {
    background-color: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

/* Efecto Cristal para Tarjetas (Claros) */
.glass-card {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(243, 244, 246, 0.7);
    border-radius: 1.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.03), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
}

/* 2. RESPONSIVIDAD PARA TEXTOS GRANDES */
/* En móviles (por defecto), el título Hero es más pequeño. En desktop md: es grande */
.text-balance {
    text-wrap: balance;
}

/* 3. LÓGICA DE DESVANECIMIENTO (BOOSTRAP CAROUSEL FADE RECREADO) */
.carousel-fade-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.carousel-fade-item {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
    z-index: 1;
}

.carousel-fade-item.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}
/* =========================================
   NUEVO: SECCIÓN NOSOTROS (DEDICIÓN EDITORIAL DE LUJO)
   ========================================= */

/* 1. Lógica del grid responsivo */
.nosotros-grid {
    display: grid;
    grid-template-columns: 1fr; /* Móvil: 1 columna */
    gap: 3rem;
    text-align: center; /* Centrado base para móvil */
}

/* PC: 2 columnas, texto a la izquierda, carpintero a la derecha */
@media (min-width: 1024px) {
    .nosotros-grid {
        grid-template-columns: 1.2fr 0.8fr; /* Texto más ancho */
        gap: 6rem; /* Más separación en PC */
        text-align: left; /* Alineado a la izquierda en PC */
    }
}

/* 2. Contenedor del carpintero (Para el halo) */
.carpenter-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: visible; /* Clave para el efecto */
    display: flex;
    justify-content: center; /* Centra la imagen horizontalmente */
    align-items: end; /* Apoya la imagen en la base */
}

/* 3. El EFECTO HALO DORADO (Potenciado) */
.carpenter-effect {
    position: absolute;
    inset: 0;
    width: 150%; /* Más ancho para que abrace al man */
    height: 150%; /* Más alto */
    /* Hacemos un radial-gradient elíptico y más difuso */
    background: radial-gradient(ellipse at center, rgba(212, 175, 55, 0.4) 0%, transparent 70%); /* Halo dorado */
    opacity: 0.8; /* Más visible */
    z-index: 10;
    transform: translate(-15%, 80px); /* Centrado relativo y bajada para GSAP */
    pointer-events: none;
    filter: blur(10px); /* Un pequeño blur extra para suavizar */
}

/* 4. Imagen de Señor Ruiz (Cutout) */
.carpenter-image {
    position: relative;
    z-index: 20; /* Importante: Sobre el efecto */
    width: 100%;
    height: auto;
    max-width: 320px; /* Tamaño máximo en celulares */
    object-fit: contain;
    object-position: bottom;
    margin-right: auto;
    margin-left: auto; /* Centrado automático */
}

/* PC: La imagen puede crecer un poco más */
@media (min-width: 1024px) {
    .carpenter-image {
        max-width: 480px; 
    }
}
/* =========================================
   LÓGICA DEL CARRUSEL DE PROYECTOS (SWIPER)
   ========================================= */
.swiper {
    width: 100%;
    padding-top: 20px;
    padding-bottom: 20px;
}

.swiper-slide {
    background-position: center;
    background-size: cover;
    width: 260px; /* Tamaño móvil */
    height: 380px; 
    border-radius: 1.5rem;
    overflow: hidden;
    
    /* EFECTO GRIS PARA LOS LADOS (Restaurado) */
    transition: filter 0.5s ease, opacity 0.5s ease, transform 0.5s ease;
    filter: grayscale(100%) blur(1px);
    opacity: 0.4;
    transform: scale(0.85);
}

/* Tamaño PC */
@media (min-width: 768px) {
    .swiper-slide {
        width: 320px; 
        height: 480px; 
    }
}

/* IMAGEN CENTRAL (A color y grande) */
.swiper-slide-active {
    filter: grayscale(0%) blur(0px);
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}

/* --- NUEVO CONTENEDOR DE CONTROLES (Flexbox Seguro) --- */
.custom-swiper-pagination {
    position: relative !important;
    bottom: 0 !important;
    width: auto !important;
    display: flex;
    align-items: center;
    gap: 6px;
    /* Separación base en celulares (pegaditas pero sin tocar) */
    margin: 0 10px !important; 
}

/* MEDIA QUERY: En pantallas PC empujamos las flechas hacia los lados */
@media (min-width: 1024px) {
    .custom-swiper-pagination {
        margin: 0 50px !important; /* Esto abre el espacio en tu MacBook */
    }
}

.swiper-pagination-bullet {
    background: #2A1F18 !important;
    width: 10px !important;
    height: 10px !important;
    margin: 0 !important;
    transition: all 0.3s;
}

.swiper-pagination-bullet-active {
    background: #D4AF37 !important;
    transform: scale(1.4);
}

/* Flechas personalizadas obedeciendo al Flexbox */
.custom-swiper-btn {
    position: static !important; /* Anula la posición absoluta rota de Swiper */
    margin: 0 !important;
    transform: none !important; 
    color: #D4AF37 !important;
    background: #FFFFFF !important;
    width: 45px !important;
    height: 45px !important;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
}

.custom-swiper-btn:after {
    font-size: 16px !important;
    font-weight: 800;
    font-family: swiper-icons; /* Usa la fuente de Swiper */
}

/* Aplicamos los iconos de las flechas */
.swiper-button-prev:after { content: 'prev'; }
.swiper-button-next:after { content: 'next'; }

/* ============================================================================
   MAQUILLAJE FINAL ETHEREAL (Colores Premium y Detalles Cinemáticos)
   ============================================================================ */

/* 1. TIPOGRAFÍA INTER BASE (Forzado nivel Ethereal para look corporativo) */
html, body, button, input, textarea, select {
    font-family: 'Inter', sans-serif !important;
}

/* 2. BARRA DE PROGRESO DE LECTURA (Línea dorada superior - NO NECESITA ARCHIVOS) */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: #D4AF37;
    z-index: 9999;
    width: 0%; /* Se controla con MAIN.js */
    transition: width 0.1s ease;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.6);
}

/* 3. BRILLO DE CRISTAL (Glass Glare) EN TARJETAS DE SERVICIOS - NO NECESITA ARCHIVOS */
.glass-card {
    position: relative;
    overflow: hidden;
    background-color: #FFFFFF; /* Fondo blanco puro */
    /* AQUÍ ESTÁ EL CAMBIO: Borde dorado semi-transparente fijo para móvil */
    border: 1px solid rgba(212, 175, 55, 0.5); 
    border-radius: 1.5rem; /* Aseguramos bordes redondeados suaves */
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.04); /* Sombra base muy sutil */
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    z-index: 10;
}

/* Creamos la franja de luz invisible con puro CSS */
.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    transition: all 0.7s ease;
    z-index: 1;
    pointer-events: none;
}

/* BONUS PARA PC: Al pasar el mouse, el borde dorado se hace 100% sólido y la tarjeta flota */
.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 30px -5px rgba(212, 175, 55, 0.15); /* Sombra dorada flotante */
    border-color: #D4AF37; /* Borde dorado fuerte */
}
.glass-card:hover::before {
    left: 150%;
}
