/*
Theme Name: Crayon IT
Template: generatepress
Version: 1.0
Description: Tema personalizado de Crayon IT SpA basado en GeneratePress
Author: Crayon IT SpA
*/

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;700&display=swap');

:root {
  --accent:      #FB5C3B;
  --accent-h:    #ff7254;
  --accent-glow: rgba(251,92,59,0.35);
  --accent-dim:  rgba(251,92,59,0.12);
}

[data-theme="dark"] {
  --bg:       #080c12;
  --bg2:      #0d1320;
  --text:     #e8edf5;
  --muted:    #8fa3bc;
  --border:   rgba(251,92,59,0.15);
  --card:     rgba(255,255,255,0.03);
  --nav-bg:   rgba(8,12,18,0.9);
  --hr:       rgba(255,255,255,0.06);
  --shadow:   0 20px 60px rgba(0,0,0,0.5);
  --logo-filter: brightness(1.1);
}

[data-theme="light"] {
  --bg:       #f7f5f2;
  --bg2:      #ffffff;
  --text:     #111111;
  --muted:    #6b7280;
  --border:   rgba(251,92,59,0.2);
  --card:     rgba(0,0,0,0.025);
  --nav-bg:   rgba(247,245,242,0.94);
  --hr:       rgba(0,0,0,0.06);
  --shadow:   0 20px 60px rgba(0,0,0,0.07);
  --logo-filter: brightness(0.85);
}

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

body {
  font-family: 'Space Grotesk', sans-serif;
  background: var(--bg) !important;
  color: var(--text) !important;
  overflow-x: hidden;
  transition: background .35s, color .35s;
}

/* ── NAVEGACIÓN ── */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 200;
  background: var(--nav-bg) !important;
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  transition: background .35s;
}

.site-header .inside-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 6%;
  max-width: 100%;
}

.site-logo img { height: 44px; filter: var(--logo-filter); }

.main-nav ul { display: flex; gap: 2rem; list-style: none; }
.main-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: .88rem;
  font-weight: 500;
  transition: color .2s;
  position: relative;
}
.main-nav a::after {
  content: '';
  position: absolute;
  bottom: -5px; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s;
}
.main-nav a:hover { color: var(--text); }
.main-nav a:hover::after { transform: scaleX(1); }

.nav-cta {
  background: var(--accent);
  color: #fff !important;
  padding: .55rem 1.4rem;
  border-radius: 6px;
  font-size: .85rem;
  font-weight: 700;
  text-decoration: none;
  transition: all .2s;
  box-shadow: 0 4px 16px var(--accent-glow);
}
.nav-cta:hover { background: var(--accent-h); transform: translateY(-1px); }

.theme-toggle {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  width: 52px;
  height: 28px;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}
.theme-toggle::before {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent);
  transition: transform .3s;
  box-shadow: 0 0 8px var(--accent-glow);
}
[data-theme="light"] .theme-toggle::before { transform: translateX(24px); }

.site-content { padding-top: 80px; }

/* ── CONTENIDO ── */
.site-main,
.content-area,
.widget-area,
.sidebar,
article,
.hentry,
.type-post,
.type-page,
.entry-header,
.entry-content,
.entry-footer,
.widget {
  background: transparent !important;
  background-color: transparent !important;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--text) !important;
}

p { color: var(--muted); line-height: 1.75; }
a { color: var(--accent); }

.entry-title a { color: var(--text) !important; }
.entry-meta, .entry-meta a { color: var(--muted) !important; }
.widget-title { color: var(--text) !important; }

