/* ==========================================================================
   TIDEBLACK - Premium Textile Fabrication Mockup Stylesheet
   ========================================================================== */

/* Design Tokens & Variables */
:root {
    --bg-primary: #f8f9fa; /* Fondo gris claro liso */
    --bg-secondary: #ffffff; /* Blanco para tarjetas y contenedores */
    --bg-tertiary: #f1f3f5; /* Gris intermedio liso */
    --border-color: #dee2e6; /* Borde gris claro */
    --border-light: rgba(0, 0, 0, 0.06); /* Borde sutil */
    
    --gold: #8d704b; /* Dorado/bronce más oscuro para buen contraste en fondo claro */
    --gold-rgb: 141, 112, 75;
    --gold-hover: #755b3c;
    --white: #121214; /* Remapeado a carbón oscuro para el texto principal */
    --muted: #5e5e6e; /* Gris medio para textos secundarios */
    --dark-muted: #868e96; /* Gris más claro para placeholders/medidas */
    
    --font-heading: 'Outfit', sans-serif;
    --font-accent: 'Syne', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-elastic: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-primary);
    color: var(--white);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
}

body {
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* 1. Background Technical Grid Overlay (Hiddend for solid light style) */
.blueprint-grid {
    display: none;
}

/* Hidden grid glow for clean light style */
body::after {
    display: none;
}

/* Common Layout Components */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

section {
    position: relative;
    padding: 120px 0;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Button System */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 36px;
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-radius: 0;
    transition: var(--transition-smooth);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background-color: var(--gold);
    color: var(--bg-primary);
    border: 1px solid var(--gold);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--gold);
    box-shadow: 0 0 20px rgba(var(--gold-rgb), 0.2);
}

.btn-arrow {
    transition: transform 0.3s ease;
}

.btn:hover .btn-arrow {
    transform: translateX(5px);
}

/* Section Divider Line (Technical Theme) */
.section-divider-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color) 10%, var(--border-color) 90%, transparent);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 80px;
    font-family: monospace;
    font-size: 9px;
    color: var(--dark-muted);
    pointer-events: none;
}

.divider-dot,
.divider-coord {
    display: none !important;
}

/* Typography Templates */
.section-tag {
    display: inline-block;
    font-family: monospace;
    font-size: 11px;
    letter-spacing: 0.2em;
    color: var(--gold);
    margin-bottom: 15px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 44px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    max-width: 800px;
    margin-bottom: 20px;
}

.section-subtitle {
    font-size: 18px;
    color: var(--muted);
    max-width: 600px;
    font-weight: 300;
    line-height: 1.6;
}

/* ==========================================================================
   TECHNICAL IMAGE PLACEHOLDER STYLING (Empty space labeled "imagen")
   ========================================================================== */
.image-placeholder {
    width: 100%;
    height: 100%;
    background-color: var(--bg-tertiary); /* Solid light background */
    border: 1px dashed var(--border-color);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    overflow: hidden;
}

.placeholder-lines {
    display: none; /* Hide technical diagonal grid lines */
}

.image-placeholder::before,
.image-placeholder::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    border: 1px solid var(--dark-muted);
    pointer-events: none;
}

.image-placeholder::before {
    top: 10px;
    left: 10px;
    border-right: none;
    border-bottom: none;
}

.image-placeholder::after {
    bottom: 10px;
    right: 10px;
    border-left: none;
    border-top: none;
}

.placeholder-text {
    font-family: monospace;
    font-size: 11px;
    letter-spacing: 0.4em;
    color: var(--muted);
    text-transform: uppercase;
    z-index: 1;
    position: relative;
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    transition: var(--transition-smooth);
}

.image-placeholder:hover {
    border-color: var(--gold);
}

.image-placeholder:hover .placeholder-text {
    color: var(--gold);
    border-color: var(--gold);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* ==========================================================================
   HEADER & RADIAL NAVIGATION (El Menú en la Esquina con su Logo)
   ========================================================================== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 900;
    background-color: rgba(255, 255, 255, 0.85); /* Glassmorphism background for light theme */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-smooth);
}

.brand-text {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.15em;
    color: var(--white);
    transition: var(--transition-smooth);
}

.brand-text:hover {
    color: var(--gold);
}

