:root {
  --snow: #F6F7F5;
  --maple-red: #B72F3A;
  --lake-blue: #1B6CA8;
  --cactus-green: #4F7C59;
  --warm-gold: #D7A639;
  --charcoal: #23313A;
  --white: #FFFFFF;
  --card-shadow: 6px 6px 0px var(--charcoal);
  --btn-shadow: 4px 4px 0px var(--charcoal);
}

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

body {
  font-family: 'Comic Sans MS', 'Chalkboard SE', 'Trebuchet MS', sans-serif;
  background-color: var(--snow);
  color: var(--charcoal);
  line-height: 1.6;
  padding-bottom: 0;
}

/* CARTOON ELEMENTS & ESSENTIALS */
h1, h2, h3, h4, h5, h6 {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.5px;
}

a {
  color: var(--lake-blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* NAVIGATION */
.nav-header {
  background-color: var(--warm-gold);
  border-bottom: 6px solid var(--charcoal);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 45px;
  height: 45px;
  background-color: var(--maple-red);
  border: 3px solid var(--charcoal);
  border-radius: 50%;
  box-shadow: 2px 2px 0 var(--charcoal);
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-link {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--charcoal);
  text-decoration: none;
  text-shadow: 2px 2px 0px var(--white);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.nav-link {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--charcoal);
  padding: 0.5rem 1rem;
  border: 3px solid transparent;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.nav-link:hover, .nav-link.active {
  background-color: var(--white);
  border-color: var(--charcoal);
  box-shadow: var(--btn-shadow);
  transform: translate(-2px, -2px);
  text-decoration: none;
}

.menu-toggle {
  display: none;
  background: var(--white);
  border: 3px solid var(--charcoal);
  border-radius: 8px;
  padding: 0.5rem;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--charcoal);
}

.menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--charcoal);
  margin: 4px 0;
  transition: 0.3s;
}

/* TRIPTYCH HERO GRID */
.triptych-hero {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  min-height: 80vh;
  border-bottom: 6px solid var(--charcoal);
}

.triptych-panel {
  position: relative;
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.3s ease, z-index 0.3s ease;
  z-index: 1;
}

.triptych-panel::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  pointer-events: none;
  border-right: 4px solid var(--charcoal);
}

.triptych-panel:last-child::after {
  border-right: none;
}

/* COOL GRID LINES (CANADA) */
.panel-canada {
  background-color: var(--snow);
  background-image: linear-gradient(rgba(183, 47, 58, 0.08) 2px, transparent 2px),
                    linear-gradient(90deg, rgba(183, 47, 58, 0.08) 2px, transparent 2px);
  background-size: 24px 24px;
}

/* WARM PAPER BLOCKS (MEXICO) */
.panel-mexico {
  background-color: #FCF9F2;
  background-image: radial-gradient(var(--cactus-green) 12%, transparent 12%);
  background-size: 20px 20px;
}

/* USA FIELD STRIPES (USA) */
.panel-usa {
  background-color: #F0F5FB;
  background-image: repeating-linear-gradient(90deg, transparent, transparent 35px, rgba(27, 108, 168, 0.06) 35px, rgba(27, 108, 168, 0.06) 70px);
}

