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

/* Prevent horizontal overflow */
html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

* {
    max-width: 100%;
}

img, svg, canvas, video, iframe {
    max-width: 100%;
    height: auto;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --accent-orange: #e55a2b;
    --accent-orange-dark: #d14a1f;
    --accent-orange-light: #ff6b35;
    --secondary: #64748b;
    --text: #0f172a;
    --text-light: #475569;
    --text-lighter: #94a3b8;
    --bg: #ffffff;
    --bg-light: #f8fafc;
    --bg-dark: #0f172a;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-orange: 0 10px 30px -5px rgba(255, 107, 53, 0.3);
    --shadow-3d: 8px 8px 0 0 var(--primary), 16px 16px 0 0 var(--accent-orange);
    --shadow-3d-hover: 12px 12px 0 0 var(--primary), 24px 24px 0 0 var(--accent-orange);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    background: var(--bg);
    position: relative;
}

/* Particle Canvas */
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }
}

/* Mobile Styles - Fixes for small screens */
@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    html {
        font-size: 14px;
    }
    
    body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }
    
    * {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    img, svg, canvas, video {
        max-width: 100%;
        height: auto;
    }
    
    /* Ocultar elementos decorativos en móviles pequeños */
    .geometric-shapes,
    .tech-illustrations-container {
        display: none;
    }
    
    /* Ajustar hero */
    .hero {
        padding: 6rem 1rem 3rem;
    }
    
    .hero-title {
        font-size: 2rem !important;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn {
        width: 100%;
        max-width: 100%;
    }
    
    /* Ajustar secciones */
    .section-header {
        padding: 0 0 2rem;
    }
    
    .section-title {
        font-size: 1.75rem !important;
    }
    
    /* Ajustar cards y grids */
    .servicios-grid,
    .portafolio-grid,
    .estadisticas-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Ajustar simulador */
    .simulador-wrapper {
        padding: 1.5rem 1rem !important;
    }
    
    .perfil-opciones {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .activadores-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-metricas {
        grid-template-columns: 1fr;
    }
    
    .resultado-mejoras {
        grid-template-columns: 1fr;
    }
    
    /* Ajustar formularios */
    .contacto-wrapper {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    /* Ajustar footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* Ajustar navbar */
    .navbar .container {
        padding: 0.75rem 1rem;
    }
    
    .logo-img {
        height: 50px !important;
    }
    
    /* Ajustar textos largos */
    p, span, div {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Asegurar que no haya overflow horizontal */
    section {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
    background: rgba(255, 255, 255, 0.98);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
}

.nav-brand {
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: var(--transition);
}

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

.logo-link:hover .logo-img {
    transform: scale(1.05);
}

@media (max-width: 767px) {
    .logo-img {
        height: 70px;
    }
}

.nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.nav-toggle span {
    width: 28px;
    height: 3px;
    background: var(--text);
    border-radius: 3px;
    transition: var(--transition);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 2rem 1.5rem;
    box-shadow: var(--shadow-lg);
    transform: translateX(-100%);
    transition: var(--transition);
    list-style: none;
    gap: 0;
    display: flex;
}

.nav-menu.active {
    transform: translateX(0);
}

@media (min-width: 768px) {
    .nav-menu {
        position: static;
        flex-direction: row;
        padding: 0;
        box-shadow: none;
        transform: none;
        background: transparent;
        display: flex !important;
    }
    
    .nav-menu.active {
        transform: none;
    }
}

.nav-link {
    display: block;
    padding: 1rem;
    color: var(--text);
    text-decoration: none;
    transition: var(--transition);
    border-bottom: 1px solid var(--border);
    font-weight: 500;
}

.nav-link:hover {
    color: var(--primary);
    padding-left: 1.5rem;
}

.btn-nav {
    background: var(--primary);
    color: white !important;
    border-radius: 0.5rem;
    margin-top: 0.5rem;
    border: none !important;
    position: relative;
    overflow: hidden;
}

.btn-nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--accent-orange);
    transition: left 0.3s;
    z-index: -1;
}

.btn-nav:hover::before {
    left: 0;
}

.btn-nav:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    padding-left: 1rem !important;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 8rem 2rem 4rem;
    overflow: hidden;
}

@media (max-width: 768px) {
    .hero {
        padding: 8rem 1.5rem 4rem;
    }
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    overflow: hidden;
}

/* Tech Illustrations */
.tech-illustration {
    position: absolute;
    opacity: 0.4;
    animation: floatTech 15s infinite ease-in-out;
    z-index: 0;
}

.tech-illustration svg {
    filter: drop-shadow(0 0 10px rgba(255, 107, 53, 0.3));
}

.code-brackets {
    top: 15%;
    left: 10%;
    animation-delay: 0s;
}

.code-lines {
    top: 25%;
    right: 15%;
    animation-delay: 2s;
}

.circuit {
    bottom: 30%;
    left: 8%;
    animation-delay: 4s;
}

.database {
    top: 50%;
    right: 10%;
    animation-delay: 6s;
}

.server {
    bottom: 20%;
    right: 20%;
    animation-delay: 8s;
}

@keyframes floatTech {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.4;
    }
    25% {
        transform: translate(20px, -20px) rotate(5deg);
        opacity: 0.6;
    }
    50% {
        transform: translate(-15px, 15px) rotate(-5deg);
        opacity: 0.5;
    }
    75% {
        transform: translate(10px, 10px) rotate(3deg);
        opacity: 0.55;
    }
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s infinite ease-in-out;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: var(--primary);
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: #764ba2;
    bottom: -150px;
    right: -150px;
    animation-delay: 5s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: #3b82f6;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* Geometric Shapes */
.geometric-shapes {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    opacity: 0.1;
    animation: shapeFloat 20s infinite ease-in-out;
}

.shape-1 {
    width: 200px;
    max-width: 100%;
    height: 200px;
    background: var(--primary);
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.shape-2 {
    width: 150px;
    max-width: 100%;
    height: 150px;
    background: var(--accent-orange);
    clip-path: polygon(25% 0%, 100% 0%, 75% 100%, 0% 100%);
    top: 60%;
    right: 10%;
    animation-delay: 3s;
}

.shape-3 {
    width: 180px;
    max-width: 100%;
    height: 180px;
    background: var(--primary);
    clip-path: circle(50%);
    bottom: 20%;
    left: 15%;
    animation-delay: 6s;
}

.shape-4 {
    width: 120px;
    max-width: 100%;
    height: 120px;
    background: var(--accent-orange);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    top: 30%;
    right: 20%;
    animation-delay: 9s;
}

.shape-5 {
    width: 100px;
    max-width: 100%;
    height: 100px;
    background: var(--primary);
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
    bottom: 40%;
    right: 5%;
    animation-delay: 12s;
}

@keyframes shapeFloat {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(30px, -30px) rotate(90deg);
    }
    50% {
        transform: translate(-20px, 20px) rotate(180deg);
    }
    75% {
        transform: translate(20px, 30px) rotate(270deg);
    }
}

/* Tech Illustrations Container */
.tech-illustrations-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    overflow: hidden;
}

.tech-illustration-wrapper {
    position: absolute;
    opacity: 0.3;
}

.tech-svg {
    filter: drop-shadow(0 0 15px rgba(255, 107, 53, 0.4));
    animation: techPulse 4s infinite ease-in-out;
}

@keyframes techPulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.1);
    }
}