.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 55px; /* Taller height container for cropping the square SVG */
    width: 220px; /* Width container to allow horizontal logo to scale wider */
    overflow: hidden;
    position: relative;
    transition: var(--transition-smooth);
}

.brand-logo:hover {
    opacity: 0.8;
}

.logo-img {
    height: 220px; /* Match the scale width/height to scale up the SVG */
    width: 220px;  /* Force square layout on SVG to avoid distortion */
    object-fit: contain;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: block;
}

/* Classic Top Navigation Bar */
.main-nav {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-link {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: var(--transition-smooth);
    padding: 8px 0;
    position: relative;
}

.nav-link:hover {
    color: var(--white);
}

/* Underline slide effect on hover */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--gold);
    transition: var(--transition-smooth);
}

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

/* ==========================================================================
.hero-section {
    position: relative;
    padding-top: 220px;
    padding-bottom: 160px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: var(--bg-primary);
}

/* Gradiente decorativo sutil */
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 40%, rgba(184,141,77,0.07) 0%, transparent 65%);
    z-index: 1;
    pointer-events: none;
}

.hero-bg-placeholder { display: none; }
.hero-bg-text { display: none; }

.hero-container {
    position: relative;
    z-index: 5;
    display: flex;
    justify-content: center;
    text-align: center;
}

.hero-content {
    max-width: 820px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 54px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 25px;
    color: var(--white);
}

.hero-subtitle {
    font-size: 18px;
    line-height: 1.7;
    color: var(--muted);
    font-weight: 400;
    margin-bottom: 40px;
    max-width: 650px;
}

.hero-cta-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
}

.main-hero-placeholder {
    height: 100%;
    min-height: 400px;
}

/* ==========================================================================
   3. SERVICES SECTION (Servicios)
   ========================================================================== */
.section-header {
    margin-bottom: 70px;
}

.section-header.center-align {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 50px 40px;
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
}

/* Technical grid graphic in background of card */
.card-tech-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: 20px 20px;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.003) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.003) 1px, transparent 1px);
    opacity: 0;
    transition: var(--transition-smooth);
    pointer-events: none;
}

.service-num {
    font-family: var(--font-accent);
    font-size: 54px;
    font-weight: 800;
    line-height: 1;
    color: rgba(255, 255, 255, 0.015);
    position: absolute;
    top: 30px;
    right: 40px;
    transition: var(--transition-smooth);
}

.service-icon-box {
    color: var(--gold);
    margin-bottom: 30px;
    display: inline-block;
    transition: var(--transition-smooth);
}

.service-card-title {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 15px;
    position: relative;
}

.service-card-desc {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.6;
    font-weight: 300;
}

.card-footer-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--gold);
    transition: var(--transition-smooth);
}

