/* =============================================
   styles.css - RickyReparaPC
   Diseño Mobile-First | UX/UI Premium
   ============================================= */

/* --- Reset & Variables --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Paleta Tecnológica */
    --bg-deep: #0a0e17;
    --bg-dark: #111827;
    --bg-card: rgba(17, 25, 40, 0.75);
    --bg-card-hover: rgba(30, 41, 59, 0.85);
    --cyan-neon: #00e5ff;
    --cyan-dark: #00b8d4;
    --blue-accent: #3b82f6;
    --blue-deep: #1e40af;
    --purple-glow: #8b5cf6;
    --white: #e2e8f0;
    --white-pure: #ffffff;
    --gray: #94a3b8;
    --gray-dark: #475569;
    --border-subtle: rgba(148, 163, 184, 0.15);
    --border-glow: rgba(0, 229, 255, 0.4);

    /* Tipografía */
    --font-display: 'Orbitron', 'Rajdhani', sans-serif;
    --font-body: 'Rajdhani', 'Segoe UI', sans-serif;

    /* Espaciado */
    --section-padding: 4rem 0;

    /* Transiciones */
    --transition-fast: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    /* Bordes */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --radius-full: 50%;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background: var(--bg-deep);
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- Canvas de Three.js --- */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

/* --- Overlay de contenido --- */
.content-overlay {
    position: relative;
    z-index: 1;
    pointer-events: auto;
}

/* --- Container --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* --- Header / Navegación --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(10, 14, 23, 0.85);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border-subtle);
    transition: var(--transition-smooth);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    z-index: 1001;
}

.logo-icon {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--cyan-neon);
    text-shadow: 0 0 18px rgba(0, 229, 255, 0.6);
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--white-pure);
    letter-spacing: 0.5px;
}

.logo-text .highlight {
    color: var(--cyan-neon);
}

/* --- Menú de navegación --- */
.nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: rgba(10, 14, 23, 0.97);
    backdrop-filter: blur(30px);
    padding: 5rem 2rem 2rem;
    transition: right var(--transition-smooth);
    border-left: 1px solid var(--border-subtle);
    z-index: 999;
}

.nav-menu.active {
    right: 0;
}

.nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.nav-link {
    color: var(--gray);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    transition: var(--transition-fast);
    position: relative;
    display: inline-block;
}

.nav-link:hover,
.nav-link.active {
    color: var(--cyan-neon);
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--cyan-neon);
    transition: width var(--transition-fast);
    box-shadow: 0 0 8px rgba(0, 229, 255, 0.5);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* --- Botón Hamburguesa --- */
.menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 8px;
    width: 40px;
    height: 40px;
    justify-content: center;
    align-items: center;
}

.menu-toggle .bar {
    display: block;
    width: 26px;
    height: 2.5px;
    background: var(--white-pure);
    border-radius: 3px;
    transition: var(--transition-fast);
    transform-origin: center;
}

.menu-toggle.active .bar:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
    background: var(--cyan-neon);
}

.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
    background: var(--cyan-neon);
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 64px;
    position: relative;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 3rem 0;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 229, 255, 0.08);
    border: 1px solid rgba(0, 229, 255, 0.25);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--cyan-neon);
    width: fit-content;
    letter-spacing: 0.5px;
}

.pulse-dot {
    width: 9px;
    height: 9px;
    background: var(--cyan-neon);
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.7);
}

@keyframes pulse-dot {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.4;
        transform: scale(1.8);
    }
}

.hero-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.5px;
    color: var(--white-pure);
}

.hero-title .glitch-text {
    position: relative;
    color: var(--cyan-neon);
    display: inline-block;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: var(--cyan-neon);
    opacity: 0;
}

.glitch-text:hover::before {
    animation: glitch 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
    opacity: 0.8;
    color: #ff006e;
}
.glitch-text:hover::after {
    animation: glitch 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) reverse both;
    opacity: 0.8;
    color: #00e5ff;
}

@keyframes glitch {
    0% {
        transform: translate(0);
    }
    20% {
        transform: translate(-3px, 3px);
    }
    40% {
        transform: translate(-3px, -3px);
    }
    60% {
        transform: translate(3px, 3px);
    }
    80% {
        transform: translate(3px, -3px);
    }
    100% {
        transform: translate(0);
    }
}

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--gray);
    max-width: 520px;
    line-height: 1.6;
    font-weight: 400;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
}

