/* =================================
   BYTEWAVE DEVELOPMENT - ESTILOS
   Colores: Azul #0066CC / Naranja #FF6600
   ================================= */

/* Fuentes personalizadas */
.font-montserrat {
    font-family: 'Montserrat', sans-serif;
}

.font-opensans {
    font-family: 'Open Sans', sans-serif;
}

/* Animaciones generales */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Clases de animación */
.animate-fade-in-down {
    animation: fadeInDown 1s ease-out;
}

.animate-fade-in-up {
    animation: fadeInUp 1s ease-out;
    animation-delay: 0.2s;
    animation-fill-mode: both;
}

.animate-fade-in {
    animation: fadeIn 1s ease-out;
    animation-delay: 0.4s;
    animation-fill-mode: both;
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.float {
    animation: float 3s ease-in-out infinite;
}

/* Fade-in al hacer scroll */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Efectos hover para cards */
.hover-zoom {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-zoom:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 102, 204, 0.15);
}

/* Patrón de fondo para header */
.bg-pattern {
    background-image: 
        linear-gradient(30deg, rgba(255, 255, 255, 0.05) 12%, transparent 12.5%, transparent 87%, rgba(255, 255, 255, 0.05) 87.5%, rgba(255, 255, 255, 0.05)),
        linear-gradient(150deg, rgba(255, 255, 255, 0.05) 12%, transparent 12.5%, transparent 87%, rgba(255, 255, 255, 0.05) 87.5%, rgba(255, 255, 255, 0.05)),
        linear-gradient(30deg, rgba(255, 255, 255, 0.05) 12%, transparent 12.5%, transparent 87%, rgba(255, 255, 255, 0.05) 87.5%, rgba(255, 255, 255, 0.05)),
        linear-gradient(150deg, rgba(255, 255, 255, 0.05) 12%, transparent 12.5%, transparent 87%, rgba(255, 255, 255, 0.05) 87.5%, rgba(255, 255, 255, 0.05)),
        linear-gradient(60deg, rgba(255, 255, 255, 0.05) 25%, transparent 25.5%, transparent 75%, rgba(255, 255, 255, 0.05) 75%, rgba(255, 255, 255, 0.05)),
        linear-gradient(60deg, rgba(255, 255, 255, 0.05) 25%, transparent 25.5%, transparent 75%, rgba(255, 255, 255, 0.05) 75%, rgba(255, 255, 255, 0.05));
    background-size: 80px 140px;
    background-position: 0 0, 0 0, 40px 70px, 40px 70px, 0 0, 40px 70px;
}

/* Navbar con efecto scroll */
#navbar {
    transition: all 0.3s ease;
}

#navbar.scrolled {
    padding: 0.75rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Menu móvil */
#mobile-menu {
    transition: all 0.3s ease;
}

#mobile-menu.active {
    display: block;
}

/* Service Cards */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.service-card:hover::before {
    left: 100%;
}

/* Portfolio Cards */
.portfolio-card {
    position: relative;
    overflow: hidden;
}