/* Service Card Hover States */
.service-card:hover {
    transform: translateY(-8px);
    border-color: rgba(var(--gold-rgb), 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.service-card:hover .card-tech-grid {
    opacity: 1;
}

.service-card:hover .service-num {
    color: rgba(var(--gold-rgb), 0.08);
}

.service-card:hover .service-icon-box {
    transform: scale(1.1) rotate(5deg);
}

.service-card:hover .card-footer-line {
    width: 100%;
}

/* ==========================================================================
   4. QUALITY SECTION (Calidad y Filosofía)
   ========================================================================== */
.quality-container {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 80px;
    align-items: center;
}

.quality-text {
    font-size: 16px;
    line-height: 1.8;
    color: var(--muted);
    margin-bottom: 40px;
    font-weight: 300;
}

.quality-specs {
    display: flex;
    gap: 40px;
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
}

.spec-item {
    display: flex;
    flex-direction: column;
}

.spec-num {
    font-family: var(--font-heading);
    font-size: 36px;
    font-weight: 700;
    color: var(--gold);
    line-height: 1.1;
    margin-bottom: 5px;
}

.spec-label {
    font-family: monospace;
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

/* Interactive Garment Blueprint Hotspots */
.spec-garment-container {
    max-width: 440px;
    margin: 0 auto;
    position: relative; /* ESTRICTO: contenedor relativo para posicionar hotspots y líneas técnicas */
}

.quality-garment-placeholder {
    height: 100%;
    min-height: 480px;
}

.quality-detail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Technical guides over the placeholder */
.measure-line-h {
    position: absolute;
    height: 1px;
    border-top: 1px dashed rgba(var(--gold-rgb), 0.3);
    z-index: 2;
    pointer-events: none;
}

.measure-line-v {
    position: absolute;
    width: 1px;
    border-left: 1px dashed rgba(var(--gold-rgb), 0.3);
    z-index: 2;
    pointer-events: none;
}

/* Hotspot pulse trigger */
.hotspot {
    position: absolute;
    width: 20px;
    height: 20px;
    z-index: 20;
    transform: translate(-50%, -50%);
}

.hotspot-pulse {
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: rgba(var(--gold-rgb), 0.25);
    border: 1px solid var(--gold);
    animation: hotspotPulse 2.5s infinite ease-in-out;
    pointer-events: none;
}

.hotspot-trigger {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--gold);
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 2px solid var(--bg-primary);
}

.hotspot:hover .hotspot-trigger {
    background-color: var(--white);
    transform: scale(1.3);
}

/* Tooltip popup card */
.hotspot-tooltip {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: 220px;
    background: rgba(13, 13, 16, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 30;
}

.hotspot-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: rgba(13, 13, 16, 0.9) transparent transparent transparent;
}

.hotspot-tooltip strong {
    display: block;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--gold);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hotspot-tooltip p {
    font-size: 11px;
    color: var(--white);
    line-height: 1.5;
    font-weight: 300;
}

/* Show tooltip states */
.hotspot:hover .hotspot-tooltip,
.hotspot.active .hotspot-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
    border-color: var(--gold);
}

@keyframes hotspotPulse {
    0% {
        transform: scale(0.9);
        opacity: 0.8;
    }
    70% {
        transform: scale(2.2);
        opacity: 0;
    }
    100% {
        transform: scale(2.2);
        opacity: 0;
    }
}

/* ==========================================================================
   4.5 INTERACTIVE SIZE GUIDE (Guía de Talles Interactiva)
   ========================================================================== */
.talles-section {
    padding-top: 100px;
    padding-bottom: 120px;
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
}

.talles-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.talles-header {
    text-align: center;
    margin-bottom: 50px;
}

.talles-visualizer {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

.product-selector {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 25px;
}

.product-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--muted);
    padding: 12px 24px;
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.product-btn:hover {
    border-color: var(--gold);
    color: var(--white);
}

.product-btn.active {
    background-color: var(--gold);
    border-color: var(--gold);
    color: var(--bg-secondary) !important;
}

.visualizer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

@media (max-width: 900px) {
    .visualizer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

.visualizer-illustration {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    position: relative;
    overflow: hidden;
}

.svg-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.illustration-wrapper {
    width: 100%;
    height: 100%;
    max-width: 350px;
    max-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Size scaling animations */
.size-s .illustration-wrapper { transform: scale(0.92); }
.size-m .illustration-wrapper { transform: scale(0.96); }
.size-l .illustration-wrapper { transform: scale(1.00); }
.size-xl .illustration-wrapper { transform: scale(1.04); }
.size-xxl .illustration-wrapper { transform: scale(1.08); }

.clothing-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
    display: none; /* ESTRICTO: ocultar por defecto para evitar solapamientos */
}

.clothing-svg.active {
    display: block; /* Mostrar únicamente el SVG del producto seleccionado */
}

.clothing-svg .garment-path {
    transition: var(--transition-smooth);
}

/* Dimension lines animations */
.dim-line {
    transition: var(--transition-smooth);
    pointer-events: none;
}

.dim-line text {
    font-family: monospace;
    font-weight: 700;
}

.dim-line rect {
    transition: var(--transition-smooth);
}

/* Glow highlight for active dimension lines */
.dim-line.highlighted {
    opacity: 1 !important;
}

.dim-line.highlighted line {
    stroke: var(--gold) !important;
    stroke-width: 2px;
}

.dim-line.highlighted circle {
    fill: var(--gold) !important;
}

.dim-line.highlighted rect {
    stroke: var(--gold) !important;
    fill: rgba(var(--gold-rgb), 0.05) !important;
}

.dim-line.highlighted text {
    fill: var(--gold) !important;
}

.visualizer-controls {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.size-selector-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.control-label {
    font-family: monospace;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.size-selector-buttons {
    display: flex;
    gap: 10px;
}

.size-btn {
    width: 46px;
    height: 46px;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--white);
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
}

.size-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.size-btn.active {
    background-color: var(--gold);
    border-color: var(--gold);
    color: var(--bg-secondary);
}

.measurements-display {
    display: flex;
    flex-direction: column;
    gap: 16px;
    border-top: 1px solid var(--border-color);
    padding-top: 25px;
}

.measure-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 15px 20px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.measure-row:hover, .measure-row.active {
    border-color: var(--gold);
    background-color: rgba(var(--gold-rgb), 0.02);
}

.measure-row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.measure-name {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 600;
    color: var(--white);
}

.measure-value {
    font-family: monospace;
    font-size: 16px;
    font-weight: 700;
    color: var(--gold);
}

.measure-desc {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.4;
}

/* ==========================================================================
   5. CLIENTS SECTION (Clientes - Carrusel Infinito)
   ========================================================================== */
.clients-section {
    padding-bottom: 150px;
}

.clients-carousel {
    display: flex;
    flex-wrap: nowrap; /* ESTRICTO: mantiene una sola fila horizontal */
    overflow-x: auto; /* ESTRICTO: desbordamiento horizontal */
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; /* Desplazamiento táctil fluido en celulares */
    
    /* Configuración de anclaje magnético al INICIO con padding (Mercado Pago style) */
    scroll-snap-type: x mandatory;
    scroll-padding-left: 5%; /* Alinea al punto de sticky left */
    
    /* Variables para el mazo de cartas apilable */
    --card-width: 85vw;
    --overlap: calc(var(--card-width) * 0.45); /* Solapamiento del 45% para mazo más visible en móvil */
    --card-height: 190px;
    
    /* OCULTAR COMPLETAMENTE LA BARRA DE DESLIZAMIENTO */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE y Edge antiguo */
    
    gap: 0px; /* ESTRICTO: gap en 0 ya que el solapamiento se controla con el margen negativo */
    margin: 0 -24px; /* Extiende el riel de lado a lado del celular */
    
    /* Relleno lateral de 5% a la izquierda y 80vw a la derecha (Requisito 4)
       El padding-right de 80vw asegura que la última tarjeta pueda deslizarse
       completamente hacia la izquierda y apilarse/guardarse de forma fluida. */
    padding: 20px 80vw 20px 5%; 
    
    /* CURSOR DE AGARRE y evitar selección de textos al arrastrar */
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

/* Ajuste del ancho de la tarjeta para pantallas medianas (móviles grandes / tablets) */
@media (min-width: 480px) and (max-width: 1024px) {
    .clients-carousel {
        --card-width: 360px;
        --overlap: 150px;
        --card-height: 200px;
    }
}

/* Estilo para PC / Pantallas de escritorio: Centrado y sin scroll innecesario */
@media (min-width: 1025px) {
    .clients-carousel {
        --card-width: 380px; /* Tarjeta más ancha en PC */
        --overlap: 160px; /* Menor porcentaje de solapamiento para ver mejor los logos */
        --card-height: 220px; /* Tarjeta más alta en PC */
        justify-content: center; /* Centra el mazo horizontalmente en pantallas grandes */
        overflow-x: visible; /* Elimina scroll innecesario en PC */
        scroll-snap-type: none;
        padding: 20px 0;
        margin: 0 auto;
        max-width: 1200px;
        cursor: default;
    }
}

/* Cursor cuando se está arrastrando */
.clients-carousel.dragging {
    cursor: grabbing;
}

/* Ocultar barra de scroll en Chrome, Safari, Edge y Opera */
.clients-carousel::-webkit-scrollbar {
    display: none !important;
}

/* Tarjeta de Cliente (Apilable de Costado) */
.client-card {
    position: sticky; /* ESTRICTO: Efecto de mazo apilable */
    left: 5%; /* ESTRICTO: Punto de anclaje izquierdo donde se clava la tarjeta (Requisito 2) */
    scroll-snap-align: start; /* Anclaje magnético directo de la tarjeta */
    
    flex: 0 0 var(--card-width);
    width: var(--card-width);
    height: var(--card-height, 180px);
    background: #ffffff; /* Fondo blanco */
    border-radius: 16px; /* Bordes redondeados */
    margin-left: 0; /* Por defecto 0 para la primera tarjeta, evitando que se oculte en zona negativa */
    
    /* Sombra lateral izquierda muy pronunciada para simular el relieve del solapamiento */
    box-shadow: -10px 0 25px rgba(0, 0, 0, 0.12), 0 4px 15px rgba(0, 0, 0, 0.05); 
    border: 1px solid rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start; /* Alineación a la izquierda */
    padding: 24px;
    padding-right: calc(var(--overlap) + 24px); /* Dinámico: asegura que el contenido no sea tapado */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    flex-shrink: 0; /* Evita aplastamiento de las tarjetas */
}

/* Ajustes de tarjeta para PC / Escritorio */
@media (min-width: 1025px) {
    .client-card {
        position: relative; /* No necesita ser pegajoso en PC si entra todo en pantalla */
        left: auto;
        scroll-snap-align: none;
        flex: 0 0 var(--card-width);
        width: var(--card-width);
        padding-right: calc(var(--overlap) + 24px);
    }
}

/* Solapamiento escalonado a partir de la segunda tarjeta para formar el mazo visible */
.client-card + .client-card {
    margin-left: calc(-1 * var(--overlap));
}

.client-card:hover {
    z-index: 10 !important; /* Trae al frente la tarjeta apuntada */
    box-shadow: -15px 4px 35px rgba(0, 0, 0, 0.22), 0 8px 25px rgba(0, 0, 0, 0.08);
}

/* Contenedor del logotipo de cliente */
.client-logo-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Alineado a la izquierda */
    width: 100%;
    height: 100%;
}

/* Imagen de logotipo real */
.client-logo {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
    filter: grayscale(100%) opacity(0.85);
    transition: var(--transition-smooth);
}

.client-card:hover .client-logo {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.08); /* Micro-animación premium en el logo en vez de mover toda la tarjeta */
}

/* Placeholder si no hay imagen */
.client-logo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Alineado a la izquierda */
    gap: 8px;
    color: #8a8a93;
}

.client-logo-text {
    font-family: monospace;
    font-size: 8px;
    letter-spacing: 0.1em;
    color: #b0b0b5;
    text-transform: uppercase;
}

.client-logo-brand {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.15em;
    color: #070708;
}

/* Estado del cliente ("Producción Activa") */
.client-status {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 600;
    color: #8a8a93;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Punto verde de actividad */
.client-status::before {
    content: '';
    width: 6px;
    height: 6px;
    background-color: #2ec4b6;
    border-radius: 50%;
    display: inline-block;
}

/* El comportamiento en PC hereda el mismo efecto de apilamiento y snapping de móvil */

/* ==========================================================================
   6. CONTACT SECTION (Contacto - Formulario Ficha Técnica)
   ========================================================================== */
.contact-container {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 80px;
    align-items: start;
}

.contact-desc {
    font-size: 16px;
    line-height: 1.8;
    color: var(--muted);
    margin-bottom: 40px;
    font-weight: 300;
}

.technical-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-left: 2px solid var(--gold);
    padding-left: 24px;
    margin-bottom: 40px;
}

.tech-detail-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-family: monospace;
    font-size: 9px;
    letter-spacing: 0.15em;
    color: var(--muted);
}

