/**
 * Base CSS - Synckpro
 * Estilos globales: reset, variables, tipografía base, utilidades
 * Se carga en TODAS las páginas
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Alpine.js cloak - hide elements until Alpine initializes */
[x-cloak] {
    display: none !important;
}

/* ==================== PERFORMANCE OPTIMIZATIONS ==================== */
/* Respetar preferencias de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

:root {
    --primary: #0157fe;
    --primary-light: #3d7bff;
    --primary-dark: #0145d1;
    --accent: #00d4ff;
    --dark: #000;
    --light: #fff;
    --gray: #f5f5f5;
    --gray-dark: #1a1a1a;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --shadow: 0 8px 32px rgba(1, 87, 254, 0.1);
    --transition-fast: background-color 0.1s ease, color 0.1s ease;
    
    /* Background colors */
    --bg-primary: #ffffff;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f8fafc;
    
    /* Border & hover */
    --border-color: rgba(0, 0, 0, 0.1);
    --hover-bg: rgba(1, 87, 254, 0.08);
    
    /* Transition */
    --transition: all 0.3s ease;
}

/* ==================== TEXT COLOR UTILITIES ==================== */
.text-primary { color: var(--primary); }
.text-primary-light { color: var(--primary-light); }
.text-primary-dark { color: var(--primary-dark); }
.text-accent { color: var(--accent); }
.text-dark { color: var(--dark); }
.text-light { color: var(--light); }
.text-gray { color: var(--gray); }
.text-gray-dark { color: var(--gray-dark); }
.text-body { color: var(--text-primary); }
.text-muted { color: var(--text-secondary); }

/* ==================== BACKGROUND COLOR UTILITIES ==================== */
.bg-primary { background-color: var(--primary); }
.bg-primary-light { background-color: var(--primary-light); }
.bg-primary-dark { background-color: var(--primary-dark); }
.bg-accent { background-color: var(--accent); }
.bg-dark { background-color: var(--dark); }
.bg-light { background-color: var(--light); }
.bg-gray { background-color: var(--gray); }
.bg-gray-dark { background-color: var(--gray-dark); }
.bg-page { background-color: var(--bg-primary); }
.bg-secondary { background-color: var(--bg-secondary); }
.bg-tertiary { background-color: var(--bg-tertiary); }

/* ==================== BUTTON UTILITIES ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}
.btn-primary {
    background-color: var(--primary);
    color: var(--light);
}
.btn-primary:hover {
    background-color: var(--primary-dark);
}
.btn-primary-light {
    background-color: var(--primary-light);
    color: var(--light);
}
.btn-primary-light:hover {
    background-color: var(--primary);
}
.btn-primary-dark {
    background-color: var(--primary-dark);
    color: var(--light);
}
.btn-primary-dark:hover {
    background-color: var(--primary);
}
.btn-accent {
    background-color: var(--accent);
    color: var(--dark);
}
.btn-accent:hover {
    filter: brightness(1.1);
}
.btn-dark {
    background-color: var(--dark);
    color: var(--light);
}
.btn-dark:hover {
    background-color: var(--gray-dark);
}
.btn-light {
    background-color: var(--light);
    color: var(--dark);
}
.btn-light:hover {
    background-color: var(--gray);
}
.btn-outline-primary {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}
.btn-outline-primary:hover {
    background-color: var(--primary);
    color: var(--light);
}
.btn-outline-dark {
    background-color: transparent;
    color: var(--dark);
    border: 2px solid var(--dark);
}
.btn-outline-dark:hover {
    background-color: var(--dark);
    color: var(--light);
}
.btn-outline-light {
    background-color: transparent;
    color: var(--light);
    border: 2px solid var(--light);
}
.btn-outline-light:hover {
    background-color: var(--light);
    color: var(--dark);
}
.btn-ghost {
    background-color: var(--hover-bg);
    color: var(--primary);
}
.btn-ghost:hover {
    background-color: var(--primary);
    color: var(--light);
}

/* Button sizes */
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}
.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Button link style (similar to card-link) */
.btn-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1.5rem;
    background: var(--hover-bg);
    color: var(--primary);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    border: 1px solid rgba(1, 87, 254, 0.15);
    cursor: pointer;
}


/* ==================== LAZY LOADING IMAGES ==================== */
.lazy-image {
    opacity: 0;
    transition: opacity 0.5s ease;
    background-color: #f0f0f0;
    position: relative;
}

.lazy-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 100%
    );
    animation: lazyShimmer 1.2s ease-in-out infinite;
    transform: translateX(-100%);
}

.lazy-loaded {
    opacity: 1;
    background-color: transparent;
}

.lazy-loaded::before {
    display: none;
}

.lazy-error {
    opacity: 0.6;
    filter: grayscale(0.5);
}

@keyframes lazyShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

html {
    overflow-x: hidden;
}

body {
    width: 100%;
    margin: 0;
    padding: 0;
    /* overflow-x: hidden se hereda de html */
}

html {
    scroll-behavior: smooth;
}

