@font-face {
    font-family: ZwiftSprint-Black;
    src: url(/fonts/ZwiftSprint-Black.woff) format("woff"),url(/fonts/ZwiftSprint-Black.woff2) format("woff2"),url(/fonts/ZwiftSprint-Black.ttf) format("truetype")
}

@font-face {
    font-family: ZwiftSprint-BlackItalic;
    src: url(/fonts/ZwiftSprint-BlackItalic.woff) format("woff"),url(/fonts/ZwiftSprint-BlackItalic.woff2) format("woff2"),url(/fonts/ZwiftSprint-BlackItalic.ttf) format("truetype")
}

@font-face {
    font-family: ZwiftSprint-Bold;
    src: url(/fonts/ZwiftSprint-Bold.woff) format("woff"),url(/fonts/ZwiftSprint-Bold.woff2) format("woff2"),url(/fonts/ZwiftSprint-Bold.ttf) format("truetype")
}

@font-face {
    font-family: ZwiftSprint-Medium;
    src: url(/fonts/ZwiftSprint-Medium.woff) format("woff"),url(/fonts/ZwiftSprint-Medium.woff2) format("woff2"),url(/fonts/ZwiftSprint-Medium.ttf) format("truetype")
}

@font-face {
    font-family: ZwiftSprint-Regular;
    src: url(/fonts/ZwiftSprint-Regular.woff) format("woff"),url(/fonts/ZwiftSprint-Regular.woff2) format("woff2"),url(/fonts/ZwiftSprint-Regular.ttf) format("truetype")
}

@font-face {
    font-family: ZwiftSprint-Italic;
    src: url(/fonts/ZwiftSprint-Italic.woff) format("woff"),url(/fonts/ZwiftSprint-Italic.woff2) format("woff2"),url(/fonts/ZwiftSprint-Italic.ttf) format("truetype")
}

@font-face {
    font-family: ZwiftFondo-Light;
    src: url(/fonts/ZwiftFondo-Light.woff) format("woff"),url(/fonts/ZwiftFondo-Light.woff2) format("woff2"),url(/fonts/ZwiftFondo-Light.ttf) format("truetype")
}

@font-face {
    font-family: ZwiftFondo-Medium;
    src: url(/fonts/ZwiftFondo-Medium.woff) format("woff"),url(/fonts/ZwiftFondo-Medium.ttf) format("truetype")
}

@font-face {
    font-family: ZwiftFondo-Regular;
    src: url(/fonts/ZwiftFondo-Regular.woff) format("woff"),url(/fonts/ZwiftFondo-Regular.woff2) format("woff2"),url(/fonts/ZwiftFondo-Regular.ttf) format("truetype")
}

@font-face {
    font-family: ZwiftFondo-Black;
    src: url(/fonts/ZwiftFondo-Black.woff) format("woff"),url(/fonts/ZwiftFondo-Black.woff2) format("woff2"),url(/fonts/ZwiftFondo-Black.ttf) format("truetype")
}

@font-face {
    font-family: ZwiftFondo-Bold;
    src: url(/fonts/ZwiftFondo-Bold.woff) format("woff"),url(/fonts/ZwiftFondo-Bold.woff2) format("woff2"),url(/fonts/ZwiftFondo-Bold.ttf) format("truetype")
}

@font-face {
    font-family: ZwiftChrono-Regular;
    src: url(/fonts/ZwiftChrono-Regular.woff) format("woff"),url(/fonts/ZwiftChrono-Regular.woff2) format("woff2"),url(/fonts/ZwiftChrono-Regular.otf) format("opentype"),url(/fonts/ZwiftChrono-Regular.ttf) format("truetype")
}

@font-face {
    font-family: ZwiftChrono-Light;
    src: url(/fonts/ZwiftChrono-Light.woff) format("woff"),url(/fonts/ZwiftChrono-Light.woff2) format("woff2"),url(/fonts/ZwiftChrono-Light.otf) format("opentype"),url(/fonts/ZwiftChrono-Light.ttf) format("truetype")
}

@font-face {
    font-family: ZwiftChrono-Bold;
    src: url(/fonts/ZwiftChrono-Bold.woff) format("woff"),url(/fonts/ZwiftChrono-Bold.woff2) format("woff2"),url(/fonts/ZwiftChrono-Bold.otf) format("opentype"),url(/fonts/ZwiftChrono-Bold.ttf) format("truetype")
}


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

:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --text-light: #666666;
  --border: #e5e5e5;
  --accent: #000000;
  --orange: #ff6b35;
  --green: #39ff14;
  --cyan: #00d9ff;
  --hover: #C9FF1C;
}

html,
body {
  height: 100%;
}