/* Terminal Window */
.terminal-window {
    position: absolute;
    bottom: 10%;
    right: 5%;
    width: 400px;
    max-width: 90%;
    background: var(--bg-dark);
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 1;
    font-family: 'JetBrains Mono', monospace;
    overflow: hidden;
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: transform 0.3s;
}

.terminal-window:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg) scale(1.05);
}

.terminal-header {
    background: #1a1a1a;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid #333;
}

.terminal-buttons {
    display: flex;
    gap: 0.5rem;
}

.terminal-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-btn-red {
    background: #ff5f56;
}

.terminal-btn-yellow {
    background: var(--accent-orange);
}

.terminal-btn-green {
    background: #27c93f;
}

.terminal-title {
    color: #888;
    font-size: 0.75rem;
    margin-left: auto;
}

.terminal-body {
    padding: 1rem;
    background: #0d1117;
    min-height: 150px;
    color: #c9d1d9;
    font-size: 0.875rem;
}

.terminal-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.terminal-prompt {
    color: var(--accent-orange);
    font-weight: 600;
}

.terminal-command {
    color: #58a6ff;
}

.terminal-cursor {
    display: inline-block;
    width: 8px;
    height: 16px;
    background: var(--accent-orange);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

.terminal-output {
    margin-top: 1rem;
    color: #7c3aed;
    font-size: 0.8rem;
    line-height: 1.6;
}

.hero-content {
    max-width: 900px;
    text-align: center;
    z-index: 1;
    width: 100%;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1.25rem;
    background: rgba(255, 107, 53, 0.1);
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--accent-orange);
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.tech-icon {
    font-size: 1rem;
    animation: pulse 2s infinite;
}

.code-badge {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    opacity: 0.8;
    padding: 0.25rem 0.5rem;
    background: rgba(255, 107, 53, 0.15);
    border-radius: 4px;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

.tech-stack-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1.5rem;
    margin-bottom: 2rem;
}

.tech-tag {
    padding: 0.5rem 1rem;
    background: rgba(255, 107, 53, 0.1);
    border: 1px solid rgba(255, 107, 53, 0.2);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent-orange);
    font-family: 'Courier New', monospace;
    transition: var(--transition);
}

