/* ==========================================================================
   styles.css — Pulido Visual MenteCodificadaIA
   Enfoque: tipografía, jerarquía, micro-interacciones y responsive suave
   ========================================================================== */

/* ------------------------------
   0) Reset moderno + base
   ------------------------------ */
:root {
  /* Paleta oscura + azul corporativo */
  --bg: #0b1220;           /* fondo principal */
  --bg-2: #0f1629;         /* superficies elevadas suaves */
  --surface: #111827;      /* tarjetas/elementos */
  --border: rgba(255,255,255,0.08);

  --text: #e5e7eb;         /* texto principal */
  --muted: #9ca3af;        /* texto secundario */

  --primary-400: #60a5fa;
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --primary: var(--primary-600);

  /* Tipografía y ritmo vertical */
  --font-sans: "Poppins", "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --leading-tight: 1.15;
  --leading-normal: 1.6;

  /* Escala tipográfica fluida */
  --fs-900: clamp(2.4rem, 4vw + 1rem, 3.6rem); /* H1 */
  --fs-800: clamp(2rem, 3vw + 0.8rem, 3rem);   /* H2 */
  --fs-700: clamp(1.6rem, 2vw + 0.6rem, 2.2rem);/* H3 */
  --fs-600: clamp(1.3rem, 1.2vw + 0.6rem, 1.6rem);/* H4 */
  --fs-500: 1.125rem; /* P grande / label */
  --fs-400: 1rem;     /* texto base */
  --fs-300: 0.9375rem;/* small */
  --fs-200: 0.875rem; /* xs */

  /* Espaciados */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-7: 2rem;
  --space-8: 2.5rem;
  --space-9: 3rem;

  /* Radios y sombras */
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;

  --shadow-1: 0 1px 2px rgba(0,0,0,0.25);
  --shadow-2: 0 6px 18px rgba(0,0,0,0.35);
  --shadow-3: 0 12px 30px rgba(0,0,0,0.45);

  /* Transiciones */
  --ease: cubic-bezier(.2,.8,.2,1);
  --speed-fast: 160ms;
  --speed: 220ms;
  --speed-slow: 420ms;

  /* Contenedor */
  --container-max: 1200px;
  --container-pad: 1.25rem;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: var(--fs-400);
  line-height: var(--leading-normal);
  color: var(--text);
  background: radial-gradient(1200px 600px at 20% -10%, rgba(37,99,235,0.12), transparent 60%),
              radial-gradient(1000px 500px at 90% 0%, rgba(37,99,235,0.08), transparent 60%),
              var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:target { scroll-margin-top: 96px; }

/* Imágenes */
img, picture, video, canvas, svg { display: block; max-width: 100%; }
img { height: auto; border-radius: var(--radius-sm); }

/* Listas */
ul[role="list"], ol[role="list"] { list-style: none; padding-left: 0; }

/* Enlaces */
a { 
  color: var(--text);
  text-decoration: none;
  position: relative;
  transition: color var(--speed) var(--ease);
}
a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0%;
  height: 1px;
  background: linear-gradient(90deg, var(--primary-400), var(--primary));
  transition: width var(--speed) var(--ease);
  opacity: 0.9;
}
a:hover { color: #fff; }
a:hover::after { width: 100%; }

/* Contenedor y secciones */
.container { 
  width: min(var(--container-max), 92%);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}
.section {
  padding-block: clamp(2.5rem, 5vw, 5rem);
}

/* Tipografía */
h1, h2, h3, h4, h5, h6 {
  letter-spacing: -0.02em;
  font-weight: 700;
  line-height: var(--leading-tight);
}
h1 { font-size: var(--fs-900); }
h2 { font-size: var(--fs-800); margin-top: var(--space-8); }
h3 { font-size: var(--fs-700); margin-top: var(--space-6); }
h4 { font-size: var(--fs-600); margin-top: var(--space-5); }

p { 
  margin-top: var(--space-4);
  color: var(--text);
  max-width: 70ch;
}
.lead { 
  font-size: clamp(1.05rem, 1.2vw + 0.5rem, 1.25rem);
  color: #f3f4f6;
  opacity: 0.95;
}

/* Etiquetas/chips */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5ch;
  font-size: var(--fs-200);
  color: #dbeafe;
  background: linear-gradient(180deg, rgba(59,130,246,0.18), rgba(59,130,246,0.06));
  border: 1px solid rgba(59,130,246,0.25);
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius);
  font-weight: 600;
  line-height: 1;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--speed) var(--ease),
              box-shadow var(--speed) var(--ease),
              background var(--speed) var(--ease),
              border-color var(--speed) var(--ease),
              color var(--speed) var(--ease);
  will-change: transform, box-shadow;
}
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(59,130,246,0.25);
}
.btn--primary {
  color: #fff;
  background: linear-gradient(180deg, var(--primary-500), var(--primary-700));
  box-shadow: var(--shadow-2);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-3);
}
.btn--primary:active {
  transform: translateY(0);
}
.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn--ghost:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.18);
}
.btn--sm { padding: 0.6rem 0.85rem; border-radius: 12px; font-size: var(--fs-300); }

