/*
Theme Name: Ridge Stone
Theme URI: https://www.ridgestonegolf.com/
Description: Custom block theme for Ridge Stone Golf Club, a public links-style nine in Sheffield, Iowa.
Author: Darin
Version: 1.0.0
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ridge-stone
*/

/* ---------- Shared bits ---------- */
:root { --rs-line: #E6E0D3; --rs-muted: #4A5248; --rs-on-dark: #D7DDD4; }
html { scroll-behavior: smooth; }
.wp-site-blocks > * { margin-block-start: 0; }
.rs-hero__content > :first-child, .rs-section h1 { margin-top: 0; }

.rs-eyebrow {
  font-size: 0.8125rem; letter-spacing: 0.16em; text-transform: uppercase;
  font-weight: 600; color: var(--wp--preset--color--prairie); margin-bottom: 0;
}
.rs-lede { font-size: var(--wp--preset--font-size--large); color: var(--rs-muted); max-width: 46ch; }
.rs-muted { color: var(--rs-muted); }
.rs-section { padding-top: var(--wp--preset--spacing--60); padding-bottom: var(--wp--preset--spacing--60); }
.rs-section--tight-top { padding-top: var(--wp--preset--spacing--50); }
.rs-white { background: #FFFFFF; border-top: 1px solid var(--rs-line); border-bottom: 1px solid var(--rs-line); }

/* ---------- Header ---------- */
.rs-topbar { background: var(--wp--preset--color--ink); color: var(--wp--preset--color--sand); font-size: 0.875rem; }
.rs-topbar > .wp-block-group { padding-top: 0.6rem; padding-bottom: 0.6rem; gap: 0.5rem 1.75rem; }
.rs-topbar p { margin: 0; }
.rs-topbar a { color: var(--wp--preset--color--stone); text-decoration: none; }

.rs-header { border-bottom: 1px solid var(--rs-line); }
.rs-header__inner { padding-top: 1.1rem; padding-bottom: 1.1rem; gap: 1rem 2rem; }
.rs-brand { gap: 0 !important; }
.rs-brand .wp-block-site-title {
  font-family: var(--wp--preset--font-family--display); font-size: 1.875rem; font-weight: 600;
  line-height: 1.1; letter-spacing: -0.01em; margin: 0;
}
.rs-brand .wp-block-site-title a { color: var(--wp--preset--color--ink); text-decoration: none; }
.rs-tagline { margin: 0; font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; color: #5A6358; }
.rs-nav { font-weight: 500; gap: 0.25rem 1.75rem; }
.rs-nav a { text-decoration: none; font-weight: 500; }
.rs-nav .current-menu-item > a, .rs-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; }
.rs-header .wp-block-button__link { padding: 0.7rem 1.35rem; }

/* ---------- Hero ---------- */
.rs-hero {
  background-color: #2E3B31;
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,0.035) 0 2px, transparent 2px 18px);
  background-size: cover; background-position: center;
  color: #FFFFFF; position: relative;
  padding-top: clamp(6rem, 12vw, 9rem); padding-bottom: clamp(4rem, 9vw, 7.5rem);
}
/* When a background image is set in the editor, darken it so text stays readable. */
.rs-hero[style*="background-image"]::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(24,36,27,0.85), rgba(24,36,27,0.25));
}
.rs-hero > * { position: relative; }
.rs-hero h1 { color: #FFFFFF; max-width: 14ch; margin-top: 0; }
.rs-hero .rs-lede { color: var(--wp--preset--color--sand); }
.rs-btn-light .wp-block-button__link { background: var(--wp--preset--color--stone); color: var(--wp--preset--color--ink); }
.rs-btn-light .wp-block-button__link:hover { background: #FFFFFF; color: var(--wp--preset--color--ink); }
.rs-btn-ghost .wp-block-button__link { background: transparent; color: #FFFFFF; border: 1px solid rgba(255,255,255,0.6); }
.rs-btn-ghost .wp-block-button__link:hover { background: rgba(255,255,255,0.1); color: #FFFFFF; }
.is-style-outline .wp-block-button__link { border: 1px solid currentColor; }

/* ---------- Stats strip ---------- */
.rs-stats { background: #FFFFFF; border-bottom: 1px solid var(--rs-line); padding-top: 1.75rem; padding-bottom: 1.75rem; }
.rs-stat { gap: 0 !important; }
.rs-stat p { margin: 0; }
.rs-stat__num { font-family: var(--wp--preset--font-family--display); font-size: 2.125rem; font-weight: 600; line-height: 1.2; }
.rs-stat__label { color: #5A6358; font-size: 0.9375rem; }

/* ---------- Cards and photos ---------- */
.rs-card {
  background: #FFFFFF; border: 1px solid var(--rs-line); border-radius: 10px;
  padding: 2rem; display: flex; flex-direction: column; height: 100%; box-sizing: border-box;
}
.rs-card h3 { margin: 0; }
.rs-card p { color: var(--rs-muted); }
.rs-card .rs-card__link { margin-top: auto; }
.rs-photo {
  background-color: var(--wp--preset--color--photo);
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,0.04) 0 2px, transparent 2px 18px);
  border-radius: 10px; min-height: 420px; padding: 1.25rem;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.rs-photo p { color: #C9D1C6; font-family: ui-monospace, Menlo, monospace; font-size: 0.8125rem; margin: 0; }
.rs-photo img { border-radius: 10px; }

/* ---------- Green band ---------- */
.rs-band { background: var(--wp--preset--color--fescue); color: var(--wp--preset--color--stone); }
.rs-band h2, .rs-band h3 { color: var(--wp--preset--color--stone); }
.rs-band p { color: var(--rs-on-dark); }
.rs-band a { color: #FFFFFF; }
.rs-band .rs-eyebrow { color: #D9B77A; }
.rs-events { border-top: 1px solid rgba(244,242,237,0.25); gap: 0 !important; }
.rs-event { border-bottom: 1px solid rgba(244,242,237,0.25); padding: 1.15rem 0; gap: 1.5rem; flex-wrap: nowrap !important; }
.rs-event p { margin: 0; }
.rs-event__date { font-family: var(--wp--preset--font-family--display); font-size: 1.375rem; min-width: 5.5rem; color: var(--wp--preset--color--stone) !important; }
.rs-event__name { font-weight: 600; color: var(--wp--preset--color--stone) !important; }
.rs-event__meta { font-size: 0.9375rem; }

/* ---------- Visit ---------- */
.rs-label { font-size: 0.8125rem; letter-spacing: 0.16em; text-transform: uppercase; color: #5A6358; font-weight: 600; margin-bottom: 0.25rem !important; }
.rs-label + p { margin-top: 0; }
.rs-map {
  background: var(--wp--preset--color--sand); border-radius: 10px; min-height: 380px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.rs-map p { font-family: ui-monospace, Menlo, monospace; font-size: 0.8125rem; color: var(--rs-muted); }
.rs-map iframe { width: 100%; min-height: 380px; border: 0; display: block; }

/* ---------- Tees, tables ---------- */
.rs-tee h3 { display: flex; align-items: center; gap: 0.6rem; font-family: var(--wp--preset--font-family--body); font-size: 1.125rem; font-weight: 600; }
.rs-tee h3::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--wp--preset--color--ink); background: var(--rs-dot, #ccc); }
.rs-tee--gold { --rs-dot: #C9A23A; }
.rs-tee--black { --rs-dot: #18241B; }
.rs-tee--blue { --rs-dot: #2F5E8E; }
.rs-tee--red { --rs-dot: #B23A2E; }
.rs-tee .rs-stat__num { margin: 0.25rem 0 0; }

.rs-table { overflow-x: auto; border: 1px solid var(--rs-line); border-radius: 10px; margin: 0; }
.rs-table table { width: 100%; min-width: 640px; border-collapse: collapse; background: #FFFFFF; }
.rs-table th, .rs-table td { border: 0; border-top: 1px solid var(--rs-line); padding: 0.75rem 1rem; text-align: center; }
.rs-table td:first-child, .rs-table th:first-child { text-align: left; font-weight: 600; }
.rs-table thead th { background: var(--wp--preset--color--fescue); color: var(--wp--preset--color--stone); border-top: 0; font-weight: 600; }
.rs-table--fees td, .rs-table--fees th { text-align: left; }
.rs-table--fees thead th { background: var(--wp--preset--color--stone); color: var(--wp--preset--color--ink); }

.rs-hole .rs-photo { min-height: 190px; border-radius: 10px 10px 0 0; }
.rs-hole { padding: 0; overflow: hidden; }
.rs-hole__body { padding: 1.4rem 1.5rem 1.6rem; }
.rs-hole__body h3 { font-size: 1.5rem; }

.rs-booking { border-style: dashed; border-color: #B9B3A6; min-height: 320px; justify-content: center; }

/* ---------- Footer ---------- */
.rs-footer { background: var(--wp--preset--color--ink); color: #C9D1C6; font-size: 0.9375rem; }
.rs-footer__inner { padding-top: 3rem; padding-bottom: 3rem; gap: 1.5rem; }
.rs-footer p { margin: 0; }
.rs-footer a { color: var(--wp--preset--color--stone); text-decoration: none; font-weight: 500; }
.rs-footer__name { font-family: var(--wp--preset--font-family--display); font-size: 1.5rem; font-weight: 600; color: var(--wp--preset--color--stone); }
.rs-footer__links { gap: 0.5rem 1.5rem; }

/* ---------- Small screens ---------- */
@media (max-width: 781px) {
  .rs-photo { min-height: 260px; }
  .rs-map, .rs-map iframe { min-height: 260px; }
  .rs-hero .wp-block-buttons { flex-direction: column; align-items: stretch; }
  .rs-hero .wp-block-button__link { width: 100%; text-align: center; }
}
