/* ============================================
   rubencervera.es — Estilos globales
   Para WordPress: copiar a style.css del tema
   o pegar en Apariencia > Personalizar > CSS adicional
   ============================================ */

:root {
  --bg: #0B0C0E;
  --surface: #121418;
  --surface-2: #171A1F;
  --border: #1F2328;
  --border-bright: #2A2F36;
  --text: #E8E6E0;
  --text-dim: #B0B5BF;
  --text-faint: #8A8F9A;
  --accent: #FF7A45;
  --accent-dim: #B85A33;
  --green: #84CC16;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --sans: 'IBM Plex Sans', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.25;
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* === NAV === */
nav.site-nav {
  border-bottom: 1px solid var(--border);
  background: rgba(11, 12, 14, 0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  max-width: 1200px;
  margin: 0 auto;
}
.logo {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--green);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  font-family: var(--mono);
  font-size: 13px;
}
.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--accent);
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex !important; }
}
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-bright);
  color: var(--text);
  padding: 8px 12px;
  font-family: var(--mono);
  font-size: 12px;
  cursor: pointer;
}

/* === BREADCRUMBS === */
.breadcrumbs {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-faint);
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.breadcrumbs ol {
  list-style: none;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.breadcrumbs a {
  color: var(--text-dim);
  text-decoration: none;
}
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs li + li::before {
  content: '/';
  margin-right: 8px;
  color: var(--text-faint);
}
.breadcrumbs [aria-current="page"] { color: var(--text); }

/* === HERO === */
.hero {
  padding: 100px 0 80px;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.hero-sm { padding: 60px 0 50px; }
.hero-meta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-faint);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border: 1px solid var(--border-bright);
  background: var(--surface);
  color: var(--green);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
}
.status-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
.hero h1 {
  font-family: var(--mono);
  font-size: clamp(38px, 6.5vw, 78px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin-bottom: 28px;
  max-width: 900px;
}
.hero-sm h1 {
  font-size: clamp(32px, 5vw, 56px);
  margin-bottom: 20px;
}
.hero h1 .accent { color: var(--accent); }
.hero h1 .slash {
  color: var(--text-faint);
  font-weight: 300;
}
.hero-sub {
  font-size: 18px;
  color: var(--text-dim);
  max-width: 640px;
  margin-bottom: 40px;
  line-height: 1.55;
}
.hero-sm .hero-sub { font-size: 16px; margin-bottom: 28px; }
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--border-bright);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.02em;
}
.btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}
.btn-primary:hover {
  background: transparent;
  color: var(--accent);
}
.btn .arrow { transition: transform 0.15s; }
.btn:hover .arrow { transform: translateX(3px); }

/* === SECTIONS === */
.section {
  padding: 90px 0;
  border-bottom: 1px solid var(--border);
}
.section-sm { padding: 60px 0; }
.section-label {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-label::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--accent);
}
.section-title {
  font-family: var(--mono);
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  max-width: 700px;
}
.section-sub {
  color: var(--text-dim);
  max-width: 620px;
  margin-bottom: 48px;
  font-size: 16px;
}

/* === CATEGORIES (home) === */
.categories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--border);
}
@media (max-width: 900px) {
  .categories { grid-template-columns: 1fr; }
}
.category {
  padding: 36px 32px;
  border-right: 1px solid var(--border);
  transition: background 0.2s;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  position: relative;
}
.category:last-child { border-right: none; }
@media (max-width: 900px) {
  .category {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .category:last-child { border-bottom: none; }
}
.category:hover { background: var(--surface); }
.category:hover .cat-arrow {
  color: var(--accent);
  transform: translate(3px, -3px);
}
.cat-num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-faint);
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
}
.cat-arrow {
  color: var(--text-dim);
  transition: all 0.2s;
}
.cat-icon {
  font-family: var(--mono);
  font-size: 24px;
  color: var(--accent);
  margin-bottom: 20px;
  font-weight: 700;
}
.cat-title {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}
.cat-desc {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 20px;
}
.cat-services {
  list-style: none;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-faint);
  margin-top: auto;
}
.cat-services li {
  padding: 4px 0;
  border-top: 1px solid var(--border);
}
.cat-services li:first-child { border-top: none; }