body, button, input, select, textarea {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

body {
    color: var(--text-primary);
    background-color: var(--light);
    line-height: 1.6;
    padding-top: 80px;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
    overflow: visible;
}

/* ==================== GLASS EFFECT ==================== */
.glass-effect {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(1, 87, 254, 0.08);
    transition: var(--transition);
}

.glass-effect:hover {
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 12px 40px rgba(1, 87, 254, 0.15);
    transform: translateY(-4px);
}

/* ==================== SECTION TITLES ==================== */
.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.1rem;
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-weight: 300;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
    z-index: 1;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(1, 87, 254, 0.08);
    border: 1px solid rgba(1, 87, 254, 0.2);
    border-radius: 50px;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.section-badge i {
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

/* ==================== COMMON BUTTON STYLES ==================== */
.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.1rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.cta-button:hover::before {
    opacity: 1;
}

.cta-button.primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 8px 25px rgba(1, 87, 254, 0.3);
}

.cta-button.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(1, 87, 254, 0.4);
}

.cta-button.primary i {
    transition: transform 0.3s;
}

.cta-button.primary:hover i {
    transform: translateX(5px);
}

.cta-button.secondary {
    background: rgba(1, 87, 254, 0.08);
    color: var(--primary);
    border: 2px solid rgba(1, 87, 254, 0.2);
}

.cta-button.secondary:hover {
    background: rgba(1, 87, 254, 0.15);
    border-color: var(--primary);
    transform: translateY(-3px);
}

/* ==================== COMMON GRID STYLES ==================== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

/* ==================== COMMON CARD STYLES ==================== */
.card,
.service-card,
.service-item,
.feature,
.team-member,
.about-card,
.stat-card,
.timeline-item,
.commitment,
.method-step,
.layer,
.badge,
.tech-category,
.portfolio-item,
.benefit {
    padding: 2rem;
    text-align: center;
    border-radius: 16px;
}

.card-icon,
.feature-icon,
.step-icon,
.item-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
    display: inline-block;
}

.card h3,
.service-card h3,
.team-member h3,
.about-card h2,
.faq-question h3,
.method-step h3,
.layer h3,
.tech-category h3,
.portfolio-item h3,
.benefit h4 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.card p,
.service-card p,
.team-member p,
.about-card p,
.faq-answer p,
.method-step p,
.layer p,
.tech-category li,
.portfolio-item p,
.benefit p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* ==================== COMMON ANIMATIONS ==================== */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes floatOrb {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(8px);
    }
}

/* ==================== CARD LINK ==================== */
.card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1.5rem;
    background: rgba(1, 87, 254, 0.08);
    color: var(--primary);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(1, 87, 254, 0.15);
}
.card-link:hover {
    background: var(--primary);
    color: white;
    gap: 1rem;
    border-color: var(--primary);
}
.card-link i { transition: transform 0.3s; }
.card-link:hover i { transform: translateX(3px); }

/* ==================== PAGE HEADER BASE ==================== */
.page-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--light);
    padding: 4rem 0;
    text-align: center;
}

.header-content h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 800;
}

.header-content p {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
}

/* ==================== CTA SECTION ==================== */
.cta-section {
    position: relative;
    padding: 6rem 2rem;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.cta-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.cta-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.3;
    animation: ctaFloat 15s ease-in-out infinite;
}

.cta-orb-1 {
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.15);
    top: -100px;
    right: -100px;
}

.cta-orb-2 {
    width: 300px;
    height: 300px;
    background: rgba(0, 212, 255, 0.2);
    bottom: -80px;
    left: -80px;
    animation-delay: 3s;
}

@keyframes ctaFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(20px, -20px) scale(1.05); }
    66% { transform: translate(-15px, 15px) scale(0.95); }
}

.cta-pattern {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.3;
}

.cta-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.cta-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50px;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}

.cta-badge i {
    font-size: 1rem;
}

.cta-title {
    font-size: 3rem;
    font-weight: 900;
    color: white;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.highlight-text {
    display: block;
    background: linear-gradient(135deg, #fff 0%, #00d4ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cta-description {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.cta-description strong {
    color: white;
    font-weight: 700;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.cta-button-primary,
.cta-button-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.2rem 2.5rem;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.cta-button-primary::before,
.cta-button-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.cta-button-primary:hover::before,
.cta-button-secondary:hover::before { opacity: 1; }

.cta-button-primary {
    background: white;
    color: var(--primary);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.cta-button-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
}

.cta-button-primary i { transition: transform 0.3s; }
.cta-button-primary:hover i { transform: translateX(5px); }

.cta-button-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.cta-button-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: white;
    transform: translateY(-4px);
}

.cta-features {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    flex-wrap: wrap;
}

.cta-feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    font-size: 0.95rem;
    font-weight: 500;
}

.cta-feature i {
    font-size: 1.2rem;
    color: #00d4ff;
}

/* CTA Section Responsive */
@media (max-width: 992px) {
    .cta-title { font-size: 2.5rem; }
}

@media (max-width: 768px) {
    .cta-section { padding: 4rem 1.5rem; }
    .cta-title { font-size: 2rem; }
    .cta-buttons { flex-direction: column; }
    .cta-button-primary, .cta-button-secondary { width: 100%; justify-content: center; }
    .cta-features { flex-direction: column; gap: 1rem; }
}
