/* Reset y configuración base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #06b6d4;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-dark: #111827;
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-secondary: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    overflow-x: hidden;
}

/* Cursor personalizado */
.cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    transition: transform 0.1s ease;
}

.cursor-follower {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transition: all 0.3s ease;
    opacity: 0.5;
}

/* Partículas de fondo */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

#particles {
    width: 100%;
    height: 100%;
}

/* Barra de carga */
.loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--gradient-primary);
    z-index: 10000;
    transition: width 0.3s ease;
}

/* Navegación */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    overflow: hidden;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-title .line {
    display: block;
    opacity: 0;
    transform: translateY(50px);
    animation: slideUp 0.8s ease forwards;
}

.hero-title .line:nth-child(2) {
    animation-delay: 0.2s;
}

.hero-title .line:nth-child(3) {
    animation-delay: 0.4s;
}

.highlight-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeIn 0.8s ease 0.6s forwards;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    opacity: 0;
    animation: fadeIn 0.8s ease 0.8s forwards;
}

.btn-primary, .btn-secondary {
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--text-primary);
}

.btn-secondary:hover {
    background: var(--text-primary);
    color: white;
}

/* Hero Visual */
.hero-visual {
    position: relative;
    height: 500px;
}

.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
}

.floating-card {
    position: absolute;
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: var(--shadow-lg);
    animation: float 6s ease-in-out infinite;
}

.card-1 {
    top: 10%;
    left: 10%;
    color: #61dafb;
    animation-delay: 0s;
}

.card-2 {
    top: 20%;
    right: 20%;
    color: #68a063;
    animation-delay: 1s;
}

.card-3 {
    bottom: 30%;
    left: 20%;
    color: #3776ab;
    animation-delay: 2s;
}

.card-4 {
    bottom: 10%;
    right: 10%;
    color: #f7df1e;
    animation-delay: 3s;
}

.hero-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.code-window {
    background: #1e293b;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    width: 350px;
    border: 1px solid #334155;
}

.window-header {
    background: #334155;
    padding: 1rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #475569;
}

