/*
 * dellnova Main Stylesheet
 * Optimized for clarity, consistency, and modern aesthetics.
 */

:root {
    /* Main Palette - Professional High Contrast */
    --primary-blue: #0066ff;
    --primary-dark: #0052cc;
    --secondary-dark: #0f172a; /* Títulos y Footer */
    --text-primary: #1e293b;   /* Cuerpo del texto */
    --text-secondary: #475569; /* Descripciones y textos suaves */
    
    /* Backgrounds & Glass */
    --bg-light: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.7);
    --white: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.5);
    --glass-border: rgba(255, 255, 255, 0.8);
    
    /* Accents */
    --accent-cyan: #06b6d4;
    --accent-indigo: #4f46e5;
    
    /* Semantic Colors */
    --success: #10b981;
    --error: #ef4444;
    
    /* Layout & Effects */
    --shadow-soft: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 20px 40px -15px rgba(0, 102, 255, 0.08);
    --transition-smooth: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    --border-radius-xl: 24px;
    
    /* Gradients */
    --gradient-tech: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-cyan) 100%);
    --gradient-mesh: radial-gradient(at 0% 0%, rgba(0, 102, 255, 0.05) 0, transparent 50%), 
                     radial-gradient(at 50% 0%, rgba(6, 182, 212, 0.05) 0, transparent 50%), 
                     radial-gradient(at 100% 0%, rgba(139, 92, 246, 0.05) 0, transparent 50%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-light);
    background-image: var(--gradient-mesh);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Background Canvas Fixed */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Background Animation Body */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(0, 102, 255, 0.03), transparent 50%);
    z-index: -2;
    animation: meshFlow 20s ease infinite;
}

@keyframes meshFlow {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(2%, 2%) scale(1.05); }
    66% { transform: translate(-2%, 1%) scale(0.98); }
}

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

/* Headers & Typography */
h1, h2, h3, h4 {
    color: var(--secondary-dark);
    font-weight: 800;
    line-height: 1.2;
}

.gradient-text {
    background: var(--gradient-tech);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

/* Modern Buttons */
.btn-primary {
    background: var(--gradient-tech);
    color: white;
    padding: 16px 36px;
    border-radius: 50px;
    font-weight: 700;
    display: inline-block;
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 8px 20px rgba(0, 102, 255, 0.2);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0, 102, 255, 0.3);
}

.btn-secondary {
    background: white;
    color: var(--primary-blue);
    padding: 16px 36px;
    border-radius: 50px;
    font-weight: 700;
    display: inline-block;
    border: 1px solid rgba(0, 102, 255, 0.1);
    cursor: pointer;
    transition: var(--transition-smooth);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-decoration: none;
    box-shadow: var(--shadow-soft);
}

.btn-secondary:hover {
    border-color: var(--primary-blue);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

/* Main Header - Transparent to Glass */
.main-header {
    background: transparent;
    padding: 20px 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition-smooth);
}

.main-header.scrolled {
    padding: 12px 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
}

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

.logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
    transition: var(--transition-smooth);
}

.main-header.scrolled .logo-img {
    height: 32px;
}

/* Desktop Navigation - Horizontal */
.desktop-nav ul {
    display: flex;
    align-items: center;
    gap: 40px;
    list-style: none;
}

.desktop-nav a:not(.btn-primary) {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: 0.3s;
    position: relative;
    padding: 5px 0;
    text-decoration: none;
}

.desktop-nav a:not(.btn-primary):hover,
.desktop-nav a.active:not(.btn-primary) {
    color: var(--primary-blue);
}

.desktop-nav a:not(.btn-primary)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-blue);
    transition: width 0.3s;
}

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

/* Sections */
.section-padding {
    padding: 120px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title p {
    color: var(--primary-blue);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.section-title h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 60px;
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 5rem);
    margin-bottom: 24px;
    letter-spacing: -2px;
}

