/* ==========================================================================
   NNIVAGIO QUÍMICA - DESIGN SYSTEM & GLOBAL STYLES (main.css)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Montserrat:wght@400;500;600;700;800&display=swap');

:root {
    /* Color Palette */
    --color-primary-dark: #2B1E17;     /* Café muy oscuro, casi negro */
    --color-primary: #4E3629;          /* Café corporativo industrial */
    --color-primary-light: #704F3D;    /* Café claro cálido */
    --color-secondary: #704F3D;        /* Café claro cálido como secundario principal */
    --color-secondary-hover: #4E3629;  /* Café corporativo */
    --color-accent: #FFAF87;           /* Metalizado naranja claro */
    --color-accent-pink: #FF6B8B;      /* Acento rosa/metálico de especialidades */
    --color-orange-accent: #FF6B35;    /* Naranja como acento secundario vibrante */
    
    /* Neutral Colors */
    --color-bg-dark: #0F1216;          /* Gris carbón profundo (modo oscuro) */
    --color-bg-dark-card: #171C23;     /* Tarjeta en modo oscuro */
    --color-bg-light: #F4F6F8;         /* Gris claro industrial (fresco) */
    --color-bg-white: #FFFFFF;
    --color-text-dark: #1F2421;        /* Texto en fondo claro */
    --color-text-muted: #6B7280;      /* Texto secundario */
    --color-text-light: #F3F4F6;       /* Texto en fondo oscuro */
    --color-border-dark: rgba(255, 255, 255, 0.08);
    --color-border-light: rgba(78, 54, 41, 0.12);

    /* Typography */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-premium: 0 20px 40px -10px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 15px rgba(255, 107, 53, 0.35);

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-full: 9999px;

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

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text-dark);
    background-color: var(--color-bg-white);
    overflow-x: hidden;
}

/* Scrollbar Personalizado */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--color-bg-dark);
}
::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border: 2px solid var(--color-bg-dark);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-secondary);
}

/* Tipografía Base */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.25;
    color: var(--color-primary-dark);
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

img, svg {
    max-width: 100%;
    height: auto;
    display: block;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    outline: none;
    border: none;
}

ul {
    list-style: none;
}

/* ==========================================================================
   LOADER ANIMADO INDUSTRIAL
   ========================================================================== */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--color-bg-dark);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity var(--transition-slow) ease-in-out, visibility var(--transition-slow);
}

.loader-container {
    text-align: center;
}

.chemical-spinner {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 30px;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top-color: var(--color-secondary);
    border-radius: 50%;
    animation: spin 1.5s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.spinner-ring-inner {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    border: 3px solid transparent;
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin-reverse 2s linear infinite;
}

.spinner-core {
    position: absolute;
    top: 25px;
    left: 25px;
    width: 50px;
    height: 50px;
    background-image: url('../assets/img/logo.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    animation: pulse 1.5s ease-in-out infinite alternate;
}

.loader-text {
    font-family: var(--font-heading);
    color: var(--color-bg-white);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.loader-sub {
    font-size: 0.8rem;
    color: var(--color-accent);
    letter-spacing: 3px;
    text-transform: uppercase;
}

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

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

@keyframes pulse {
    0% { transform: scale(0.8); opacity: 0.5; }
    100% { transform: scale(1.2); opacity: 1; }
}

/* ==========================================================================
   CURSOR PERSONALIZADO
   ========================================================================== */
.custom-cursor {
    width: 30px;
    height: 30px;
    border: 2px solid var(--color-secondary);
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 10000;
    transition: width var(--transition-fast) ease, height var(--transition-fast) ease, background-color var(--transition-fast) ease, border-color var(--transition-fast) ease;
    mix-blend-mode: difference;
    opacity: 0;
}

.custom-cursor-dot {
    width: 6px;
    height: 6px;
    background-color: var(--color-secondary);
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 10001;
    transition: transform 0.1s ease;
    opacity: 0;
}

body.cursor-active .custom-cursor {
    opacity: 1;
}
body.cursor-active .custom-cursor-dot {
    opacity: 1;
}

/* Hover en elementos interactivos */
.custom-cursor.hovered {
    width: 50px;
    height: 50px;
    background-color: rgba(255, 107, 53, 0.1);
    border-color: var(--color-accent);
}

@media (max-width: 1024px) {
    .custom-cursor, .custom-cursor-dot {
        display: none !important;
    }
}

/* ==========================================================================
   NAVBAR / CABECERA STICKY
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 25px 5%;
    z-index: 999;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-normal);
}

.navbar.scrolled {
    padding: 15px 5%;
    background-color: rgba(15, 18, 22, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border-dark);
    box-shadow: var(--shadow-md);
}

.navbar .logo-container {
    display: flex;
    align-items: center;
}

.navbar .logo {
    height: 50px;
    width: auto;
    filter: brightness(1) contrast(1.1);
    transition: var(--transition-normal);
}

.navbar.scrolled .logo {
    height: 40px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-bg-white);
    letter-spacing: 0.5px;
    position: relative;
    padding: 5px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-secondary);
    transition: var(--transition-normal);
}

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

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

/* Botón Destacado Cotización */
.btn-quote {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    background-color: var(--color-secondary);
    color: var(--color-bg-white) !important;
    padding: 12px 25px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
    border: 1px solid transparent;
}

.btn-quote:hover {
    background-color: var(--color-secondary-hover);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

/* Menú Hamburguesa */
.hamburger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--color-bg-white);
    margin: 5px 0;
    transition: var(--transition-normal);
}

@media (max-width: 991px) {
    .hamburger {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background-color: var(--color-bg-dark);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 40px;
        transition: var(--transition-slow);
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }
}

/* ==========================================================================
   FOOTER PREMIUM
   ========================================================================== */
.footer {
    background-color: var(--color-bg-dark);
    color: var(--color-text-light);
    padding: 80px 5% 30px;
    border-top: 2px solid var(--color-primary);
    position: relative;
    overflow: hidden;
}

/* Efecto de partículas sutiles de fondo */
.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 80% 20%, rgba(255, 107, 53, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.2fr 1.5fr;
    gap: 50px;
    margin-bottom: 60px;
}

.footer-info .footer-logo {
    height: 50px;
    margin-bottom: 25px;
}

.footer-info p {
    color: #9CA3AF;
    font-size: 0.9rem;
    margin-bottom: 25px;
    max-width: 300px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-icon {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border-dark);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-bg-white);
    transition: var(--transition-normal);
}

.social-icon:hover {
    background-color: var(--color-secondary);
    color: var(--color-bg-white);
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

.footer-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--color-bg-white);
    position: relative;
    padding-bottom: 10px;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: var(--color-secondary);
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #9CA3AF;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--color-secondary);
    padding-left: 5px;
}

