/* ============================================================
   The Patriot Cup Golf Series — main stylesheet
   Hybrid: patriotic identity, modern grid layout
   ============================================================ */

:root {
  /* Brand palette */
  --navy:        #0a1f44;
  --navy-2:      #14305f;
  --red:         #c8102e;
  --red-2:       #a30d24;
  --cream:       #f7f3ea;
  --gold:        #c8a35c;
  --white:       #ffffff;
  --ink:         #1a1d2e;
  --gray-700:    #404a5c;
  --gray-500:    #6b7588;
  --gray-300:    #c8cdd6;
  --gray-100:    #eef0f4;
  --green:       #2d7a3e;

  /* Typography */
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Layout */
  --container: 1200px;
  --container-narrow: 880px;
  --radius: 6px;
  --radius-lg: 12px;
  --shadow: 0 4px 18px rgba(10, 31, 68, 0.08);
  --shadow-lg: 0 18px 48px rgba(10, 31, 68, 0.18);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--red-2); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.15;
  color: var(--navy);
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.15rem; font-family: var(--sans); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; margin: 0 0 1em; }
li { margin-bottom: 0.4em; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container-narrow { width: 100%; max-width: var(--container-narrow); margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section-tight { padding: 48px 0; }
.section-cream { background: var(--cream); }
.section-navy { background: var(--navy); color: var(--white); }
.section-navy h1, .section-navy h2, .section-navy h3, .section-navy h4 { color: var(--white); }
.eyebrow {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--red);
  margin-bottom: 1rem;
}
.section-navy .eyebrow { color: var(--gold); }

/* ---------- Top utility bar ---------- */
.utility-bar {
  background: var(--navy);
  color: var(--white);
  font-size: 0.85rem;
  padding: 8px 0;
}
.utility-bar .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.utility-bar a { color: var(--white); }
.utility-bar a:hover { color: var(--gold); }
.utility-bar .contact-info { display: flex; gap: 18px; }

/* ---------- Header / Nav ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 2px 12px rgba(10, 31, 68, 0.04);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; padding-top: 16px; padding-bottom: 16px; }
.logo { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.logo-img { height: 64px; width: 64px; object-fit: contain; display: block; flex-shrink: 0; }
.logo-text {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--navy);
  line-height: 1.05;
  letter-spacing: -0.005em;
}
.logo-text small {
  display: block;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--red);
  margin-top: 5px;
}
.site-footer .logo-img { height: 72px; width: 72px; }
.site-footer .logo-text { color: var(--white); }
.site-footer .logo-text small { color: var(--gold); }
@media (max-width: 600px) {
  .logo-img { height: 52px; width: 52px; }
  .logo-text { font-size: 1.05rem; }
  .logo-text small { font-size: 0.62rem; letter-spacing: 0.18em; }
}
@media (max-width: 380px) {
  .logo-text { display: none; }
}

.main-nav { display: flex; gap: 28px; align-items: center; }
.main-nav a {
  color: var(--navy);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover, .main-nav a.active { color: var(--red); border-color: var(--red); }
.main-nav a.btn { padding: 10px 22px; border-bottom: none; color: var(--white); }
.main-nav a.btn:hover { color: var(--white); border-color: transparent; }
.main-nav a.btn.btn-outline { color: var(--navy); }
.main-nav a.btn.btn-outline:hover { color: var(--white); }

.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.menu-toggle span { display: block; width: 26px; height: 3px; background: var(--navy); margin: 5px 0; border-radius: 2px; transition: 0.2s; }

@media (max-width: 900px) {
  .main-nav { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: var(--white); padding: 24px; box-shadow: var(--shadow-lg); display: none; gap: 18px; align-items: stretch; }
  .main-nav.open { display: flex; }
  .menu-toggle { display: block; }
  .utility-bar .contact-info { font-size: 0.78rem; gap: 12px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 28px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  text-align: center;
  transition: all 0.18s;
  text-decoration: none;
  line-height: 1.2;
}
.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover { background: var(--red-2); color: var(--white); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(200, 16, 46, 0.3); }
.btn-secondary { background: var(--navy); color: var(--white); }
.btn-secondary:hover { background: var(--navy-2); color: var(--white); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-outline-light { background: transparent; color: var(--white); border-color: var(--white); }
.btn-outline-light:hover { background: var(--white); color: var(--navy); }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: #b8924c; color: var(--navy); }
.btn-large { padding: 18px 36px; font-size: 1.05rem; }
.btn-block { display: block; width: 100%; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 640px;
  display: flex;
  align-items: center;
  color: var(--white);
  background: linear-gradient(135deg, rgba(10,31,68,0.92), rgba(10,31,68,0.65)), var(--navy);
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background-image: url('../images/hero-fallback.jpg');
  background-size: cover; background-position: center;
  opacity: 0.45;
  z-index: 0;
}
.hero .container { position: relative; z-index: 1; padding-top: 80px; padding-bottom: 80px; }
.hero h1 { color: var(--white); max-width: 18ch; }
.hero h1 .accent { color: var(--gold); display: block; font-style: italic; font-weight: 400; font-size: 0.55em; margin-top: 0.4em; letter-spacing: 0.05em; }
.hero .lead { font-size: 1.2rem; max-width: 56ch; margin-bottom: 2rem; opacity: 0.95; }
.hero .hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero .event-date {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 10px 18px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1.4rem;
  backdrop-filter: blur(6px);
}
.hero .event-date::before {
  content: ''; display: inline-block; width: 8px; height: 8px; background: var(--red); border-radius: 50%; animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ---------- Stats strip ---------- */
.stats {
  background: var(--white);
  border-top: 4px solid var(--red);
  border-bottom: 1px solid var(--gray-100);
  padding: 48px 0;
}
.stats .grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat .num { font-family: var(--serif); font-size: 2.6rem; font-weight: 700; color: var(--navy); line-height: 1; }
.stat .label { display: block; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gray-500); margin-top: 6px; font-weight: 600; }
@media (max-width: 700px) { .stats .grid { grid-template-columns: repeat(2, 1fr); gap: 32px; } }

