/* ===================================
   TIKI AI SOLUTIONS - CUSTOM STYLES
   =================================== */

/* Reset y Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}



/* ===================================
   HERO SECTION STYLES
   =================================== */

/* Hero Section Background */
#inicio {
    background: #021024;
    padding-top: 80px;
}

/* Stars Canvas */
#stars-canvas {
    z-index: 1;
}

/* Typing Cursor Animation */
.typing-cursor {
    display: inline-block;
    animation: blink 1s step-end infinite;
    color: #7DA0CA;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Responsive Hero Typography */
@media (max-width: 768px) {
    #inicio h1 {
        font-size: 2rem;
    }
    
    #inicio h2 {
        font-size: 1.5rem;
        min-height: 2.5rem;
    }
    
    #inicio p {
        font-size: 1rem;
    }
}

/* ===================================
   END HERO SECTION STYLES
   =================================== */

/* ===================================
   SOBRE MÍ SECTION STYLES
   =================================== */

/* Background con gradient suave */
.sobre-mi-bg {
    background: linear-gradient(180deg, #052659 0%, #021024 100%);
}

.proceso-bg {
    background: #021024;
}

/* Tech Badges */
.tech-badge {
    display: inline-block;
    background: rgba(84, 131, 179, 0.15);
    border: 1px solid rgba(84, 131, 179, 0.3);
    color: #C1E8FF;
    padding: 0.4rem 0.8rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tech-badge:hover {
    background: rgba(84, 131, 179, 0.3);
    border-color: #5483B3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(84, 131, 179, 0.2);
}

/* Photo Container */
#sobre-mi img {
    filter: brightness(1.05) contrast(1.1);
    transition: all 0.3s ease;
}

#sobre-mi img:hover {
    filter: brightness(1.1) contrast(1.15);
    transform: scale(1.02);
}

/* Responsive adjustments for photo */
@media (max-width: 1024px) {
    #sobre-mi img {
        max-width: 350px;
    }
}

@media (max-width: 768px) {
    #sobre-mi img {
        max-width: 280px;
    }
    
    /* Stack en mobile */
    #sobre-mi .grid.md\\:grid-cols-3 {
        grid-template-columns: 1fr;
    }
}

/* ===================================
   END SOBRE MÍ SECTION STYLES
   =================================== */

/* ===================================
   PROCESO SECTION SPACING
   =================================== */

/* Agregar más espacio superior a la sección Proceso */
#proceso {
    padding-top: 6rem; /* 96px */
}

@media (max-width: 768px) {
    #proceso {
        padding-top: 4rem; /* 64px en mobile */
    }
}

/* ===================================
   SERVICIOS SECTION STYLES
   =================================== */

/* Servicios Section Background */
#servicios {
    background: #021024;
}

#services-stars-canvas {
    z-index: 0;
}

/* Service Cards */
.service-card {
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    border-color: rgba(84, 131, 179, 0.5);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(84, 131, 179, 0.2);
}

/* Ensure content pushes CTA to bottom */
.service-card > a {
    margin-top: auto;
}

/* Responsive Grid */
@media (max-width: 768px) {
    #servicios .grid.md\\:grid-cols-2 {
        grid-template-columns: 1fr;
    }
}

/* ===================================
   END SERVICIOS SECTION STYLES
   =================================== */

/* Header Transparente (sin fondo) */
#header {
    height: 80px;
}

/* Logo con tamaño fijo */
.logo-img {
    width: 120px;
    height: auto;
}

@media (max-width: 640px) {
    .logo-img {
        width: 80px;
    }
}

