/* ===== RESET Y BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100vw;
    max-width: 100vw;
    overflow-x: hidden !important;
    scroll-behavior: smooth;
    font-size: 62.5%;
    /* 1rem = 10px */
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1.6rem;
    line-height: 1.6;
    color: #f8fafc;
    background-color: #0f172a;
}

body.light-mode {
    --bg-primary: #f8fafc;
    --bg-secondary: #e5e7eb;
    --bg-tertiary: #cbd5e1;
    --text-primary: #1e293b;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --border-color: #cbd5e1;
    --gradient-primary: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    --gradient-secondary: linear-gradient(135deg, #fbbf24 0%, #6366f1 100%);
    --gradient-accent: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --color-toggle-bg: #fff;
    --color-toggle-fg: #1e293b;
}

/* ===== VARIABLES CSS ===== */
:root {
    /* Colores */
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;

    /* Neutrales */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #334155;

    /* Gradientes */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-secondary: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    --gradient-accent: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);

    /* Espaciado */
    --section-padding: 12rem 0;
    --container-padding: 0 2rem;
    --gap-xs: 0.8rem;
    --gap-sm: 1.6rem;
    --gap-md: 2.4rem;
    --gap-lg: 3.2rem;
    --gap-xl: 4.8rem;
    --gap-2xl: 6.4rem;

    /* Tipografía */
    --font-primary: 'Inter', sans-serif;
    --font-secondary: 'Space Grotesk', sans-serif;
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-black: 800;

    /* Sombras */
    --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);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

    /* Bordes */
    --border-radius-sm: 0.4rem;
    --border-radius-md: 0.8rem;
    --border-radius-lg: 1.2rem;
    --border-radius-xl: 1.6rem;
    --border-radius-2xl: 2.4rem;

    /* Transiciones */
    --transition-fast: 0.15s ease-out;
    --transition-normal: 0.3s ease-out;
    --transition-slow: 0.5s ease-out;

    /* Z-index */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal: 1040;
    --z-popover: 1050;
    --z-tooltip: 1060;

    /* Toggle */
    --color-toggle-bg: #1e293b;
    --color-toggle-fg: #fff;
    --color-toggle-shadow: 0 4px 16px rgba(99, 102, 241, 0.18);
}

/* ===== UTILIDADES ===== */
.container {
    max-width: 120rem;
    margin: 0 auto;
    padding: var(--container-padding);
}

.section {
    padding: var(--section-padding);
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== NAVEGACIÓN ===== */
.nav {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 4rem);
    max-width: 900px;
    z-index: var(--z-fixed);
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: none;
    border-radius: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 1);
    transition: var(--transition-normal);
    padding: 0.5rem 1.2rem;
}

.nav.scrolled {
    background: rgba(15, 23, 42, 0.95);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
}

.nav-container {
    max-width: 120rem;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 5.5rem;
}

.nav-logo {
    font-family: var(--font-secondary);
    font-size: 2.4rem;
    font-weight: var(--font-weight-bold);

}

.logo-text {
    position: relative;
    top: 0.1em;
    color: #fff;
    background: none;
    -webkit-background-clip: initial;
    -webkit-text-fill-color: initial;
    background-clip: initial;
    transition: color 0.6s, background 0.6s, -webkit-text-fill-color 0.6s;


}

.logo-text:hover {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.logo-link {
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--gap-lg);
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    transition: var(--transition-fast);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -0.5rem;
    left: 50%;
    background: var(--gradient-primary);
    transition: var(--transition-normal);
    transform: translateX(-50%);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 0.4rem;
    background: none;
    border: none;
    cursor: pointer;

}

.bar {
    width: 2.5rem;
    height: 0.3rem;
    background: var(--text-primary);
    transition: var(--transition-fast);
    border-radius: 0.2rem;
}

body.light-mode .bar {
    background: #fff !important;
}

/* ===== HERO SECTION ===== */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    cursor: crosshair;
}