/* HOVER EFFECT FOR TRIPTYCH */
.triptych-panel:hover {
  transform: scale(1.02);
  z-index: 5;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.panel-header {
  text-align: center;
}

.badge-art {
  width: 90px;
  height: 90px;
  margin: 0 auto 1.5rem auto;
  border-radius: 50%;
  border: 4px solid var(--charcoal);
  box-shadow: var(--btn-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
}

.badge-canada { background-color: var(--maple-red); }
.badge-mexico { background-color: var(--cactus-green); }
.badge-usa { background-color: var(--lake-blue); }

.country-title {
  font-size: 3rem;
  color: var(--charcoal);
  text-shadow: 3px 3px 0px var(--white);
  margin-bottom: 0.5rem;
}

.group-tag {
  display: inline-block;
  background-color: var(--charcoal);
  color: var(--white);
  padding: 0.3rem 1.2rem;
  border-radius: 20px;
  font-weight: bold;
  font-size: 1.1rem;
}

.panel-body {
  margin: 2rem 0;
}

.panel-footer {
  text-align: center;
}

/* CARTOON BUTTONS */
.btn-cartoon {
  display: inline-block;
  padding: 1rem 2rem;
  font-size: 1.2rem;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--charcoal);
  background-color: var(--warm-gold);
  border: 3px solid var(--charcoal);
  border-radius: 16px;
  box-shadow: var(--btn-shadow);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-cartoon:hover {
  transform: translate(-3px, -3px);
  box-shadow: 7px 7px 0px var(--charcoal);
  text-decoration: none;
  background-color: var(--white);
}

.btn-cartoon:active {
  transform: translate(0px, 0px);
  box-shadow: 2px 2px 0px var(--charcoal);
}

.btn-canada { background-color: #FFC0C5; }
.btn-mexico { background-color: #B2DFB6; }
.btn-usa { background-color: #AED8F2; }

/* COMPACT HOST CAMPAIGN LEDGER */
.ledger-box {
  background: var(--white);
  border: 4px solid var(--charcoal);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  margin-bottom: 1.5rem;
}

.ledger-box h3 {
  font-size: 1.4rem;
  border-bottom: 4px dashed var(--charcoal);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  color: var(--charcoal);
}

.ledger-list {
  list-style: none;
}

.ledger-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.75rem 0;
  border-bottom: 2px solid #E5E5E5;
}

.ledger-item:last-child {
  border-bottom: none;
}

.status-badge {
  font-size: 0.85rem;
  font-weight: 900;
  padding: 0.25rem 0.6rem;
  border: 2px solid var(--charcoal);
  border-radius: 8px;
  text-transform: uppercase;
}

.status-win { background-color: #A3E4D7; }
.status-draw { background-color: #FCF3CF; }
.status-loss { background-color: #FADBD8; }
.status-next { background-color: #D2B4DE; }

.match-text {
  font-weight: bold;
  font-size: 1rem;
}

/* SECTION STRUCTURE */
.main-section {
  max-width: 1200px;
  margin: 4rem auto;
  padding: 0 1.5rem;
}

.section-title-wrapper {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  display: inline-block;
  font-size: 2.5rem;
  background-color: var(--white);
  border: 4px solid var(--charcoal);
  padding: 0.75rem 2rem;
  border-radius: 20px;
  box-shadow: var(--card-shadow);
  transform: rotate(-1.5deg);
}

/* AT A GLANCE TABLE & COMPARISON */
.comparison-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.cartoon-table-wrapper {
  background: var(--white);
  border: 4px solid var(--charcoal);
  border-radius: 20px;
  box-shadow: var(--card-shadow);
  overflow-x: auto;
}

.cartoon-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.cartoon-table th, .cartoon-table td {
  padding: 1.25rem;
  border-bottom: 3px solid var(--charcoal);
}

.cartoon-table th {
  background-color: var(--warm-gold);
  color: var(--charcoal);
  font-size: 1.2rem;
  text-transform: uppercase;
  font-weight: 900;
}

.cartoon-table tr:last-child td {
  border-bottom: none;
}

.table-country-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  font-size: 1.2rem;
}

.table-badge {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--charcoal);
}

/* TIMELINE AND MATCH HISTORY */
.timeline-card {
  background-color: var(--white);
  border: 4px solid var(--charcoal);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--card-shadow);
}

.timeline-event {
  position: relative;
  padding-left: 2.5rem;
  margin-bottom: 2rem;
}

.timeline-event:last-child {
  margin-bottom: 0;
}

.timeline-event::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 6px;
  bottom: -32px;
  width: 4px;
  background-color: var(--charcoal);
}

.timeline-event:last-child::before {
  display: none;
}

.timeline-marker {
  position: absolute;
  left: 0;
  top: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background-color: var(--warm-gold);
  border: 3px solid var(--charcoal);
}

.timeline-host-accent {
  font-size: 0.9rem;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--white);
  padding: 0.15rem 0.6rem;
  border-radius: 8px;
  border: 2px solid var(--charcoal);
  margin-right: 8px;
  display: inline-block;
}

.accent-canada { background-color: var(--maple-red); }
.accent-mexico { background-color: var(--cactus-green); }
.accent-usa { background-color: var(--lake-blue); }

.timeline-date {
  font-weight: bold;
  font-size: 0.95rem;
  color: #666;
}

.timeline-match {
  font-size: 1.3rem;
  font-weight: 900;
  margin-top: 0.5rem;
}

/* GROUP CONTEXTS & CARDS */
.group-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.group-card {
  background: var(--white);
  border: 4px solid var(--charcoal);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--card-shadow);
  position: relative;
}

.group-card::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 20px;
  padding: 0.25rem 1rem;
  background: var(--charcoal);
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 900;
  border-radius: 8px;
  text-transform: uppercase;
}

.group-card-b::before { content: 'Group B Snapshot'; }
.group-card-a::before { content: 'Group A Snapshot'; }
.group-card-d::before { content: 'Group D Snapshot'; }

.context-title {
  font-size: 1.6rem;
  margin-bottom: 1rem;
  border-bottom: 3px solid var(--charcoal);
  padding-bottom: 0.5rem;
}

.context-data {
  font-size: 1.1rem;
  font-weight: bold;
  background-color: var(--snow);
  border: 3px solid var(--charcoal);
  border-radius: 12px;
  padding: 1rem;
  line-height: 1.8;
}

/* WHAT COMES NEXT */
.next-card {
  background: #FFFCEB;
  border: 4px solid var(--charcoal);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: var(--card-shadow);
  text-align: center;
}

.next-title {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.next-content {
  font-size: 1.3rem;
  font-weight: bold;
  max-width: 800px;
  margin: 0 auto 1.5rem auto;
}

.disclaimer-badge {
  display: inline-block;
  background-color: var(--charcoal);
  color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: bold;
}

/* INNER COUNTRY PAGE LAYOUT */
.hero-country {
  padding: 5rem 1.5rem;
  border-bottom: 6px solid var(--charcoal);
  text-align: center;
}

.hero-canada {
  background-color: var(--maple-red);
  color: var(--white);
}
.hero-canada .country-title {
  text-shadow: 3px 3px 0 var(--charcoal);
  color: var(--white);
}

.hero-mexico {
  background-color: var(--cactus-green);
  color: var(--white);
}
.hero-mexico .country-title {
  text-shadow: 3px 3px 0 var(--charcoal);
  color: var(--white);
}

.hero-usa {
  background-color: var(--lake-blue);
  color: var(--white);
}
.hero-usa .country-title {
  text-shadow: 3px 3px 0 var(--charcoal);
  color: var(--white);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.5rem;
  margin: 2rem auto;
  max-width: 900px;
}

.stat-item {
  background-color: var(--white);
  border: 3px solid var(--charcoal);
  border-radius: 16px;
  padding: 1rem;
  text-align: center;
  box-shadow: var(--btn-shadow);
  color: var(--charcoal);
}

.stat-label {
  font-size: 0.9rem;
  font-weight: 900;
  text-transform: uppercase;
  color: #666;
}

.stat-value {
  font-size: 2.2rem;
  font-weight: 900;
}

/* GENERAL PAGES & LEGAL */
.legal-container {
  max-width: 800px;
  margin: 4rem auto;
  padding: 0 1.5rem;
}

.legal-card {
  background: var(--white);
  border: 4px solid var(--charcoal);
  border-radius: 20px;
  padding: 3rem;
  box-shadow: var(--card-shadow);
}

.legal-card h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 4px solid var(--charcoal);
  padding-bottom: 0.75rem;
}

.legal-card h2 {
  font-size: 1.6rem;
  margin: 2rem 0 1rem 0;
}

.legal-card p, .legal-card ul {
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
}

.legal-card ul {
  padding-left: 2rem;
}

.legal-card li {
  margin-bottom: 0.5rem;
}

/* CONTACT FORM */
.contact-form {
  display: grid;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-weight: 900;
  font-size: 1.1rem;
  text-transform: uppercase;
}

.form-input, .form-textarea {
  font-family: inherit;
  font-size: 1.1rem;
  padding: 1rem;
  border: 3px solid var(--charcoal);
  border-radius: 12px;
  background-color: var(--snow);
  color: var(--charcoal);
}

.form-input:focus, .form-textarea:focus {
  outline: none;
  background-color: var(--white);
  box-shadow: 0 0 0 4px var(--warm-gold);
}

.form-textarea {
  resize: vertical;
  min-height: 150px;
}

/* STATIC ALERT / SNAPSHOT BANNER */
.snapshot-banner {
  background-color: var(--charcoal);
  color: var(--white);
  text-align: center;
  padding: 0.75rem 1rem;
  font-weight: bold;
  font-size: 0.95rem;
}

.snapshot-banner span {
  color: var(--warm-gold);
}

/* FOOTER */
.site-footer {
  background-color: var(--charcoal);
  color: var(--white);
  padding: 4rem 1.5rem 2rem 1.5rem;
  border-top: 6px solid var(--charcoal);
  font-size: 1rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 3rem;
  border-bottom: 3px dashed rgba(255, 255, 255, 0.15);
  padding-bottom: 3rem;
  margin-bottom: 2rem;
}

.footer-brand h4 {
  font-size: 1.8rem;
  color: var(--warm-gold);
  margin-bottom: 1rem;
}

.footer-brand p {
  color: #B4B9BC;
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.footer-links h5, .footer-address h5 {
  font-size: 1.2rem;
  color: var(--white);
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: #B4B9BC;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--warm-gold);
}

.footer-address p {
  color: #B4B9BC;
  line-height: 1.8;
}

.footer-address strong {
  color: var(--white);
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  color: #8C9296;
  font-size: 0.9rem;
}

.editorial-note {
  max-width: 100%;
  font-style: italic;
  line-height: 1.6;
}

/* COOKIE BANNER */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: 450px;
  background-color: var(--white);
  border: 4px solid var(--charcoal);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 8px 8px 0px var(--charcoal);
  z-index: 9999;
  display: none; /* Controlled by JS */
}

.cookie-title {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.cookie-text {
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
  color: #555;
}

.cookie-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn-cookie-small {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  border: 2px solid var(--charcoal);
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  background-color: var(--snow);
  transition: transform 0.1s;
}

.btn-cookie-small:hover {
  transform: translateY(-2px);
}

.btn-cookie-accept {
  background-color: var(--warm-gold);
}

/* MOBILE RESPONSIVENESS */
@media (max-width: 1200px) {
  .triptych-hero {
    min-height: auto;
  }
}

@media (max-width: 992px) {
  .triptych-hero {
    grid-template-columns: 1fr;
  }
  .triptych-panel::after {
    border-right: none;
    border-bottom: 4px solid var(--charcoal);
  }
  .triptych-panel:last-child::after {
    border-bottom: none;
  }
  .group-grid {
    grid-template-columns: 1fr;
  }
  .footer-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--warm-gold);
    border-bottom: 6px solid var(--charcoal);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
  }
  .nav-menu.show {
    display: flex;
  }
  .menu-toggle {
    display: block;
  }
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .legal-card {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .country-title {
    font-size: 2.2rem;
  }
  .section-title {
    font-size: 1.8rem;
  }
  .cookie-banner {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }
}