/* Animaciones de enlaces de navegación */
.nav-link {
    position: relative;
    padding-bottom: 4px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #7DA0CA;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Botón Primary con efectos */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

/* Mobile Menu Animations */
.mobile-nav-link {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
}

.mobile-nav-link:nth-child(1) { animation-delay: 0.1s; }
.mobile-nav-link:nth-child(2) { animation-delay: 0.2s; }
.mobile-nav-link:nth-child(3) { animation-delay: 0.3s; }
.mobile-nav-link:nth-child(4) { animation-delay: 0.4s; }
.mobile-nav-link:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Animations - Fade In */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Scroll Animations - Slide Up */
.slide-up {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.slide-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Glassmorphism Cards */
.glass-card {
    background: rgba(5, 38, 89, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(116, 160, 202, 0.2);
    transition: all 0.3s ease;
}

.glass-card:hover {
    background: rgba(5, 38, 89, 0.6);
    border-color: rgba(116, 160, 202, 0.4);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(84, 131, 179, 0.2);
}

/* Gradientes Suaves */
.gradient-blue {
    background: linear-gradient(135deg, #052659 0%, #021024 100%);
}

.gradient-accent {
    background: linear-gradient(135deg, #5483B3 0%, #7DA0CA 100%);
}

/* Texto con Gradiente */
.text-gradient {
    background: linear-gradient(135deg, #7DA0CA 0%, #C1E8FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hover Effects para Cards */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(84, 131, 179, 0.3);
}

/* Loading Spinner (para formularios futuros) */
.spinner {
    border: 3px solid rgba(193, 232, 255, 0.3);
    border-top: 3px solid #5483B3;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Typography */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 13px;
    }
}

/* Selection Color */
::selection {
    background: #5483B3;
    color: #C1E8FF;
}

::-moz-selection {
    background: #5483B3;
    color: #C1E8FF;
}

/* ===================================
   PRIVACY PAGE STYLES
   =================================== */

/* Privacy Section Animations */
.privacy-section {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease-out forwards;
}

.privacy-section:nth-child(1) { animation-delay: 0.1s; }
.privacy-section:nth-child(2) { animation-delay: 0.2s; }
.privacy-section:nth-child(3) { animation-delay: 0.3s; }
.privacy-section:nth-child(4) { animation-delay: 0.4s; }
.privacy-section:nth-child(5) { animation-delay: 0.5s; }
.privacy-section:nth-child(6) { animation-delay: 0.6s; }
.privacy-section:nth-child(7) { animation-delay: 0.7s; }
.privacy-section:nth-child(8) { animation-delay: 0.8s; }
.privacy-section:nth-child(9) { animation-delay: 0.9s; }
.privacy-section:nth-child(10) { animation-delay: 1s; }

/* Privacy Item Hover Effects */
.privacy-item {
    padding: 1rem;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

.privacy-item:hover {
    background: rgba(84, 131, 179, 0.1);
    transform: translateX(8px);
}

/* Privacy Highlight */
.privacy-highlight {
    padding: 1rem;
    border-left: 3px solid #5483B3;
    border-radius: 0.5rem;
    background: rgba(84, 131, 179, 0.05);
    transition: all 0.3s ease;
}

.privacy-highlight:hover {
    background: rgba(84, 131, 179, 0.15);
    border-left-color: #7DA0CA;
    transform: translateX(5px);
}

/* Canvas Background */
#privacy-stars-canvas {
    pointer-events: none;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .privacy-section .ml-16 {
        margin-left: 0;
    }
    
    .privacy-section .flex-shrink-0 {
        display: none;
    }
}

/* ===================================
   END PRIVACY PAGE STYLES
   =================================== */

/* ===================================
   ACCESSIBILITY STYLES
   =================================== */

/* Skip to main content link - visible solo en focus */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #5483B3;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 0 0 8px 0;
    font-weight: 600;
    z-index: 9999;
    transition: top 0.2s ease-in-out;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid #C1E8FF;
    outline-offset: 2px;
}

/* Screen reader only class - visible solo para lectores de pantalla */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Hacer visible cuando tiene focus (skip link) */
.focus\:not-sr-only:focus {
    position: fixed;
    width: auto;
    height: auto;
    padding: 0.5rem 1rem;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* Focus visible mejorado para todos los elementos interactivos */
*:focus-visible {
    outline: 2px solid #7DA0CA;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Focus mejorado para botones principales */
.btn-primary:focus-visible {
    outline: 3px solid #C1E8FF;
    outline-offset: 3px;
}

/* Focus mejorado para inputs */
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #5483B3;
    outline-offset: 2px;
}

/* Focus mejorado para links de navegación */
.nav-link:focus-visible,
.mobile-nav-link:focus-visible {
    outline: 2px solid #C1E8FF;
    outline-offset: 4px;
    background-color: rgba(132, 131, 202, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
}

/* ===================================
   REDUCED MOTION SUPPORT
   =================================== */

/* Respetar preferencia de reduced motion del usuario */
@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;
    }
    
    /* Desactivar animaciones de canvas */
    canvas {
        display: none;
    }
}

/* Clase para reducir animaciones programáticamente */
.reduce-motion * {
    animation: none !important;
    transition: none !important;
}

.reduce-motion canvas {
    display: none;
}

/* ===================================
   HIGH CONTRAST MODE SUPPORT
   =================================== */

@media (prefers-contrast: high) {
    /* Aumentar contraste de textos */
    .text-text-light {
        color: #FFFFFF !important;
    }
    
    /* Aumentar contraste de bordes */
    .border-accent-blue\/30 {
        border-color: #7DA0CA !important;
        border-width: 2px !important;
    }
    
    /* Aumentar contraste de botones */
    .btn-primary {
        background-color: #5483B3 !important;
        color: #FFFFFF !important;
        border: 2px solid #C1E8FF !important;
    }
}

/* ===================================
   END ACCESSIBILITY STYLES
   =================================== */

/* ===================================
   PERFORMANCE OPTIMIZATIONS
   =================================== */

/* Optimización para dispositivos de bajo rendimiento */
.low-performance * {
    animation-duration: 0.3s !important;
    transition-duration: 0.2s !important;
}

.low-performance canvas {
    opacity: 0.5 !important;
}

/* Optimización: will-change para animaciones frecuentes */
.logo-img,
.btn-primary,
.card-effect {
    will-change: transform;
}

/* Optimización: GPU acceleration para transiciones */
.transition-transform,
.hover\:scale-105 {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Optimización: Contenido que aparece en scroll */
.fade-in,
.slide-in {
    content-visibility: auto;
}

/* ===================================
   END PERFORMANCE OPTIMIZATIONS
   =================================== */

/* Navbar Styles - All Resolutions */
header#header {
  background-color: rgba(2, 16, 36, 0.85) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
  z-index: 40 !important;
}

header#header.navbar-transparent {
  background-color: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Transiciones suaves solo en desktop */
@media (min-width: 1024px) {
  header#header {
    transition: background-color 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease, -webkit-backdrop-filter 0.3s ease;
  }
}

/* Mobile main content padding to avoid navbar overlap */
@media (max-width: 1023px) {
  main {
    padding-top: 6rem !important;
  }
}