.detail-value {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 600;
    color: var(--white);
}

.contact-logo-container {
    max-width: 320px;
    width: 100%;
    margin-top: 25px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-logo-img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* The Technical Garment quote sheet Form */
.contact-form-wrapper {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 50px 40px;
    position: relative;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.05);
}

.contact-form-wrapper::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 40px;
    right: 40px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.form-sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
    margin-bottom: 35px;
    font-family: monospace;
    font-size: 10px;
    letter-spacing: 0.1em;
}

.sheet-title {
    color: var(--dark-muted);
}

.sheet-status {
    color: var(--gold);
    background-color: rgba(var(--gold-rgb), 0.05);
    padding: 3px 8px;
    border: 1px solid rgba(var(--gold-rgb), 0.2);
}

/* Form floating label fields */
.form-group {
    position: relative;
    margin-bottom: 35px;
}

.form-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-color);
    color: var(--white);
    padding: 12px 0;
    font-size: 15px;
    font-family: var(--font-body);
    transition: var(--transition-smooth);
}

.form-textarea {
    resize: none;
}

.form-input:focus {
    outline: none;
    border-bottom-color: var(--gold);
}

.form-label {
    position: absolute;
    left: 0;
    top: 12px;
    color: var(--muted);
    font-size: 14px;
    transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) all;
    pointer-events: none;
}

