/**
 * BTTPeso Main Styles
 * White theme with purple CTAs, matching user's HTML designs
 */

/* ==========================================
   CSS Variables (Design Tokens from user HTML)
   ========================================== */
:root {
  --bg: #f6f7f9;
  --bg-white: #ffffff;
  --text: #111;
  --text-dark: #0f172a;
  --text-gray: #6b7280;
  --text-light: #9ca3af;
  --border: #e5e7eb;
  --border-light: #eef0f3;
  
  --purple: #7c3aed;
  --purple-hover: #6d28d9;
  --purple-light: #ede9fe;
  
  --yellow: #ffc21a;
  --yellow-dark: #f5b505;
  --star: #f4b400;
  
  --navy: #0f2034;
  --navy-dark: #0a1a35;
  --navy-light: #12233c;
  
  --blue: #1a4ea8;
  --blue-accent: #2563eb;
  --blue-mid: #1d4ed8;
  
  --green: #16a34a;
  --green-light: #22c55e;
  --red: #dc2626;
  --red-light: #e11d48;
  
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* ==========================================
   Base
   ========================================== */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Nunito', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue-mid); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5, h6 {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
  margin: 0 0 16px;
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 999;
  padding: 12px 20px;
  background: var(--purple);
  color: #fff;
}
.skip-link:focus { left: 20px; top: 20px; }

.wrap, .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================
   Top Bar (thin navy stripe)
   ========================================== */
.topbar {
  height: 8px;
  background: linear-gradient(90deg, var(--navy) 0%, var(--navy-light) 100%);
}

/* ==========================================
   Site Header / Navigation
   ========================================== */
.site-header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-logo {
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 26px;
  color: var(--navy);
  text-decoration: none;
  letter-spacing: -0.5px;
}

.site-logo span { color: var(--purple); }

.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 28px;
}

.nav-menu a {
  color: var(--text-dark);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: color 0.2s;
}

.nav-menu a:hover { color: var(--purple); }

.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-dark);
  margin: 5px 0;
}

/* ==========================================
   Hero Section (Homepage)
   ========================================== */
.hero {
  background: var(--bg-white);
  padding: 40px 30px;
  border-radius: var(--radius-lg);
  margin-top: 30px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero h1.title {
  font-size: 36px;
  margin-bottom: 16px;
  color: var(--navy);
}

.hero p {
  color: var(--text-dark);
  font-size: 15.5px;
  margin: 0 0 14px;
}

/* Category tiles */
.tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.tile {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 18px;
  text-align: center;
  transition: all 0.3s;
  box-shadow: var(--shadow);
}

.tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--purple);
}

.tile .ico {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.tile .lbl {
  font-weight: 800;
  font-size: 15px;
  color: var(--navy);
}

/* ==========================================
   BOOKMAKER LISTING CARD (Matches user's screenshot design!)
   Navy rank ribbon + stars + blue bottom bar
   ========================================== */
.bttpeso-cards-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 24px 0;
}

.bttpeso-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  display: grid;
  grid-template-columns: 80px minmax(180px, 1.2fr) minmax(140px, 1fr) minmax(200px, 1.4fr) auto;
  gap: 24px;
  align-items: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.bttpeso-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Rank ribbon - navy with white number */
.bttpeso-card-rank {
  position: relative;
}

.bttpeso-rank-ribbon {
  background: var(--navy);
  color: #fff;
  width: 48px;
  height: 62px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10px;
  font-weight: 900;
  font-size: 18px;
  font-family: 'Nunito', sans-serif;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%);
  position: absolute;
  top: -24px;
  left: -4px;
}

/* Logo area */
.bttpeso-card-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding-left: 60px;
}

.bttpeso-card-logo img {
  max-width: 140px;
  max-height: 50px;
  object-fit: contain;
}

.bttpeso-logo-text {
  font-size: 20px;
  font-weight: 900;
  color: var(--navy);
  letter-spacing: -0.5px;
}

.bttpeso-card-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-gray);
  letter-spacing: 2px;
}

/* Rating area */
.bttpeso-card-rating {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}

.bttpeso-rating {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}

.bttpeso-rating-number {
  font-weight: 800;
  font-size: 20px;
  color: var(--text);
}

.bttpeso-rating-max {
  font-size: 13px;
  color: var(--text-gray);
  font-weight: 600;
}

.bttpeso-stars {
  display: inline-flex;
  gap: 2px;
}

.bttpeso-stars .star {
  width: 18px;
  height: 18px;
}

/* Bonus area */
.bttpeso-card-bonus {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bttpeso-bonus-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-gray);
  letter-spacing: 2px;
}

.bttpeso-bonus-text {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
}

/* CTA button */
.bttpeso-card-cta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.bttpeso-btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 1.5px;
  font-size: 13px;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Nunito', sans-serif;
}

.bttpeso-btn-primary {
  background: var(--purple);
  color: #fff;
}

.bttpeso-btn-primary:hover {
  background: var(--purple-hover);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.bttpeso-btn-dark {
  background: var(--navy);
  color: #fff;
}

.bttpeso-btn-dark:hover {
  background: var(--navy-dark);
  color: #fff;
  text-decoration: none;
}

/* BLUE BAR at bottom of card (user requirement) */
.bttpeso-card-bluebar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--blue);
}

/* Section heading */
.bttpeso-section-title {
  font-size: 28px;
  font-weight: 900;
  color: var(--navy);
  margin: 48px 0 20px;
}

