/* =========================================================
   Ontario FMZ - fish-style.css
   Clean, professional outdoor/fishing aesthetic
   No external dependencies
   ========================================================= */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
  background: #f4f6f9;
  color: #1a1f2e;
  line-height: 1.6;
}

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

a {
  color: #1a56db;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  color: #0e3fa3;
}

/* === Site Header === */
.site-header {
  background: linear-gradient(135deg, #0d2545 0%, #1a3d66 60%, #1a56db 100%);
  color: #fff;
  padding: 2.5rem 1.5rem 2rem;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.back-link {
  display: inline-block;
  color: #9ec8ff;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
  letter-spacing: 0.02em;
  transition: color 0.15s;
}

.back-link::before {
  content: '\2190  ';
}

.back-link:hover {
  color: #fff;
  text-decoration: none;
}

.header-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9ec8ff;
  margin-bottom: 0.5rem;
}

.header-title {
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.header-sub {
  font-size: 1.05rem;
  color: #c5ddff;
  max-width: 600px;
}

/* === Main Container === */
.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

/* === Disclaimer === */
.disclaimer {
  background: #fff8e1;
  border-left: 4px solid #f59e0b;
  padding: 0.875rem 1.25rem;
  border-radius: 0 4px 4px 0;
  font-size: 0.9rem;
  color: #5a4209;
  margin-bottom: 2rem;
  line-height: 1.5;
}

.disclaimer a {
  color: #92400e;
  font-weight: 600;
}

.disclaimer a:hover {
  color: #5a4209;
}

/* === Section Headings === */
.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #0d2545;
  margin-bottom: 0.5rem;
}

.section-desc {
  color: #444;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  max-width: 740px;
}

/* === Province Map === */
.province-map-section {
  margin-bottom: 2.5rem;
}

.province-map-wrap {
  background: #fff;
  border: 1px solid #dde1ea;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.province-map-img {
  width: 100%;
  object-fit: cover;
}

.province-map-caption {
  padding: 0.6rem 1rem;
  font-size: 0.8rem;
  color: #666;
  background: #f9fafb;
  border-top: 1px solid #dde1ea;
}

/* === Filter Bar === */
.filter-section {
  margin-bottom: 1.5rem;
}

.filter-bar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.filter-input {
  width: 100%;
  max-width: 420px;
  padding: 0.625rem 1rem;
  border: 1.5px solid #c5d0e6;
  border-radius: 6px;
  font-size: 0.95rem;
  color: #1a1f2e;
  background: #fff;
  outline: none;
  transition: border-color 0.15s;
}

.filter-input:focus {
  border-color: #1a56db;
  box-shadow: 0 0 0 3px rgba(26,86,219,0.12);
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-btn {
  padding: 0.4rem 1rem;
  border: 1.5px solid #c5d0e6;
  border-radius: 20px;
  background: #fff;
  color: #374151;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.filter-btn:hover {
  border-color: #1a56db;
  color: #1a56db;
}

.filter-btn.active {
  background: #1a56db;
  border-color: #1a56db;
  color: #fff;
}

/* === Zone Grid === */
.zone-grid-section {
  margin-bottom: 3rem;
}

.zone-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.zone-card {
  background: #fff;
  border: 1px solid #dde1ea;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  transition: transform 0.15s, box-shadow 0.15s;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.zone-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(26,86,219,0.12);
  text-decoration: none;
}

.zone-card-map {
  height: 160px;
  overflow: hidden;
  background: #e8edf5;
}

.zone-card-map img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.zone-card:hover .zone-card-map img {
  transform: scale(1.04);
}

.zone-card-body {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.zone-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.zone-number {
  font-size: 1rem;
  font-weight: 700;
  color: #0d2545;
}

.zone-subtitle {
  font-size: 0.82rem;
  color: #374151;
  line-height: 1.4;
  flex: 1;
}

.zone-region {
  font-size: 0.78rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.zone-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #eef1f6;
}

.zone-species-count {
  font-size: 0.78rem;
  color: #6b7280;
}

.zone-link-text {
  font-size: 0.82rem;
  color: #1a56db;
  font-weight: 600;
}

.no-results {
  text-align: center;
  padding: 2rem;
  color: #666;
  font-size: 1rem;
}

/* === Badges === */
.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.badge-official {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.badge-prev {
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fed7aa;
}

/* === Buttons === */
.btn {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: #1a56db;
  color: #fff;
  border: 1.5px solid #1a56db;
}

.btn-primary:hover {
  background: #0e3fa3;
  border-color: #0e3fa3;
  color: #fff;
  text-decoration: none;
}

.btn-secondary {
  background: #fff;
  color: #1a56db;
  border: 1.5px solid #1a56db;
}

.btn-secondary:hover {
  background: #eff4ff;
  text-decoration: none;
}

/* === Zone Detail Page === */
.zone-detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem;
  margin-bottom: 2.5rem;
  align-items: start;
}

@media (max-width: 720px) {
  .zone-detail-layout {
    grid-template-columns: 1fr;
  }
}

.zone-detail-map-section {
  margin-bottom: 0;
}

.zone-detail-map {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #dde1ea;
  object-fit: cover;
}

.map-caption {
  font-size: 0.78rem;
  color: #666;
  margin-top: 0.4rem;
}

.zone-info-card {
  background: #fff;
  border: 1px solid #dde1ea;
  border-radius: 10px;
  padding: 1.25rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.zone-info-card h2 {
  font-size: 1.1rem;
  color: #0d2545;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #eef1f6;
}

.info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.info-table th,
.info-table td {
  padding: 0.5rem 0.6rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #f0f2f7;
}

.info-table th {
  color: #6b7280;
  font-weight: 600;
  width: 34%;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.info-table td {
  color: #1a1f2e;
}

.zone-action-links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.zone-action-links .btn {
  text-align: center;
}

/* === Species Table === */
.species-section {
  margin-bottom: 2.5rem;
}

.table-wrap {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid #dde1ea;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  margin-bottom: 1rem;
}

.species-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 0.9rem;
}

.species-table thead tr {
  background: #0d2545;
  color: #fff;
}

.species-table thead th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.species-table tbody tr {
  border-bottom: 1px solid #eef1f6;
  transition: background 0.1s;
}

.species-table tbody tr:last-child {
  border-bottom: none;
}

.species-table tbody tr:hover {
  background: #f7f9ff;
}

.species-table tbody td {
  padding: 0.7rem 1rem;
  vertical-align: middle;
  color: #1a1f2e;
}

.species-name {
  font-weight: 600;
  color: #0d2545;
  white-space: nowrap;
}

.limit-cell {
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
  color: #1a56db;
}

.notes-cell {
  font-size: 0.82rem;
  color: #555;
}

.licence-note {
  background: #f0f4ff;
  border: 1px solid #c5d0f7;
  border-radius: 6px;
  padding: 0.875rem 1.125rem;
  font-size: 0.85rem;
  color: #1e40af;
  line-height: 1.5;
  margin-top: 0.5rem;
}

.licence-note a {
  color: #1e40af;
  font-weight: 600;
}

/* === Rules Section === */
.rules-section {
  margin-bottom: 2.5rem;
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.rule-card {
  background: #fff;
  border: 1px solid #dde1ea;
  border-radius: 8px;
  padding: 1rem 1.125rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.rule-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0d2545;
  margin-bottom: 0.4rem;
}

.rule-card p {
  font-size: 0.85rem;
  color: #444;
  line-height: 1.5;
}

/* === Zone Navigation === */
.zone-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #dde1ea;
  flex-wrap: wrap;
}

.zone-nav-btn {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  background: #fff;
  border: 1.5px solid #c5d0e6;
  color: #1a56db;
  text-decoration: none;
  transition: all 0.15s;
}

.zone-nav-btn:hover {
  background: #eff4ff;
  border-color: #1a56db;
  text-decoration: none;
}

.zone-nav-home {
  background: #1a56db;
  color: #fff;
  border-color: #1a56db;
}

.zone-nav-home:hover {
  background: #0e3fa3;
  border-color: #0e3fa3;
  color: #fff;
}

.zone-nav-disabled {
  color: #9ca3af;
  border-color: #e5e7eb;
  background: #f9fafb;
  cursor: default;
}

/* === Resources Section === */
.resources-section {
  margin-bottom: 3rem;
}

.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.resource-card {
  background: #fff;
  border: 1px solid #dde1ea;
  border-radius: 10px;
  padding: 1.25rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.resource-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #0d2545;
  margin-bottom: 0.5rem;
}

.resource-card p {
  font-size: 0.875rem;
  color: #444;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.resource-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* === Footer === */
.site-footer {
  background: #0d2545;
  color: #9ec8ff;
  padding: 1.75rem 1.5rem;
  margin-top: 0;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  font-size: 0.85rem;
  line-height: 1.6;
}

.footer-inner p {
  margin-bottom: 0.4rem;
}

.footer-inner a {
  color: #9ec8ff;
}

.footer-inner a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-updated {
  color: #6b8db5;
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

/* === Responsive === */
@media (max-width: 768px) {
  .main-container {
    padding: 1.25rem 1rem 2rem;
  }

  .zone-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
  }

  .zone-card-map {
    height: 130px;
  }

  .zone-nav {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .species-table thead th:nth-child(5),
  .species-table tbody td:nth-child(5) {
    display: none;
  }
}

@media (max-width: 480px) {
  .filter-buttons {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.25rem;
  }

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

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