/*
Theme Name: Teer Result Portal
Theme URI: https://example.com/teer-result-portal
Author: Your Studio
Author URI: https://example.com
Description: A fast, mobile-first, SEO-optimized WordPress theme built for publishing daily Teer results, result charts, and previous results. Includes a custom Result Management system (custom post type + taxonomy + meta fields), Customizer-driven branding, and dedicated ad zones. This theme only publishes publicly available result information; it does not process bets or wagers of any kind.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: teer-result
Tags: news, custom-post-types, custom-colors, custom-logo, custom-menu, featured-images, full-width-template, threaded-comments, translation-ready, block-styles, wide-blocks, accessibility-ready

Teer Result Portal is distributed under the terms of the GNU GPL.
*/

/* =============================================================
   TABLE OF CONTENTS
   1.0 Root Variables & Reset
   2.0 Base Typography
   3.0 Layout / Containers
   4.0 Header
   5.0 Mobile Menu
   6.0 Hero / Today's Result
   7.0 Result Cards
   8.0 Category Grid
   9.0 Result Chart Table
   10.0 Archive / Search / Filters
   11.0 SEO Content Section
   12.0 Disclaimer
   13.0 Footer
   14.0 Ad Zones
   15.0 Single Result Page
   16.0 Breadcrumbs
   17.0 Buttons & Forms
   18.0 Sidebar
   19.0 Utilities
   20.0 Responsive
   ============================================================= */

/* 1.0 Root Variables & Reset ---------------------------------- */
:root{
  --color-primary: #0b5d3b;      /* deep green */
  --color-primary-dark: #063f28;
  --color-primary-light: #e7f3ec;
  --color-accent: #d4a017;       /* gold */
  --color-accent-light: #fbf1d8;
  --color-white: #ffffff;
  --color-bg: #f6f8f7;
  --color-text: #1c2521;
  --color-text-muted: #5b6a63;
  --color-border: #e2e8e4;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(16, 40, 29, 0.06);
  --shadow-md: 0 6px 20px rgba(16, 40, 29, 0.08);
  --header-height: 64px;
  --container-width: 1180px;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img{ max-width: 100%; height: auto; display: block; }
a{ color: var(--color-primary); text-decoration: none; }
a:hover{ color: var(--color-primary-dark); }
ul{ margin: 0; padding: 0; list-style: none; }
button{ font-family: inherit; }

/* 2.0 Base Typography ------------------------------------------ */
h1, h2, h3, h4, h5, h6{
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 0.6em;
  color: var(--color-primary-dark);
}
h1{ font-size: clamp(1.7rem, 4vw, 2.4rem); }
h2{ font-size: clamp(1.35rem, 3vw, 1.85rem); }
h3{ font-size: 1.15rem; }
p{ margin: 0 0 1em; color: var(--color-text); }
.section-title{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.section-title h2{ margin: 0; }
.section-title .see-all{ font-size: 0.9rem; font-weight: 600; white-space: nowrap; }

/* 3.0 Layout ----------------------------------------------------- */
.container{
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 16px;
}
.site-main{ padding: 24px 0 48px; }
.section{ padding: 28px 0; }
.two-col{
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

/* 4.0 Header ------------------------------------------------------ */
.site-header{
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 500;
}
.header-ad-zone{ background: var(--color-primary-light); text-align: center; }
.header-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}
.site-branding{ display: flex; align-items: center; gap: 10px; }
.site-branding img.custom-logo{ max-height: 42px; width: auto; }
.site-title{
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-primary-dark);
  margin: 0;
  letter-spacing: -0.01em;
}
.site-title a{ color: inherit; }
.site-tagline{
  display: none;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin: 0;
}
.primary-nav{ display: none; }
.primary-nav ul{ display: flex; align-items: center; gap: 4px; }
.primary-nav a{
  display: inline-block;
  padding: 10px 12px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--color-text);
  border-radius: var(--radius-sm);
}
.primary-nav a:hover,
.primary-nav .current-menu-item > a{
  color: var(--color-primary);
  background: var(--color-primary-light);
}
.menu-toggle{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  cursor: pointer;
}
.menu-toggle span{
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-primary-dark);
  position: relative;
}
.menu-toggle span::before,
.menu-toggle span::after{
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: var(--color-primary-dark);
}
.menu-toggle span::before{ top: -6px; }
.menu-toggle span::after{ top: 6px; }

