
/* ===== DiscGolfInfo — Pro Refresh (lightweight, no framework) ===== */

/* CSS Reset (subset) */
*,*::before,*::after{box-sizing:border-box;}
html:focus-within{scroll-behavior:smooth;}
body{margin:0;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased}
img,svg{display:block;max-width:100%;height:auto}
a{color:inherit;text-decoration:none}
ul,ol{margin:0;padding:0}

/* Theme tokens */

:root{
  --bg: #f7fafc;            /* page background */
  --panel: #ffffff;         /* cards/header/footer */
  --muted: #475569;         /* slate-600 */
  --text: #0f172a;          /* slate-900 */
  --brand: #0ea5e9;         /* sky-500 */
  --brand-ink: #075985;     /* darker sky */
  --accent: #2563eb;        /* blue-600 */
  --ring: rgba(37,99,235,.25);
  --container: 1100px;
  --radius: 14px;
  --shadow: 0 6px 22px rgba(2,6,23,.08);
  --space: 18px;
  --font: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, "Apple Color Emoji","Segoe UI Emoji";
}


/* Base type — slightly smaller for compact look */
body{
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.55;
}

.container{
  width: min(100% - 28px, var(--container));
  margin-inline: auto;
}

/* Header */
.site-header{
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.8);
  backdrop-filter: saturate(1.1) blur(8px);
  border-bottom: 1px solid rgba(2,6,23,.06);
}
.site-header .row{
  display:flex; align-items:center; gap: 14px;
  padding: 14px 0;
}
.brand{
  display:flex; align-items:center; gap:10px; font-weight:700;
  font-size: 1.15rem; letter-spacing:.2px;
}
.brand .logo{ width:34px; height:34px; border-radius:11px; flex:0 0 auto; box-shadow: 0 6px 18px rgba(0,0,0,.28); }

.nav{ display:flex; gap: 14px; margin-left:auto; flex-wrap:wrap; }
.nav a{
  padding: 8px 12px; border-radius: 10px; opacity:.95;
  transition: transform .12s ease, background-color .12s ease, opacity .12s ease;
}
.nav a:hover{ background: rgba(255,255,255,.06); transform: translateY(-1px); opacity:1; }
.nav a[aria-current="page"]{ background: rgba(85,209,122,.14); box-shadow: inset 0 0 0 1px rgba(85,209,122,.35); }

/* Page heading */
h1,h2,h3{ line-height:1.2; margin: 20px 0 10px; }
h1{ font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); }
h2{ font-size: clamp(1.25rem, 1rem + .8vw, 1.6rem); color: var(--muted); }
.lede{ color: var(--muted); margin-top: 6px; }