.window-controls {
    display: flex;
    gap: 0.5rem;
}

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.control.red { background: #ef4444; }
.control.yellow { background: #f59e0b; }
.control.green { background: #10b981; }

.code-content {
    padding: 1.5rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.8;
    background: #0f172a;
}

.code-line {
    margin-bottom: 0.5rem;
    opacity: 0;
    animation: typewriter 0.5s ease forwards;
    color: #e2e8f0;
}

.code-line:nth-child(1) { animation-delay: 1s; }
.code-line:nth-child(2) { animation-delay: 1.5s; }
.code-line:nth-child(3) { animation-delay: 2s; }
.code-line:nth-child(4) { animation-delay: 2.5s; }

.indent { 
    padding-left: 2rem; 
}

/* Colores mejorados para el código */
.keyword { 
    color: #c084fc;
    font-weight: 600;
}

.variable { 
    color: #38bdf8;
}

.function { 
    color: #fbbf24;
    font-weight: 500;
}

.string { 
    color: #34d399;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-arrow {
    width: 30px;
    height: 30px;
    border-right: 2px solid var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    transform: rotate(45deg);
    animation: bounce 2s infinite;
}

/* Secciones */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

/* Servicios */
.services {
    padding: 6rem 0;
    background: var(--bg-secondary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin-bottom: 1.5rem;
}

.service-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.service-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.service-tech span {
    background: var(--bg-secondary);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Estadísticas */
.stats {
    padding: 4rem 0;
    background: var(--bg-dark);
    color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.stat-card {
    text-align: center;
    padding: 2rem;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    display: block;
}

.stat-label {
    font-size: 1.125rem;
    color: #9ca3af;
    font-weight: 500;
}

/* Proyectos */
.projects {
    padding: 6rem 0;
    background: var(--bg-primary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.project-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(99, 102, 241, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.view-project {
    background: white;
    color: var(--primary-color);
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-project:hover {
    transform: scale(1.05);
}

.project-info {
    padding: 2rem;
}

.project-info h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.project-info p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-tags span {
    background: var(--gradient-primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Clientes */
.clients {
    padding: 6rem 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: relative;
    overflow: hidden;
}

.clients::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23e2e8f0" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
    z-index: 0;
}

.clients .container {
    position: relative;
    z-index: 1;
}

.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.client-card {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    position: relative;
    overflow: hidden;
}

.client-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent);
    transition: left 0.5s ease;
}

.client-card:hover::before {
    left: 100%;
}

.client-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.client-logo {
    width: 120px;
    height: 80px;
    background: white;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.logo-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: all 0.3s ease;
    filter: grayscale(1) opacity(0.7);
}

.client-card:hover .logo-img {
    filter: grayscale(0) opacity(1);
    transform: scale(1.1);
}

.client-card:hover .client-logo {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

.client-logo::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.client-card:hover .client-logo::after {
    opacity: 1;
    transform: rotate(45deg) translate(50%, 50%);
}

/* Efectos especiales para cada logo */
.client-card:nth-child(1) .client-logo:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.client-card:nth-child(2) .client-logo:hover {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.client-card:nth-child(3) .client-logo:hover {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.client-card:nth-child(4) .client-logo:hover {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.client-card:nth-child(5) .client-logo:hover {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.client-card:nth-child(6) .client-logo:hover {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

/* Contacto */
.contact {
    padding: 6rem 0;
    background: var(--bg-dark);
    color: white;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contact-info p {
    font-size: 1.125rem;
    color: #9ca3af;
    margin-bottom: 2rem;
}

.contact-details {
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    color: #d1d5db;
}

.contact-item i {
    width: 20px;
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.contact-form {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #9ca3af;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.15);
}

.full-width {
    width: 100%;
}

/* Footer */
.footer {
    background: #0f172a;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-logo .logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: block;
}

.footer-logo p {
    color: #94a3b8;
    font-size: 0.95rem;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-column h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: white;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 0.5rem;
}

.footer-column ul li a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

.footer-column ul li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid #334155;
    padding-top: 1.5rem;
    text-align: center;
}

.footer-bottom p {
    color: #64748b;
    font-size: 0.875rem;
}

/* WhatsApp Button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: white;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    animation: pulse-whatsapp 2s infinite;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}

/* Animaciones */
@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes typewriter {
    to {
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

@keyframes pulse-whatsapp {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Efectos de revelación */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* RESPONSIVE DESIGN COMPLETO */
/* Tablets */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 3.5rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
    
    .code-window {
        width: 300px;
        transform: scale(0.9);
    }
}

/* Móviles grandes */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }
    
    .hero {
        min-height: 90vh;
        padding: 5rem 0 2rem;
        overflow: hidden;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
        padding: 0 1rem;
    }

    .hero-title {
        font-size: 2.2rem;
        line-height: 1.2;
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        padding: 0 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .btn-primary, .btn-secondary {
        width: 200px;
        justify-content: center;
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    /* Ventana de código responsive */
    .hero-visual {
        height: 300px;
        margin-top: 2rem;
        order: -1; /* Mover arriba del texto en móvil */
    }

    .code-window {
        width: 280px;
        transform: scale(0.8);
    }

    .floating-elements {
        display: none; /* Ocultar elementos flotantes en móvil */
    }

    /* Ocultar cursor personalizado en móvil */
    .cursor, .cursor-follower {
        display: none;
    }

    /* Ocultar partículas en móvil */
    .particles-container {
        display: none;
    }

    /* Navegación móvil */
    .nav-container {
        padding: 0.8rem 1rem;
    }
    
    .logo-text {
        font-size: 1.3rem;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 60px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-lg);
        padding: 2rem 0;
        z-index: 999;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    /* Secciones móviles */
    .container {
        padding: 0 1rem;
    }

    .section-title {
        font-size: 2rem;
        line-height: 1.2;
    }

    .section-subtitle {
        font-size: 1rem;
        padding: 0 1rem;
    }

    /* Servicios móvil */
    .services {
        padding: 4rem 0;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .service-card {
        padding: 2rem 1.5rem;
        margin: 0 0.5rem;
    }

    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    /* Estadísticas móvil */
    .stats {
        padding: 3rem 0;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .stat-label {
        font-size: 0.9rem;
    }

    /* Proyectos móvil */
    .projects {
        padding: 4rem 0;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .project-card {
        margin: 0 0.5rem;
    }

    .project-image {
        height: 200px;
    }

    /* Clientes móvil */
    .clients {
        padding: 4rem 0;
    }

    .clients-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .client-logo {
        width: 100px;
        height: 70px;
        padding: 0.5rem;
    }

    /* Contacto móvil */
    .contact {
        padding: 4rem 0;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-info h2 {
        font-size: 2rem;
    }

    .contact-info p {
        font-size: 1rem;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .form-group input,
    .form-group textarea {
        padding: 0.8rem;
        font-size: 0.9rem;
    }

    /* Footer móvil */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-links {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* WhatsApp móvil */
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 24px;
    }
}

/* Móviles pequeños */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .code-window {
        width: 250px;
        transform: scale(0.7);
    }

    .nav-container {
        padding: 0.5rem;
    }

    .logo-text {
        font-size: 1.1rem;
    }

    .service-card {
        padding: 1.5rem 1rem;
    }

    .client-logo {
        width: 80px;
        height: 60px;
        font-size: 0.8rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .projects-grid {
        gap: 1rem;
    }

    .project-card {
        margin: 0;
    }

    .contact-info h2 {
        font-size: 1.6rem;
    }

    .whatsapp-float {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
}

/* Landscape móvil */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
    }
    
    .hero-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    
    .hero-visual {
        height: 350px;
        order: 0;
    }
    
    .code-window {
        transform: scale(0.6);
    }
}

/* Móviles muy pequeños */
@media (max-width: 360px) {
    .hero-title {
        font-size: 1.6rem;
    }

    .hero-subtitle {
        font-size: 0.8rem;
    }

    .section-title {
        font-size: 1.4rem;
    }

    .code-window {
        width: 220px;
        transform: scale(0.6);
    }

    .service-card {
        padding: 1rem;
    }

    .service-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .client-logo {
        width: 70px;
        height: 50px;
        font-size: 0.7rem;
    }

    .btn-primary, .btn-secondary {
        width: 180px;
        padding: 0.7rem 1rem;
        font-size: 0.8rem;
    }

    .contact-info h2 {
        font-size: 1.4rem;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .whatsapp-float {
        width: 40px;
        height: 40px;
        font-size: 18px;
        bottom: 15px;
        right: 15px;
    }
}

/* Fix para overflow horizontal en todos los tamaños */
@media (max-width: 768px) {
    * {
        max-width: 100%;
    }
    
    .hero, .services, .stats, .projects, .clients, .contact, .footer {
        overflow-x: hidden;
    }
}

/* Smooth scrolling para navegadores que no lo soportan */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* Modo oscuro (opcional) */
@media (prefers-color-scheme: dark) {
    .navbar {
        background: rgba(17, 24, 39, 0.95);
    }
    
    .nav-link {
        color: #f9fafb;
    }
    
    .hamburger span {
        background: #f9fafb;
    }
    
    .nav-menu {
        background-color: #1f2937;
        color: #f9fafb;
    }
}

/* Animación de contador */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-number.animate {
    animation: countUp 0.6s ease;
}

/* Efectos adicionales para interactividad */
.service-card:hover .service-icon {
    transform: scale(1.1);
}

.project-card:hover .project-info h3 {
    color: var(--primary-color);
}

.client-card:hover {
    transform: translateY(-5px);
}

/* Optimización para pantallas de alta densidad */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .code-window {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Mejoras de accesibilidad */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .floating-card {
        animation: none;
    }
    
    .hero-title .line {
        animation: none;
        opacity: 1;
        transform: none;
    }
    
    .hero-subtitle, .hero-buttons {
        animation: none;
        opacity: 1;
    }
}