/*
 Theme Name:   TenisRanking Child
 Theme URI:    https://tenisranking.com
 Description:  Child theme de Hello Elementor - CSS consolidado completo
 Author:       TenisRanking
 Template:     hello-elementor
 Version:      2.4.0
 Text Domain:  tenisranking-child
*/

    :root {
      --bg:        #1A1A2E;
      --bg2:       #121220;
      --bg3:       #0e0e1a;
      --lime:      #C8E04A;
      --lime-dark: #A8C030;
      --navy:      #2a2a4a;
      --navy2:     #232340;
      --text:      #e8e8f0;
      --muted:     #7878a0;
      --border:    rgba(200,224,74,0.15);
    }

    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    html { scroll-behavior: smooth; }

    body {
      background: var(--bg);
      color: var(--text);
      font-family: 'Barlow', sans-serif;
      font-size: 16px;
      line-height: 1.6;
      overflow-x: hidden;
    }

    /* ─── NOISE TEXTURE OVERLAY ─── */
    body::before {
      content: '';
      position: fixed;
      inset: 0;
      background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
      pointer-events: none;
      z-index: 0;
      opacity: 0.5;
    }

    /* ─── NAV ─── */
    .nav {
      position: sticky;
      top: 0;
      z-index: 100;
      background: rgba(18, 18, 32, 0.92);
      backdrop-filter: blur(18px);
      -webkit-backdrop-filter: blur(18px);
      border-bottom: 1px solid var(--border);
    }

    .nav-inner {
      max-width: 1280px;
      margin: 0 auto;
      padding: 0 24px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      height: 68px;
      gap: 16px;
    }

    .nav-logo {
      display: flex;
      align-items: center;
      gap: 0;
      text-decoration: none;
      flex-shrink: 0;
    }
    .nav-logo svg {
      height: 44px;
      width: auto;
    }
    /* Adapt logo colors for nav (dark to light versions) */
    .nav-logo svg text:first-of-type { fill: var(--text) !important; }
    .nav-logo svg ellipse,
    .nav-logo svg line,
    .nav-logo svg rect:first-of-type { stroke: var(--text) !important; }
    .nav-logo svg rect:first-of-type { fill: var(--text) !important; stroke: none !important; }

    .nav-menu {
      display: flex;
      align-items: center;
      gap: 4px;
      list-style: none;
    }

    .nav-menu a {
      display: block;
      padding: 8px 14px;
      color: var(--muted);
      text-decoration: none;
      font-family: 'Barlow Condensed', sans-serif;
      font-size: 14px;
      font-weight: 600;
      letter-spacing: 1px;
      text-transform: uppercase;
      border-radius: 6px;
      transition: color .2s, background .2s;
    }
    .nav-menu a:hover,
    .nav-menu a.active {
      color: var(--lime);
      background: rgba(200,224,74,0.08);
    }

    .nav-live-badge {
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 6px 14px;
      background: rgba(200,224,74,0.12);
      border: 1px solid rgba(200,224,74,0.35);
      border-radius: 20px;
      color: var(--lime);
      font-family: 'Barlow Condensed', sans-serif;
      font-size: 13px;
      font-weight: 700;
      letter-spacing: 1px;
      text-transform: uppercase;
      text-decoration: none;
      flex-shrink: 0;
    }
    .nav-live-badge::before {
      content: '';
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: var(--lime);
      animation: pulse 1.6s ease-in-out infinite;
    }

    /* Hamburger */
    .nav-toggle {
      display: none;
      flex-direction: column;
      gap: 5px;
      background: none;
      border: none;
      cursor: pointer;
      padding: 4px;
    }
    .nav-toggle span {
      display: block;
      width: 24px;
      height: 2px;
      background: var(--lime);
      border-radius: 2px;
      transition: transform .3s, opacity .3s;
    }

    /* ─── HERO ─── */
    .hero {
      position: relative;
      min-height: 88vh;
      display: flex;
      align-items: center;
      overflow: hidden;
      padding: 80px 24px 60px;
    }

    /* Decorative court lines */
    .hero-court {
      position: absolute;
      inset: 0;
      overflow: hidden;
      pointer-events: none;
    }
    .hero-court::before {
      content: '';
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: 900px;
      height: 500px;
      border: 1px solid rgba(200,224,74,0.06);
      border-radius: 4px;
    }
    .hero-court::after {
      content: '';
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: 2px;
      height: 500px;
      background: rgba(200,224,74,0.05);
    }

    /* Glow orbs */
    .hero-orb {
      position: absolute;
      border-radius: 50%;
      filter: blur(80px);
      pointer-events: none;
    }
    .hero-orb-1 {
      width: 500px;
      height: 500px;
      top: -100px;
      right: -100px;
      background: radial-gradient(circle, rgba(200,224,74,0.12), transparent 70%);
    }
    .hero-orb-2 {
      width: 400px;
      height: 400px;
      bottom: -100px;
      left: 10%;
      background: radial-gradient(circle, rgba(26,26,100,0.5), transparent 70%);
    }

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

    .hero-content {}

    .hero-eyebrow {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      font-family: 'Barlow Condensed', sans-serif;
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 3px;
      text-transform: uppercase;
      color: var(--lime);
      margin-bottom: 24px;
    }
    .hero-eyebrow::before {
      content: '';
      width: 24px;
      height: 2px;
      background: var(--lime);
    }

    .hero-title {
      font-family: 'Barlow Condensed', sans-serif;
      font-size: clamp(52px, 7vw, 96px);
      font-weight: 900;
      line-height: 0.9;
      letter-spacing: -1px;
      text-transform: uppercase;
      margin-bottom: 28px;
    }
    .hero-title em {
      font-style: normal;
      color: var(--lime);
      display: block;
    }

    .hero-desc {
      font-size: 17px;
      font-weight: 300;
      color: var(--muted);
      max-width: 440px;
      margin-bottom: 40px;
      line-height: 1.7;
    }

    .hero-actions {
      display: flex;
      gap: 16px;
      flex-wrap: wrap;
    }

    .btn-primary {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      padding: 14px 28px;
      background: var(--lime);
      color: var(--bg3);
      font-family: 'Barlow Condensed', sans-serif;
      font-size: 15px;
      font-weight: 700;
      letter-spacing: 1.5px;
      text-transform: uppercase;
      text-decoration: none;
      border-radius: 8px;
      transition: background .2s, transform .2s;
    }
    .btn-primary:hover {
      background: var(--lime-dark);
      transform: translateY(-2px);
    }

    .btn-secondary {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      padding: 14px 28px;
      background: transparent;
      color: var(--text);
      font-family: 'Barlow Condensed', sans-serif;
      font-size: 15px;
      font-weight: 600;
      letter-spacing: 1.5px;
      text-transform: uppercase;
      text-decoration: none;
      border: 1px solid rgba(232,232,240,0.2);
      border-radius: 8px;
      transition: border-color .2s, color .2s, transform .2s;
    }
    .btn-secondary:hover {
      border-color: var(--lime);
      color: var(--lime);
      transform: translateY(-2px);
    }

    /* Stats strip */
    .hero-stats {
      display: flex;
      gap: 32px;
      margin-top: 48px;
      padding-top: 32px;
      border-top: 1px solid var(--border);
    }
    .hero-stat-item {}
    .hero-stat-num {
      font-family: 'Barlow Condensed', sans-serif;
      font-size: 36px;
      font-weight: 900;
      color: var(--lime);
      line-height: 1;
    }
    .hero-stat-label {
      font-size: 12px;
      color: var(--muted);
      letter-spacing: 1px;
      text-transform: uppercase;
      margin-top: 4px;
    }

    /* Hero right: preview card */
    .hero-card {
      background: rgba(255,255,255,0.03);
      border: 1px solid var(--border);
      border-radius: 16px;
      overflow: hidden;
      backdrop-filter: blur(10px);
    }
    .hero-card-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 18px 24px;
      border-bottom: 1px solid var(--border);
      background: rgba(200,224,74,0.04);
    }
    .hero-card-title {
      font-family: 'Barlow Condensed', sans-serif;
      font-size: 13px;
      font-weight: 700;
      letter-spacing: 2px;
      text-transform: uppercase;
      color: var(--lime);
    }
    .hero-card-live {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 1px;
      color: var(--lime);
      text-transform: uppercase;
    }
    .hero-card-live::before {
      content: '';
      width: 6px; height: 6px;
      border-radius: 50%;
      background: var(--lime);
      animation: pulse 1.6s ease-in-out infinite;
    }
    .hero-card-body {
      padding: 8px 0;
    }
    .hero-card-row {
      display: grid;
      grid-template-columns: 40px 32px 1fr 80px;
      align-items: center;
      gap: 12px;
      padding: 12px 24px;
      border-bottom: 1px solid rgba(255,255,255,0.04);
      transition: background .15s;
      font-size: 14px;
    }
    .hero-card-row:last-child { border-bottom: none; }
    .hero-card-row:hover { background: rgba(200,224,74,0.04); }
    .rank-num {
      font-family: 'Barlow Condensed', sans-serif;
      font-size: 18px;
      font-weight: 700;
      color: var(--muted);
      text-align: center;
    }
    .rank-num.top1 { color: var(--lime); }
    .rank-flag { font-size: 20px; text-align: center; }
    .rank-name { font-weight: 500; color: var(--text); }
    .rank-pts {
      font-family: 'Barlow Condensed', sans-serif;
      font-weight: 700;
      font-size: 15px;
      color: var(--lime-dark);
      text-align: right;
    }
    .hero-card-footer {
      padding: 14px 24px;
      text-align: center;
      border-top: 1px solid var(--border);
    }
    .hero-card-footer a {
      font-family: 'Barlow Condensed', sans-serif;
      font-size: 13px;
      font-weight: 700;
      letter-spacing: 1.5px;
      text-transform: uppercase;
      color: var(--lime);
      text-decoration: none;
    }
    .hero-card-footer a:hover { color: var(--lime-dark); }

    /* ─── SECTION COMMON ─── */
    .section {
      position: relative;
      z-index: 1;
      padding: 80px 24px;
    }
    .section-inner {
      max-width: 1280px;
      margin: 0 auto;
    }
    .section-label {
      font-family: 'Barlow Condensed', sans-serif;
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 3px;
      text-transform: uppercase;
      color: var(--lime);
      margin-bottom: 12px;
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .section-label::after {
      content: '';
      flex: 1;
      height: 1px;
      background: var(--border);
      max-width: 60px;
    }
    .section-title {
      font-family: 'Barlow Condensed', sans-serif;
      font-size: clamp(36px, 4vw, 56px);
      font-weight: 900;
      text-transform: uppercase;
      line-height: 1;
      letter-spacing: -0.5px;
      margin-bottom: 48px;
    }

    /* ─── RANKING SECTION ─── */
    .ranking-section {
      background: var(--bg2);
    }
    .ranking-section-inner {
      max-width: 1280px;
      margin: 0 auto;
    }
    .ranking-header {
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      gap: 24px;
      margin-bottom: 40px;
      flex-wrap: wrap;
    }

    /* Shortcode placeholder style – replaces [tst_ranking_atp_live] output */
    .shortcode-area {
      background: rgba(255,255,255,0.02);
      border: 1px solid var(--border);
      border-radius: 12px;
      overflow: hidden;
    }
    .shortcode-inner {
      padding: 32px;
      text-align: center;
      color: var(--muted);
      font-size: 14px;
    }
    /* This div would actually contain the WordPress shortcode output: */
    .shortcode-wp {
      /* WordPress renders [tst_ranking_atp_live] here */
      min-height: 200px;
    }

    /* ─── SECCIONES GRID ─── */
    .sections-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 24px;
    }
    .section-card {
      background: rgba(255,255,255,0.02);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 32px 28px;
      text-decoration: none;
      color: var(--text);
      display: flex;
      flex-direction: column;
      gap: 16px;
      transition: border-color .2s, background .2s, transform .2s;
      position: relative;
      overflow: hidden;
    }
    .section-card::before {
      content: '';
      position: absolute;
      top: 0; left: 0; right: 0;
      height: 3px;
      background: var(--lime);
      transform: scaleX(0);
      transform-origin: left;
      transition: transform .3s;
    }
    .section-card:hover {
      border-color: rgba(200,224,74,0.3);
      background: rgba(200,224,74,0.04);
      transform: translateY(-4px);
    }
    .section-card:hover::before { transform: scaleX(1); }

    .card-icon {
      font-size: 36px;
      line-height: 1;
    }
    .card-title {
      font-family: 'Barlow Condensed', sans-serif;
      font-size: 22px;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }
    .card-desc {
      font-size: 14px;
      color: var(--muted);
      line-height: 1.6;
      flex: 1;
    }
    .card-arrow {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-family: 'Barlow Condensed', sans-serif;
      font-size: 13px;
      font-weight: 700;
      letter-spacing: 1.5px;
      text-transform: uppercase;
      color: var(--lime);
      margin-top: 8px;
    }

    /* ─── TORNEOS SECTION ─── */
    .torneos-section { background: var(--bg3); }
    .torneos-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 16px;
    }
    .torneo-card {
      background: rgba(255,255,255,0.02);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 24px 20px;
      text-align: center;
      text-decoration: none;
      color: var(--text);
      transition: border-color .2s, background .2s, transform .2s;
    }
    .torneo-card:hover {
      border-color: rgba(200,224,74,0.3);
      background: rgba(200,224,74,0.04);
      transform: translateY(-3px);
    }
    .torneo-surface {
      display: inline-block;
      padding: 4px 12px;
      border-radius: 20px;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 1px;
      text-transform: uppercase;
      margin-bottom: 14px;
      font-family: 'Barlow Condensed', sans-serif;
    }
    .surface-clay { background: rgba(195,90,50,0.2); color: #c35a32; }
    .surface-hard { background: rgba(50,100,195,0.2); color: #3264c3; }
    .surface-grass { background: rgba(60,160,80,0.2); color: #3ca050; }
    .torneo-name {
      font-family: 'Barlow Condensed', sans-serif;
      font-size: 18px;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      margin-bottom: 6px;
    }
    .torneo-date {
      font-size: 12px;
      color: var(--muted);
      letter-spacing: 0.5px;
    }

    /* ─── CTA STRIP ─── */
    .cta-section {
      background: linear-gradient(135deg, rgba(200,224,74,0.1) 0%, rgba(26,26,46,0) 100%);
      border-top: 1px solid var(--border);
      border-bottom: 1px solid var(--border);
      padding: 64px 24px;
    }
    .cta-inner {
      max-width: 700px;
      margin: 0 auto;
      text-align: center;
    }
    .cta-title {
      font-family: 'Barlow Condensed', sans-serif;
      font-size: clamp(36px, 5vw, 60px);
      font-weight: 900;
      text-transform: uppercase;
      line-height: 0.95;
      margin-bottom: 20px;
    }
    .cta-title em { font-style: normal; color: var(--lime); }
    .cta-desc {
      font-size: 16px;
      color: var(--muted);
      margin-bottom: 36px;
    }

    /* ─── FOOTER ─── */
    .footer {
      background: var(--bg3);
      border-top: 1px solid var(--border);
      padding: 56px 24px 32px;
    }
    .footer-inner {
      max-width: 1280px;
      margin: 0 auto;
    }
    .footer-top {
      display: grid;
      grid-template-columns: 2fr 1fr 1fr 1fr;
      gap: 48px;
      margin-bottom: 48px;
    }
    .footer-brand-desc {
      font-size: 14px;
      color: var(--muted);
      line-height: 1.7;
      margin-top: 16px;
      max-width: 280px;
    }
    .footer-col-title {
      font-family: 'Barlow Condensed', sans-serif;
      font-size: 13px;
      font-weight: 700;
      letter-spacing: 2px;
      text-transform: uppercase;
      color: var(--lime);
      margin-bottom: 16px;
    }
    .footer-links {
      list-style: none;
      display: flex;
      flex-direction: column;
      gap: 10px;
    }
    .footer-links a {
      font-size: 14px;
      color: var(--muted);
      text-decoration: none;
      transition: color .2s;
    }
    .footer-links a:hover { color: var(--lime); }
    .footer-bottom {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding-top: 24px;
      border-top: 1px solid var(--border);
      flex-wrap: wrap;
      gap: 12px;
    }
    .footer-copy {
      font-size: 13px;
      color: var(--muted);
    }
    .footer-tours {
      display: flex;
      gap: 8px;
    }
    .footer-tour-tag {
      padding: 4px 10px;
      border: 1px solid var(--border);
      border-radius: 4px;
      font-family: 'Barlow Condensed', sans-serif;
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 1px;
      text-transform: uppercase;
      color: var(--muted);
    }

    /* ─── ANIMATIONS ─── */
    @keyframes pulse {
      0%, 100% { opacity: 1; transform: scale(1); }
      50%       { opacity: 0.5; transform: scale(0.85); }
    }

    @keyframes fadeUp {
      from { opacity: 0; transform: translateY(24px); }
      to   { opacity: 1; transform: translateY(0); }
    }

    .animate-up { animation: fadeUp .6s ease forwards; }
    .delay-1 { animation-delay: .1s; opacity: 0; }
    .delay-2 { animation-delay: .2s; opacity: 0; }
    .delay-3 { animation-delay: .35s; opacity: 0; }
    .delay-4 { animation-delay: .5s; opacity: 0; }

    /* ─── MOBILE ─── */
    @media (max-width: 900px) {
      .nav-menu { display: none; flex-direction: column; position: absolute; top: 68px; left: 0; right: 0; background: var(--bg2); border-bottom: 1px solid var(--border); padding: 16px; gap: 4px; }
      .nav-menu.open { display: flex; }
      .nav-toggle { display: flex; }
      .nav-live-badge { display: none; }

      .hero-inner { grid-template-columns: 1fr; }
      .hero-card { display: none; }
      .hero-stats { gap: 20px; }
      .hero { min-height: auto; }

      .sections-grid { grid-template-columns: 1fr 1fr; }
      .torneos-grid { grid-template-columns: 1fr 1fr; }
      .footer-top { grid-template-columns: 1fr 1fr; }
    }

    @media (max-width: 600px) {
      .sections-grid { grid-template-columns: 1fr; }
      .torneos-grid { grid-template-columns: 1fr; }
      .footer-top { grid-template-columns: 1fr; gap: 28px; }
      .hero-stats { flex-wrap: wrap; }
      .hero-actions { flex-direction: column; }
      .hero-actions a { justify-content: center; }
    }
  
/* ═══════════════════════════════════════
   MENU MOBILE - ESTILOS ADICIONALES
═══════════════════════════════════════ */
@media (max-width: 768px) {
  .tr-nav-menu {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: rgba(18,18,32,0.98);
    flex-direction: column;
    padding: 20px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    max-height: calc(100vh - 68px);
    overflow-y: auto;
  }
  
  .tr-nav-menu.open {
    transform: translateX(0);
  }
  
  .tr-nav-toggle {
    display: flex !important;
  }
  
  .tr-nav-menu li {
    width: 100%;
    margin: 8px 0;
  }
  
  .tr-nav-menu a {
    display: block;
    width: 100%;
    padding: 12px 16px;
  }
}

/* Force CSS application */
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Asegurar que los estilos se apliquen */
body.tr-home {
  background: #1A1A2E !important;
  color: #e8e8f0 !important;
}