.hero-background {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 6s ease-in-out infinite;
    transition: all 0.3s ease-out;
    will-change: transform;
}

.orb-1 {
    width: 40rem;
    height: 40rem;
    background: var(--gradient-primary);
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.orb-2 {
    width: 30rem;
    height: 30rem;
    background: var(--gradient-secondary);
    top: 60%;
    right: 20%;
    animation-delay: 2s;
}

.orb-3 {
    width: 25rem;
    height: 25rem;
    background: var(--gradient-accent);
    bottom: 20%;
    left: 60%;
    animation-delay: 4s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

.particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-content {
    text-align: center;
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 2rem;
    z-index: 1;
    will-change: transform;
    padding-top: 5em;
}

.hero-title {
    font-family: var(--font-secondary);
    font-size: clamp(4rem, 8vw, 7rem);
    font-weight: var(--font-weight-black);
    line-height: 1;
    margin-bottom: 0.5em;
}

.title-line {
    display: block;
    transition: all 0.3s ease-out;
    cursor: pointer;
    margin-bottom: 0;
    margin-top: 0;
    padding: 0;
}

.title-line.gradient-text {
    margin-top: -1.2rem;
}

.hero-subtitle {
    font-size: clamp(1.8rem, 2.5vw, 2.2rem);
    color: var(--text-secondary);
    margin-bottom: var(--gap-xl);
    max-width: 60rem;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

.hero-subtitle strong {
    color: #fff;
    font-size: 2.2rem;
    font-weight: 800;
    display: inline-block;
    margin-top: 0.5em;
}

.hero-buttons {
    display: flex;
    gap: var(--gap-md);
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: var(--gap-2xl);
}


.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--gap-xs);
    padding: 1.4rem 3.2rem;
    border-radius: var(--border-radius-lg);
    font-weight: var(--font-weight-semibold);
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    font-size: 1.6rem;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: var(--transition-normal);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary::before {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    z-index: 0;
}

.btn-primary span,
.btn-primary .btn-icon {
    position: relative;
    z-index: 1;
}

.btn-primary,
.btn-primary:hover {
    color: white !important;
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
}

body.light-mode .btn-primary,
body.light-mode .btn-primary:hover,
body.light-mode .btn-primary:focus {
    box-shadow: 0 2px 12px 0 #fbbf24cc !important;
}

body.light-mode .btn-primary:hover::before {
    opacity: 0 !important;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-icon {
    width: 2rem;
    height: 2rem;
    transition: var(--transition-fast);
}

.btn:hover .btn-icon {
    transform: translateX(4px);
}

.hero-stats {
    display: flex;
    gap: var(--gap-xl);
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-top: var(--gap-2xl);
}

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

.stat-number {
    display: block;
    font-size: 3.6rem;
    font-weight: var(--font-weight-black);
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    will-change: transform;
}

.stat-label {
    font-size: 1.4rem;
    color: var(--text-muted);
    font-weight: var(--font-weight-medium);
}

.scroll-indicator {
    position: absolute;
    bottom: 4.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 2.6rem;
}

.scroll-dots {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.scroll-dot {
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 50%;
    background: var(--primary-color);
    opacity: 0.8;
    will-change: auto;
    transition: background 0.3s;
}

.scroll-dot:nth-child(2),
.scroll-dot:nth-child(3) {
    animation-delay: 0s;
}

/* ===== SECTION HEADERS ===== */
.section-header {
    text-align: center;
    margin-bottom: var(--gap-2xl);
}

.section-subtitle {
    display: inline-block;
    font-size: 1.4rem;
    font-weight: var(--font-weight-semibold);
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--gap-sm);
    padding: 0.5rem 1.5rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--border-radius-md);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.section-title {
    font-family: var(--font-secondary);
    font-size: clamp(3rem, 5vw, 4.8rem);
    font-weight: var(--font-weight-bold);
    line-height: 1.2;
    color: var(--text-primary);
    max-width: 80rem;
    margin: 0 auto;
}

/* ===== SERVICIOS SECTION ===== */
.servicios {
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.servicios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(30rem, 1fr));
    gap: var(--gap-lg);
    margin-top: var(--gap-2xl);
}

.servicio-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-xl);
    padding: var(--gap-lg);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    will-change: transform;
}