/* Floating logic animation */
.form-input:focus ~ .form-label,
.form-input:not(:placeholder-shown) ~ .form-label {
    top: -16px;
    font-size: 11px;
    color: var(--gold);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.input-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--gold);
    transition: var(--transition-smooth);
}

.form-input:focus ~ .input-line {
    width: 100%;
}

/* Interactive tags buttons selector */
.form-group-tags {
    margin-bottom: 35px;
}

.form-group-label {
    display: block;
    font-family: monospace;
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 15px;
}

.tag-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--muted);
    padding: 10px 20px;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.tag-btn:hover {
    border-color: var(--gold);
    color: var(--white);
}

.tag-btn.selected {
    background-color: rgba(var(--gold-rgb), 0.08);
    border-color: var(--gold);
    color: var(--gold);
}

/* Custom Styled Range Slider */
.form-group-range {
    margin-bottom: 35px;
}

.range-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.range-value {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    color: var(--gold);
}

.form-range-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 3px;
    background: var(--border-color);
    outline: none;
    transition: background 0.3s;
}

.form-range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--gold);
    cursor: pointer;
    transition: transform 0.2s ease;
    border: 2px solid var(--bg-secondary);
}

.form-range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.3);
}

.form-range-slider::-moz-range-thumb {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--gold);
    cursor: pointer;
    transition: transform 0.2s ease;
    border: 2px solid var(--bg-secondary);
}

