/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-bg: #faf9f6;
  --color-text: #2c2c2c;
  --color-text-light: #5a5a5a;
  --color-accent: #5b7a3a;
  --color-accent-dark: #4a6630;
  --color-border: #ddd;
  --color-card-bg: #fff;
  --max-width: 1100px;
  --nav-height: 70px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

a:hover {
  color: var(--color-accent-dark);
}

/* Header */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--color-text);
}

.logo img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}

.logo span {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Navigation */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--color-text);
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 0.25rem;
}

.main-nav a {
  display: block;
  padding: 0.5rem 0.75rem;
  color: var(--color-text-light);
  font-size: 0.9rem;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
  background: var(--color-accent);
  color: #fff;
}

/* Hero */
.hero {
  position: relative;
  height: 50vh;
  min-height: 350px;
  overflow: hidden;
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 40%, rgba(0, 0, 0, 0.5));
  display: flex;
  align-items: flex-end;
  padding: 2rem;
}

.hero-overlay h1 {
  color: #fff;
  font-size: 2.5rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Content */
.content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  flex: 1;
}

.content h1 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--color-text);
}

.content h2 {
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
  color: var(--color-text);
}

.content p {
  margin-bottom: 1rem;
  max-width: 75ch;
}

/* Page header with title */
.page-header {
  background: var(--color-accent);
  color: #fff;
  padding: 2.5rem 1.5rem;
  text-align: center;
}

.page-header h1 {
  font-size: 2rem;
  margin: 0;
  color: #fff;
}

/* Horse cards */
.horse-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.horse-card {
  background: var(--color-card-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}

.horse-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.horse-card-img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  background: #e8e8e8;
}

.horse-card-body {
  padding: 1.25rem;
}

.horse-card-body h3 {
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
}

.horse-card-body .registration {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-bottom: 0.5rem;
}

.horse-card-body .pedigree {
  font-size: 0.85rem;
  color: var(--color-text-light);
  line-height: 1.5;
}

.horse-card-body .pedigree strong {
  color: var(--color-text);
}

/* Score table */
.score-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.75rem;
  font-size: 0.85rem;
}

.score-table th,
.score-table td {
  padding: 0.35rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.score-table th {
  font-weight: 600;
  color: var(--color-text-light);
}

.score-table .total-row {
  font-weight: 700;
  background: #f5f5f5;
}

/* News */
.news-item {
  background: var(--color-card-bg);
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  margin-bottom: 1.5rem;
  max-width: 700px;
}

.news-item .date {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-bottom: 0.5rem;
}

.news-item h2 {
  margin: 0 0 0.75rem;
  font-size: 1.3rem;
}

/* Videos */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(480px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Empty/placeholder pages */
.placeholder {
  text-align: center;
  padding: 4rem 1.5rem;
  color: var(--color-text-light);
}

.placeholder p {
  max-width: 50ch;
  margin: 0 auto;
  font-size: 1.1rem;
}

/* Footer */
.site-footer {
  background: #2c2c2c;
  color: #aaa;
  text-align: center;
  padding: 1.5rem;
  font-size: 0.85rem;
  margin-top: auto;
}

.site-footer a {
  color: #ccc;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }

  .main-nav.open {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    padding: 0.5rem;
  }

  .main-nav a {
    padding: 0.75rem 1rem;
  }

  .hero {
    height: 35vh;
    min-height: 220px;
  }

  .hero-overlay h1 {
    font-size: 1.8rem;
  }

  .horse-grid,
  .video-grid {
    grid-template-columns: 1fr;
  }

  .logo span {
    font-size: 1.1rem;
  }

  .header-inner {
    padding: 0 1rem;
  }

  .content {
    padding: 1.5rem 1rem;
  }
}