.servicio-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition-normal);
    z-index: -1;
}

.servicio-card:hover::before {
    opacity: 0.05;
}

.servicio-card:hover {
    transform: translateY(-8px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.service-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: var(--gap-md);
    gap: 1em;
}

.service-icon {
    width: 6rem;
    height: 6rem;
    padding: 1.5rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--border-radius-lg);
    color: var(--primary-color);
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    flex-shrink: 0;
}

.service-icon svg {
    width: 100%;
    height: 100%;
}

.service-title {
    font-size: 2.2rem;
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--gap-sm);
    color: var(--text-primary);
}

.service-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--gap-md);
}

.service-description strong {
    color: #fff;

    font-weight: 800;
    letter-spacing: 0.02em;
}

.service-features {
    list-style: none;

}

.service-features strong {
    color: #fff;
    font-weight: 200;

}

.service-features li {
    padding: 0.5rem 0;
    color: var(--text-muted);
    position: relative;
    padding-left: 2rem;
    transition: var(--transition-fast);
}

.service-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: var(--font-weight-bold);
}

.service-btn {
    font-family: var(--font-secondary);
    height: 6rem;
    flex: 1 1 auto;
    width: auto;
    padding: 0 1.5em;
    font-size: 1.8rem;
    border: none;
    border-radius: 0.6em;
    background: var(--gradient-primary);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.5rem;
    font-weight: 500;
    text-decoration: none;
}

.service-btn:hover {

    transform: translateY(-2px) scale(1.05);
}

.servicio-card-basico {
    border: 2.5px solid #7c3aed !important;
    box-shadow: 0 0 0 2px #a78bfa33;
}

body.light-mode .servicio-card-basico {
    border-color: #fbbf24 !important;
}

/* ===== PORTFOLIO SECTION ===== */
.portfolio {
    background: var(--bg-primary);
}

.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: var(--gap-sm);
    margin-bottom: var(--gap-xl);
    flex-wrap: wrap;
}

.filter-btn {
    padding: 1rem 2.4rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
    font-weight: var(--font-weight-medium);
    font-size: 1.4rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(35rem, 1fr));
    gap: var(--gap-lg);
    align-items: stretch;
}

.portfolio-item {
    height: 360px;
    min-height: 360px;
    max-height: 360px;
    position: relative;
    overflow: hidden;
    border-radius: 1.2rem;
    background: var(--bg-secondary);
    box-shadow: 0 2px 16px 0 #a5b4fc22;
}

.portfolio-image {
    width: 100%;
    height: 100%;
    min-height: 100%;
    max-height: 100%;
    position: relative;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 1.2rem;
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(.4, 2, .6, 1);
    border-radius: inherit;
    padding: 2rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.88) 0%, rgba(139, 92, 246, 0.7) 100%);
}

.portfolio-item:hover .portfolio-overlay,
.portfolio-item:focus-within .portfolio-overlay {
    opacity: 1;
    pointer-events: auto;
}



.portfolio-content h3 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
    text-shadow: 0 2px 8px #4f46e5cc;
}

.portfolio-content p {
    font-size: 1.6rem;
    color: #ffffff;
    margin-bottom: 2rem;
}

.portfolio-tags {
    display: flex;
    gap: var(--gap-xs);
    flex-wrap: wrap;
}

.portfolio-tags span {
    padding: 0.4rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius-sm);
    font-size: 1.2rem;
    color: white;
    backdrop-filter: blur(10px);
}