.footer-contact li {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
    color: #9CA3AF;
    font-size: 0.9rem;
}

.footer-contact i {
    color: var(--color-secondary);
    margin-top: 5px;
}

.footer-bottom {
    border-top: 1px solid var(--color-border-dark);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    color: #6B7280;
    font-size: 0.85rem;
}

.footer-legal {
    display: flex;
    gap: 20px;
}

.footer-legal a:hover {
    color: var(--color-secondary);
}

@media (max-width: 991px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* ==========================================================================
   ELEMENTOS EXTRAS: WHATSAPP FLOTANTE Y LOADER GENERAL
   ========================================================================== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 998;
    transition: var(--transition-normal);
    animation: pulse-whatsapp 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background-color: #20BA5A;
}

@keyframes pulse-whatsapp {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Scroll Reveal base styles */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* ==========================================================================
   BLOG MODAL READER (main.css / global component)
   ========================================================================== */
.blog-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 18, 22, 0.85);
    backdrop-filter: blur(15px);
    z-index: 10000; /* Por encima de todo */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.blog-modal.active {
    opacity: 1;
    visibility: visible;
}

.blog-modal-content {
    background-color: var(--color-bg-white);
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-light);
    box-shadow: var(--shadow-premium);
    overflow-y: auto;
    position: relative;
    padding: 50px;
    transform: translateY(30px);
    transition: transform var(--transition-normal);
}

.blog-modal.active .blog-modal-content {
    transform: translateY(0);
}

.blog-modal-close {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 1.8rem;
    color: var(--color-primary-dark);
    cursor: pointer;
    transition: var(--transition-fast);
}

.blog-modal-close:hover {
    color: var(--color-orange-accent);
    transform: rotate(90deg);
}

.blog-modal-header {
    margin-bottom: 30px;
}

.blog-modal-badge {
    display: inline-block;
    background-color: var(--color-primary-dark);
    color: white;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    margin-bottom: 15px;
}

.blog-modal-title {
    font-size: 2.2rem;
    color: var(--color-primary-dark);
    line-height: 1.25;
}

.blog-modal-meta {
    display: flex;
    gap: 20px;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-top: 15px;
    border-bottom: 1px solid var(--color-border-light);
    padding-bottom: 15px;
}

.blog-modal-image {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: 30px;
}

.blog-modal-text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--color-text-dark);
}

.blog-modal-text p {
    margin-bottom: 20px;
}

.blog-modal-text h4 {
    font-size: 1.3rem;
    margin: 30px 0 15px;
    color: var(--color-primary-dark);
}

@media (max-width: 576px) {
    .blog-modal-content {
        padding: 30px 20px;
    }
    .blog-modal-title {
        font-size: 1.6rem;
    }
}