/* ---------- Generic grids ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 48px; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; gap: 32px; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Card ---------- */
.card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.card h3 { color: var(--navy); margin-bottom: 0.5em; }
.card .price {
  font-family: var(--serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--red);
  margin: 0 0 0.2em;
  line-height: 1;
}
.card .price small { font-size: 0.5em; color: var(--gray-500); font-weight: 500; }
.card .card-perks { padding-left: 1.1em; font-size: 0.93rem; color: var(--gray-700); flex: 1; }
.card .card-perks li { margin-bottom: 8px; }
.card .card-footer { margin-top: 20px; }
.card.featured { border: 2px solid var(--red); position: relative; }
.card.featured::before {
  content: 'MOST POPULAR'; position: absolute; top: -12px; left: 32px; background: var(--red); color: var(--white);
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; padding: 4px 12px; border-radius: 4px;
}
.card.sold-out { opacity: 0.6; }
.card.sold-out .card-footer::after {
  content: 'SOLD OUT'; display: inline-block; padding: 10px 20px; background: var(--gray-300); color: var(--gray-700);
  font-weight: 700; border-radius: var(--radius); width: 100%; text-align: center;
}
.card.sold-out .btn { display: none; }

/* ---------- Beneficiary card ---------- */
.beneficiary-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.beneficiary-card .photo { aspect-ratio: 16 / 9; background: var(--navy); display: flex; align-items: center; justify-content: center; color: var(--gold); font-family: var(--serif); font-size: 1.8rem; font-weight: 700; text-align: center; padding: 20px; }
.beneficiary-card .body { padding: 24px 28px 28px; flex: 1; display: flex; flex-direction: column; }
.beneficiary-card h3 { color: var(--navy); }
.beneficiary-card p { color: var(--gray-700); font-size: 0.95rem; flex: 1; }
.beneficiary-card a { font-weight: 600; }

/* ---------- Person card (board/team) ---------- */
.person {
  text-align: center;
}
.person .avatar {
  width: 140px; height: 140px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-weight: 700; font-size: 2.4rem;
  margin: 0 auto 16px;
  border: 4px solid var(--white);
  box-shadow: var(--shadow);
}
.person .name { font-family: var(--serif); font-size: 1.25rem; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.person .role { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--red); font-weight: 600; }