.portfolio-overlay .portfolio-btn {
    display: inline-block;
    padding: 1rem 2.2rem;
    border-radius: 2rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    font-weight: 600;
    font-size: 1.2rem;
    text-decoration: none;
    box-shadow: 0 2px 12px #6366f155;
    transition: background 0.3s, transform 0.2s;
    border: none;
    cursor: pointer;
}

.portfolio-overlay .portfolio-btn:hover {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    transform: scale(1.07);
}

/* ===== PROCESO SECTION ===== */
.proceso {
    position: relative;
    overflow: hidden;
    background-color: var(--bg-primary);
    background-image: url('data:image/svg+xml;utf8,<svg width="60" height="60" viewBox="0 0 60 60" fill="none" xmlns="http://www.w3.org/2000/svg"><g opacity="0.13"><line x1="0" y1="0" x2="60" y2="60" stroke="%236366f1" stroke-width="1"/><line x1="60" y1="0" x2="0" y2="60" stroke="%238b5cf6" stroke-width="1"/><line x1="30" y1="0" x2="30" y2="60" stroke="%236366f1" stroke-width="0.5"/><line x1="0" y1="30" x2="60" y2="30" stroke="%238b5cf6" stroke-width="0.5"/></g></svg>');
    background-repeat: repeat;
    background-size: 120px 120px;
}

.proceso.section {
    padding-top: 5em;
}

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

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 0.3rem;
    background: var(--gradient-primary);
    transform: translateX(-50%);
    z-index: 1;
    transform-origin: top center;
    border-radius: 0.15rem;
}

.proceso-steps {
    display: flex;
    flex-direction: column;
    gap: var(--gap-2xl);
    position: relative;
    z-index: 2;
}

.proceso-step {
    display: flex;
    align-items: flex-start;
    gap: var(--gap-lg);
    position: relative;
    cursor: pointer;
    transition: all var(--transition-normal);
    opacity: 1;
    visibility: visible;
}

.proceso-step:nth-child(even) {
    flex-direction: row-reverse;
    text-align: right;
}

.proceso-step.expanded {
    transform: scale(1.02);
}

.step-number {
    width: 7rem;
    height: 7rem;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    font-weight: var(--font-weight-bold);
    color: white;
    position: relative;
    z-index: 3;
    flex-shrink: 0;
    transition: all var(--transition-normal);
    will-change: transform, background-color;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.step-content {
    flex: 1;
    max-width: 45rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--border-radius-xl);
    padding: var(--gap-lg);
    backdrop-filter: blur(15px);
    transition: all var(--transition-normal);
    will-change: transform;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.step-content:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.step-title {
    font-size: 2.4rem;
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--gap-sm);
    color: var(--text-primary);
}

.step-description {
    color: var(--text-secondary);
    margin-bottom: var(--gap-md);
    line-height: 1.6;
    font-size: 1.6rem;
}

.step-features {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: var(--gap-sm);
}

.step-features li {
    padding: 0.8rem 1.4rem;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: var(--border-radius-md);
    font-size: 1.3rem;
    color: var(--primary-color);
    font-weight: var(--font-weight-medium);
    transition: var(--transition-fast);
    will-change: transform;
}

.step-features li:hover {
    background: rgba(99, 102, 241, 0.25);
    transform: translateY(-2px);
}

.step-connector {
    display: none;
}

/* ===== TESTIMONIOS SECTION ===== */
.testimonios {
    background: var(--bg-primary);
    overflow: hidden;
}

.testimonios-wrapper {
    position: relative;
    margin-top: var(--gap-xl);
}

.testimonios-track {
    display: flex;
    gap: var(--gap-lg);
    animation: scroll-testimonios 30s linear infinite;
}

@keyframes scroll-testimonios {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.testimonios-track:hover {
    animation-play-state: paused;
}

.testimonio-card {
    flex: 0 0 40rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-xl);
    padding: var(--gap-lg);
    backdrop-filter: blur(10px);
    transition: var(--transition-normal);
}

.testimonio-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-4px);
}