/* --- Botones --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.6rem;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 50px;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--cyan-dark), var(--blue-accent));
    color: var(--white-pure);
    box-shadow: 0 4px 20px rgba(0, 229, 255, 0.3);
    border: 1px solid transparent;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 35px rgba(0, 229, 255, 0.5);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-outline {
    background: transparent;
    color: var(--white-pure);
    border: 2px solid var(--border-glow);
    backdrop-filter: blur(5px);
}

.btn-outline:hover {
    background: rgba(0, 229, 255, 0.08);
    border-color: var(--cyan-neon);
    box-shadow: 0 0 25px rgba(0, 229, 255, 0.2);
    transform: translateY(-3px);
}

.btn-full {
    width: 100%;
}

/* --- Hero Stats --- */
.hero-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.stat-number {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--cyan-neon);
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- Scroll Indicator --- */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    opacity: 0.6;
    animation: float 2.5s ease-in-out infinite;
}

.mouse-wheel {
    width: 20px;
    height: 32px;
    border: 2px solid var(--gray);
    border-radius: 12px;
    position: relative;
}

.mouse-wheel::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 8px;
    background: var(--cyan-neon);
    border-radius: 3px;
    animation: scroll-wheel 1.5s ease-in-out infinite;
}

@keyframes scroll-wheel {
    0% {
        top: 6px;
        opacity: 1;
    }
    100% {
        top: 18px;
        opacity: 0;
    }
}

@keyframes float {
    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

.scroll-text {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--gray);
}

/* --- Secciones generales --- */
section {
    padding: var(--section-padding);
}

.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-tag {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--cyan-neon);
    background: rgba(0, 229, 255, 0.06);
    padding: 0.35rem 1rem;
    border-radius: 50px;
    border: 1px solid rgba(0, 229, 255, 0.2);
    margin-bottom: 0.8rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--white-pure);
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.section-title .highlight {
    color: var(--cyan-neon);
}

.section-desc {
    color: var(--gray);
    font-size: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

/* --- Services Grid --- */
.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

.service-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(0, 229, 255, 0.06) 0%, transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-smooth);
    pointer-events: none;
}

.service-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-glow);
    background: var(--bg-card-hover);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 30px rgba(0, 229, 255, 0.1);
}

.service-card:hover .card-glow {
    opacity: 1;
}

.service-icon {
    width: 50px;
    height: 50px;
    color: var(--cyan-neon);
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.service-icon svg {
    width: 100%;
    height: 100%;
}

.service-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--white-pure);
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.service-desc {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    line-height: 1.5;
}

.service-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    position: relative;
    z-index: 1;
}

.service-features li {
    font-size: 0.8rem;
    color: var(--gray-dark);
    padding-left: 1rem;
    position: relative;
}

.service-features li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--cyan-neon);
    font-size: 0.7rem;
}

/* --- About Section --- */
.about {
    background: rgba(17, 24, 39, 0.5);
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    align-items: center;
}

.about-text {
    max-width: 540px;
}

.about-text p {
    color: var(--gray);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.about-values {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.value-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--bg-card);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    border: 1px solid var(--border-subtle);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--white-pure);
}

.value-icon {
    font-size: 1.1rem;
}

/* --- Tech Orb Visual --- */
.about-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.tech-orb {
    position: relative;
    width: 160px;
    height: 160px;
}

.orb-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: var(--cyan-neon);
    border-radius: 50%;
    box-shadow: 0 0 40px rgba(0, 229, 255, 0.7), 0 0 80px rgba(0, 229, 255, 0.3);
}

.orb-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 2px solid rgba(0, 229, 255, 0.35);
    animation: ring-rotate 8s linear infinite;
}

.ring-1 {
    width: 90px;
    height: 90px;
    animation-duration: 6s;
}
.ring-2 {
    width: 130px;
    height: 130px;
    animation-duration: 10s;
    animation-direction: reverse;
    border-style: dashed;
}
.ring-3 {
    width: 170px;
    height: 170px;
    animation-duration: 14s;
    border-color: rgba(139, 92, 246, 0.35);
}

@keyframes ring-rotate {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* --- Contact Form --- */
.contact-form {
    max-width: 580px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    backdrop-filter: blur(10px);
}

.form-input {
    width: 100%;
    padding: 0.85rem 1.2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--white-pure);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition-fast);
    outline: none;
}

.form-input::placeholder {
    color: var(--gray-dark);
}