/* ---------- Agenda timeline ---------- */
.agenda { position: relative; padding-left: 36px; }
.agenda::before { content: ''; position: absolute; top: 8px; bottom: 8px; left: 8px; width: 2px; background: var(--red); }
.agenda-item { position: relative; padding-bottom: 28px; }
.agenda-item::before { content: ''; position: absolute; left: -32px; top: 4px; width: 16px; height: 16px; background: var(--red); border-radius: 50%; border: 3px solid var(--white); box-shadow: 0 0 0 2px var(--red); }
.agenda-item .time { font-family: var(--serif); font-size: 1.05rem; font-weight: 700; color: var(--navy); display: block; }
.agenda-item .title { font-weight: 600; color: var(--ink); }
.agenda-item .desc { color: var(--gray-500); font-size: 0.92rem; }

/* ---------- CTA strip ---------- */
.cta-strip {
  background: linear-gradient(120deg, var(--navy), var(--navy-2));
  color: var(--white);
  padding: 64px 0;
  text-align: center;
}
.cta-strip h2 { color: var(--white); }
.cta-strip .actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--gray-300); padding: 64px 0 32px; font-size: 0.93rem; }
.site-footer h4 { color: var(--white); font-size: 0.85rem; letter-spacing: 0.18em; }
.site-footer .grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.site-footer a { color: var(--gray-300); }
.site-footer a:hover { color: var(--gold); }
.site-footer .legal { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 24px; display: flex; justify-content: space-between; font-size: 0.82rem; color: var(--gray-500); flex-wrap: wrap; gap: 12px; }
.site-footer ul { list-style: none; padding: 0; }
.site-footer li { margin-bottom: 8px; }
@media (max-width: 800px) { .site-footer .grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Misc ---------- */
.muted { color: var(--gray-500); }
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }
.flag-stripe {
  height: 6px;
  background: linear-gradient(to right,
    var(--red) 0%, var(--red) 33.3%,
    var(--white) 33.3%, var(--white) 66.6%,
    var(--navy) 66.6%, var(--navy) 100%);
}

/* ============================================================
   Chatbot widget
   ============================================================ */
.tpc-chatbot { position: fixed; bottom: 22px; right: 22px; z-index: 9999; font-family: var(--sans); }
.tpc-chatbot-toggle {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--red); color: var(--white); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 28px rgba(200, 16, 46, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}
.tpc-chatbot-toggle:hover { transform: scale(1.05); box-shadow: 0 12px 34px rgba(200, 16, 46, 0.5); }
.tpc-chatbot-toggle .icon-close { display: none; }
.tpc-chatbot.is-open .tpc-chatbot-toggle .icon-open { display: none; }
.tpc-chatbot.is-open .tpc-chatbot-toggle .icon-close { display: block; }

.tpc-chatbot-panel {
  position: absolute; bottom: 80px; right: 0;
  width: 380px; max-width: calc(100vw - 32px);
  height: 560px; max-height: calc(100vh - 120px);
  background: var(--white); border-radius: 16px;
  box-shadow: 0 24px 64px rgba(10, 31, 68, 0.28);
  display: none; flex-direction: column; overflow: hidden;
  border: 1px solid var(--gray-100);
}
.tpc-chatbot.is-open .tpc-chatbot-panel { display: flex; animation: tpcSlideUp 0.22s ease-out; }
@keyframes tpcSlideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.tpc-chatbot-header {
  background: var(--navy); color: var(--white);
  padding: 16px 20px; display: flex; justify-content: space-between; align-items: center;
  border-bottom: 3px solid var(--red);
}
.tpc-chatbot-header-info strong { font-family: var(--serif); font-size: 1.05rem; display: block; }
.tpc-chatbot-header-info small { font-size: 0.75rem; opacity: 0.7; display: block; margin-top: 2px; }
.tpc-chatbot-min {
  background: rgba(255,255,255,0.12); border: none; color: var(--white);
  width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: 1.4rem;
  line-height: 1; display: flex; align-items: center; justify-content: center;
}
.tpc-chatbot-min:hover { background: rgba(255,255,255,0.22); }