.testimonio-rating {
    margin-bottom: var(--gap-sm);
}

.star {
    color: var(--accent-color);
    font-size: 1.8rem;
    margin-right: 0.2rem;
}

.testimonio-text {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--gap-md);
    font-style: italic;
}

.testimonio-author {
    display: flex;
    align-items: center;
    gap: var(--gap-sm);
}

.testimonio-author img {
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(99, 102, 241, 0.3);
}

.author-info h4 {
    color: var(--text-primary);
    font-weight: var(--font-weight-semibold);
    margin-bottom: 0.2rem;
}

.author-info span {
    color: var(--text-muted);
    font-size: 1.4rem;
}

/* ===== CONTACTO SECTION ===== */
.contacto {
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.contacto-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--gap-2xl);
    align-items: start;
}

.contacto-info h3 {
    font-size: 2.8rem;
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--gap-md);
    color: var(--text-primary);
}

.contacto-info p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--gap-xl);
}

.contacto-items {
    display: flex;
    flex-direction: column;
    gap: var(--gap-md);
}

.contacto-item {
    display: flex;
    align-items: center;
    gap: var(--gap-md);
    padding: var(--gap-md);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-lg);
    transition: var(--transition-fast);
}

.contacto-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(99, 102, 241, 0.3);
}

.contacto-icon {
    width: 4rem;
    height: 4rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    flex-shrink: 0;
}

.contacto-icon svg {
    width: 2rem;
    height: 2rem;
}

.contacto-text h4 {
    color: var(--text-primary);
    font-weight: var(--font-weight-semibold);
    margin-bottom: 0.2rem;
}

.contacto-text p {
    color: var(--text-secondary);
    margin: 0;
}

/* ===== FORMULARIO ===== */
.contacto-form {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-xl);
    padding: var(--gap-lg);
    backdrop-filter: blur(10px);
}

.form-group {
    margin-bottom: var(--gap-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--gap-xs);
    color: var(--text-primary);
    font-weight: var(--font-weight-medium);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1.2rem 1.6rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-md);
    color: var(--text-primary);
    font-size: 1.4rem;
    transition: var(--transition-fast);
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: var(--error-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 10rem;
}

.btn-form {
    width: 100%;
    justify-content: center;
    margin-top: var(--gap-md);
}

.field-error {
    color: var(--error-color);
    font-size: 1.2rem;
    margin-top: 0.5rem;
    display: block;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--gap-2xl) 0 var(--gap-md) 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--gap-2xl);
    margin-bottom: var(--gap-xl);
}

.footer-brand {
    max-width: 35rem;
}

.footer-logo {
    margin-bottom: var(--gap-md);
}

.footer-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--gap-md);
}

.footer-social {
    display: flex;
    gap: var(--gap-sm);
}

.social-link {
    width: 4rem;
    height: 4rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.social-link:hover {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
    transform: translateY(-2px);
}

.social-link svg {
    width: 2rem;
    height: 2rem;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap-lg);
}

.footer-column h4 {
    color: var(--text-primary);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--gap-md);
}

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

.footer-column ul li {
    margin-bottom: var(--gap-xs);
}

.footer-column ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer-column ul li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--gap-md);
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    margin: 0;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .proceso-step {
        flex-direction: column !important;
        text-align: center !important;
        align-items: center;
    }

    .proceso-step .step-content {
        max-width: 60rem;
    }

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

    .footer-content {
        grid-template-columns: 1fr;
    }

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

    .nav {
        max-width: 98vw;
        width: calc(100% - 1rem);
        left: 50%;
        transform: translateX(-50%);
        top: 1rem;
        border-radius: 1.5rem;
        padding: 0.2rem 0.5rem;
    }

    .nav-container {
        height: 6.2rem !important;
        min-height: 6.2rem !important;
    }
}