.hero p {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0 auto 40px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Cards System */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--bg-card);
    padding: 40px;
    border-radius: var(--border-radius-xl);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-soft);
    height: 100%;
}

.card:hover {
    transform: translateY(-10px);
    background: var(--white);
    border-color: var(--primary-blue);
    box-shadow: var(--shadow-md);
}

.card-icon {
    width: 64px;
    height: 64px;
    background: rgba(0, 102, 255, 0.05);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: var(--primary-blue);
    transition: var(--transition-smooth);
}

.card:hover .card-icon {
    background: var(--gradient-tech);
    color: white;
    transform: scale(1.1) rotate(5deg);
}

.card h3 {
    margin-bottom: 16px;
    font-size: 1.5rem;
}

.card p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* CTA Section */
.cta-section .card {
    background: var(--secondary-dark);
    color: white;
    border: none;
    padding: 80px 40px;
    text-align: center;
}

.cta-section h2 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.cta-section p {
    color: #94a3b8;
    max-width: 600px;
    margin: 0 auto 40px;
}

/* Footer - Contrast Optimized */
.main-footer {
    background: var(--secondary-dark);
    color: white;
    padding: 100px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 50px;
    margin-bottom: 60px;
}

.footer-about h3, .footer-links h4, .footer-services h4, .footer-contact h4 {
    color: white;
    margin-bottom: 24px;
    font-size: 1.2rem;
}

.footer-about p, .footer-contact p, .footer-links a, .footer-services a {
    color: #94a3b8;
    text-decoration: none;
    transition: 0.3s;
}

.footer-links a:hover, .footer-services a:hover {
    color: white;
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
}

/* Mobile Toggle - Professional */
.mobile-toggle {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 10px;
}

.bar {
    display: block;
    width: 28px;
    height: 3px;
    margin: 6px 0;
    background: var(--primary-blue);
    border-radius: 3px;
    transition: 0.3s;
}

/* Mobile Nav - Fullscreen Glass */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(30px);
    z-index: 1001;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

@media (max-width: 992px) {
    .desktop-nav { display: none; }
    .mobile-toggle { display: block; }
    .mobile-nav.active { display: flex; }
    
    .section-padding { padding: 80px 0; }
    .hero { padding-top: 40px; }
}

.mobile-nav ul {
    list-style: none;
    text-align: center;
}

.mobile-nav ul li {
    margin-bottom: 30px;
}

.mobile-nav a {
    font-size: 2rem;
    font-weight: 800;
    color: var(--secondary-dark);
    text-decoration: none;
}

/* Scroll Top Button */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-blue);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    box-shadow: var(--shadow-md);
    z-index: 999;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

/* Page Loader */
.page-loader {
    position: fixed;
    inset: 0;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: 0.5s;
}

/* Form System - Modern & Accessible */
.form-group {
    margin-bottom: 24px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--secondary-dark);
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    padding: 16px 20px;
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-primary);
    transition: var(--transition-smooth);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-blue);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.05), var(--shadow-soft);
    transform: translateY(-2px);
}

.form-control::placeholder {
    color: #94a3b8;
    opacity: 0.7;
}

textarea.form-control {
    resize: none;
    line-height: 1.6;
}

/* Contact Specific Items */
.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    border-radius: 20px;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.contact-item:hover {
    background: var(--white);
    border-color: rgba(0, 102, 255, 0.1);
    box-shadow: var(--shadow-soft);
}

.contact-icon {
    width: 54px;
    height: 54px;
    background: rgba(0, 102, 255, 0.05);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-blue);
    flex-shrink: 0;
}

/* Alerts */
.alert {
    padding: 20px 24px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid transparent;
}

.alert-success {
    background: #ecfdf5;
    color: #065f46;
    border-color: #a7f3d0;
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}

/* Grid & Layout adjustments */
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mb-40 { margin-bottom: 40px; }

@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr;
        gap: 40px !important;
    }
    
    .contact-form .card {
        padding: 30px 20px;
    }
}