/**
 * Tesauro Software - Mejoras de Diseño Moderno 2025
 * Autor: Claude Code
 * Fecha: 2025-11-04
 *
 * Este archivo contiene mejoras visuales modernas que se aplican
 * sobre el diseño existente sin romper la funcionalidad.
 */

/* =========================================
   1. VARIABLES MODERNAS (CSS Custom Properties)
   ========================================= */
:root {
    /* Colores principales más modernos */
    --primary-color: #4F46E5;  /* Indigo moderno (antes #00356A) */
    --primary-dark: #4338CA;
    --primary-light: #818CF8;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

    /* Colores secundarios */
    --secondary-color: #10B981;  /* Verde esmeralda */
    --accent-color: #F59E0B;     /* Amber para CTAs */

    /* Grises modernos */
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-900: #111827;

    /* Sombras modernas */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

    /* Espaciado moderno */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;

    /* Radius modernos */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;

    /* Transiciones suaves */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================
   2. TIPOGRAFÍA MEJORADA
   ========================================= */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
    color: var(--gray-700);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--gray-900);
    margin-bottom: var(--spacing-md);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }

/* =========================================
   3. BOTONES MODERNOS
   ========================================= */
.btn-primary,
.btn-arf,
button[type="submit"],
input[type="submit"] {
    background: var(--primary-gradient) !important;
    border: none !important;
    border-radius: var(--radius-lg) !important;
    padding: 0.875rem 2rem !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    box-shadow: var(--shadow-md) !important;
    transition: all var(--transition-base) !important;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover,
.btn-arf:hover,
button[type="submit"]:hover,
input[type="submit"]:hover {
    transform: translateY(-2px) !important;
    box-shadow: var(--shadow-xl) !important;
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%) !important;
}

.btn-primary:active,
.btn-arf:active {
    transform: translateY(0) !important;
    box-shadow: var(--shadow-md) !important;
}

/* Efecto ripple en botones */
.btn-primary::before,
.btn-arf::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before,
.btn-arf:hover::before {
    width: 300px;
    height: 300px;
}

/* =========================================
   4. CARDS MODERNOS
   ========================================= */
.feature-item,
.service-item,
.project-item,
.blog-item,
.team-item,
.testimonial-item,
.product-item {
    border-radius: var(--radius-xl) !important;
    box-shadow: var(--shadow-md) !important;
    transition: all var(--transition-base) !important;
    background: white !important;
    overflow: hidden;
    border: 1px solid var(--gray-200) !important;
}

.feature-item:hover,
.service-item:hover,
.project-item:hover,
.blog-item:hover,
.team-item:hover,
.product-item:hover {
    transform: translateY(-8px) !important;
    box-shadow: var(--shadow-2xl) !important;
    border-color: var(--primary-light) !important;
}

/* Imágenes dentro de cards */
.feature-item img,
.service-item img,
.project-item img,
.blog-item img,
.team-item img,
.product-item img {
    transition: transform var(--transition-slow) !important;
}

.feature-item:hover img,
.service-item:hover img,
.project-item:hover img,
.blog-item:hover img,
.team-item:hover img,
.product-item:hover img {
    transform: scale(1.05) !important;
}

/* =========================================
   5. ESPACIADO Y LAYOUT MEJORADO
   ========================================= */
.container {
    padding-left: var(--spacing-lg);
    padding-right: var(--spacing-lg);
}

/* Secciones con más respiración */
.feature,
.service,
.project,
.blog-area,
.team,
.testimonial {
    padding: var(--spacing-2xl) 0 !important;
}

/* Headings de sección */
.heading {
    margin-bottom: var(--spacing-xl) !important;
}

.heading h2 {
    position: relative;
    padding-bottom: var(--spacing-md);
}

.heading h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

/* =========================================
   6. TOP BAR MODERNO
   ========================================= */
.top {
    background: var(--primary-gradient) !important;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
}

.top-contact a,
.top-social a {
    transition: all var(--transition-fast) !important;
}

.top-contact a:hover,
.top-social a:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* =========================================
   7. NAVEGACIÓN MEJORADA
   ========================================= */
.main-nav {
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.main-nav nav .navbar-nav .nav-item a {
    font-weight: 500;
    transition: all var(--transition-fast) !important;
    position: relative;
}

.main-nav nav .navbar-nav .nav-item a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transform: translateX(-50%);
    transition: width var(--transition-base);
}

.main-nav nav .navbar-nav .nav-item a:hover::after {
    width: 80%;
}

/* =========================================
   8. HERO SLIDER MODERNO
   ========================================= */
.slider-item {
    position: relative;
}

.slider-bg {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.8) 0%, rgba(139, 92, 246, 0.6) 100%) !important;
}

.slider-text h1 {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-weight: 800 !important;
}

/* =========================================
   9. FORMULARIOS MODERNOS
   ========================================= */
.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    border-radius: var(--radius-md) !important;
    border: 2px solid var(--gray-200) !important;
    padding: 0.875rem 1rem !important;
    transition: all var(--transition-fast) !important;
    font-size: 1rem !important;
}

.form-control:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1) !important;
    outline: none !important;
}

/* =========================================
   10. FOOTER MEJORADO
   ========================================= */
.footer-area {
    background: var(--gray-900) !important;
    position: relative;
}

.footer-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
}

.footer-social-link ul li a {
    border-radius: 50% !important;
    transition: all var(--transition-base) !important;
}

.footer-social-link ul li a:hover {
    transform: scale(1.1) rotate(5deg) !important;
}

/* =========================================
   11. ICONOS Y ELEMENTOS VISUALES
   ========================================= */
.contact-icon,
.feature-item .icon {
    transition: all var(--transition-base) !important;
}

.contact-item:hover .contact-icon {
    transform: scale(1.1) rotate(5deg) !important;
}

/* =========================================
   12. SCROLL TO TOP MODERNO
   ========================================= */
.scroll-top {
    border-radius: 50% !important;
    box-shadow: var(--shadow-lg) !important;
    transition: all var(--transition-base) !important;
}

.scroll-top:hover {
    transform: translateY(-4px) scale(1.1) !important;
    box-shadow: var(--shadow-2xl) !important;
}

/* =========================================
   13. ANIMACIONES SUAVES
   ========================================= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wow {
    animation-duration: 0.8s;
}

/* =========================================
   14. RESPONSIVE MEJORADO
   ========================================= */
@media (max-width: 768px) {
    :root {
        --spacing-xl: 2rem;
        --spacing-2xl: 3rem;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }

    .feature,
    .service,
    .project,
    .blog-area,
    .team {
        padding: var(--spacing-xl) 0 !important;
    }
}

/* =========================================
   15. MODO DE ALTO CONTRASTE (Accesibilidad)
   ========================================= */
@media (prefers-contrast: high) {
    .btn-primary,
    .btn-arf {
        border: 2px solid white !important;
    }

    .feature-item,
    .service-item,
    .project-item,
    .blog-item {
        border: 2px solid var(--gray-900) !important;
    }
}

/* =========================================
   16. ANIMACIÓN DE CARGA
   ========================================= */
#preloader {
    background: var(--primary-gradient) !important;
}

/* =========================================
   17. MEJORAS DE PERFORMANCE
   ========================================= */
* {
    /* Optimizar rendering */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

img {
    /* Lazy loading visual hint */
    background: var(--gray-100);
}