/* 5.0 Mobile Menu --------------------------------------------------- */
.mobile-nav{
  display: none;
  position: fixed;
  inset: 0;
  z-index: 600;
}
.mobile-nav.is-open{ display: block; }
.mobile-nav__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(6, 63, 40, 0.45);
}
.mobile-nav__panel{
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(320px, 86%);
  background: var(--color-white);
  box-shadow: var(--shadow-md);
  padding: 18px;
  overflow-y: auto;
}
.mobile-nav__close{
  margin-left: auto;
  display: block;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--color-primary-dark);
  cursor: pointer;
  padding: 6px 10px;
}
.mobile-nav ul{ margin-top: 8px; }
.mobile-nav a{
  display: block;
  padding: 12px 8px;
  font-weight: 600;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
}

/* 6.0 Hero / Today's Result ------------------------------------------ */
.hero{
  background: linear-gradient(160deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: var(--color-white);
  padding: 28px 0 34px;
}
.hero-heading{ color: var(--color-white); margin-bottom: 4px; }
.hero-date{
  font-size: 0.92rem;
  color: var(--color-accent-light);
  margin-bottom: 18px;
  font-weight: 600;
}
.hero-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.result-round-card{
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-md);
  color: var(--color-text);
  text-align: center;
}
.result-round-card .round-label{
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: var(--color-primary-light);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.result-round-card .round-number{
  font-size: clamp(2.6rem, 12vw, 3.4rem);
  font-weight: 800;
  color: var(--color-primary-dark);
  line-height: 1;
  letter-spacing: -0.02em;
}
.result-round-card .round-time{
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}
.hero-cta{
  margin-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* 7.0 Result Cards --------------------------------------------------- */
.result-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.result-card{
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.result-card:hover{ box-shadow: var(--shadow-md); transform: translateY(-2px); }
.result-card__top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.result-card__category{
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.result-card__date{ font-size: 0.8rem; color: var(--color-text-muted); }
.result-card__numbers{
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}
.result-card__num{
  flex: 1;
  text-align: center;
  background: var(--color-primary-light);
  border-radius: var(--radius-sm);
  padding: 10px 6px;
}
.result-card__num .label{
  display: block;
  font-size: 0.68rem;
  color: var(--color-text-muted);
  font-weight: 600;
  margin-bottom: 3px;
}
.result-card__num .value{
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-primary-dark);
}
.result-card__link{
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
}

/* 8.0 Category Grid ---------------------------------------------------- */
.category-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.category-card{
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 18px 14px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.category-card:hover{ box-shadow: var(--shadow-md); }
.category-card__icon{
  width: 46px;
  height: 46px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: var(--color-accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  font-weight: 800;
  font-size: 1.1rem;
}
.category-card__title{
  font-size: 0.98rem;
  margin-bottom: 4px;
  color: var(--color-primary-dark);
}
.category-card__desc{
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 0;
}

/* 9.0 Result Chart Table ------------------------------------------------ */
.table-wrap{
  overflow-x: auto;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
table.result-chart{
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
}
table.result-chart th,
table.result-chart td{
  padding: 12px 14px;
  text-align: center;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--color-border);
}
table.result-chart th{
  background: var(--color-primary);
  color: var(--color-white);
  font-weight: 700;
  position: sticky;
  top: 0;
}
table.result-chart tbody tr:nth-child(even){ background: var(--color-primary-light); }
table.result-chart td.num{ font-weight: 800; color: var(--color-primary-dark); font-size: 1rem; }

.pagination{
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.pagination a, .pagination span{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-white);
  font-size: 0.85rem;
  font-weight: 600;
}
.pagination .current{ background: var(--color-primary); color: var(--color-white); border-color: var(--color-primary); }

/* 10.0 Archive / Search / Filters ---------------------------------------- */
.archive-filters{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px;
}
.archive-filters select,
.archive-filters input[type="search"]{
  flex: 1 1 140px;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  background: var(--color-white);
}
.archive-filters button{
  flex: 0 0 auto;
}

/* 11.0 SEO Content Section ------------------------------------------------- */
.seo-content{
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 22px;
}
.seo-content h2{ margin-top: 0; }
.seo-content h3{ color: var(--color-primary); }

/* 12.0 Disclaimer ------------------------------------------------------------ */
.disclaimer-box{
  background: var(--color-accent-light);
  border: 1px solid #f0dfa8;
  border-radius: var(--radius-md);
  padding: 16px 18px;
  font-size: 0.85rem;
  color: #5c4c11;
}
.disclaimer-box strong{ color: #3f3308; }

/* 13.0 Footer ------------------------------------------------------------------ */
.site-footer{
  background: var(--color-primary-dark);
  color: #d7e6dd;
  padding: 40px 0 18px;
  margin-top: 32px;
}
.footer-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
}
.footer-col h3{
  color: var(--color-white);
  font-size: 1rem;
  margin-bottom: 12px;
}
.footer-col ul li{ margin-bottom: 8px; }
.footer-col a{ color: #bcd3c6; font-size: 0.9rem; }
.footer-col a:hover{ color: var(--color-accent); }
.footer-social{ display: flex; gap: 10px; margin-top: 10px; }
.footer-social a{
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid #2b6047;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
}
.footer-bottom{
  border-top: 1px solid #16543a;
  margin-top: 26px;
  padding-top: 16px;
  text-align: center;
  font-size: 0.8rem;
  color: #9fbaac;
}

/* 14.0 Ad Zones ------------------------------------------------------------------ */
.ad-zone{
  text-align: center;
  margin: 20px 0;
}
.ad-zone__label{
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}
.ad-zone__inner{
  display: inline-block;
  width: 100%;
  min-height: 60px;
}

/* 15.0 Single Result Page ------------------------------------------------------- */
.single-result-header{ margin-bottom: 18px; }
.single-result-meta{
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}
.single-result-numbers{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 22px;
}
.single-result-numbers .box{
  background: var(--color-primary-light);
  border-radius: var(--radius-md);
  text-align: center;
  padding: 22px 10px;
}
.single-result-numbers .box .label{
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.single-result-numbers .box .num{
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--color-primary-dark);
}
.result-nav{
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 24px 0;
  padding: 14px 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
.result-nav a{ font-weight: 700; font-size: 0.9rem; }
.related-results{ margin-top: 30px; }

/* 16.0 Breadcrumbs ----------------------------------------------------------------- */
.breadcrumbs{
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 14px;
}
.breadcrumbs a{ color: var(--color-text-muted); }
.breadcrumbs a:hover{ color: var(--color-primary); }
.breadcrumbs .sep{ margin: 0 6px; }

/* 17.0 Buttons & Forms -------------------------------------------------------------- */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary{ background: var(--color-white); color: var(--color-primary-dark); }
.btn-primary:hover{ background: var(--color-accent-light); color: var(--color-primary-dark); }
.btn-outline{
  background: transparent;
  color: var(--color-white);
  border-color: rgba(255,255,255,0.6);
}
.btn-gold{ background: var(--color-accent); color: #3f3308; }
.btn-gold:hover{ background: #c1930f; color: #221c05; }
.btn-block{ width: 100%; }

/* 18.0 Sidebar ------------------------------------------------------------------------ */
.widget{
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.widget-title{
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 2px solid var(--color-accent);
  padding-bottom: 8px;
  margin-bottom: 12px;
}

/* 19.0 Utilities ------------------------------------------------------------------------- */
.screen-reader-text{
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
.skip-link{
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-primary-dark);
  color: #fff;
  padding: 10px 16px;
  z-index: 999;
}
.skip-link:focus{ left: 10px; top: 10px; }
.text-muted{ color: var(--color-text-muted); }
.mt-0{ margin-top: 0; }
.lazy-img{ background: var(--color-primary-light); }

/* 20.0 Responsive ------------------------------------------------------------------------- */
@media (min-width: 640px){
  .hero-grid{ grid-template-columns: 1fr 1fr; }
  .result-grid{ grid-template-columns: 1fr 1fr; }
  .category-grid{ grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 861px){
  .site-tagline{ display: block; }
  .primary-nav{ display: block; }
  .menu-toggle{ display: none; }
  .two-col{ grid-template-columns: 2.2fr 1fr; align-items: start; }
  .footer-grid{ grid-template-columns: repeat(4, 1fr); }
  .category-grid{ grid-template-columns: repeat(4, 1fr); }
  .result-grid{ grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px){
  .hero-grid{ grid-template-columns: 1fr 1fr; max-width: 720px; }
}