.form-range-slider::-moz-range-thumb:hover {
    transform: scale(1.3);
}

.range-markers {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-family: monospace;
    font-size: 9px;
    color: var(--dark-muted);
}

/* File Drop Zone (Technical details sheet style) */
.form-group-upload {
    margin-bottom: 40px;
}

.file-drop-zone {
    border: 1px dashed var(--border-color);
    background-color: var(--bg-primary);
    padding: 30px;
    text-align: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: var(--transition-smooth);
}

.drop-zone-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: 10px 10px;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.002) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.002) 1px, transparent 1px);
    pointer-events: none;
}

.file-drop-zone svg {
    color: var(--dark-muted);
    transition: var(--transition-smooth);
}

.drop-zone-text {
    font-size: 13px;
    color: var(--muted);
    font-weight: 300;
}

.drop-zone-subtext {
    font-family: monospace;
    font-size: 9px;
    color: var(--dark-muted);
    letter-spacing: 0.1em;
}

.file-hidden-input {
    display: none;
}

/* File upload hover/active styles */
.file-drop-zone:hover {
    border-color: var(--gold);
}

.file-drop-zone:hover svg {
    color: var(--gold);
    transform: translateY(-2px);
}

.file-drop-zone.dragover {
    border-color: var(--white);
    background-color: var(--bg-secondary);
}

.selected-file-name {
    margin-top: 10px;
    font-family: monospace;
    font-size: 11px;
    color: var(--gold);
    padding: 6px 12px;
    background-color: rgba(var(--gold-rgb), 0.05);
    border: 1px solid rgba(var(--gold-rgb), 0.2);
    display: inline-block;
}

/* Submit Spec sheet button */
.btn-submit {
    width: 100%;
    justify-content: center;
    border: 1px solid var(--gold);
    background-color: transparent;
    color: var(--gold);
}

.btn-submit:hover {
    background-color: var(--gold);
    color: var(--bg-primary);
    box-shadow: 0 5px 25px rgba(var(--gold-rgb), 0.15);
}

/* ==========================================================================
   FOOTER (Pie de Página)
   ========================================================================== */
.main-footer {
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    padding: 40px 0;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 30px;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px; /* Elegant height for footer */
    width: 160px; /* Aspect ratio mapping */
    overflow: hidden;
    position: relative;
    transition: var(--transition-smooth);
}

.footer-logo:hover {
    opacity: 0.8;
}

.footer-logo .logo-img {
    height: 160px;
    width: 160px;
    object-fit: contain;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: block;
}

.footer-copyright {
    font-size: 12px;
    color: var(--dark-muted);
}

.tech-spec-label {
    font-family: monospace;
    font-size: 10px;
    color: var(--dark-muted);
}

/* ==========================================================================
   RESPONSIVE DESIGN (Diseño Adaptable)
   ========================================================================== */