/* Tarjetas */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.0)) , var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  padding: clamp(1rem, 1.2vw + 0.5rem, 1.5rem);
  transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease), border-color var(--speed) var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-2);
  border-color: rgba(255,255,255,0.14);
}
.card h3, .card h4 { margin-top: 0; }
.card p { color: var(--muted); }

/* Navegación y pie */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding-block: 1rem;
}
.nav__links {
  display: flex;
  gap: clamp(0.6rem, 1.2vw, 1.2rem);
}
.nav__link {
  color: var(--muted);
  font-weight: 500;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  transition: color var(--speed) var(--ease), background var(--speed) var(--ease);
}
.nav__link:hover { color: #fff; background: rgba(255,255,255,0.04); }

footer {
  border-top: 1px solid var(--border);
  margin-top: var(--space-9);
  padding-block: var(--space-7);
  color: var(--muted);
}

/* Formularios */
input, textarea, select {
  width: 100%;
  color: var(--text);
  background: #0e1526;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  transition: border-color var(--speed) var(--ease), box-shadow var(--speed) var(--ease), background var(--speed) var(--ease);
}
input::placeholder, textarea::placeholder { color: #8891a7; }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: rgba(59,130,246,0.45);
  box-shadow: 0 0 0 4px rgba(59,130,246,0.18);
  background: #0f192e;
}
input[type="checkbox"], input[type="radio"] { width: auto; }

/* Grillas */
.grid {
  display: grid;
  gap: clamp(1rem, 2vw, 1.75rem);
}
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) {
  .grid--3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
}

/* Hero */
.hero {
  padding-block: clamp(3rem, 7vw, 6rem);
}
.hero__title { margin-top: 0.25rem; }
.hero__subtitle { color: var(--muted); max-width: 70ch; }

/* Accesibilidad */
:focus-visible { outline: 3px solid rgba(59,130,246,0.5); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* Scrollbar */
*::-webkit-scrollbar { height: 10px; width: 10px; }
*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(59,130,246,0.5), rgba(59,130,246,0.2));
  border-radius: 999px;
  border: 2px solid rgba(0,0,0,0);
  background-clip: padding-box;
}
*::-webkit-scrollbar-track { background: transparent; }

/* Helpers */
.muted { color: var(--muted); }
.center { text-align: center; }
.stack > * + * { margin-top: var(--space-4); }
.pad { padding: var(--space-6); }
.pad-lg { padding: var(--space-8); }
.round { border-radius: var(--radius); }
.shadow-1 { box-shadow: var(--shadow-1); }
.shadow-2 { box-shadow: var(--shadow-2); }
.shadow-3 { box-shadow: var(--shadow-3); }