.portfolio-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.1), rgba(255, 102, 0, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.portfolio-card:hover::after {
    opacity: 1;
}

/* FAQ Mejorado */
.faq-item {
    border: 2px solid #e2e8f0;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
}

.faq-item:hover {
    border-color: #0066CC;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.1);
}

.faq-question {
    transition: all 0.3s ease;
    background: white;
}

.faq-item.active .faq-question {
    background: linear-gradient(135deg, #f0f7ff, #fff5f0);
    border-bottom: 2px solid #e2e8f0;
}

.faq-item.active .faq-question h3 {
    color: #0066CC;
}

.faq-item.active .faq-question svg {
    transform: rotate(180deg);
    color: #0066CC;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0 1.5rem;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 1.5rem;
}

/* Contador animado */
.counter {
    display: inline-block;
}

/* Botones con gradiente */
.btn-gradient-blue {
    background: linear-gradient(135deg, #0066CC, #0052A3);
    transition: all 0.3s ease;
}

.btn-gradient-blue:hover {
    background: linear-gradient(135deg, #0052A3, #003d7a);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 102, 204, 0.3);
}

.btn-gradient-orange {
    background: linear-gradient(135deg, #FF6600, #E65C00);
    transition: all 0.3s ease;
}

.btn-gradient-orange:hover {
    background: linear-gradient(135deg, #E65C00, #cc5200);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 102, 0, 0.3);
}

/* Efectos de texto */
.text-gradient-blue {
    background: linear-gradient(135deg, #0066CC, #0052A3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-orange {
    background: linear-gradient(135deg, #FF6600, #E65C00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-full {
    background: linear-gradient(135deg, #0066CC, #FF6600);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Inputs y forms personalizados */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #0066CC;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #0066CC, #FF6600);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #0052A3, #E65C00);
}

/* Loading spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0066CC;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

.badge-blue {
    background: linear-gradient(135deg, #e6f2ff, #cce5ff);
    color: #0066CC;
}

.badge-orange {
    background: linear-gradient(135deg, #fff5e6, #ffebcc);
    color: #FF6600;
}

/* Tooltips */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.875rem;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Responsive utilities */
@media (max-width: 768px) {
    .service-card,
    .portfolio-card {
        margin-bottom: 1.5rem;
    }
    
    h1 {
        font-size: 2rem !important;
    }
    
    h2 {
        font-size: 1.75rem !important;
    }
    
    .counter {
        font-size: 2.5rem !important;
    }
}

/* Animaciones específicas de ByteWave */
.bytewave-glow {
    position: relative;
}

.bytewave-glow::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 102, 204, 0.2), transparent);
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bytewave-glow:hover::before {
    opacity: 1;
}

/* Separadores decorativos */
.section-divider {
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #0066CC, #FF6600);
    margin: 2rem auto;
    border-radius: 2px;
}

/* Efectos de partículas (decorativo) */
.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    opacity: 0.5;
    animation: float 6s infinite;
}

/* Estilos para código */
code {
    background: #f4f4f4;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #0066CC;
    font-size: 0.9em;
}

pre {
    background: #f4f4f4;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    border-left: 4px solid #0066CC;
}

pre code {
    background: none;
    padding: 0;
}

/* Alertas y notificaciones */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    border-left: 4px solid;
}

.alert-success {
    background: #e6f7ed;
    border-color: #28A745;
    color: #155724;
}

.alert-info {
    background: #e6f2ff;
    border-color: #0066CC;
    color: #004085;
}

.alert-warning {
    background: #fff5e6;
    border-color: #FFC107;
    color: #856404;
}

.alert-error {
    background: #ffe6e6;
    border-color: #DC3545;
    color: #721c24;
}

/* Timeline (para portafolio o proceso) */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, #0066CC, #FF6600);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    width: 16px;
    height: 16px;
    background: white;
    border: 4px solid #0066CC;
    border-radius: 50%;
    transform: translateX(-50%);
}

/* Cards con efecto flip */
.flip-card {
    perspective: 1000px;
    height: 300px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 1rem;
}

.flip-card-back {
    transform: rotateY(180deg);
}

/* Progress bars */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0066CC, #FF6600);
    transition: width 0.3s ease;
}

/* Skill tags */
.skill-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 9999px;
    margin: 0.25rem;
    transition: all 0.3s ease;
    font-weight: 600;
}

.skill-tag:hover {
    border-color: #0066CC;
    background: linear-gradient(135deg, #e6f2ff, #fff5f0);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 102, 204, 0.15);
}

/* Efectos de imagen */
.img-hover-zoom {
    overflow: hidden;
    border-radius: 1rem;
}

.img-hover-zoom img {
    transition: transform 0.5s ease;
}

.img-hover-zoom:hover img {
    transform: scale(1.1);
}

/* Stats/Metrics */
.stat-card {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 102, 204, 0.15);
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #0066CC, #FF6600);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Mejoras de accesibilidad */
.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;
}

/* Focus visible para accesibilidad */
*:focus-visible {
    outline: 2px solid #0066CC;
    outline-offset: 2px;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Utilidades de color ByteWave */
.bg-blue-bytewave {
    background-color: #0066CC;
}

.bg-blue-bytewave-dark {
    background-color: #0052A3;
}

.bg-orange-bytewave {
    background-color: #FF6600;
}

.bg-orange-bytewave-dark {
    background-color: #E65C00;
}

.text-blue-bytewave {
    color: #0066CC;
}

.text-orange-bytewave {
    color: #FF6600;
}

.border-blue-bytewave {
    border-color: #0066CC;
}

.border-orange-bytewave {
    border-color: #FF6600;
}

/* Animación de carga inicial */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0066CC, #FF6600);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.page-loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-logo {
    font-size: 3rem;
    font-weight: 800;
    color: white;
    animation: pulse 1.5s ease-in-out infinite;
}

/* Tool Cards con imagen de fondo expandible */
.tool-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.tool-image {
    transition: transform 0.5s ease, opacity 0.3s ease;
    transform: scale(1);
}

.tool-card:hover .tool-image {
    transform: scale(1.15);
    opacity: 0.4 !important;
}

.tool-card a {
    text-decoration: none;
    transition: all 0.3s ease;
}

.tool-card:hover a {
    transform: translateX(5px);
}