@media (max-width: 768px) {


    .particles {
        display: none;

    }

    .nav {
        width: 100px;
        left: 0;
        right: 0;
        transform: none;
        max-width: 100vw;
        top: 1.5rem;
        border-radius: 1.5rem;
        padding: 0.1rem 0.3rem;
        box-sizing: border-box;
    }

    .nav-container {
        height: 1.2rem !important;
        min-height: 3.2rem !important;
    }

    .nav-logo {
        order: 1;
        flex: 1 1 auto;
        display: flex;
        align-items: center;
        justify-content: flex-start;
    }

    .nav-toggle {
        order: 2;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 1201;

    }

    .nav-menu {
        display: none;
        position: fixed;
        top: 6.5rem;
        left: 0;
        right: 0;
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: flex-start;
        padding: 2rem 1.5rem 2rem 1.5rem;
        gap: 2rem;
        border-radius: 0 0 2rem 2rem;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
        transform: translateY(-120%);
        transition: transform 0.3s cubic-bezier(.4, 2, .6, 1);
        z-index: 900;
    }

    .nav-menu.active {
        display: flex;
        transform: translateY(0);
        z-index: 1200;
    }

    .nav-link {
        font-size: 2rem;
        width: 100%;
        padding: 1rem 0;
    }

    :root {
        --section-padding: 8rem 0;
        --container-padding: 0 1.5rem;
    }

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

    .hero-buttons .btn {
        width: 70vw;
        max-width: 320px;
        min-width: 120px;
        margin-bottom: 0;
        font-size: 1.6rem;
        padding: 1.4rem 3.2rem;
        text-align: center;
        display: flex;
        justify-content: center;
    }

    .hero-stats {
        display: none !important;
    }

    .servicios-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .testimonio-card {
        flex: 0 0 32rem;
    }

    .footer-links {
        grid-template-columns: 1fr;
    }

    .proceso-timeline {
        max-width: 50rem;
    }

    .step-number {
        width: 6rem;
        height: 6rem;
        font-size: 2rem;
    }

    .portfolio-grid {
        gap: 2.4rem;
    }

    .portfolio-item,
    .portfolio-image img {
        border-radius: 0.8rem;
    }

    .testimonios-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 1.5rem;
    }

    .testimonios-track {
        display: flex;
        flex-wrap: nowrap;
        gap: 1.6rem;
        min-width: 100vw;
        width: max-content;
        animation: none !important;
    }

    .testimonio-card {
        min-width: 80vw;
        max-width: 90vw;
        flex: 0 0 auto;
        scroll-snap-align: start;
    }

    .testimonios-wrapper {
        scroll-snap-type: x mandatory;
    }

    .hero-content {
        padding-top: 2rem;
        padding-left: 4rem;
        padding-right: 4rem;
    }

    .gradient-orb {
        animation: none !important;
    }
}

@media (max-width: 480px) {

    .particles {
        display: none;

    }

    .nav-container {
        height: 2.4rem !important;
        min-height: 2.4rem !important;
        max-height: 2.4rem !important;
        overflow: hidden !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    .logo-img {
        height: 1.1rem !important;
        margin-right: 0.2rem !important;
    }

    .nav-logo {
        padding: 0 !important;
        margin: 0 !important;
    }

    .nav-logo img {
        display: none;
    }



    .bar {
        height: 0.18rem !important;
        width: 1.6rem !important;
    }

    .nav-menu {
        margin: 0 !important;
        padding: 0 !important;
    }
}

@media (max-width: 375px) {
    html {
        font-size: 55%;
        /* Reduce aún más el tamaño base */
    }

    .container {
        padding: 0 0.5rem;
    }

    .hero-title {
        font-size: clamp(2.4rem, 8vw, 4rem);
    }

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

    .btn {
        padding: 1rem 2rem;
        font-size: 1.2rem;
    }

    .hero-buttons {
        gap: 0.8rem;
    }

    .stat-number {
        font-size: 2.2rem;
    }

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

    .servicio-card,
    .testimonio-card,
    .step-content,
    .contacto-form {
        padding: 1rem;
    }

    .portfolio-filters {
        gap: 0.4rem;
    }

    .footer-content,
    .footer-links {
        gap: 0.8rem;
    }
}

@media (max-width: 375px) {
    .nav-menu {
        max-height: 70vh;
        overflow-y: auto;
    }
}

@media (min-width: 1440px) {
    .container {
        max-width: 140rem;
    }

    .hero-content {
        max-width: 100rem;
    }

    .section-title {
        font-size: clamp(4rem, 4vw, 7rem);
    }
}

/* ===== ANIMACIONES DE SCROLL ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(30px);
}

.scale-in {
    opacity: 0;
    transform: scale(0.8);
}

/* ===== ESTADOS DE CARGA ===== */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.btn.loading {
    position: relative;
}

.btn.loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: inherit;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* ===== ACCESIBILIDAD ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .scroll-arrow {
        animation: none;
    }

    .testimonios-track {
        animation: none;
    }

    .gradient-orb {
        animation: none;
    }
}