/* Responsive fino */
@media (max-width: 768px) {
  .section { padding-block: 2rem; }
  .nav { gap: var(--space-4); }
  .nav__links { gap: 0.6rem; }
  .btn { padding: 0.8rem 1rem; }
  .container { padding-inline: 0.75rem; }
  p { max-width: 75ch; }
}

/* Foto perfil */
.mi-foto {
  width: 280px;                
  height: 280px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--primary-500);
  box-shadow: 0 6px 18px rgba(0,0,0,0.45);
  display: block;
  margin: 0 auto;

  /* Animación de entrada */
  animation: fadeZoomIn 1s ease forwards;
  opacity: 0;
  transform: scale(0.85);
}

@keyframes fadeZoomIn {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Responsive foto */
@media (max-width: 768px) {
  .mi-foto {
    width: 180px;
    height: 180px;
    border-width: 3px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  }
}

/* Animaciones de scroll */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
/* ------------------------------
   Footer
   ------------------------------ */
.footer {
  background-color: #0e1118;
  color: #e8edf2;
  padding: 40px 20px 20px 20px;
  font-size: 14px;
}

.footer-container {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-left h3 {
  margin-bottom: 10px;
  font-size: 18px;
  color: var(--brand, #5dd3ff);
}

.footer-left p {
  color: #aab3bd;
  line-height: 1.5;
}

.footer-center h4,
.footer-right h4 {
  margin-bottom: 10px;
  font-size: 16px;
  color: var(--brand, #5dd3ff);
}

.footer-center ul {
  list-style: none;
  padding: 0;
}

.footer-center ul li {
  margin-bottom: 8px;
}

.footer-center ul li a {
  text-decoration: none;
  color: #e8edf2;
  transition: color 0.3s ease;
}

.footer-center ul li a:hover {
  color: var(--brand, #5dd3ff);
}

.footer-right .social-icons a {
  margin-right: 12px;
  display: inline-block;
  transition: transform 0.3s ease;
}

.footer-right .social-icons img {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1); /* Blanco */
}

.footer-right .social-icons a:hover {
  transform: scale(1.2);
}

.footer-bottom {
  text-align: center;
  margin-top: 30px;
  border-top: 1px solid #1c2432;
  padding-top: 15px;
  color: #aab3bd;
  font-size: 13px;
}

/* Responsive para móviles */
@media (max-width: 768px) {
  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-right .social-icons {
    justify-content: center;
  }
}
/* Iconos sociales con Font Awesome */
.social-icons a {
  margin-right: 14px;
  font-size: 22px;
  color: #fff; /* blanco por defecto */
  transition: transform 0.3s ease, color 0.3s ease;
}

.social-icons a:hover {
  transform: scale(1.2);
}

/* Colores de hover personalizados */
.social-icons a:hover .fa-linkedin { 
  color: #0A66C2; /* Azul oficial LinkedIn */
}
.social-icons a:hover .fa-instagram { 
  color: #E1306C; /* Rosa Instagram */
}
.social-icons a:hover .fiverr-icon { 
  color: #00b22d; /* Verde oficial Fiverr */
}

/* Fiverr icon - blanco por defecto */
.fiverr-icon {
  color: #fff; /* Blanco por defecto */
  transition: color 0.3s ease;
}

/* Fiverr icon al pasar el ratón */
.social-icons a:hover .fiverr-icon {
  color: #00b22d; /* Verde oficial Fiverr */
}

/* === FIX RESTAURACIÓN TARJETAS SERVICIOS === */
.card {
  background: #111827 !important; /* tono original exacto */
  border: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 22px !important;
  box-shadow: 0 6px 20px rgba(0,0,0,0.45) !important;
  padding: 1.6rem !important;
  transition: all 0.25s ease !important;
}

.card:hover {
  background: #1a233d !important; /* sutil aclarado en hover */
  transform: translateY(-3px);
  border-color: rgba(59,130,246,0.25);
  box-shadow: 0 10px 25px rgba(0,0,0,0.55);
}

/* Evita subrayado y borde blanco en hover */
.services-grid a::after {
  display: none !important;
}