body {
  font-family: ZwiftFondo-Regular, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Header */
header {
  background: white;
  border-bottom: 1px solid var(--border);
}

.header-top {
  padding: 1rem 0; /* Minimal padding top/bottom */
}

.header-top .container {
  padding: 0 2rem; /* Keep container padding, but ensure it's not adding extra to sides */
}

.header-content {
  display: flex;
  justify-content: space-between; /* Pushes items to opposite ends */
  align-items: center; /* Vertically centers them */
}

.header-logo {
  flex-shrink: 0;
  width: auto;
  max-width: 70px; /* Max width for the logo */
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.2s;
}

.header-logo:hover {
  opacity: 0.8;
}

.header-logo img {
  max-width: 100%; /* Ensure image scales within its container */
  height: auto;
  display: block;
}

.header-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

header h1 {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  color: var(--accent);
  line-height: 1.2;
}

header .tagline {
  font-size: 10px;
  color: var(--text-light);
  font-weight: 400;
  letter-spacing: 0.3px;
  margin: 0.25rem 0 0 0;
  line-height: 1.2;
}

header .tagline strong {
  font-weight: 700;
  text-transform: uppercase;
}

header .tagline a {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  text-transform: uppercase;
  transition: opacity 0.2s;
}

header .tagline strong {
  font-weight: 700;
  text-transform: uppercase;
}

header .tagline a:hover {
  opacity: 0.7;
  color: var(--orange);
}

/* Hero Image Section (remains the same) */
.home-hero {
  width: 100%;
  height: 380px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--border);
  margin-bottom: 3rem;
}

.home-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: bottom;
  display: block;
}

/* Responsive adjustments for header */
@media (max-width: 768px) {
  .header-top {
    padding: 0.75rem 0;
  }

  .header-content {
    flex-direction: row; /* Keep on one row */
    gap: 0.75rem; /* Reduced gap for smaller screens */
    align-items: center;
  }

  .header-logo {
    max-width: 50px; /* Smaller logo on mobile */
  }

  header h1 {
    font-size: 16px;
  }

  header .tagline {
    font-size: 8px;
  }

  .home-hero {
    height: 250px;
    margin-bottom: 2rem;
  }
}

/* Filters */
#filters {
  display: flex;
  gap: 3rem;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--green);
}

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

.filter-group label {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--orange);
}

.filter-group select {
  padding: 0.75rem 0;
  border: none;
  border-bottom: 2px solid var(--border);
  background: transparent;
  font-size: 1rem;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s;
}

.filter-group select:hover,
.filter-group select:focus {
  border-bottom-color: var(--cyan);
  outline: none;
}

#list-view {
  width: 100%;
}

/* Recons List */
#recons-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); /* Keep for responsiveness */
  gap: 2rem;
  margin-bottom: 3rem;
  width: 100%;
}

.recon-card {
  background: white;
  border: 1px solid var(--border); /* Subtle light border */
  border-radius: 8px; /* Rounded corners for the whole card */
  overflow: hidden; /* Important to clip image/content corners */
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05); /* Soft shadow for depth */
}

.recon-card:hover {
  border-color: var(--orange); /* Orange border on hover */
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1); /* Slightly more prominent shadow */
  transform: translateY(-3px); /* Subtle lift effect */
}


.recon-card h2 {
  font-size: 1.25rem; /* Slightly smaller for card titles */
  font-weight: 700;
  line-height: 1.3;
  color: var(--accent); /* Black for titles on white background */
  margin-bottom: 0.5rem;
  margin-top: 0.5rem; /* Space below event tag / above title */
}

.recon-card .meta {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem; /* Smaller meta info */
  color: var(--text-light); /* Lighter gray for meta info */
  margin-bottom: 0.75rem;
}

/* Difficulty stars styling, ensures correct color against white background */
.recon-card .difficulty {
  color: var(--orange); /* Stars in orange */
  display: flex; /* keep this for SVG stars */
  align-items: center;
}

.recon-card .star-icon {
  stroke: var(--accent); /* Black outline for stars */
  fill: #C9FF1C; /* Lime-yellow fill for stars */
}


.recon-card .narrative {
  color: var(--text-light); /* Lighter gray for narrative */
  font-size: 0.9rem; /* Slightly smaller narrative */
  line-height: 1.5;
  font-style: italic;
  flex-grow: 1;
  margin-bottom: 1rem;
}

.recon-card .cta {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--orange); /* CTA remains orange */
  margin-top: auto;
}


.card-image-wrapper {
  width: 100%;
  height: 180px; /* Fixed height for the image area */
  overflow: hidden;
  position: relative;
  /* Apply top border-radius directly here */
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ensures image covers the area, cropping if necessary */
  object-position: center; /* Adjust if needed (e.g., 'bottom') */
  display: block;
}

.card-event-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--orange); /* Orange background for the tag */
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 10; /* Ensure it's above the image */
}

.card-content {
  padding: 1rem 1.5rem 1.5rem; /* Adjust padding for visual balance */
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}



/* Detail View */
#detail-content {
  padding: 0;
}