/* ── FOOTER ── */
.site-footer {
  background: var(--bg2) !important;
  border-top: 1px solid var(--border);
  padding: 2.5rem 6%;
}
.site-footer .inside-site-info {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.footer-logo img { height: 32px; filter: var(--logo-filter); }
.footer-links { display: flex; gap: 2rem; }
.footer-links a {
  color: var(--muted);
  font-size: .83rem;
  text-decoration: none;
  transition: color .2s;
}
.footer-links a:hover { color: var(--accent); }
.footer-social { display: flex; gap: .75rem; }
.footer-social a {
  width: 34px; height: 34px;
  border: 1px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-decoration: none;
  transition: all .2s;
}
.footer-social a:hover { border-color: var(--accent); color: var(--accent); }
.footer-copy { color: var(--muted); font-size: .78rem; }

/* ── WHATSAPP ── */
.wa-btn {
  position: fixed;
  bottom: 2rem; right: 2rem;
  z-index: 150;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 24px rgba(37,211,102,.4);
  text-decoration: none;
  transition: all .2s;
  animation: wa-bounce 2s ease-in-out infinite;
}
.wa-btn:hover { transform: scale(1.12); animation: none; }
.wa-btn svg { width: 28px; height: 28px; fill: #fff; }
@keyframes wa-bounce {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

/* ── REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .65s ease, transform .65s ease;
}
.reveal.visible { opacity: 1; transform: none; }
.d1 { transition-delay: .1s; }
.d2 { transition-delay: .2s; }
.d3 { transition-delay: .3s; }
.d4 { transition-delay: .4s; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .site-header .inside-header { padding: 1rem 5%; }
  .main-nav { display: none; }
  .site-content { padding-top: 70px; }
}

/* ── FIX INSIDE-ARTICLE ── */
.inside-article {
  background: transparent !important;
  background-color: transparent !important;
}

/* ── WIDGETS Y FORMULARIOS MODO OSCURO ── */
[data-theme="dark"] input[type="search"],
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="tel"],
[data-theme="dark"] textarea,
[data-theme="dark"] select,
[data-theme="dark"] .search-field {
  background: #0d1320 !important;
  color: #e8edf5 !important;
  border: 1px solid rgba(251,92,59,0.2) !important;
  border-radius: 6px;
}

[data-theme="dark"] input[type="submit"],
[data-theme="dark"] button[type="submit"],
[data-theme="dark"] .search-submit {
  background: var(--accent) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 6px;
  cursor: pointer;
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
  color: #6b7e96 !important;
}

/* ══════════════════════════════════════
   PÁGINA DE INICIO
   ══════════════════════════════════════ */

/* ── SECCIONES BASE ── */
.section-dark  { background: var(--bg);  padding: 6rem 6%; }
.section-alt   { background: var(--bg2); padding: 6rem 6%; }
.s-inner       { max-width: 1200px; margin: 0 auto; }

.s-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem;
  color: var(--accent);
  letter-spacing: .18em;
  text-transform: uppercase;
  margin-bottom: .8rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.s-label::before {
  content: '';
  display: block;
  width: 20px;
  height: 1px;
  background: var(--accent);
}

.s-inner h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  margin-bottom: 1rem;
}

.s-desc {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
  max-width: 640px;
  margin-bottom: 3rem;
}

/* ── HERO ── */
.hero {
  min-height: 100vh;
  background: var(--bg2);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8rem 6% 4rem;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 90% at 50% 50%, black 30%, transparent 100%);
  animation: grid-shift 22s linear infinite;
}
@keyframes grid-shift { to { background-position: 64px 64px; } }

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.orb-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(251,92,59,.15) 0%, transparent 70%);
  top: -150px; right: -100px;
  animation: orb-f 8s ease-in-out infinite;
}
.orb-2 {
  width: 350px; height: 350px;
  background: radial-gradient(circle, rgba(251,92,59,.08) 0%, transparent 70%);
  bottom: -80px; left: -80px;
  animation: orb-f 10s ease-in-out infinite reverse;
}
@keyframes orb-f {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-20px); }
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
  width: 100%;
}

.hero-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem;
  color: var(--accent);
  letter-spacing: .18em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.hero-eyebrow::before {
  content: '';
  display: block;
  width: 20px;
  height: 1px;
  background: var(--accent);
}

.hero-content h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.05;
  margin-bottom: 1.2rem;
  color: var(--text) !important;
}
.hero-content h1 span { color: var(--accent); }

.hero-sub {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.75;
  max-width: 560px;
  margin-bottom: 2.5rem;
}

.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: .9rem 2rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: .92rem;
  text-decoration: none;
  transition: all .2s;
  box-shadow: 0 4px 20px var(--accent-glow);
  display: inline-block;
}
.btn-primary:hover {
  background: var(--accent-h);
  transform: translateY(-2px);
  color: #fff;
}

.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text);
  padding: .9rem 2rem;
  border-radius: 6px;
  font-weight: 500;
  font-size: .92rem;
  text-decoration: none;
  transition: all .2s;
  display: inline-block;
  background: var(--card);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* Shield SVG */
.hero-shield { width: 280px; flex-shrink: 0; }
.hero-shield svg { width: 100%; height: auto; }
.pulse-ring { animation: pulse 3s ease-in-out infinite; }
@keyframes pulse {
  0%,100% { opacity: .3; transform: scale(1); }
  50%      { opacity: .6; transform: scale(1.05); }
}

/* Hero stats */
.hero-stats {
  display: flex;
  gap: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  max-width: 1200px;
  margin: 3rem auto 0;
  position: relative;
  z-index: 1;
  width: 100%;
}
.hstat {
  padding: 1.2rem 2rem;
  flex: 1;
  border-right: 1px solid var(--border);
}
.hstat:last-child { border-right: none; }
.hstat-n {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
  margin-bottom: .2rem;
}
.hstat-l { font-size: .78rem; color: var(--muted); }