/* === SERVICE CARDS === */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 0;
  border: 1px solid var(--border);
}
.service {
  padding: 28px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  transition: background 0.2s;
}
.service:hover { background: var(--surface-2); }
.service-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  gap: 12px;
}
.service-name {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.service-price {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}
.service-price small { font-size: 11px; color: var(--text-dim); font-weight: 400; }
.service-meta {
  display: flex;
  gap: 16px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--border-bright);
  flex-wrap: wrap;
}
.service-spec { margin-bottom: 14px; }
.spec-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}
.spec-label.ok { color: var(--green); }
.spec-label.no { color: var(--accent); }
.spec-list {
  list-style: none;
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
}
.spec-list li {
  padding-left: 16px;
  position: relative;
}
.spec-list.ok li::before {
  content: '+';
  position: absolute;
  left: 0;
  color: var(--green);
  font-family: var(--mono);
  font-weight: 700;
}
.spec-list.no li::before {
  content: '−';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: var(--mono);
  font-weight: 700;
}
.spec-list.no li { color: var(--text-dim); }

/* === RULE BOX === */
.rule-box {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid var(--accent-dim);
  background: rgba(255, 122, 69, 0.04);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-dim);
  display: flex;
  gap: 14px;
}
.rule-box::before {
  content: '//';
  color: var(--accent);
  font-weight: 700;
}

/* === FAQ === */
.faq-list {
  border: 1px solid var(--border);
}
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item:last-child { border-bottom: none; }
.faq-q {
  padding: 20px 24px;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  transition: background 0.15s;
  list-style: none;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q:hover { background: var(--surface-2); }
.faq-q::after {
  content: '+';
  color: var(--accent);
  font-size: 20px;
  font-weight: 300;
  transition: transform 0.2s;
}
details[open] .faq-q::after { transform: rotate(45deg); }
.faq-a {
  padding: 4px 24px 24px;
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.6;
  background: var(--surface);
}

/* === CONTACT FORM === */
.contact-wrap { max-width: 680px; }
.form {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 32px;
}
.form-row { margin-bottom: 20px; }
.form-label {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}
.form-label .req { color: var(--accent); }
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border-bright);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  transition: border-color 0.15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-textarea {
  resize: vertical;
  min-height: 110px;
}
.form-radios {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.form-radios label {
  flex: 1;
  min-width: 130px;
  padding: 12px 14px;
  border: 1px solid var(--border-bright);
  font-family: var(--mono);
  font-size: 12px;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
  background: var(--bg);
}
.form-radios input { display: none; }
.form-radios label:has(input:checked) {
  border-color: var(--accent);
  background: rgba(255, 122, 69, 0.05);
  color: var(--accent);
}
.form-submit {
  width: 100%;
  padding: 16px;
  background: var(--accent);
  border: none;
  color: var(--bg);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 8px;
}
.form-submit:hover { background: #FF9466; }

/* === BLOG === */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 0;
  border: 1px solid var(--border);
}
.blog-card {
  padding: 28px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s;
}
.blog-card:hover { background: var(--surface-2); }
.blog-card:hover .blog-title { color: var(--accent); }
.blog-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
  margin-bottom: 14px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.blog-category {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.blog-title {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
  transition: color 0.2s;
}
.blog-excerpt {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.55;
  margin-bottom: 16px;
  flex: 1;
}
.blog-readmore {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* === BLOG POST === */
.post-article {
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 0;
}
.post-header { margin-bottom: 40px; }
.post-meta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-faint);
  margin-bottom: 20px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.post-meta .blog-category { font-weight: 500; }
.post-title {
  font-family: var(--mono);
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}
.post-lede {
  font-size: 19px;
  color: var(--text-dim);
  line-height: 1.55;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--border);
}
.post-content {
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
}
.post-content h2 {
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 700;
  margin: 48px 0 16px;
  letter-spacing: -0.02em;
}
.post-content h3 {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 700;
  margin: 32px 0 12px;
}
.post-content p { margin-bottom: 20px; }
.post-content ul, .post-content ol {
  margin: 0 0 20px 28px;
}
.post-content li { margin-bottom: 8px; }
.post-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.post-content code {
  font-family: var(--mono);
  background: var(--surface);
  padding: 2px 6px;
  font-size: 14px;
  border: 1px solid var(--border);
}
.post-content pre {
  font-family: var(--mono);
  background: var(--surface);
  padding: 20px;
  border: 1px solid var(--border);
  overflow-x: auto;
  margin: 24px 0;
  font-size: 14px;
}
.post-content blockquote {
  border-left: 2px solid var(--accent);
  padding: 8px 0 8px 20px;
  margin: 24px 0;
  color: var(--text-dim);
  font-style: italic;
}
.post-cta {
  margin: 50px 0;
  padding: 28px;
  border: 1px solid var(--accent-dim);
  background: rgba(255, 122, 69, 0.04);
}
.post-cta-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}
.post-cta-title {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
}
.post-cta-desc {
  color: var(--text-dim);
  margin-bottom: 18px;
}

