/* ============================================
   IMPORTAR PALETA DE COLORES
   ============================================ */
@import url('color-palette.css');

/* ============================================
   FONDO CON GRID Y ORBE RADIAL
   ============================================ */
body {
    position: relative;
    min-height: 100vh;
    background: #ffffff;
}

.dark body {
    background: #020617;
}

/* Modo Claro: Grid sutil con orbe violeta */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background: transparent;
    background-image: 
        linear-gradient(to right, rgba(71, 85, 105, 0.08) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(71, 85, 105, 0.08) 1px, transparent 1px),
        radial-gradient(circle at 50% 50%, rgba(74, 0, 183, 0.06) 0%, rgba(189, 0, 255, 0.02) 40%, transparent 70%);
    background-size: 40px 40px, 40px 40px, 100% 100%;
    pointer-events: none;
}

/* Modo Oscuro: Grid gris con orbe radial fucsia intenso */
.dark body::before {
    background: transparent;
    background-image: 
        linear-gradient(to right, rgba(71, 85, 105, 0.2) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(71, 85, 105, 0.2) 1px, transparent 1px),
        radial-gradient(circle at 50% 60%, rgba(189, 0, 255, 0.20) 0%, rgba(168, 85, 247, 0.06) 40%, transparent 70%);
    background-size: 40px 40px, 40px 40px, 100% 100%;
    pointer-events: none;
}

/* Estilos personalizados */
.animation-container {
    width: 100%;
    height: 500px;
    background: radial-gradient(circle at center, var(--overlay-primary-20) 0%, transparent 70%);
    border-radius: 30px;
    position: relative;
    overflow: hidden;
}

/* Transiciones suaves para el cambio de tema */
.transition-theme {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Estilos del menú móvil */
#mobile-menu.active {
    display: block;
}

#mobile-menu.active .transform {
    transform: translateX(0);
}

.animation-container::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 0%,
        var(--overlay-primary-10) 50%,
        transparent 100%
    );
    animation: wave 8s linear infinite;
}

.dark .animation-container {
    background: radial-gradient(circle at center, rgba(189, 0, 255, 0.3) 0%, transparent 70%);
}

.dark .animation-container::before {
    background: linear-gradient(
        45deg,
        transparent 0%,
        rgba(189, 0, 255, 0.15) 50%,
        transparent 100%
    );
}

@keyframes wave {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--overlay-primary-20);
    border: 2px solid var(--primary-700);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    margin: 0 auto;
    color: var(--primary-700);
}

.dark .step-number {
    background: rgba(189, 0, 255, 0.2);
    border-color: var(--secondary-700);
    color: var(--secondary-700);
}

.service-card {
    transform: translateY(0);
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
}

/* Scrollbar personalizado */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-900);
}

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

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

.dark ::-webkit-scrollbar-track {
    background: var(--gray-950);
}

.dark ::-webkit-scrollbar-thumb {
    background: var(--secondary-600);
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-700);
}

/* View Transitions API */
@keyframes fade-in {
    from { opacity: 0; }
}

@keyframes fade-out {
    to { opacity: 0; }
}

@keyframes slide-from-right {
    from { transform: translateX(100%); }
}

@keyframes slide-to-left {
    to { transform: translateX(-100%); }
}

::view-transition-old(root) {
    animation: 90ms cubic-bezier(0.4, 0, 1, 1) both fade-out,
               300ms cubic-bezier(0.4, 0, 0.2, 1) both slide-to-left;
}

::view-transition-new(root) {
    animation: 210ms cubic-bezier(0, 0, 0.2, 1) 90ms both fade-in,
               300ms cubic-bezier(0.4, 0, 0.2, 1) both slide-from-right;
}

/* Animaciones específicas para imágenes y títulos */
::view-transition-old(article-1-image),
::view-transition-old(article-2-image),
::view-transition-old(article-3-image),
::view-transition-new(article-1-image),
::view-transition-new(article-2-image),
::view-transition-new(article-3-image) {
    animation: none;
    mix-blend-mode: normal;
}

::view-transition-old(article-content),
::view-transition-new(article-content) {
    animation: none;
    mix-blend-mode: normal;
}

/* Estilos para la página 404 */
.robot-animation {
    width: 200px;
    height: 200px;
    margin: 0 auto;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="%234A00B7"/></svg>');
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

/* Estilos para el blog */
.prose {
    max-width: 65ch;
    color: inherit;
}

.prose a {
    color: var(--color-link);
    text-decoration: none;
}

.prose a:hover {
    text-decoration: underline;
    color: var(--color-link-hover);
}

.dark .prose {
    color: #f3f4f6;
}

/* Estilos para páginas legales */
.legal-page {
    padding: 100px 0 60px;
    min-height: 100vh;
    background-color: #f9fafb;
}

.legal-content {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    padding: 60px;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.legal-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 10px;
    line-height: 1.2;
}

.legal-content .last-updated {
    color: #6b7280;
    font-size: 0.95rem;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #e5e7eb;
}

.legal-section {
    margin-bottom: 40px;
}

.legal-section h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 16px;
    margin-top: 30px;
}

.legal-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 12px;
    margin-top: 20px;
}

.legal-section p {
    color: #4b5563;
    line-height: 1.8;
    margin-bottom: 16px;
    font-size: 1rem;
}

.legal-section ul {
    margin: 16px 0;
    padding-left: 30px;
}

.legal-section li {
    color: #4b5563;
    line-height: 1.8;
    margin-bottom: 8px;
    position: relative;
}

.legal-section li::marker {
    color: var(--primary-700);
}

.legal-section strong {
    color: #1f2937;
    font-weight: 600;
}

.legal-acknowledgment {
    background-color: var(--primary-50);
    border-left: 4px solid var(--primary-700);
    padding: 20px 24px;
    margin-top: 40px;
    border-radius: 8px;
}

.legal-acknowledgment p {
    color: var(--primary-900);
    margin: 0;
    font-size: 1rem;
}

/* Responsive para páginas legales */
@media (max-width: 768px) {
    .legal-content {
        padding: 30px 20px;
    }

    .legal-content h1 {
        font-size: 1.875rem;
    }

    .legal-section h2 {
        font-size: 1.5rem;
    }

    .legal-section h3 {
        font-size: 1.125rem;
    }
}

.bg-custom {
    background: #020617;
    background-image: 
        linear-gradient(to right, rgba(71,85,105,0.15) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(71,85,105,0.15) 1px, transparent 1px),
        radial-gradient(circle at 50% 60%, rgba(236,72,153,0.15) 0%, rgba(168,85,247,0.05) 40%, transparent 70%);
    background-size: "40px 40px, 40px 40px, 100% 100%";
}