.tpc-chatbot-messages {
  flex: 1; overflow-y: auto; padding: 18px 20px;
  background: linear-gradient(180deg, #fbfaf6 0%, var(--white) 100%);
  display: flex; flex-direction: column; gap: 12px;
}
.tpc-msg { max-width: 86%; padding: 10px 14px; border-radius: 14px; font-size: 0.93rem; line-height: 1.5; word-wrap: break-word; }
.tpc-msg.user { background: var(--red); color: var(--white); align-self: flex-end; border-bottom-right-radius: 4px; }
.tpc-msg.bot { background: var(--gray-100); color: var(--ink); align-self: flex-start; border-bottom-left-radius: 4px; }
.tpc-msg.bot a { color: var(--red); font-weight: 600; }
.tpc-msg.bot strong { color: var(--navy); font-weight: 700; }
.tpc-msg.bot em { font-style: italic; }
.tpc-msg.bot code { background: rgba(10, 31, 68, 0.08); padding: 1px 6px; border-radius: 4px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.88em; }
.tpc-msg.bot ul, .tpc-msg.bot ol { margin: 6px 0 6px 0; padding-left: 22px; }
.tpc-msg.bot li { margin: 3px 0; }
.tpc-msg.bot ul + br, .tpc-msg.bot ol + br { display: none; }
.tpc-msg.system { background: var(--cream); color: var(--gray-700); align-self: center; font-size: 0.82rem; font-style: italic; text-align: center; padding: 8px 14px; border-radius: 8px; max-width: 100%; }
.tpc-msg.handoff {
  background: var(--navy); color: var(--white); align-self: center; max-width: 100%;
  text-align: center; padding: 14px; border-radius: 8px;
}
.tpc-msg.handoff a { display: inline-block; background: var(--gold); color: var(--navy); padding: 8px 16px; border-radius: 6px; margin-top: 8px; font-weight: 700; }
.tpc-typing { display: flex; gap: 4px; align-self: flex-start; padding: 12px 14px; background: var(--gray-100); border-radius: 14px; }
.tpc-typing span { width: 7px; height: 7px; background: var(--gray-500); border-radius: 50%; animation: tpcTypeBlink 1.4s infinite; }
.tpc-typing span:nth-child(2) { animation-delay: 0.2s; }
.tpc-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes tpcTypeBlink { 0%, 60%, 100% { opacity: 0.3; } 30% { opacity: 1; } }

.tpc-chatbot-form { padding: 12px 14px; border-top: 1px solid var(--gray-100); display: flex; gap: 8px; background: var(--white); }
.tpc-chatbot-form input {
  flex: 1; padding: 12px 14px; border: 1.5px solid var(--gray-100); border-radius: 24px;
  font-family: var(--sans); font-size: 0.95rem; outline: none;
}
.tpc-chatbot-form input:focus { border-color: var(--red); }
.tpc-chatbot-send {
  width: 44px; height: 44px; border-radius: 50%; background: var(--red); color: var(--white);
  border: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.tpc-chatbot-send:hover { background: var(--red-2); }
.tpc-chatbot-send:disabled { background: var(--gray-300); cursor: not-allowed; }

.tpc-chatbot-footer {
  padding: 8px 14px; background: var(--gray-100); font-size: 0.75rem; color: var(--gray-500);
  display: flex; justify-content: space-between; align-items: center;
}
.tpc-chatbot-footer a { color: var(--navy); }

.tpc-chatbot-suggestions { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 20px 12px; }
.tpc-chatbot-suggestions button {
  background: var(--white); border: 1.5px solid var(--gray-100); color: var(--navy);
  padding: 8px 12px; border-radius: 18px; font-size: 0.82rem; cursor: pointer; transition: all 0.15s;
  font-family: var(--sans);
}
.tpc-chatbot-suggestions button:hover { border-color: var(--red); color: var(--red); }

@media (max-width: 480px) {
  .tpc-chatbot { bottom: 14px; right: 14px; }
  .tpc-chatbot-panel { width: calc(100vw - 28px); height: calc(100vh - 100px); bottom: 76px; }
}