/* ── PARTNERS ── */
.partners-section {
  background: var(--bg);
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.partners-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: .68rem;
  color: var(--muted);
  letter-spacing: .15em;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 1.2rem;
}
.partners-track-wrap { overflow: hidden; }
.partners-track {
  display: flex;
  gap: 1rem;
  animation: scroll-track 30s linear infinite;
  width: max-content;
}
.partners-track:hover { animation-play-state: paused; }
@keyframes scroll-track {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.partner-chip {
  padding: .5rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: .82rem;
  color: var(--muted);
  white-space: nowrap;
  background: var(--card);
}

/* ── SERVICIOS GRID ── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.svc-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem;
  transition: all .3s;
}
.svc-card:hover {
  border-color: rgba(251,92,59,.4);
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}
.svc-icon-wrap {
  width: 48px; height: 48px;
  border-radius: 10px;
  background: var(--accent-dim);
  border: 1px solid rgba(251,92,59,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
  transition: box-shadow .3s;
}
.svc-card:hover .svc-icon-wrap { box-shadow: 0 0 20px var(--accent-glow); }
.svc-icon-wrap svg {
  width: 22px; height: 22px;
  stroke: var(--accent);
}
.svc-card h3 {
  font-size: 1rem;
  margin-bottom: .6rem;
  color: var(--text) !important;
}
.svc-card p { font-size: .88rem; line-height: 1.65; }

/* ── SERVICIOS ESPECÍFICOS ── */
.specific-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.specific-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem;
  transition: all .3s;
  display: flex;
  flex-direction: column;
}
.specific-card:hover {
  border-color: rgba(251,92,59,.4);
  transform: translateY(-5px);
}
.specific-tag {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: .08em;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(251,92,59,.25);
  padding: .2rem .7rem;
  border-radius: 20px;
  margin-bottom: .8rem;
}
.specific-card h3 {
  font-size: 1.05rem;
  margin-bottom: .6rem;
  color: var(--text) !important;
}
.specific-card p { font-size: .88rem; line-height: 1.65; flex: 1; }
.card-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-top: 1rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.card-link:hover { text-decoration: underline; }
.specific-footer { text-align: center; }

/* ── CONTENIDO (blog/videos) ── */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}
.content-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.content-type-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem;
  color: var(--accent);
  letter-spacing: .18em;
  text-transform: uppercase;
}
.content-ver-todos {
  font-size: .8rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.content-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  text-decoration: none;
  transition: all .2s;
}
.content-card:hover {
  border-color: rgba(251,92,59,.4);
  transform: translateY(-3px);
}
.content-card-tag {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: .08em;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(251,92,59,.25);
  padding: .2rem .7rem;
  border-radius: 20px;
  margin-bottom: .8rem;
}
.content-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text) !important;
  line-height: 1.35;
  margin-bottom: .6rem;
}
.content-card p { font-size: .85rem; color: var(--muted); line-height: 1.65; }
.content-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  font-size: .75rem;
  color: var(--muted);
}
.content-leer { font-weight: 700; color: var(--accent); }

.video-card { padding: 0; overflow: hidden; }
.video-thumb {
  position: relative;
  padding-bottom: 52%;
  background: #000;
  overflow: hidden;
}
.video-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0; left: 0;
  opacity: .85;
}
.video-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-play div {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.video-play svg { width: 20px; height: 20px; margin-left: 3px; }
.video-card .content-card-tag,
.video-card h3,
.video-card p { padding: 0 1.5rem; }
.video-card .content-card-tag { margin-top: 1.2rem; }
.video-card h3 { margin-top: .5rem; }
.video-card p  { padding-bottom: 1.5rem; }

/* ── CONTACTO ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}
.contact-info { display: flex; flex-direction: column; gap: 2rem; }
.contact-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.contact-item svg {
  width: 22px; height: 22px;
  stroke: var(--accent);
  flex-shrink: 0;
  margin-top: .2rem;
}
.contact-item strong { display: block; color: var(--text); margin-bottom: .3rem; }
.contact-item p { font-size: .9rem; margin: 0; }

/* Contact Form 7 */
.wpcf7-form { display: flex; flex-direction: column; gap: 1rem; }
.wpcf7-form p { margin: 0; }
.wpcf7-form input,
.wpcf7-form textarea {
  width: 100%;
  padding: .85rem 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  font-size: .92rem;
  transition: border-color .2s;
}
.wpcf7-form input:focus,
.wpcf7-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.wpcf7-form textarea { height: 130px; resize: vertical; }
.wpcf7-form input[type="submit"] {
  background: var(--accent) !important;
  color: #fff !important;
  font-weight: 700;
  cursor: pointer;
  border: none !important;
  transition: all .2s;
}
.wpcf7-form input[type="submit"]:hover {
  background: var(--accent-h) !important;
  transform: translateY(-2px);
}

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  .hero-inner       { grid-template-columns: 1fr; }
  .hero-shield      { display: none; }
  .services-grid    { grid-template-columns: 1fr 1fr; }
  .specific-grid    { grid-template-columns: 1fr 1fr; }
  .content-grid     { grid-template-columns: 1fr; }
  .contact-grid     { grid-template-columns: 1fr; }
  .hero-stats       { flex-wrap: wrap; }
  .hstat            { min-width: 50%; border-right: none; border-bottom: 1px solid var(--border); }
}
@media (max-width: 600px) {
  .section-dark,
  .section-alt      { padding: 4rem 5%; }
  .hero             { padding: 7rem 5% 3rem; }
  .services-grid    { grid-template-columns: 1fr; }
  .specific-grid    { grid-template-columns: 1fr; }
  .hstat            { min-width: 100%; }
}