/* === FOOTER === */
footer.site-footer {
  padding: 60px 0 40px;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-faint);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
.footer-col h4 {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  margin-bottom: 14px;
  font-weight: 500;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a {
  color: var(--text-faint);
  text-decoration: none;
}
.footer-col a:hover { color: var(--accent); }
.footer-brand {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 12px;
}
.footer-brand-desc { color: var(--text-faint); max-width: 280px; line-height: 1.5; }
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* === ANIMATIONS === */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeIn 0.45s ease forwards;
}
.fade-in.d1 { animation-delay: 0.05s; }
.fade-in.d2 { animation-delay: 0.1s; }
.fade-in.d3 { animation-delay: 0.15s; }
.fade-in.d4 { animation-delay: 0.2s; }
@keyframes fadeIn {
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .fade-in {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* === MOBILE RESPONSIVE === */
@media (max-width: 720px) {

  /* Nav: hamburger */
  .nav-links {
    display: none;
    position: fixed;
    top: 57px;
    left: 0;
    right: 0;
    background: rgba(11,12,14,0.97);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-bright);
    padding: 20px 24px 28px;
    flex-direction: column;
    gap: 14px;
    z-index: 99;
  }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 15px; }
  .nav-toggle { display: flex; }

  /* Hero */
  .hero { padding: 60px 0 50px; }
  .hero h1 {
    font-size: clamp(28px, 8.5vw, 52px);
    margin-bottom: 18px;
  }
  .hero-sub {
    font-size: 16px;
    margin-bottom: 28px;
  }
  .hero-actions { gap: 10px; }

  /* Sections */
  .section { padding: 54px 0; }
  .section-title { font-size: clamp(20px, 5.5vw, 34px); }
  .section-sub { font-size: 15px; margin-bottom: 32px; }

  /* Container */
  .container { padding: 0 18px; }

  /* Category cards */
  .category { padding: 24px 20px; }
  .cat-desc { font-size: 14px; }
  .cat-services { font-size: 13px; }
  .cat-title { font-size: 17px; }
  .cat-icon { font-size: 20px; margin-bottom: 14px; }

  /* Service cards */
  .services-grid { grid-template-columns: 1fr; }
  .service { padding: 22px; }
  .service-name { font-size: 15px; }

  /* Blog */
  .blog-grid { grid-template-columns: 1fr; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 28px; }
  footer.site-footer { padding: 44px 0 28px; }

  /* Buttons */
  .btn { padding: 13px 18px; }
}

@media (max-width: 420px) {
  .container { padding: 0 14px; }
  .hero h1 { font-size: clamp(26px, 8vw, 40px); }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .footer-grid { grid-template-columns: 1fr; }
}
