/*
Theme: rules-guide (worldcuprulebook.com, groupstageguide.com)
Layout: Guide steps with sticky sidebar TOC
Grid: Sidebar-main layout
Font: Inter
*/
*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}
body{font-family:'Inter',-apple-system,BlinkMacSystemFont,sans-serif;background:#f3e5f5;color:#4a148c;line-height:1.7}

/* Header: Compact guide header */
.header-guide{background:linear-gradient(135deg,#4a148c,#6a1b9a);box-shadow:0 2px 8px rgba(0,0,0,.12)}
.guide-header-inner{max-width:1200px;margin:0 auto;padding:0 24px;display:flex;align-items:center;justify-content:space-between;height:60px}
.guide-logo{display:flex;align-items:center;gap:8px;color:#fff;text-decoration:none}
.guide-icon{font-size:1.3rem}
.guide-name{font-size:1rem;font-weight:800;letter-spacing:-.3px}
.nav-guide-compact{display:flex;gap:16px}
.nav-guide-compact a{color:rgba(255,255,255,.7);font-size:.82rem;font-weight:500;padding:4px 0;transition:all .2s}
.nav-guide-compact a:hover{color:#ffab00}

/* Hero: Step-by-step guide */
.hero-rules-guide{background:linear-gradient(135deg,#6a1b9a,#ab47bc,#e1bee7);padding:50px 0;text-align:center}
.hero-guide-steps{max-width:800px;margin:0 auto;padding:0 24px}
.hero-guide-badge{display:inline-block;background:rgba(255,255,255,.2);padding:4px 16px;border-radius:20px;font-size:.78rem;color:#fff;margin-bottom:16px}
.hero-title{font-size:2.2rem;font-weight:800;color:#fff;line-height:1.2;margin-bottom:15px}
.hero-subtitle{font-size:1rem;color:rgba(255,255,255,.85);margin-bottom:24px}
.hero-step-indicators{display:flex;gap:20px;justify-content:center;margin-bottom:28px}
.step-dot{width:70px;height:70px;border-radius:50%;background:rgba(255,255,255,.15);display:flex;flex-direction:column;align-items:center;justify-content:center;font-weight:700;font-size:1.2rem;color:#fff;position:relative}
.step-dot.active{background:rgba(255,255,255,.3)}
.step-dot-label{position:absolute;bottom:-20px;font-size:.65rem;text-transform:uppercase;letter-spacing:1px;opacity:.6;white-space:nowrap}
.hero-btn{padding:10px 24px;border-radius:4px;font-weight:600;font-size:.85rem;display:inline-block;margin:6px;text-decoration:none}
.hero-btn-primary{background:#4a148c;color:#fff;border:none}
.hero-btn-primary:hover{background:#6a1b9a}
.hero-btn-outline{border:2px solid #fff;color:#fff;background:transparent}

/* Guide layout: Sidebar + main */
.guide-layout{display:grid;grid-template-columns:280px 1fr;gap:30px;max-width:1200px;margin:0 auto;padding:40px 24px}
.guide-sidebar{position:sticky;top:80px;align-self:start}
.sticky-sidebar{background:#fff;border-radius:8px;padding:20px;box-shadow:0 2px 8px rgba(0,0,0,.08)}
.sidebar-toc h3{font-size:.9rem;font-weight:700;color:#4a148c;margin-bottom:12px;padding-bottom:8px;border-bottom:2px solid #7b1fa2}
.sidebar-toc ul{list-style:none}
.sidebar-toc li{margin:8px 0}
.sidebar-toc a{font-size:.82rem;color:#7b1fa2;text-decoration:none;padding:4px 8px;display:block;border-radius:4px;transition:all .2s}
.sidebar-toc a:hover{background:#f3e5f5;color:#4a148c}
.sidebar-search{margin-top:16px;padding-top:16px;border-top:1px solid #f3e5f5}
.sidebar-search-input{width:100%;padding:8px 12px;border:2px solid #e1bee7;border-radius:6px;font-size:.82rem;outline:none}

/* Guide main content */
.guide-main h2{font-size:1.4rem;font-weight:700;color:#4a148c;margin:30px 0 16px;padding-bottom:8px;border-bottom:2px solid #7b1fa2}
.guide-main p{margin:14px 0;font-size:.92rem;line-height:1.8}
.guide-main ul{margin:12px 0;padding-left:24px}
.guide-main li{margin:6px 0}

/* Cards: Numbered step cards */
.cards-grid-steps{display:flex;flex-direction:column;gap:12px;margin-top:16px}
.step-card{background:#fff;border-radius:8px;padding:20px 20px 20px 70px;box-shadow:0 2px 8px rgba(0,0,0,.06);position:relative;transition:box-shadow .2s}
.step-card:hover{box-shadow:0 4px 16px rgba(0,0,0,.1)}
.step-number{position:absolute;left:16px;top:20px;width:36px;height:36px;background:#4a148c;color:#fff;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:1rem}
.step-card h3{font-size:1rem;font-weight:700;color:#4a148c;margin-bottom:6px}
.step-card p{font-size:.85rem;color:#666;margin:0}
.step-link{display:inline-block;margin-top:8px;font-size:.8rem;color:#7b1fa2;font-weight:600}

/* Rules table */
.rules-table{width:100%;border-collapse:collapse;margin:16px 0;border-radius:6px;overflow:hidden;background:#fff;box-shadow:0 1px 4px rgba(0,0,0,.06)}
.rules-table th{background:#4a148c;color:#fff;padding:12px;text-align:left;font-size:.85rem}
.rules-table td{padding:10px 12px;border-bottom:1px solid #f3e5f5;font-size:.85rem}

/* Examples */
.example-cards{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.example-item{background:#fff;border-radius:8px;padding:20px;box-shadow:0 1px 4px rgba(0,0,0,.06)}
.example-item h4{font-size:.9rem;color:#4a148c;margin-bottom:8px}
.example-item p{font-size:.85rem;color:#666;margin:0}

/* Footer */
.footer-guide-detailed{background:linear-gradient(135deg,#4a148c,#6a1b9a);padding:40px 0;color:rgba(255,255,255,.7)}
.guide-footer-grid{display:grid;grid-template-columns:2fr 1fr 1fr;gap:30px;max-width:1200px;margin:0 auto;padding:0 24px}
.guide-footer-col h4{font-size:.9rem;font-weight:700;color:#ffab00;margin-bottom:12px}
.guide-footer-col a{display:block;color:rgba(255,255,255,.6);margin:5px 0;font-size:.8rem}
.guide-footer-col p{font-size:.82rem;line-height:1.6}
.guide-footer-legal{text-align:center;font-size:.78rem;max-width:1200px;margin:20px auto 0;padding:16px 24px 0;border-top:1px solid rgba(255,255,255,.1);line-height:1.6}

@media(max-width:768px){
  .guide-header-inner{flex-direction:column;height:auto;padding:12px 16px;gap:8px}
  .nav-guide-compact{flex-wrap:wrap;justify-content:center}
  .hero-step-indicators{flex-wrap:wrap;gap:12px}
  .step-dot{width:50px;height:50px;font-size:.9rem}
  .guide-layout{grid-template-columns:1fr}
  .guide-sidebar{position:static}
  .example-cards{grid-template-columns:1fr}
  .guide-footer-grid{grid-template-columns:1fr}
}

/* ===== Content section styles - rules-guide ===== */
section:not([class*="hero"]){padding:36px 0;border-bottom:1px solid rgba(74,20,140,.06)}
section:not([class*="hero"]):last-child{border-bottom:none}
section:not([class*="hero"]) .wrap{max-width:1200px;margin:0 auto;padding:0 24px}
section:not([class*="hero"]) h2{font-size:1.5rem;font-weight:700;color:#4a148c;margin-bottom:16px;padding-bottom:10px;border-bottom:3px solid #e1bee7}
section:not([class*="hero"]) h3{font-size:1.15rem;font-weight:700;color:#6a1b9a;margin-bottom:10px}
section:not([class*="hero"]) p{font-size:.92rem;color:#555;line-height:1.8;margin-bottom:14px}
section:not([class*="hero"]) ul{list-style:none;display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:10px;margin:14px 0}
section:not([class*="hero"]) li{background:#fff;border-radius:8px;padding:14px 18px;box-shadow:0 2px 6px rgba(0,0,0,.06);font-size:.88rem;color:#4a148c;transition:all .25s;border-left:3px solid #ab47bc}
section:not([class*="hero"]) li:hover{box-shadow:0 4px 14px rgba(0,0,0,.1);transform:translateY(-2px);border-left-color:#ffab00}
section:not([class*="hero"]) li a{color:#6a1b9a;font-weight:600;text-decoration:none}
section:not([class*="hero"]) li a:hover{color:#4a148c;text-decoration:underline}
section:not([class*="hero"]) a{color:#7b1fa2;font-weight:500;text-decoration:none}
section:not([class*="hero"]) a:hover{color:#4a148c;text-decoration:underline}
section:not([class*="hero"]) table{width:100%;border-collapse:collapse;margin:16px 0;background:#fff;border-radius:8px;overflow:hidden;box-shadow:0 2px 6px rgba(0,0,0,.06)}
section:not([class*="hero"]) th{background:#4a148c;color:#fff;padding:12px 14px;text-align:left;font-size:.85rem;font-weight:600}
section:not([class*="hero"]) td{padding:10px 14px;border-bottom:1px solid #e1bee7;font-size:.85rem;color:#4a148c}
section:not([class*="hero"]) tr:last-child td{border-bottom:none}
@media(max-width:768px){
  section:not([class*="hero"]) ul{grid-template-columns:1fr}
  section:not([class*="hero"]){padding:24px 0}
}
/* ============================================
   ENHANCEMENTS - rules-guide beautification
   Guide theme refinements, step cards, sidebar,
   typography, interactions, responsive
   ============================================ */
body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;scroll-behavior:smooth}
::selection{background:#4a148c;color:#fff}

/* Header refinements */
.header-guide{position:sticky;top:0;z-index:100}
.guide-name{letter-spacing:-.3px}
.nav-guide-compact a{position:relative;letter-spacing:.3px}
.nav-guide-compact a::after{content:'';position:absolute;bottom:0;left:0;width:0;height:2px;background:#ffab00;transition:width .25s}
.nav-guide-compact a:hover::after{width:100%}

/* Hero refinements */
.hero-rules-guide{position:relative;overflow:hidden}
.hero-rules-guide::before{content:'';position:absolute;top:-30%;right:-20%;width:400px;height:400px;background:radial-gradient(circle,rgba(255,171,0,.08),transparent);border-radius:50%}
.hero-title{letter-spacing:-.5px;text-shadow:0 2px 8px rgba(0,0,0,.15)}
.hero-guide-badge{backdrop-filter:blur(4px);border:1px solid rgba(255,255,255,.15)}
.step-dot{transition:all .3s;cursor:pointer;border:2px solid transparent}
.step-dot:hover{transform:scale(1.1);border-color:rgba(255,255,255,.3)}
.step-dot.active{background:rgba(255,255,255,.3);border-color:#ffab00;box-shadow:0 0 20px rgba(255,171,0,.2)}
.hero-btn{letter-spacing:.3px;transition:all .25s}
.hero-btn-primary:hover{transform:translateY(-2px);box-shadow:0 4px 16px rgba(74,20,140,.3)}

/* Sidebar refinements */
.sticky-sidebar{border-radius:10px;transition:box-shadow .3s;border:1px solid #e1bee7}
.sticky-sidebar:hover{box-shadow:0 4px 20px rgba(74,20,140,.1)}
.sidebar-toc h3{position:relative;padding-left:14px}
.sidebar-toc h3::before{content:'';position:absolute;left:0;top:2px;bottom:2px;width:3px;background:#ffab00;border-radius:2px}
.sidebar-toc a{font-weight:500;transition:all .2s}
.sidebar-toc a:hover{padding-left:12px}
.sidebar-search-input{transition:all .3s}
.sidebar-search-input:focus{border-color:#7b1fa2;box-shadow:0 0 0 3px rgba(74,20,140,.1)}

/* Step card refinements */
.step-card{border-radius:10px;transition:all .3s;border:1px solid #e1bee7}
.step-card:hover{transform:translateX(4px);box-shadow:0 6px 24px rgba(74,20,140,.1);border-color:#7b1fa2}
.step-number{box-shadow:0 2px 8px rgba(74,20,140,.2);transition:all .3s}
.step-card:hover .step-number{transform:scale(1.1);background:#ffab00;color:#4a148c}
.step-card h3{letter-spacing:-.2px}
.step-link{transition:all .2s;position:relative}
.step-link::after{content:'→';margin-left:4px;transition:margin-left .2s}
.step-link:hover::after{margin-left:8px}

/* Rules table refinements */
.rules-table{border-radius:10px;overflow:hidden;box-shadow:0 2px 10px rgba(0,0,0,.08)}
.rules-table th{letter-spacing:.5px;text-transform:uppercase;font-size:.8rem}
.rules-table td{transition:background .2s}
.rules-table tr:hover td{background:#f3e5f5}

/* Example card refinements */
.example-item{border-radius:10px;transition:all .3s;border:1px solid #e1bee7}
.example-item:hover{transform:translateY(-3px);box-shadow:0 6px 20px rgba(74,20,140,.1);border-color:#7b1fa2}

/* Guide main content refinements */
.guide-main h2{position:relative;margin-top:36px}
.guide-main h2::after{content:'';display:block;width:40px;height:3px;background:#ffab00;border-radius:2px;margin-top:6px}
.guide-main p{color:#444;font-size:.93rem}
.guide-main li{line-height:1.7}

/* Footer refinements */
.footer-guide-detailed{position:relative}
.footer-guide-detailed::before{content:'';position:absolute;top:0;left:0;right:0;height:3px;background:linear-gradient(90deg,#4a148c,#ffab00,#4a148c)}
.guide-footer-col a{transition:all .2s}
.guide-footer-col a:hover{color:#ffab00!important;padding-left:4px}

/* Responsive refinements */
@media(max-width:768px){
  .hero-rules-guide{padding:36px 0}
  .hero-title{font-size:1.5rem}
  .hero-subtitle{font-size:.9rem}
  .step-dot{width:50px;height:50px;font-size:.9rem}
  .step-dot-label{font-size:.55rem}
  .guide-layout{padding:24px 16px;gap:20px}
  .guide-main{padding:0}
  .step-card{padding:16px 16px 16px 56px}
  .step-number{width:30px;height:30px;font-size:.85rem;left:12px;top:16px}
  .example-cards{gap:12px}
  .guide-footer-grid{padding:0 16px}
}
@media(max-width:480px){
  .hero-title{font-size:1.2rem}
  .hero-step-indicators{gap:8px}
  .step-dot{width:40px;height:40px;font-size:.8rem}
  .step-card{padding:14px 14px 14px 48px}
  .step-number{width:26px;height:26px;font-size:.75rem;left:10px;top:14px}
}