.tech-tag:hover {
    background: rgba(255, 107, 53, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.2);
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.title-line {
    display: block;
}

.title-line.highlight {
    color: var(--accent-orange);
    position: relative;
    display: inline-block;
}

.title-line.highlight::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary);
    animation: underlineExpand 0.8s ease forwards;
}

@keyframes underlineExpand {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

.code-tag {
    color: var(--accent-orange);
    font-weight: 400;
    opacity: 0.7;
}

.accent-text {
    color: var(--accent-orange);
    font-weight: 600;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 3rem;
    line-height: 1.8;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}

.stat-number::before {
    content: attr(data-target);
    position: absolute;
    top: 0;
    left: 0;
    color: var(--accent-orange);
    clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
    animation: statReveal 2s ease forwards;
}

@keyframes statReveal {
    to {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 500;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    text-decoration: none;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    width: 100%;
    max-width: 280px;
    justify-content: center;
}

.btn-large {
    padding: 1.125rem 2.5rem;
    font-size: 1.125rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    border: 3px solid var(--accent-orange);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--accent-orange);
    transition: left 0.3s;
    z-index: -1;
}

.btn-primary:hover::before {
    left: 0;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-orange);
    border-color: var(--primary);
}

/* 3D Button Effect */
.btn-3d {
    transform-style: preserve-3d;
    transition: transform 0.3s;
}

.btn-3d:hover {
    transform: translateY(-5px) rotateX(5deg) rotateY(-5deg);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.hero-scroll {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    margin-top: 2rem;
}

.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.7rem;
    font-weight: 500;
}

.scroll-line {
    width: 2px;
    height: 25px;
    background: var(--accent-orange);
    border-radius: 2px;
    animation: scrollDown 2s infinite;
}

.scroll-indicator span {
    order: 2;
    margin-top: 0.25rem;
}

@keyframes scrollDown {
    0%, 100% {
        opacity: 1;
        transform: translateY(0);
    }
    50% {
        opacity: 0.3;
        transform: translateY(10px);
    }
}

/* Estadísticas Section */
.estadisticas {
    padding: 4rem 0;
    background: var(--bg-light);
}

.estadisticas-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.estadistica-card {
    background: var(--bg);
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    transform: scale(0.9);
    opacity: 0;
}

.estadistica-card.animated {
    transform: scale(1);
    opacity: 1;
}

.estadistica-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.estadistica-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.estadistica-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
    position: relative;
}

.estadistica-number::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--accent-orange);
    animation: numberLine 2s ease forwards;
}

@keyframes numberLine {
    to {
        width: 100%;
    }
}

.estadistica-label {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 500;
}

/* Sections */
section {
    padding: 5rem 0;
    width: 100%;
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
    width: 100%;
}

.section-badge {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text);
    line-height: 1.2;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-light);
    line-height: 1.8;
}

/* Servicios */
.servicios {
    background: var(--bg);
}

.servicios-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.servicio-card {
    background: var(--bg);
    padding: 2.5rem;
    border-radius: 1.5rem;
    border: 2px solid var(--border);
    transition: var(--transition);
    opacity: 0;
    transform: translateY(40px);
}