/* ===== FOCUS STATES ===== */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: var(--border-radius-sm);
}

/* ===== SELECCIÓN DE TEXTO ===== */
::selection {
    background: rgba(99, 102, 241, 0.3);
    color: var(--text-primary);
}

/* ===== SCROLLBAR PERSONALIZADA ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* === PORTFOLIO INTERACTIVO Y MODERNO === */
@keyframes portfolio-fade-in {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.portfolio-item {
    animation: portfolio-fade-in 0.8s cubic-bezier(.4, 2, .6, 1) both;
    animation-delay: 0.1s;
    transition: box-shadow 0.3s, border-color 0.3s;
    border-radius: 1.2rem;
    overflow: hidden;
    background: var(--bg-secondary);
    box-shadow: 0 2px 16px 0 #a5b4fc22;
}

.portfolio-item:hover,
.portfolio-item:focus-within {
    box-shadow: 0 8px 32px 0 #a5b4fc55, 0 0 0 2px #a5b4fc;
    border-color: #a5b4fc;
    z-index: 2;
}

.portfolio-image img {
    transition: transform 0.5s cubic-bezier(.4, 2, .6, 1), filter 0.4s;
    border-radius: 1.2rem;
}

.portfolio-item:hover .portfolio-image img,
.portfolio-item:focus-within .portfolio-image img {
    transform: scale(1.07);
    filter: brightness(0.7) blur(0.5px);
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(.4, 2, .6, 1);
    border-radius: inherit;
    padding: 2rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.88) 0%, rgba(139, 92, 246, 0.7) 100%);
}

.portfolio-item:hover .portfolio-overlay,
.portfolio-item:focus-within .portfolio-overlay {
    opacity: 1;
    pointer-events: auto;
}



.portfolio-content h3 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
    text-shadow: 0 2px 8px #4f46e5cc;
}

.portfolio-content p {
    font-size: 1.6rem;
    color: #ffffff;
    margin-bottom: 2rem;
}

.portfolio-overlay .portfolio-btn {
    display: inline-block;
    padding: 1rem 2.2rem;
    border-radius: 2rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    font-weight: 600;
    font-size: 1.2rem;
    text-decoration: none;
    box-shadow: 0 2px 12px #6366f155;
    transition: background 0.3s, transform 0.2s;
    border: none;
    cursor: pointer;
}

.portfolio-overlay .portfolio-btn:hover {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    transform: scale(1.07);
}

@media (max-width: 768px) {
    .portfolio-grid {
        gap: 2.4rem;
    }

    .portfolio-item,
    .portfolio-image img {
        border-radius: 0.8rem;
    }
}