/* ==========================================
   Popular Bonus Section
   ========================================== */
.popular {
  margin: 48px 0;
  background: var(--bg-white);
  padding: 40px 30px;
  border-radius: var(--radius-lg);
}

.popular h2 {
  font-size: 24px;
  margin-bottom: 20px;
  color: var(--navy);
}

/* ==========================================
   Single Bookmaker / Review Page
   ========================================== */
.single-wrap {
  background: var(--bg-white);
  padding: 40px;
  border-radius: var(--radius-lg);
  margin: 30px 0;
}

.single-header {
  display: grid;
  grid-template-columns: 200px 1fr auto;
  gap: 30px;
  align-items: center;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 30px;
}

.single-header .logo-area img {
  max-width: 180px;
  max-height: 80px;
  object-fit: contain;
}

.single-header h1 {
  font-size: 32px;
  color: var(--navy);
  margin-bottom: 12px;
}

.single-meta {
  display: flex;
  gap: 16px;
  color: var(--text-gray);
  font-size: 14px;
}

/* Pros/Cons cards */
.pc {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 30px 0;
}

.pc-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--border);
}

.pc-card h4 {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 900;
}

.pc-card.pros h4 { color: var(--green); }
.pc-card.cons h4 { color: var(--red); }

.pc-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pc-card li {
  padding: 8px 0 8px 30px;
  position: relative;
  font-size: 15px;
  line-height: 1.5;
}

.pc-card.pros li::before {
  content: '+';
  position: absolute;
  left: 0;
  top: 8px;
  width: 22px;
  height: 22px;
  background: var(--green);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 14px;
}

.pc-card.cons li::before {
  content: '−';
  position: absolute;
  left: 0;
  top: 8px;
  width: 22px;
  height: 22px;
  background: var(--red);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 14px;
}

/* Bonus table */
.bonus-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.bonus-table th {
  background: var(--navy);
  color: #fff;
  padding: 14px 12px;
  font-weight: 800;
  text-align: left;
  font-size: 13px;
}

.bonus-table td {
  padding: 14px 12px;
  border-top: 1px solid var(--border);
  font-size: 14px;
}

/* Actions */
.action-buttons {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin: 30px 0;
}

/* ==========================================
   Footer
   ========================================== */
.site-footer {
  background: var(--navy);
  color: #fff;
  padding: 50px 0 30px;
  margin-top: 60px;
}

.site-footer .container {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}

.site-footer h4 {
  color: #fff;
  margin-bottom: 16px;
  font-size: 16px;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  display: block;
  padding: 4px 0;
  transition: color 0.2s;
}

.site-footer a:hover { color: #fff; }

.site-footer ul { list-style: none; margin: 0; padding: 0; }

.footer-bottom {
  max-width: 1200px;
  margin: 30px auto 0;
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
}

/* ==========================================
   Responsive
   ========================================== */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 30px 20px;
  }
  
  .hero h1.title { font-size: 28px; }
  
  .bttpeso-card {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 40px 20px 24px;
  }
  
  .bttpeso-card-logo { padding-left: 0; }
  
  .bttpeso-rank-ribbon {
    position: absolute;
    top: -1px;
    left: 20px;
  }
  
  .bttpeso-card-cta { justify-content: center; }
  
  .bttpeso-btn { width: 100%; text-align: center; }
  
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: var(--bg-white);
    flex-direction: column;
    padding: 20px;
    box-shadow: var(--shadow-lg);
    gap: 0;
  }
  
  .nav-menu.open { display: flex; }
  
  .nav-menu a {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
  }
  
  .nav-mobile-toggle { display: block; }
  
  .site-footer .container { grid-template-columns: 1fr; }
  
  .single-header { grid-template-columns: 1fr; text-align: center; }
  
  .pc { grid-template-columns: 1fr; }
  
  .tiles { grid-template-columns: 1fr 1fr; }
}

/* Blog styles */
.blog-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px;
}

.blog-post {
  background: var(--bg-white);
  padding: 30px;
  border-radius: var(--radius-lg);
  margin-bottom: 30px;
  box-shadow: var(--shadow);
}

.blog-post h2 { font-size: 24px; margin-bottom: 10px; }
.blog-post h2 a { color: var(--navy); text-decoration: none; }
.blog-post h2 a:hover { color: var(--purple); }

.post-meta-top {
  color: var(--text-gray);
  font-size: 13px;
  margin-bottom: 12px;
}

.post-thumb {
  margin-bottom: 20px;
  border-radius: var(--radius);
  overflow: hidden;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 40px 0;
}

.pagination a, .pagination span {
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-dark);
  text-decoration: none;
}

.pagination a:hover {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
}

.pagination .current {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
}

/* Error 404 */
.error-404 {
  text-align: center;
  padding: 80px 20px;
}

.error-404 h1 {
  font-size: 120px;
  color: var(--purple);
  margin: 0;
  line-height: 1;
}

.error-404 h2 {
  font-size: 28px;
  color: var(--navy);
  margin: 20px 0;
}

.error-404 p {
  color: var(--text-gray);
  font-size: 17px;
  margin-bottom: 30px;
}

/* Search form */
.search-form {
  display: flex;
  gap: 10px;
  max-width: 500px;
  margin: 0 auto 30px;
}

.search-form input[type="search"] {
  flex: 1;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
}

.search-form .search-submit {
  padding: 14px 24px;
  background: var(--purple);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-weight: 700;
  cursor: pointer;
}

.search-form .search-submit:hover {
  background: var(--purple-hover);
}