.form-input:focus {
    border-color: var(--cyan-neon);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

select.form-input {
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px;
}

textarea.form-input {
    resize: vertical;
    min-height: 100px;
}

/* --- Footer --- */
.footer {
    background: rgba(10, 14, 23, 0.9);
    border-top: 1px solid var(--border-subtle);
    padding-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-bottom: 2rem;
}

.footer-brand p {
    color: var(--gray);
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.footer-links h4,
.footer-contact-info h4 {
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: var(--cyan-neon);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.8rem;
}

.footer-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.footer-links a {
    color: var(--gray);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--cyan-neon);
}

.footer-contact-info p {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.footer-bottom {
    text-align: center;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.8rem;
    color: var(--gray-dark);
}

/* --- Responsive: Tablet (min-width: 640px) --- */
@media (min-width: 640px) {
    .hero-title {
        font-size: 2.6rem;
    }
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero-stats {
        gap: 3rem;
    }
    .stat-number {
        font-size: 2.2rem;
    }
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- Responsive: Desktop (min-width: 900px) --- */
@media (min-width: 900px) {
    .nav-menu {
        position: static;
        width: auto;
        height: auto;
        background: transparent;
        backdrop-filter: none;
        padding: 0;
        border-left: none;
        transition: none;
    }

    .nav-list {
        flex-direction: row;
        gap: 2rem;
    }

    .nav-link {
        font-size: 0.9rem;
    }

    .menu-toggle {
        display: none;
    }

    .hero-title {
        font-size: 3.2rem;
    }

    .hero-subtitle {
        font-size: 1.15rem;
    }

    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }

    .section-title {
        font-size: 2.2rem;
    }

    .about-content {
        flex-direction: row;
        gap: 4rem;
    }

    .about-visual {
        min-width: 250px;
    }

    .tech-orb {
        width: 200px;
        height: 200px;
    }

    .footer-content {
        grid-template-columns: 2fr 1fr 1fr;
    }

    .hero-cta {
        gap: 1.2rem;
    }

    .btn {
        padding: 0.85rem 2rem;
        font-size: 1.05rem;
    }
}

/* --- Responsive: Large Desktop (min-width: 1200px) --- */
@media (min-width: 1200px) {
    .hero-title {
        font-size: 3.8rem;
    }
    .container {
        padding: 0 2rem;
    }
    .services-grid {
        gap: 1.8rem;
    }
    .service-card {
        padding: 2rem;
    }
}
/* --- CONFIGURACIÓN DEL COMPONENTE AVATAR --- */

#av-ui-wrapper {
    /* 
       Z-INDEX: Controla qué tan "adelante" está el componente.
       9999 asegura que flote sobre sliders, headers y modales.
       Si el avatar queda oculto, aumenta este valor.
    */
    z-index: 9999;
    position: fixed;
    top: 10px;
    right: 10px;
    width: 100px;  /* Tamaño del área interactiva en móviles */
    height: 100px;
    pointer-events: none; /* Evita bloquear scrolls accidentales */
}

#av-canvas-container {
    width: 100%;
    height: 100%;
    cursor: pointer;
    pointer-events: auto; /* Reactiva el clic solo para el avatar */
}

/* --- MENÚ CIRCULAR (EFECTO GLOBO) --- */
.av-circular-menu {
    position: absolute;
    top: 50%;
    right: 50%;
    width: 0;
    height: 0;
    visibility: hidden;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.26, 1.55);
}

/* Estado activo cuando se hace clic en el avatar */
.av-circular-menu.active {
    visibility: visible;
    opacity: 1;
}

.av-menu-item {
    position: absolute;
    background: rgba(17, 25, 40, 0.95); /* Fondo oscuro semitransparente */
    border: 1px solid #00e5ff; /* Color Cyan Neon */
    color: #ffffff;
    padding: 10px 18px;
    border-radius: 30px;
    text-decoration: none;
    font-family: sans-serif;
    font-size: 0.8rem;
    font-weight: bold;
    white-space: nowrap;
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.3);
    pointer-events: auto;
    transition: transform 0.3s, background 0.3s;
}

.av-menu-item:hover {
    background: #00e5ff;
    color: #000000;
}

/* POSICIONAMIENTO RADIAL (Mobile First) */
/* Los valores translate mueven los botones en arco desde el avatar */
.av-circular-menu.active .av-menu-item:nth-child(1) { transform: translate(-100px, 10px); }
.av-circular-menu.active .av-menu-item:nth-child(2) { transform: translate(-90px, 65px); }
.av-circular-menu.active .av-menu-item:nth-child(3) { transform: translate(-60px, 115px); }
.av-circular-menu.active .av-menu-item:nth-child(4) { transform: translate(10px, 130px); }

/* --- AJUSTES PARA DESKTOP (Pantallas grandes) --- */
@media (min-width: 900px) {
    #av-ui-wrapper {
        width: 140px;
        height: 140px;
        top: 20px;
        right: 20px;
    }

    /* Expandimos más el arco del menú en PC */
    .av-circular-menu.active .av-menu-item:nth-child(1) { transform: translate(-170px, 20px); }
    .av-circular-menu.active .av-menu-item:nth-child(2) { transform: translate(-150px, 90px); }
    .av-circular-menu.active .av-menu-item:nth-child(3) { transform: translate(-90px, 160px); }
    .av-circular-menu.active .av-menu-item:nth-child(4) { transform: translate(30px, 190px); }
}