@media (max-width: 768px) {
    .paso-container {
        flex-direction: column !important;
        align-items: center;
        gap: 4rem;
        padding: 2rem 1rem;
    }

    .paso-linea {
        display: none;
    }

    .paso {
        width: 100%;
        max-width: 30rem;
    }

    .nav {
        left: 50%;
        transform: translateX(-50%);
        width: calc(100% - 2rem);
        max-width: 100%;
        border-radius: 2.5rem;
        padding: 1rem 1.6rem;
        margin-top: 0.5em;
    }

    .nav-container {
        padding: 0;
        justify-content: space-between;
    }

    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.6rem;
    }
}

.theme-toggle {
    position: fixed;
    left: 3.5rem;
    bottom: 3.5rem;
    z-index: 2000;
    background: var(--color-toggle-bg);
    color: var(--color-toggle-fg);
    border: none;
    border-radius: 50%;
    width: 7.2rem;
    height: 7.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--color-toggle-shadow);
    cursor: pointer;
    font-size: 3.9rem;
    transition: background 0.3s, color 0.3s, box-shadow 0.3s;
    padding: 0;
}

.theme-toggle .theme-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    font-size: 2.2rem;
    line-height: 1;
}

.theme-toggle:hover {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.22);
}

@media (max-width: 768px) {
    .theme-toggle {
        left: 2.2rem;
        bottom: 2.2rem;
        width: 5.7rem;
        height: 5.7rem;
        font-size: 3rem;
    }

    .theme-toggle .theme-icon {
        width: 2.7rem;
        height: 2.7rem;
        font-size: 2.25rem;
    }
}

body.light-mode .nav,
body.light-mode .nav-link,
body.light-mode .nav-logo,
body.light-mode .logo-text,
body.light-mode .logo-link {
    color: #fff !important;
}

body.light-mode .nav-link::after {
    background: var(--gradient-primary) !important;
}

body.light-mode .nav {
    background: rgba(30, 41, 59, 0.85) !important;
    border: 1px solid #fff !important;
}

body.light-mode .hero-subtitle,
body.light-mode .hero-buttons .btn,
body.light-mode .hero-buttons .btn span {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}

body.light-mode .hero-stats,
body.light-mode .hero-stats .stat-number,
body.light-mode .hero-stats .stat-label {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}

body.light-mode .scroll-arrow::after {
    border-top: 0.8rem solid #fbbf24 !important;
}

.logo-img {
    height: 3.8rem;
    width: auto;
    margin-right: 0.8rem;
    vertical-align: middle;
    display: inline-block;
    position: relative;

}

@media (max-width: 768px) {
    .logo-img {
        height: 1.9rem;
        margin-right: 0.6rem;
        top: 0.1rem;
    }
}

body:not(.light-mode) select,
body:not(.light-mode) select option {
    color: #f8fafc;
    background-color: #1e293b;
}

body:not(.light-mode) select:focus {
    outline: 2px solid #6366f1;
}

.whatsapp-float {
    position: fixed;
    right: 3.5rem;
    bottom: 3.5rem;
    z-index: 2000;

    color: #fff;
    border: none;
    border-radius: 50%;
    width: 7.2rem;
    height: 7.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--color-toggle-shadow);
    cursor: pointer;
    font-size: 3.9rem;
    transition: background 0.3s, color 0.3s, box-shadow 0.3s;
    padding: 0;
    text-decoration: none;
}

.whatsapp-float:hover {

    color: #fff;
    box-shadow: 0 8px 32px rgba(37, 211, 102, 0.22);
}

.whatsapp-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.0rem;
    height: 2.0rem;
    font-size: 2.2rem;
    line-height: 1;
}

@media (max-width: 768px) {
    .whatsapp-float {
        right: 2.2rem;
        bottom: 2.2rem;
        width: 5.7rem;
        height: 5.7rem;
        font-size: 3rem;
    }

    .whatsapp-icon {
        width: 3.2rem;
        height: 3.2rem;
        font-size: 3.2rem;
    }

    .whatsapp-icon img {
        max-width: 5.9rem;
        max-height: 5.9rem;
        width: auto;
        height: auto;
    }
}