.servicio-card.animated {
    opacity: 1;
    transform: translateY(0);
}

.servicio-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-8px);
}

.servicio-icon-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.servicio-icon {
    font-size: 3.5rem;
    position: relative;
    z-index: 1;
}

.icon-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 50%;
    z-index: 0;
    opacity: 0;
    transition: var(--transition);
}

.servicio-card:hover .icon-glow {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
}

.servicio-card h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text);
}

.servicio-card > p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.servicio-features {
    list-style: none;
    margin-bottom: 1.5rem;
}

.servicio-features li {
    padding: 0.5rem 0;
    color: var(--text-light);
    position: relative;
    padding-left: 1.5rem;
}

.servicio-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-orange);
    font-weight: 700;
}

.servicio-link {
    color: var(--accent-orange);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.servicio-link:hover {
    gap: 1rem;
    color: var(--accent-orange-dark);
}

/* Proceso */
.proceso {
    background: var(--bg-light);
}

.proceso-timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.proceso-timeline::before {
    content: '';
    position: absolute;
    left: 2rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.proceso-item {
    display: flex;
    gap: 2rem;
    margin-bottom: 4rem;
    position: relative;
    opacity: 0;
}

.proceso-item.animated {
    opacity: 1;
}

.proceso-item.fade-in-left {
    transform: translateX(-50px);
}

.proceso-item.fade-in-left.animated {
    transform: translateX(0);
    transition: var(--transition);
}

.proceso-item.fade-in-right {
    transform: translateX(50px);
}

.proceso-item.fade-in-right.animated {
    transform: translateX(0);
    transition: var(--transition);
}

.proceso-number {
    flex-shrink: 0;
    width: 4rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 800;
    box-shadow: var(--shadow-orange);
    position: relative;
    z-index: 1;
    border: 4px solid var(--accent-orange);
    transform: rotate(0deg);
    transition: transform 0.3s;
}

.proceso-item:hover .proceso-number {
    transform: rotate(360deg) scale(1.1);
}

.proceso-content {
    flex: 1;
    background: var(--bg);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
}

.proceso-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text);
}

.proceso-content > p {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.proceso-content ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.proceso-content ul li {
    padding: 0.5rem 0;
    color: var(--text-light);
    position: relative;
    padding-left: 1.5rem;
}

.proceso-content ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-orange);
    font-weight: 700;
}

/* Tecnologías */
.tecnologias {
    background: var(--bg);
}

.tecnologias-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.tecnologia-category {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 1rem;
    opacity: 0;
    transform: translateY(30px);
}

.tecnologia-category.animated {
    opacity: 1;
    transform: translateY(0);
    transition: var(--transition);
}

.tecnologia-category h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.tecnologia-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tecnologia-tags span {
    padding: 0.5rem 1.25rem;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    transition: var(--transition);
}

.tecnologia-tags span:hover {
    border-color: var(--accent-orange);
    color: var(--accent-orange);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.2);
}

/* Comparador de Escenarios */
/* Simulador de Negocio */
.simulador-negocio {
    background: var(--bg-light);
    padding: 6rem 0;
    position: relative;
}

.simulador-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    background: var(--bg);
    border-radius: 1.5rem;
    padding: 3rem;
    box-shadow: var(--shadow-lg);
}