@media (max-width: 1024px) {
    .hero-container {
        text-align: center;
    }
    
    .hero-content {
        max-width: 100%;
        align-items: center;
    }
    
    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .quality-container {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    
    .quality-content {
        max-width: 100%;
    }
    
    .quality-visual {
        max-width: 400px;
        width: 100%;
        margin: 0 auto;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
        gap: 60px;
    }
}

@media (max-width: 768px) {
    section {
        padding: 80px 0;
    }

    /* El hero necesita espacio extra para el header de dos filas en mobile */
    .hero-section {
        padding-top: 180px;
        padding-bottom: 80px;
    }
    
    .container {
        padding: 0 24px;
    }
    
    .brand-text {
        font-size: 16px;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .hero-subtitle {
        font-size: 15px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .service-card {
        padding: 40px 30px;
    }
    
    .section-title {
        font-size: 32px;
    }
    
    .section-subtitle {
        font-size: 15px;
    }
    
    .contact-form-wrapper {
        padding: 40px 24px;
    }
    
    .footer-container {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .footer-left {
        flex-direction: column;
        gap: 10px;
    }
    
    .footer-logo {
        height: 35px;
        width: 140px;
    }
    
    .footer-logo .logo-img {
        height: 140px;
        width: 140px;
    }
    
    /* Responsive adjustment for Top Nav Bar on mobile */
    .main-header {
        padding: 15px 24px;
        flex-direction: column;
        gap: 10px;
        position: fixed; /* Mantenemos fixed para que siempre tape el contenido de abajo */
    }
    
    .brand-logo {
        height: 45px;
        width: 180px;
    }
    
    .logo-img {
        height: 180px;
        width: 180px;
    }
    
    .nav-links {
        gap: 16px;
    }
    
    .nav-link {
        font-size: 11px;
        padding: 4px 0;
    }
}

/* ==========================================================================
   WHATSAPP FLOATING BUTTON
   ========================================================================== */
.whatsapp-fab {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 9999;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #111212;
    border: 1.5px solid rgba(37, 211, 102, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.5),
        0 0 0 0 rgba(37, 211, 102, 0.4);
    animation:
        fabEntrance 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 1.2s both,
        fabRing 2.5s ease-in-out 2s infinite;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
                border-color 0.25s ease,
                box-shadow 0.25s ease;
}

.whatsapp-fab:hover {
    transform: scale(1.12) translateY(-3px);
    border-color: rgba(37, 211, 102, 0.65);
    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.55),
        0 0 24px rgba(37, 211, 102, 0.2),
        0 0 0 6px rgba(37, 211, 102, 0.07);
}

/* Tooltip flotante arriba del botón */
.whatsapp-fab__tooltip {
    position: absolute;
    bottom: calc(100% + 12px);
    right: 0;
    background: #0e0e0e;
    border: 1px solid rgba(184, 141, 77, 0.3);
    color: #e0e0e0;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.03em;
    white-space: nowrap;
    padding: 7px 13px;
    border-radius: 8px;
    pointer-events: none;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

/* Flechita del tooltip */
.whatsapp-fab__tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 18px;
    border: 6px solid transparent;
    border-top-color: rgba(184, 141, 77, 0.3);
}

.whatsapp-fab:hover .whatsapp-fab__tooltip {
    opacity: 1;
    transform: translateY(0);
}

/* Ícono */
.whatsapp-fab__icon {
    width: 28px;
    height: 28px;
    color: #25D366;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.whatsapp-fab:hover .whatsapp-fab__icon {
    transform: scale(1.1) rotate(-5deg);
}

/* Entrada desde abajo */
@keyframes fabEntrance {
    from { opacity: 0; transform: translateY(24px) scale(0.7); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Pulso de anillo periódico */
@keyframes fabRing {
    0%   { box-shadow: 0 4px 20px rgba(0,0,0,0.5), 0 0 0 0 rgba(37,211,102,0.35); }
    60%  { box-shadow: 0 4px 20px rgba(0,0,0,0.5), 0 0 0 14px rgba(37,211,102,0); }
    100% { box-shadow: 0 4px 20px rgba(0,0,0,0.5), 0 0 0 0 rgba(37,211,102,0); }
}

@media (max-width: 768px) {
    .whatsapp-fab {
        bottom: 24px;
        right: 20px;
        width: 52px;
        height: 52px;
    }

    .whatsapp-fab__icon {
        width: 25px;
        height: 25px;
    }
}
