/* ==========================================================================
   Surfside Surfs — Premium Dark Theme
   ========================================================================== */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', Arial, sans-serif;
  background: #0a0a0a;
  color: #e0e0e0;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
/* Optional Box adjustments */
.box h2 a {
  text-decoration: none;
}

/* Surf Journal Styles */
#legacy-report h2 {
  text-align: center;
}

.journal-entries {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.journal-entry {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}
.journal-entry:last-child {
  padding-bottom: 0;
  border-bottom: none;
}
.journal-meta {
  font-size: 0.95rem;
  margin-bottom: 1rem; /* Extra line between date line and surf data */
  color: #add8e6;
}
.journal-meta strong {
  font-size: 1.15rem; /* Make the font on the date line bigger */
  letter-spacing: 0.5px; /* Spread it out some */
  color: var(--accent-light);
  font-weight: 700;
}
.journal-rating {
  margin-left: 0.5rem;
  color: #fca311;
  font-weight: 600;
}
.journal-text {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-color);
}
a { color: #4fc3f7; text-decoration: none; transition: color 0.2s; }
a:hover { color: #81d4fa; }

/* --- Typography --- */
h1, h2, h3 { font-family: 'Outfit', 'Inter', sans-serif; font-weight: 700; margin: 0; }
h2 { font-size: 1.15rem; letter-spacing: 0.02em; margin-bottom: 12px; color: #fff; }
h3 { font-size: 0.95rem; font-weight: 600; color: #b0bec5; }

/* --- Layout --- */
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px 30px; }

/* --- Header / Banner --- */
#site-header {
  background: #111;
  border-bottom: 1px solid #222;
  text-align: center;
  padding: 0;
}
.banner-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 20px 4px;
}
#banner-img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}
.header-meta {
  padding: 6px 20px 10px;
  font-size: 0.82rem;
  color: #888;
  letter-spacing: 0.02em;
}
.header-meta .sep { margin: 0 8px; color: #444; }

/* --- Conditions Bar --- */
#conditions-bar {
  display: flex;
  justify-content: center;
  gap: 32px;
  padding: 16px 0;
  margin: 16px 0 0;
  background: #151515;
  border: 1px solid #222;
  border-radius: 10px;
}
.cond-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
}
.cond-icon { font-size: 1.3rem; }
.cond-label { color: #888; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; }
.cond-value { color: #fff; font-weight: 600; font-size: 1.05rem; }

/* --- Card (shared) --- */
.card {
  background: #151515;
  border: 1px solid #222;
  border-radius: 10px;
  padding: 18px;
  transition: border-color 0.25s;
}
.card:hover { border-color: #333; }

/* --- Cam Card (full width) --- */
.card-cam {
  margin-top: 16px;
}
.cam-link {
  display: block;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
}
#cam-img {
  width: 100%;
  display: block;
  border-radius: 8px;
  transition: transform 0.4s ease;
}
.cam-link:hover #cam-img { transform: scale(1.015); }
.cam-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s;
}
.cam-link:hover .cam-overlay { opacity: 1; }

/* --- 3-Box Grid --- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 16px;
}

/* --- 4-Box Grid (2x2 on desktop, 1-col on mobile) --- */
.grid-4 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

/* --- Rules List --- */
.rules-list {
  list-style: none;
  padding: 0;
  margin-top: 8px;
}
.rules-list li {
  padding: 8px 0;
  border-bottom: 1px solid #1e1e1e;
  font-size: 0.88rem;
  color: #bbb;
}
.rules-list li:last-child {
  border-bottom: none;
}
.rules-list strong {
  color: #e0e0e0;
}

/* --- Forecast List --- */
.forecast-list {
  list-style: none;
  padding: 0;
  max-height: 420px;
  overflow-y: auto;
}
.forecast-item {
  padding: 10px 0;
  border-bottom: 1px solid #1e1e1e;
}
.forecast-item:last-child { border-bottom: none; }
.forecast-item.highlight {
  background: rgba(79, 195, 247, 0.07);
  border-radius: 6px;
  padding: 10px 8px;
  margin-bottom: 4px;
  border-bottom: none;
}
.period-name {
  display: block;
  color: #4fc3f7;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.forecast-item.highlight .period-name { color: #81d4fa; }
.period-text { font-size: 0.88rem; color: #bbb; line-height: 1.5; }

/* Custom scrollbar for forecast */
.forecast-list::-webkit-scrollbar { width: 5px; }
.forecast-list::-webkit-scrollbar-track { background: transparent; }
.forecast-list::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }

/* --- Tide Section --- */
.tide-day { margin-bottom: 14px; }
.tide-day:last-child { margin-bottom: 0; }
.tide-day-label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #777;
  padding-bottom: 6px;
  border-bottom: 1px solid #1e1e1e;
  margin-bottom: 8px;
}
.tide-entries { display: flex; flex-direction: column; gap: 6px; }
.tide-entry {
  display: grid;
  grid-template-columns: 70px 80px 60px 1fr;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  padding: 4px 0;
}
.tide-type { font-weight: 600; font-size: 0.82rem; }
.tide-high .tide-type { color: #4fc3f7; }
.tide-low .tide-type { color: #78909c; }
.tide-time { color: #bbb; }
.tide-height { font-weight: 600; color: #e0e0e0; }
.tide-bar-wrap {
  height: 6px;
  background: #1e1e1e;
  border-radius: 3px;
  overflow: hidden;
}
.tide-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
}
.tide-high .tide-bar { background: linear-gradient(90deg, #4fc3f7, #29b6f6); }
.tide-low .tide-bar { background: linear-gradient(90deg, #546e7a, #78909c); }

/* --- Quick Links --- */
.link-list {
  list-style: none;
  padding: 0;
}
.link-list li {
  padding: 9px 0;
  border-bottom: 1px solid #1e1e1e;
  font-size: 0.9rem;
}
.link-list li:last-child { border-bottom: none; }
.link-list a::before { content: '→ '; color: #555; }

/* --- Journal / Legacy --- */
.journal-list {
  list-style: none;
  padding: 0;
}
.journal-list li {
  padding: 6px 0;
  border-bottom: 1px solid #1e1e1e;
  font-size: 0.88rem;
}
.journal-list li:last-child { border-bottom: none; }

/* --- Empty state --- */
.empty { color: #555; font-style: italic; font-size: 0.88rem; }

/* --- Source meta --- */
.meta { color: #666; font-size: 0.78rem; margin-top: 10px; }
.meta a { color: #666; }
.meta a:hover { color: #999; }
.source { margin-top: 14px; padding-top: 10px; border-top: 1px solid #1e1e1e; }

/* --- Footer --- */
#site-footer {
  text-align: center;
  padding: 24px 20px;
  border-top: 1px solid #1a1a1a;
  margin-top: 20px;
  font-size: 0.78rem;
  color: #555;
}
#site-footer a { color: #555; }
#site-footer a:hover { color: #888; }
.footer-sub { margin-top: 4px; color: #333; }

/* --- Responsive --- */
@media (max-width: 750px) {
  .grid-4, .grid-3 { grid-template-columns: 1fr; }
  #conditions-bar { flex-wrap: wrap; gap: 16px; padding: 12px 16px; }
  .tide-entry { grid-template-columns: 60px 70px 50px 1fr; font-size: 0.82rem; }
}

/* --- Fade-in animation --- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.card, #conditions-bar {
  animation: fadeUp 0.5s ease both;
}
.grid-4 .card:nth-child(1) { animation-delay: 0.05s; }
.grid-4 .card:nth-child(2) { animation-delay: 0.1s; }
.grid-4 .card:nth-child(3) { animation-delay: 0.15s; }
.grid-4 .card:nth-child(4) { animation-delay: 0.2s; }