/* Pasos del Simulador */
.simulador-paso {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.simulador-paso.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.paso-titulo {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
    text-align: center;
}

.paso-descripcion {
    font-size: 1.125rem;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 3rem;
}

/* Paso 1: Selección de Perfil */
.perfil-opciones {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.perfil-btn {
    background: var(--bg-light);
    border: 2px solid var(--border);
    border-radius: 1rem;
    padding: 2rem 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    font-family: inherit;
}

.perfil-btn:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.perfil-btn.active {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

.perfil-icon {
    font-size: 3rem;
}

.perfil-label {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text);
}

/* Paso 2: Dashboard Inicial */
.dashboard-inicial {
    background: var(--bg-light);
    border-radius: 1rem;
    padding: 2rem;
    border: 1px solid var(--border);
}

.dashboard-metricas {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.dashboard-metrica {
    background: var(--bg);
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid var(--border);
}

.metrica-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.metrica-icon {
    font-size: 1.5rem;
}

.metrica-nombre {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 500;
}

.metrica-valor {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
}

.metrica-cambio {
    font-size: 0.875rem;
    font-weight: 600;
    margin-top: 0.5rem;
    color: #10b981;
}

/* Paso 3: Activadores */
.activadores-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.activador-card {
    background: var(--bg-light);
    border: 2px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: var(--transition);
}

.activador-card.active {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

.activador-toggle {
    flex-shrink: 0;
}

.toggle-input {
    display: none;
}

.toggle-label {
    display: block;
    width: 60px;
    height: 32px;
    background: var(--border);
    border-radius: 16px;
    position: relative;
    cursor: pointer;
    transition: var(--transition);
}

.toggle-slider {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 24px;
    height: 24px;
    background: var(--bg);
    border-radius: 50%;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.toggle-input:checked + .toggle-label {
    background: var(--primary);
}

.toggle-input:checked + .toggle-label .toggle-slider {
    transform: translateX(28px);
}

.activador-content {
    flex: 1;
}

.activador-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.activador-content h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.activador-content p {
    font-size: 0.95rem;
    color: var(--text-light);
}

.dashboard-actualizado {
    background: var(--bg-light);
    border-radius: 1rem;
    padding: 2rem;
    border: 1px solid var(--border);
    margin-top: 2rem;
}

.dashboard-actualizado h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Paso 4: Resultado Final */
.resultado-final {
    text-align: center;
}

.resultado-header {
    margin-bottom: 3rem;
}

.resultado-badge {
    display: inline-block;
    width: 64px;
    height: 64px;
    background: var(--primary);
    color: var(--bg);
    border-radius: 50%;
    font-size: 2rem;
    line-height: 64px;
    margin-bottom: 1rem;
}

.resultado-header h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
}

.resultado-mejoras {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.mejora-item {
    background: var(--bg-light);
    border-radius: 1rem;
    padding: 2rem;
    border: 1px solid var(--border);
}

.mejora-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.mejora-content h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.mejora-content p {
    font-size: 1rem;
    color: var(--text-light);
}

.resultado-cta {
    margin-bottom: 2rem;
}

.cta-texto {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1.5rem;
}

.resultado-formulario {
    max-width: 500px;
    margin: 0 auto;
    background: var(--bg-light);
    border-radius: 1rem;
    padding: 2rem;
    border: 1px solid var(--border);
    display: none;
}

.resultado-formulario.active {
    display: block;
}

.form-diagnostico {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
}

.form-group input {
    padding: 0.875rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Navegación del Simulador */
.simulador-navegacion {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.pasos-indicador {
    display: flex;
    gap: 0.5rem;
}

.paso-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border);
    transition: var(--transition);
}

.paso-dot.active {
    background: var(--primary);
    width: 32px;
    border-radius: 6px;
}

.btn-nav-simulador {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: var(--bg);
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.btn-nav-simulador:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-nav-simulador:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Botón Simulador en Hero y Nav */
.btn-simulador {
    background: var(--accent-orange);
    color: var(--bg);
}

.btn-simulador:hover {
    background: var(--accent-orange-dark);
}

.btn-nav-simulador {
    background: var(--accent-orange);
    color: var(--bg);
    padding: 0.5rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: var(--transition);
}

.btn-nav-simulador:hover {
    background: var(--accent-orange-dark);
}


/* Portafolio */
.portafolio {
    background: var(--bg-light);
}

.portafolio-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.portafolio-item {
    background: var(--bg);
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    opacity: 0;
    transform: translateY(40px);
}

.portafolio-item.animated {
    opacity: 1;
    transform: translateY(0);
}

.portafolio-item:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-8px);
}

.portafolio-image {
    height: 250px;
    background: #ffffff;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.portafolio-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 1;
}

.portafolio-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--accent-orange);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 2;
}

.portafolio-item:hover .portafolio-image::before {
    background: rgba(255, 255, 255, 0.95);
}

.portafolio-item:hover .portafolio-image::after {
    opacity: 0.1;
}

.portafolio-badge {
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    border-radius: 50px;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    position: relative;
    z-index: 3;
    box-shadow: var(--shadow-sm);
}

.portafolio-content {
    padding: 2rem;
}

.portafolio-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text);
}

