/* ========================================== */
/* 🎨 PRODIGY LUXURY CAD/CAM - CSS OPTIMIZADO */
/* ========================================== */

/* ==================== RESET Y BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* Selección permitida solo en inputs */
* {
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

input, textarea {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    user-select: text !important;
}

/* ==================== VARIABLES CSS ==================== */
:root {
    /* Colores oscuros */
    --bg-darker: #050505;
    --bg-dark: #0a0a0a;
    --bg-card: #0f0f0f;
    --bg-card-hover: #151515;

    /* Dorado metálico luxury */
    --gold-primary: #D4AF37;
    --gold-light: #F0D878;
    --gold-dark: #B8941F;
    --gold-darker: #8B6914;

    /* Efectos dorados */
    --gold-subtle: rgba(212, 175, 55, 0.08);
    --gold-glow: rgba(212, 175, 55, 0.25);
    --gold-glow-strong: rgba(212, 175, 55, 0.4);

    /* Textos */
    --text-primary: #ffffff;
    --text-secondary: #a8a8a8;
    --text-tertiary: #6a6a6a;
    --text-muted: #4a4a4a;

    /* Bordes */
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-gold: rgba(212, 175, 55, 0.2);
    --border-gold-hover: rgba(212, 175, 55, 0.5);

    /* Tipografía */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Montserrat', 'Inter', sans-serif;

    /* Espaciado */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Radios */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;

    /* Sombras */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
    --shadow-gold: 0 4px 20px var(--gold-glow);
    --shadow-gold-strong: 0 8px 32px var(--gold-glow-strong);

    /* Transiciones */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== MODO CLARO ==================== */
body.light-mode {
    --bg-darker: #ffffff;
    --bg-dark: #f8f8f8;
    --bg-card: #ffffff;
    --bg-card-hover: #fafafa;

    --text-primary: #0a0a0a;
    --text-secondary: #505050;
    --text-tertiary: #808080;
    --text-muted: #b0b0b0;

    --border-subtle: rgba(0, 0, 0, 0.08);
    --border-gold: rgba(212, 175, 55, 0.3);

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
}

body.light-mode .text-stroke {
    text-shadow: 
        -1px -1px 0 rgba(255, 255, 255, 0.9),
        1px -1px 0 rgba(255, 255, 255, 0.9),
        -1px 1px 0 rgba(255, 255, 255, 0.9),
        1px 1px 0 rgba(255, 255, 255, 0.9),
        0 0 8px rgba(255, 255, 255, 0.5);
}

/* ==================== BODY Y TIPOGRAFÍA ==================== */
body {
    font-family: var(--font-primary);
    background: var(--bg-darker);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
    transition: background var(--transition-base), color var(--transition-base);
    overflow-x: hidden;
    position: relative;
}

/* Gradiente sutil de fondo */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at top, rgba(212, 175, 55, 0.02) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* ==================== TIPOGRAFÍA ==================== */
.display-title {
    font-family: var(--font-display);
    font-weight: 900;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    line-height: 1.1;
}

.section-title {
    font-size: clamp(1.75rem, 5vw, 2.75rem);
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: var(--spacing-lg);
}

.gold-text {
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold-primary) 50%, var(--gold-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

/* ==================== CONTENEDORES Y LAYOUT ==================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

.section {
    padding: var(--spacing-xl) 0;
    position: relative;
}

/* Alternancia de fondos */
.section:nth-child(even) {
    background: var(--bg-dark);
}

/* ==================== GRIDS ==================== */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-md);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--spacing-md);
}

/* ==================== LUXURY CARDS ==================== */
.luxury-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

/* Brillo sutil en hover */
.luxury-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.05), transparent);
    transition: left var(--transition-slow);
}

.luxury-card:hover::before {
    left: 100%;
}

.luxury-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-gold-hover);
    box-shadow: var(--shadow-gold);
    transform: translateY(-4px);
}

/* ==================== BOTONES ==================== */
.luxury-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 0.875rem 1.75rem;
    background: transparent;
    border: 1.5px solid var(--gold-primary);
    border-radius: var(--radius-full);
    color: var(--gold-primary);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.8125rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.luxury-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gold-primary);
    transition: left var(--transition-base);
    z-index: -1;
}

.luxury-button:hover {
    color: #000;
    border-color: var(--gold-primary);
    box-shadow: var(--shadow-gold);
    transform: translateY(-2px);
}

.luxury-button:hover::before {
    left: 0;
}

.luxury-button:active {
    transform: translateY(0);
}

/* Botón filled */
.luxury-button.filled {
    background: var(--gold-primary);
    color: #000;
    border-color: var(--gold-primary);
}

.luxury-button.filled::before {
    background: var(--gold-dark);
}

/* ==================== BOTONES WHATSAPP LUXURY ==================== */
.whatsapp-btn {
    background: var(--bg-card);
    border: 1.5px solid var(--border-gold);
    color: var(--text-primary);
    position: relative;
}

.whatsapp-btn i {
    color: var(--gold-primary);
    transition: all var(--transition-base);
}

.whatsapp-btn::before {
    background: #25D366;
}

.whatsapp-btn:hover {
    background: #25D366;
    border-color: #25D366;
    color: #fff;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
}

.whatsapp-btn:hover i {
    color: #fff;
}

/* Animación pulse para WhatsApp flotante */
@keyframes pulseWhatsApp {
    0%, 100% {
        box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5), 0 0 0 12px rgba(37, 211, 102, 0.1);
        transform: scale(1.05);
    }
}

.whatsapp-floating {
    animation: pulseWhatsApp 3s infinite;
}

/* ==================== HEADER ==================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    transition: all var(--transition-base);
}

header.scrolled {
    background: rgba(5, 5, 5, 0.95);
    box-shadow: var(--shadow-md);
}

header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: color var(--transition-fast);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--gold-primary);
    transition: width var(--transition-base);
}

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

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

/* ==================== SECCIÓN "ENVÍA TU CASO" MINIMALISTA ==================== */
#canales {
    background: var(--bg-darker);
    padding: var(--spacing-xl) 0;
}

.canal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 2.5rem 2rem;
    text-align: center;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.canal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.03), transparent);
    transition: left var(--transition-slow);
}

.canal-card:hover::before {
    left: 100%;
}

.canal-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-gold-hover);
    box-shadow: var(--shadow-gold);
    transform: translateY(-6px);
}

.canal-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gold-subtle);
    border: 1px solid var(--border-gold);
    border-radius: 50%;
    transition: all var(--transition-base);
}

.canal-card:hover .canal-icon {
    background: var(--gold-primary);
    border-color: var(--gold-primary);
    transform: scale(1.1) rotate(5deg);
    box-shadow: var(--shadow-gold);
}

.canal-card:hover .canal-icon i {
    color: #000 !important;
}

/* ==================== PROTECCIÓN DE IMÁGENES ==================== */
img {
    pointer-events: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

/* ==================== BLOQUEO DE IMPRESIÓN ==================== */
@media print {
    * {
        display: none !important;
    }
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    :root {
        --spacing-xl: 4rem;
        --spacing-lg: 3rem;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 4rem 0;
    }

    .container {
        padding: 0 1.5rem;
    }
}