/* Cards & panels */
.panel{
  background: var(--panel);
  border: 1px solid rgba(2,6,23,.06);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card{ composes: panel; }
.section{ margin: 26px 0; }

/* Feed cards override (existing markup) */
.feed-card ul{ list-style:none; }
.feed-card li{
  display:flex; gap: 12px; align-items:flex-start;
  padding:10px; border-radius:12px;
  transition: background-color .12s ease, transform .12s ease;
}
.feed-card li:hover{ background: rgba(2,6,23,.04); transform: translateY(-1px); }
.feed-card .thumb{ width:56px; height:56px; border-radius:12px; overflow:hidden; background:#e2e8f0; }
.feed-card .item h3{ font-size: 1rem; margin: 0; }
.feed-card .excerpt{ font-size:.9rem; opacity:.85; margin-top:4px; }

/* Footer */
.site-footer{
  margin-top: 40px; color: var(--muted);
  border-top: 1px solid rgba(2,6,23,.06);
  background: var(--panel);
}
.site-footer .container{ padding: 22px 0; }

/* Utilities */
.row{ display:flex; align-items:stretch; gap: var(--space); flex-wrap: wrap; }
.grow{ flex:1 1 260px; }
.p-2{ padding: 12px; }
.p-3{ padding: 18px; }
.p-4{ padding: 24px; }
.mt-2{ margin-top: 12px; }
.mt-3{ margin-top: 18px; }
.mt-4{ margin-top: 24px; }
.text-mute{ color: var(--muted); }

/* Links that look like subtle buttons */
a.btn{
  display:inline-flex; align-items:center; gap:8px;
  padding:10px 14px; border-radius:12px; font-weight:600;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
}
a.btn:hover{ background: rgba(37,99,235,.10); border-color: rgba(37,99,235,.35); box-shadow: 0 0 0 4px var(--ring); }

/* Ensure fallback SVG scales nicely */
.feed-card .thumb img{width:100%;height:100%;object-fit:contain;display:block;}

/* Vertical category list with icons */
.category-list{ list-style:none; margin: 8px 0 0; padding: 0; }
.category-list li{ border-bottom: 1px solid rgba(2,6,23,.06); }
.category-list li:last-child{ border-bottom: 0; }
.category-list a{ display:flex; align-items:center; gap: 12px; padding: 10px 4px; border-radius: 10px; }
.category-list a:hover{ background: rgba(2,6,23,.04); }
.category-list .ico{ width:24px; height:24px; flex:0 0 auto; }
.category-list .label{ font-weight:600; color: var(--text); }


/* ---- Videos: force 4-up on desktop, responsive below ---- */
.row.four-up { gap: var(--space); }
.row.four-up > .panel { flex: 1 1 calc(25% - var(--space)); }
@media (max-width: 1024px) {
  .row.four-up > .panel { flex: 1 1 calc(50% - var(--space)); }
}
@media (max-width: 640px) {
  .row.four-up > .panel { flex: 1 1 100%; }
}

/* Key-value list */
.kv{ list-style:none; padding:0; margin:0; }
.kv li{ display:flex; justify-content:space-between; gap:12px; padding:8px 0; border-bottom:1px solid rgba(2,6,23,.06); }
.kv li:last-child{ border-bottom:0; }
.kv .k{ color: var(--muted); min-width: 160px; }
.kv .v{ color: var(--text); font-weight:600; }


/* ========= Mobile enhancements (added by ChatGPT 2025-11-18) ========= */
/* These rules only affect small screens; desktop layout remains the same. */

/* Tablets and small laptops */
@media (max-width: 900px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* Phones in portrait */
@media (max-width: 768px) {
  body {
    font-size: 15px;
  }

  .site-header .row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .brand {
    font-size: 1rem;
  }

  .brand .logo {
    width: 30px;
    height: 30px;
  }

  .nav {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
  }

  .nav a {
    flex: 1 1 calc(50% - 8px);
    text-align: center;
    padding: 8px 10px;
  }

  main.container {
    padding-top: 12px;
    padding-bottom: 24px;
  }

  .hero {
    padding: 18px 16px;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  .hero p {
    font-size: 0.98rem;
  }

  .hero .cta {
    flex-direction: column;
    align-items: stretch;
  }

  .hero .cta .btn {
    width: 100%;
    justify-content: center;
  }

  /* Generic row/grid helpers */
  .row {
    flex-direction: column;
  }

  .row > .col,
  .row > .panel {
    width: 100%;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  /* Tables: allow horizontal scroll instead of overflowing */
  .table-wrap {
    width: 100%;
    overflow-x: auto;
  }

  table {
    min-width: 100%;
  }

  /* Forms in auth pages */
  form.card,
  .panel form {
    width: 100%;
  }

  input[type="text"],
  input[type="email"],
  input[type="password"],
  select {
    max-width: 100%;
  }
}

/* Very small phones */
@media (max-width: 480px) {
  .nav a {
    flex: 1 1 100%;
  }

  .site-header .brand strong {
    font-size: 0.95rem;
  }

  .hero h1 {
    font-size: 1.35rem;
  }
}


/* ========= Page-specific mobile tuning (ChatGPT 2025-11-18) ========= */

/* Phones & small tablets */
@media (max-width: 768px) {
  /* --- Shop page --- */
  .category-list {
    list-style: none;
    padding-left: 0;
    margin: 12px 0 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .category-list li {
    margin: 0;
  }
  .category-list a.row {
    flex-direction: row;
    align-items: center;
    padding: 8px 10px;
  }
  .category-list .ico {
    width: 24px;
    height: 24px;
  }
  .category-list .label {
    font-size: 0.9rem;
  }

  .feed-card ul {
    margin-top: 8px;
  }
  .feed-card li {
    align-items: flex-start;
  }

  /* --- Tournaments page --- */
  .note {
    padding: 12px 14px;
    margin: 16px 0;
  }
  .pill-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .pill-grid .btn.sm {
    flex: 1 1 calc(33.33% - 8px);
    justify-content: center;
    text-align: center;
    padding-inline: 0;
  }
}

/* Very small phones: stack pills more aggressively and tighten feeds */
@media (max-width: 480px) {
  .pill-grid .btn.sm {
    flex: 1 1 calc(50% - 8px);
  }

  .feed-card .thumb {
    width: 48px;
    height: 48px;
  }

  /* Profile search input */
  #pdga {
    max-width: 100% !important;
    width: 100%;
  }
}