.portafolio-content > p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.portafolio-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 0.75rem;
}

.portafolio-stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.25rem;
    position: relative;
}

.stat-value::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -10px;
    width: 4px;
    height: 4px;
    background: var(--accent-orange);
    border-radius: 50%;
    transform: translateY(-50%);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: 500;
}

.portafolio-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.portafolio-features span {
    padding: 0.375rem 0.875rem;
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
}

.portafolio-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.portafolio-tech span {
    padding: 0.375rem 0.875rem;
    background: var(--bg-light);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text);
}

/* Testimonios */
.testimonios {
    background: var(--bg);
}

.testimonios-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.testimonio-card {
    background: var(--bg-light);
    padding: 2.5rem;
    border-radius: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    opacity: 0;
    transform: translateY(40px);
}

.testimonio-card.animated {
    opacity: 1;
    transform: translateY(0);
}

.testimonio-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.testimonio-rating {
    color: var(--accent-orange);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.testimonio-text {
    color: var(--text);
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    font-style: italic;
}

.testimonio-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
    border: 3px solid var(--accent-orange);
    position: relative;
}

.author-avatar::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    animation: avatarPulse 2s infinite;
}

@keyframes avatarPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0;
    }
}

.author-name {
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.author-role {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* FAQ */
.faq {
    background: var(--bg-light);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.faq-item {
    background: var(--bg);
    border-radius: 1rem;
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(30px);
}

.faq-item.animated {
    opacity: 1;
    transform: translateY(0);
    transition: var(--transition);
}

.faq-question {
    width: 100%;
    padding: 1.5rem;
    background: none;
    border: none;
    text-align: left;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.faq-question:hover {
    color: var(--primary);
}

.faq-icon {
    transition: var(--transition);
    flex-shrink: 0;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-light);
    line-height: 1.8;
}

/* CTA Section */
.cta-section {
    background: var(--primary);
    color: white;
    padding: 5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255, 107, 53, 0.1) 10px,
        rgba(255, 107, 53, 0.1) 20px
    );
    animation: movePattern 20s linear infinite;
    opacity: 0.5;
}

.cta-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--accent-orange);
    clip-path: polygon(0 0, 100% 0, 100% 30%, 0 50%);
    opacity: 0.2;
    z-index: 0;
}

.cta-content {
    position: relative;
    z-index: 1;
}

@keyframes movePattern {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 50px);
    }
}

.cta-content h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-content .btn-primary {
    background: white;
    color: var(--primary);
    border-color: var(--accent-orange);
}

.cta-content .btn-primary::before {
    background: var(--accent-orange);
}

.cta-content .btn-primary:hover {
    background: var(--accent-orange);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* Contacto */
.contacto {
    background: var(--bg);
}

.contacto-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.contacto-info h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text);
}

.contacto-info > p {
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.8;
    font-size: 1.125rem;
}

