/*
Theme Name: SIJU
Theme URI: https://simulacionjudicial.es
Author: Cánovas Fundación
Description: Tema de la Simulación Judicial Universitaria (SIJU).
Version: 1.0.0
Text Domain: siju
*/

  html { scroll-behavior: smooth; }
  [id] { scroll-margin-top: 84px; }
  body { margin: 0; background: #CCBBA7; font-family: 'Work Sans', system-ui, sans-serif; color: #2C211D; }
  ::selection { background: #4A3830; color: #FFFFFF; }
  ::-webkit-scrollbar { width: 10px; }
  ::-webkit-scrollbar-track { background: #CCBBA7; }
  ::-webkit-scrollbar-thumb { background: #4A3830; border-radius: 999px; }
  ::-webkit-scrollbar-thumb:hover { background: #5A4337; }
  #scroll-progress { position: fixed; top: 0; left: 0; height: 3px; background: #4A3830; z-index: 60; transition: width .1s linear; }
  .to-top { position: fixed; bottom: 24px; left: 24px; z-index: 45; width: 44px; height: 44px; border-radius: 999px; background: #2C211D; border: 1px solid rgba(168,138,90,0.3); display: flex; align-items: center; justify-content: center; color: #E8DED0; transition: transform .15s ease, background .15s ease; }
  .to-top:hover { transform: translateY(-3px); background: #5A4337; }
  .faq-item { border-bottom: 1px solid #BDA991; }
  .faq-question { width: 100%; text-align: left; background: none; border: none; padding: 20px 0; font-size: 16px; font-weight: 600; color: #2C211D; display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-family: 'Work Sans', sans-serif; }
  .faq-icon { transition: transform .25s ease; flex-shrink: 0; margin-left: 16px; }
  .faq-answer { max-height: 0; overflow: hidden; transition: max-height .3s ease, padding .3s ease; }
  .faq-answer-inner { padding-bottom: 20px; font-size: 14px; line-height: 1.6; color: #5A4A3C; }
  h1, h2, h3, .display { font-family: 'Cormorant Garamond', Georgia, serif; }
  a { color: inherit; text-decoration: none; }
  .navlink { color: #5A4A3C; font-size: 14px; white-space: nowrap; transition: color .15s ease; }
  .navlink:hover { color: #4A3830; }
  .btn-primary { transition: background .15s ease, transform .1s ease, box-shadow .15s ease; }
  .btn-primary:hover { background: #5A4337 !important; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(43,27,16,0.22); }
  .btn-primary:active { transform: translateY(0) scale(.97); box-shadow: none; }
  .btn-primary[disabled] { background: #BDA991 !important; color: #8A7A5C !important; cursor: not-allowed; transform: none; box-shadow: none; }
  .btn-primary[disabled]::after { display: none; }
  .btn-outline { transition: background .15s ease, color .15s ease, transform .1s ease; }
  .btn-outline:hover { background: #4A3830 !important; color: #FFFFFF !important; transform: translateY(-1px); }
  .btn-outline:active { transform: translateY(0) scale(.97); }
  .card { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; border: 1px solid #BDA991; }
  .card:hover { transform: translateY(-6px) rotateX(2deg); box-shadow: 0 18px 34px rgba(20,17,13,0.14); border-color: #4A3830; }
  .tilt-parent { perspective: 900px; }
  .grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
  .grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
  .grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
  .nav-links { display: flex; align-items: center; gap: 16px; flex-wrap: nowrap; }
  .upload-box { border: 1.5px dashed #4A3830; border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 8px; background: #E8DED0; }
  .field-input { border: 1px solid #BDA991; border-radius: 12px; padding: 12px 14px; font-size: 14px; font-family: 'Work Sans', sans-serif; background: #F7F4EF; color: #2C211D; }
  .hero-flex { display: flex; align-items: center; justify-content: space-between; gap: 48px; }
  .hero-graphic { flex-shrink: 0; filter: drop-shadow(0 0 14px rgba(74,56,48,0.28)); }
  .floaty { animation: float 7s ease-in-out infinite; }
  .badge-ring { width: 56px; height: 56px; border-radius: 50%; border: 1.5px solid #4A3830; display: flex; align-items: center; justify-content: center; }
  .badge-ring-lg { width: 68px; height: 68px; border-radius: 50%; border: 1.5px solid #4A3830; display: flex; align-items: center; justify-content: center; }
  .sticky-day { position: sticky; top: 0; background: #E8DED0; z-index: 2; padding-bottom: 6px; }
  .social-icon { width: 38px; height: 38px; border-radius: 999px; border: 1px solid rgba(168,138,90,0.3); display: flex; align-items: center; justify-content: center; color: #E8DED0; transition: background .15s ease, color .15s ease, transform .15s ease; }
  .social-icon:hover { background: #4A3830; color: #FFFFFF; transform: translateY(-2px); }
  .footer-link { color: #C9B48C; font-size: 14px; transition: color .15s ease; }
  .footer-link:hover { color: #F7F4EF; }

  .aurora-bg {
    background-image:
      radial-gradient(circle at 18% 20%, rgba(74,56,48,0.20), transparent 46%),
      radial-gradient(circle at 82% 26%, rgba(90,67,55,0.24), transparent 52%),
      radial-gradient(circle at 50% 94%, rgba(74,56,48,0.12), transparent 50%);
    background-size: 200% 200%;
    animation: auroraShift 18s ease-in-out infinite;
  }
  @keyframes auroraShift {
    0%, 100% { background-position: 0% 0%, 100% 0%, 50% 100%; }
    50% { background-position: 30% 45%, 65% 60%, 60% 35%; }
  }

  .gradient-text {
    background-image: linear-gradient(100deg, #D9C9AE 20%, #C9B48C 40%, #A88A5A 50%, #C9B48C 60%, #D9C9AE 80%);
    background-size: 240% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shine 5s linear infinite;
  }
  @keyframes shine { to { background-position: -240% center; } }

  .ring-outer { animation: spin 50s linear infinite; transform-origin: 120px 170px; }
  .ring-inner { animation: spin 36s linear infinite reverse; transform-origin: 120px 170px; }
  .orbit1 { animation: spin 15s linear infinite; transform-origin: 120px 170px; }
  .orbit2 { animation: spin 24s linear infinite reverse; transform-origin: 120px 170px; }
  .scale-tilt { animation: tilt 4s ease-in-out infinite alternate; transform-origin: 52px 42px; }
  @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
  @keyframes tilt { from { transform: rotate(-5deg); } to { transform: rotate(5deg); } }

  .justice-draw path, .justice-draw line { stroke-dasharray: 900; stroke-dashoffset: 900; animation: draw 2.2s ease forwards; }
  .justice-draw .d1 { animation-delay: .1s; }
  .justice-draw .d2 { animation-delay: .5s; }
  .justice-draw .d3 { animation-delay: .9s; }
  .justice-draw .d4 { animation-delay: 1.2s; }
  .justice-draw .d5 { animation-delay: 1.4s; }
  .justice-draw circle { animation: fadeIn .5s ease forwards; animation-delay: 1.8s; opacity: 0; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
  @keyframes fadeIn { to { opacity: 1; } }
  @keyframes float { 0%, 100% { transform: translateY(0px); } 50% { transform: translateY(-12px); } }
  @keyframes slideInToast { from { transform: translateY(16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

  .shimmer { position: relative; overflow: hidden; }
  .shimmer::after {
    content: ''; position: absolute; top: 0; left: -150%; width: 55%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.4), transparent);
    transform: skewX(-20deg); animation: shimmerMove 3.4s ease-in-out infinite;
  }
  @keyframes shimmerMove { 0% { left: -150%; } 55% { left: 150%; } 100% { left: 150%; } }

  .marquee-wrap { overflow: hidden; width: 100%; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
  .marquee-track { display: flex; gap: 20px; width: max-content; animation: marquee 24s linear infinite; }
  .marquee-wrap:hover .marquee-track { animation-play-state: paused; }
  @keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

  .reveal { opacity: 1; }
  @supports (animation-timeline: view()) {
    .reveal { animation: revealUp linear both; animation-timeline: view(); animation-range: entry 0% cover 26%; }
  }
  @keyframes revealUp { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: translateY(0); } }

  /* SPLASH SCREEN — mazo golpeando la base */
  #splash { position: fixed; inset: 0; z-index: 999; background: #2C211D; display: flex; align-items: center; justify-content: center; animation: splashFadeOut .8s ease forwards; animation-delay: 4.2s; }
  #splash .splash-inner { display: flex; flex-direction: column; align-items: center; gap: 18px; animation: splashShake .3s ease; animation-delay: 1.15s; }
  #splash .gavel-group { transform-origin: 110px 38px; animation: gavelStrike .85s cubic-bezier(.34,1.1,.4,1) both; animation-delay: .7s; }
  #splash .impact-ring { transform-origin: 110px 132px; opacity: 0; animation: impactRing .55s ease-out forwards; animation-delay: 1.15s; }
  #splash .splash-word { opacity: 0; transform: translateY(8px); animation: splashTextIn .7s ease forwards; animation-delay: 1.9s; }
  #splash .splash-tag { opacity: 0; transform: translateY(8px); animation: splashTextIn .7s ease forwards; animation-delay: 2.1s; }
  #splash .splash-bar-track { width: 180px; height: 2px; border-radius: 2px; background: rgba(168,138,90,0.18); overflow: hidden; opacity: 0; animation: splashTextIn .5s ease forwards; animation-delay: 2.25s; }
  #splash .splash-bar-fill { height: 100%; width: 0%; background: #E8DED0; animation: splashBar 3.6s linear forwards; }
  @keyframes gavelStrike {
    0% { transform: translate(-14px, -34px) rotate(-24deg); }
    55% { transform: translate(0px, 2px) rotate(3deg); }
    72% { transform: translate(0px, -3px) rotate(-2deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
  }
  @keyframes impactRing { 0% { transform: scale(.3); opacity: .85; } 100% { transform: scale(2.4); opacity: 0; } }
  @keyframes splashShake { 0%, 100% { transform: translate(0,0); } 25% { transform: translate(-2px,1px); } 50% { transform: translate(2px,-1px); } 75% { transform: translate(-1px,1px); } }
  @keyframes splashTextIn { to { opacity: 1; transform: translateY(0); } }
  @keyframes splashBar { to { width: 100%; } }
  @keyframes splashFadeOut { 0% { opacity: 1; pointer-events: auto; } 99% { pointer-events: auto; } 100% { opacity: 0; pointer-events: none; transform: scale(1.02); } }
  @media (prefers-reduced-motion: reduce) {
    #splash, #splash * { animation-duration: .01ms !important; animation-delay: 0s !important; }
  }

  @media (max-width: 860px) {
    .grid-3 { grid-template-columns: 1fr; }
    .grid-2 { grid-template-columns: 1fr; }
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nav-links { display: none; }
    .hero-flex { flex-direction: column; }
    .hero-graphic { display: none; }
    .hero-title { font-size: 44px !important; }
    .hero-pad { padding: 48px 24px !important; }
    .section-pad { padding: 64px 24px !important; }
  }