#detail-content h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.3;
  border-left: 4px solid var(--cyan);
  padding-left: 1rem;
}

#detail-content .event {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--cyan);
  margin-bottom: 2rem;
}

#detail-content .meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--green);
}

.meta-block {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-left: 1rem;
  border-left: 3px solid var(--orange);
}

.meta-block label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--orange);
}

.meta-block value {
  font-size: 1.2rem;
  color: var(--text);
  font-weight: 500;
}

#detail-content .narrative {
  font-size: 1.3rem;
  line-height: 1.8;
  font-style: italic;
  color: var(--text-light);
  margin-bottom: 3rem;
  padding: 1rem 10%;
  background: rgba(0, 217, 255, 0.05);
  border-left: 4px solid var(--cyan);
  text-align: center;
}

/* Scroll Hint Note */
.hint-download-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  gap: 2rem;
}

.scroll-hint {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--cyan);
  font-weight: 700;
}

.download-btn {
  background: transparent;
  color: var(--orange);
  border: 2px solid var(--orange);
  padding: 0.75rem 1.5rem;
  border-radius: 0;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.download-btn:hover {
  background: var(--orange);
  color: white;
  border-color: var(--orange);
}

/* Table Wrapper using VW */
.table-wrapper {
  width: calc(100% + 16px);
  /* margin-left: -8px;
  margin-right: -8px; */
  margin-top: 2rem;
  margin-bottom: 2rem;
  overflow-x: auto;
  border: 1px solid var(--border);
  -webkit-overflow-scrolling: touch;
}


/* Table */
.recon-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.recon-table thead {
  background: var(--orange);
  border-bottom: 3px solid var(--orange);
}

.recon-table th {
  padding: 1rem 1.5rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: white;
  white-space: nowrap;
  border-right: 1px solid rgba(255, 255, 255, 0.3);
}

.recon-table td {
  padding: 1.5rem 1rem;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  vertical-align: top;
  color: var(--text);
  line-height: 1.6;
  white-space: nowrap;
}

.recon-table tbody tr:hover {
  background: rgba(0, 217, 255, 0.02);
}

.recon-table .km {
  font-weight: 700;
  width: 10%;
  color: var(--orange);
}

/* Ensure Terrain is Bold 600 */
.recon-table .terrain {
  font-weight: 600 !important;
  width: 15%;
  color: var(--text);
}

.recon-table .effort {
  font-weight: 600;
  width: 12%;
  color: var(--cyan);
}





/* Back Button */
.back-btn {
  background: transparent;
  color: #ff6b35;
  border: 2px solid #ff6b35;
  padding: 0.75rem 1.5rem;
  border-radius: 0;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 2rem;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.back-btn:hover {
  background: #ff6b35;
  color: white;
  border-color: #ff6b35;
}

/* Footer */
footer {
  background-color: rgb(37, 37, 37);
  border-top: 3px solid var(--orange);
  padding: 1rem 0;
  margin-top: auto;
  text-align: center;
}

footer p {
  font-size: 0.95rem;
  color: white;
  margin-bottom: 0.5rem;
}

footer p:last-child {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

footer a {
  color: #C9FF1C;
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s;
}

footer a:hover {
  opacity: 0.8;
}


/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 0 .5rem;
  }

  header h1 {
    font-size: 2rem;
  }

  header {
    padding: 2rem 0;
    margin-bottom: 2rem;
  }

  #filters {
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
  }

  #recons-list {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  #detail-content .meta {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  #detail-content h1 {
    font-size: 1.8rem;
  }

  .recon-table {
    width: calc(100vw - 20px);
    margin-left: calc(-50vw + 50%);
  }

  .recon-table th,
  .recon-table td {
    padding: 1rem;
    font-size: 0.85rem;
  }

  .recon-table .km,
  .recon-table .terrain,
  .recon-table .effort {
    width: auto;
  }
}

@media (max-width: 480px) {
  header h1 {
    font-size: 1.6rem;
  }

  header p {
    font-size: 1rem;
  }

  #detail-content h1 {
    font-size: 1.5rem;
  }

  .recon-card {
    padding: 1.5rem;
  }

  #detail-content {
    padding: 0;
  }

  .recon-table {
    width: calc(100vw - 20px);
    margin-left: calc(-50vw + 50%);
    font-size: 0.8rem;
  }

  .recon-table th,
  .recon-table td {
    padding: 0.75rem;
  }

  #detail-content h1 {
    padding-left: 0.75rem;
  }
}

@media print {
  .recon-table {
    width: 100%;
    min-width: 100%;
  }
  
  .recon-table th,
  .recon-table td {
    padding: 10px 8px;
    font-size: 0.85rem;
    border: 1px solid #000;
  }
  
  .recon-table thead {
    background: #ff6b35 !important;
    color: white !important;
  }
  
  .recon-table th {
    color: white !important;
  }
}