.contacto-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contacto-detail {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.detail-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.contacto-detail strong {
    display: block;
    color: var(--text);
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.contacto-detail p {
    color: var(--text-light);
}

.contact-form {
    background: var(--bg-light);
    padding: 2.5rem;
    border-radius: 1.5rem;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateX(50px);
}

.contact-form.animated {
    opacity: 1;
    transform: translateX(0);
    transition: var(--transition);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text);
    font-size: 0.875rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: 0.75rem;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    background: var(--bg);
    color: var(--text);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 0.75rem;
    text-align: center;
    display: none;
}

.form-message.success {
    background: #d1fae5;
    color: #065f46;
    display: block;
}

.form-message.error {
    background: #fee2e2;
    color: #991b1b;
    display: block;
}

/* Footer */
.footer {
    background: var(--bg-dark);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
    margin-bottom: 1rem;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
}

.footer-links h4,
.footer-contact h4 {
    margin-bottom: 1rem;
    font-size: 1.125rem;
    font-weight: 700;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 0.75rem;
}

.footer-links a,
.footer-contact p {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
    display: block;
}

.footer-links a:hover {
    color: white;
    padding-left: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

/* 3D Card Effects */
.card-3d {
    transform-style: preserve-3d;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.card-3d::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid var(--primary);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: -1;
}

.card-3d:hover {
    transform: translateY(-10px) rotateX(5deg) rotateY(-5deg);
    box-shadow: var(--shadow-3d-hover);
}

.card-3d:hover::before {
    opacity: 1;
}

.stat-3d {
    transform-style: preserve-3d;
    transition: transform 0.3s;
}

.stat-3d:hover {
    transform: translateY(-5px) scale(1.05);
}

/* Glitch Effect */
.animate-glitch {
    position: relative;
    animation: glitch 0.3s infinite;
}

@keyframes glitch {
    0%, 100% {
        transform: translate(0);
    }
    20% {
        transform: translate(-2px, 2px);
    }
    40% {
        transform: translate(-2px, -2px);
    }
    60% {
        transform: translate(2px, 2px);
    }
    80% {
        transform: translate(2px, -2px);
    }
}

.animate-glitch::before,
.animate-glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.animate-glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--accent-orange);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.animate-glitch::after {
    left: -2px;
    text-shadow: -2px 0 var(--primary);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 1s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(31px, 9999px, 94px, 0);
    }
    20% {
        clip: rect(54px, 9999px, 66px, 0);
    }
    40% {
        clip: rect(28px, 9999px, 99px, 0);
    }
    60% {
        clip: rect(68px, 9999px, 85px, 0);
    }
    80% {
        clip: rect(40px, 9999px, 77px, 0);
    }
    100% {
        clip: rect(87px, 9999px, 20px, 0);
    }
}

@keyframes glitch-anim2 {
    0% {
        clip: rect(65px, 9999px, 100px, 0);
    }
    20% {
        clip: rect(79px, 9999px, 85px, 0);
    }
    40% {
        clip: rect(66px, 9999px, 4px, 0);
    }
    60% {
        clip: rect(17px, 9999px, 53px, 0);
    }
    80% {
        clip: rect(40px, 9999px, 73px, 0);
    }
    100% {
        clip: rect(31px, 9999px, 13px, 0);
    }
}

/* Animations */
.animate-fade-in {
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
}

.animate-slide-up {
    opacity: 0;
    transform: translateY(30px);
    animation: slideUp 0.8s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
.delay-6 { animation-delay: 0.6s; }

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tablet Styles */
@media (min-width: 768px) {
    .nav-toggle {
        display: none;
    }

    .nav-link {
        padding: 0.5rem 1.25rem;
        border-bottom: none;
        display: block;
    }

    .nav-link:hover {
        padding-left: 1.25rem;
        color: var(--primary);
    }
    
    .btn-nav {
        margin-top: 0;
        margin-left: 0.5rem;
    }
    
    .btn-nav:hover {
        padding-left: 2rem !important;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .hero-buttons {
        flex-direction: row;
        justify-content: center;
    }

    .btn {
        width: auto;
    }

    .section-title {
        font-size: 3rem;
    }

    .estadisticas-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .servicios-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tecnologias-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .perfil-opciones {
        grid-template-columns: 1fr;
    }

    .dashboard-metricas {
        grid-template-columns: 1fr;
    }

    .resultado-mejoras {
        grid-template-columns: 1fr;
    }

    .simulador-wrapper {
        padding: 2rem 1.5rem;
    }

    .portafolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .testimonios-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contacto-wrapper {
        grid-template-columns: 1fr 1.5fr;
    }

    .form-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop Styles */
@media (min-width: 1024px) {
    .hero-title {
        font-size: 4.5rem;
    }

    .hero-stats {
        gap: 3rem;
    }

    .servicios-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .proceso-timeline::before {
        left: 2rem;
    }

    .proceso-item:nth-child(even) {
        flex-direction: row-reverse;
    }

    .proceso-item:nth-child(even) .proceso-content {
        text-align: right;
    }

    .tecnologias-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .perfil-opciones {
        grid-template-columns: repeat(3, 1fr);
    }

    .dashboard-metricas {
        grid-template-columns: repeat(2, 1fr);
    }

    .resultado-mejoras {
        grid-template-columns: repeat(3, 1fr);
    }

    .portafolio-image {
        height: 300px;
    }

    .testimonios-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-content {
        grid-template-columns: repeat(4, 1fr);
    }
}
