/*
Theme Name: Niles Dog Lodge Style
Theme URI: https://nilesdoglodge.com/
Author: Niles Dog Lodge
Author URI: https://nilesdoglodge.com/
Description: Style-only theme for Niles Dog Lodge. Includes header/footer and global CSS. No custom page templates.
Version: 0.2.8
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: niles-dog-lodge
Tags: custom-logo, one-column, responsive-layout
*/

/* ==========================================================
   Design Tokens
   ========================================================== */
:root {
  --ndl-max-width: 1200px;
  --ndl-gutter: 20px;

  /* Brand palette (from logo) */
  --ndl-brand-orange: #f35110;
  --ndl-brand-orange-700: #d9440d;
  --ndl-brand-pine: #4ea766;
  --ndl-brand-teal: #35a182;
  --ndl-brand-teal-700: #2d9778;
  --ndl-cream: #f9f4e8;
  --ndl-charcoal: #271e1e;

  /* UI palette */
  --ndl-color-bg: var(--ndl-cream);
  --ndl-color-surface: #ffffff;
  --ndl-color-surface-2: rgba(0,0,0,.035);
  --ndl-color-text: #141010;
  --ndl-color-muted: rgba(20,16,16,.72);

  --ndl-color-primary: var(--ndl-brand-orange);
  --ndl-color-primary-700: var(--ndl-brand-orange-700);
  --ndl-color-accent: var(--ndl-brand-teal);
  --ndl-color-border: rgba(20,16,16,.14);

  --ndl-radius: 16px;
  --ndl-radius-sm: 12px;
  --ndl-radius-lg: 22px;

  --ndl-font-sans: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  --ndl-font-size: 16px;
  --ndl-line-height: 1.55;

  --ndl-shadow-sm: 0 1px 2px rgba(0,0,0,.06);
  --ndl-shadow-md: 0 10px 28px rgba(0,0,0,.14);
  --ndl-shadow-lg: 0 18px 50px rgba(0,0,0,.22);

  --ndl-focus: 0 0 0 4px rgba(243,81,16,.25);
}

/* ==========================================================
   Base
   ========================================================== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--ndl-font-sans);
  font-size: var(--ndl-font-size);
  line-height: var(--ndl-line-height);
  color: var(--ndl-color-text);
  background: var(--ndl-color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--ndl-color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
hr { border: 0; border-top: 1px solid var(--ndl-color-border); }

:where(a, button, input, select, textarea):focus-visible {
  outline: none;
  box-shadow: var(--ndl-focus);
  border-radius: 10px;
}

.ndl-container {
  max-width: var(--ndl-max-width);
  margin: 0 auto;
  padding: 0 var(--ndl-gutter);
}

/* ==========================================================
   Header
   ========================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(249,244,232,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ndl-color-border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}
.site-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

/* Logo: lock display height to 48px (prevents header blow-up) */
.site-brand__logo,
.custom-logo-link {
  display: inline-flex;
  align-items: center;
  max-height: 48px;
}
.custom-logo-link img.custom-logo,
.site-brand__logo img,
.site-brand__logo svg {
  display: block;
  max-height: 48px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.site-brand__title {
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 18px;
  color: var(--ndl-color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Menu */
.primary-nav {
  display: flex;
  align-items: center;
  gap: 14px;
}
.primary-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Dropdowns */
.primary-nav li { position: relative; }
.primary-nav .sub-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 50;
  background: var(--ndl-color-surface);
  border: 1px solid var(--ndl-color-border);
  border-radius: 14px;
  box-shadow: var(--ndl-shadow-md);
  padding: 8px;
  min-width: 220px;
}
.primary-nav .sub-menu li { width: 100%; }
.primary-nav .sub-menu a {
  width: 100%;
  justify-content: flex-start;
  border-radius: 12px;
}

/* Desktop: open on hover/focus for accessibility */
@media (min-width: 821px) {
  .primary-nav li:focus-within > .sub-menu,
  .primary-nav li:hover > .sub-menu { display: block; }
}

/* Mobile submenu toggle button (injected by JS) */
.ndl-submenu-toggle {
  display: none;
  border: 1px solid var(--ndl-color-border);
  background: var(--ndl-color-surface);
  border-radius: 12px;
  padding: 8px 10px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}
.ndl-submenu-toggle:focus-visible { outline: 3px solid rgba(53,161,130,.35); outline-offset: 2px; }
.primary-nav a {
  display: inline-flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--ndl-color-text);
  font-weight: 600;
}
.primary-nav a:hover {
  background: var(--ndl-color-surface-2);
  text-decoration: none;
}
.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a {
  background: rgba(243,81,16,.14);
  color: var(--ndl-color-primary-700);
}

/* Mobile */
.menu-toggle {
  display: none;
  border: 1px solid var(--ndl-color-border);
  background: var(--ndl-color-surface);
  border-radius: 999px;
  padding: 10px 12px;
  font-weight: 700;
  cursor: pointer;
}
@media (max-width: 820px) {
  .menu-toggle { display: inline-flex; }
  .primary-nav ul {
    display: none;
    position: absolute;
    right: var(--ndl-gutter);
    top: 72px;
    background: var(--ndl-color-surface);
    border: 1px solid var(--ndl-color-border);
    border-radius: 14px;
    box-shadow: var(--ndl-shadow-md);
    padding: 10px;
    flex-direction: column;
    align-items: stretch;
    min-width: 220px;
  }
  .primary-nav.is-open ul { display: flex; }
  .primary-nav a { border-radius: 12px; }

  /* Mobile: dropdowns become nested lists */
  .primary-nav li { width: 100%; }
  .primary-nav li > a { width: 100%; justify-content: space-between; }
  .ndl-submenu-toggle { display: inline-flex; align-self: center; }
  .primary-nav .sub-menu {
    position: static;
    box-shadow: none;
    border: 0;
    padding: 6px 0 0;
    margin: 0;
    min-width: 0;
  }
  .primary-nav li.is-sub-open > .sub-menu { display: flex; flex-direction: column; gap: 6px; }
}

/* ==========================================================
   Content
   ========================================================== */
.site-main { padding: 32px 0 56px; }
.entry-title { letter-spacing: -0.02em; }
.entry-content {
  max-width: var(--ndl-max-width);
  margin: 0 auto;
  padding: 0 var(--ndl-gutter);
}

.entry-content > .alignfull {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.entry-content > .alignwide {
  max-width: var(--ndl-max-width);
}
.entry-content p { margin: 0 0 1em; }

/* ==========================================================
   Block defaults + utilities
   ========================================================== */
.wp-site-blocks { padding-top: 0; }

.ndl-prose :where(h1,h2,h3) { letter-spacing: -0.02em; }
.ndl-prose h1 { font-size: clamp(32px, 4vw, 48px); line-height: 1.06; margin: 0 0 14px; }
.ndl-prose h2 { font-size: clamp(24px, 2.6vw, 34px); line-height: 1.15; margin: 0 0 12px; }
.ndl-prose p  { font-size: 18px; line-height: 1.6; }

.ndl-section {
  padding: 56px 0;
}
.ndl-section--tight { padding: 36px 0; }
.ndl-surface {
  background: var(--ndl-color-surface);
  border: 1px solid var(--ndl-color-border);
  border-radius: var(--ndl-radius-lg);
  box-shadow: var(--ndl-shadow-sm);
}
.ndl-card {
  background: var(--ndl-color-surface);
  border: 1px solid var(--ndl-color-border);
  border-radius: var(--ndl-radius);
  padding: 18px;
  box-shadow: var(--ndl-shadow-sm);
}
.ndl-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--ndl-color-border);
  background: rgba(255,255,255,.65);
  font-weight: 700;
  font-size: 13px;
  color: var(--ndl-color-text);
}

/* Buttons */
.wp-block-button .wp-block-button__link,
.ndl-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 800;
  padding: 12px 18px;
  border-radius: 999px;
  border: 2px solid transparent;
  text-decoration: none !important;
  transition: transform .04s ease, filter .12s ease;
}
.wp-block-button.is-style-outline .wp-block-button__link {
  border-color: var(--ndl-color-border);
  background: transparent;
  color: var(--ndl-color-text);
}
.wp-block-button__link {
  background: var(--ndl-color-primary);
  color: #fff;
}
.wp-block-button__link:hover { filter: brightness(.96); }
.wp-block-button__link:active { transform: translateY(1px); }

/* Forms */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--ndl-color-border);
  background: var(--ndl-color-surface);
  color: var(--ndl-color-text);
}
label { font-weight: 700; }

/* Simple grid helpers */
.ndl-grid-3 {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 920px) {
  .ndl-grid-3 { grid-template-columns: 1fr; }
}

/* Steps */
.ndl-steps { counter-reset: ndl-step; }
.ndl-step {
  position: relative;
  padding-left: 52px;
}
.ndl-step::before {
  counter-increment: ndl-step;
  content: counter(ndl-step);
  position: absolute;
  left: 0;
  top: 0;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(53,161,130,.18);
  color: var(--ndl-charcoal);
  font-weight: 900;
  border: 1px solid rgba(45,151,120,.25);
}

/* Notices */
.ndl-notice {
  border-radius: var(--ndl-radius);
  padding: 14px 16px;
  border: 1px solid var(--ndl-color-border);
  background: rgba(255,255,255,.7);
}
.ndl-notice--policy { border-left: 6px solid var(--ndl-brand-pine); }
.ndl-notice--important { border-left: 6px solid var(--ndl-brand-orange); }

/* ==========================================================
   Home page utilities
   ========================================================== */
.entry-content :where(h1,h2,h3) {
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.entry-content h1 {
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.08;
  margin: 0 0 14px;
}
.entry-content h2 {
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.15;
  margin: 0 0 12px;
}
.entry-content h3 {
  font-size: clamp(20px, 2.2vw, 24px);
  line-height: 1.2;
  margin: 0 0 10px;
}

.ndl-home-page .ndl-home-hero,
.ndl-home-page .ndl-home-section {
  padding-top: clamp(32px, 6vw, 64px) !important;
  padding-bottom: clamp(32px, 6vw, 64px) !important;
}

.ndl-home-page .ndl-home-section--compact {
  padding-top: clamp(28px, 5vw, 48px) !important;
  padding-bottom: clamp(28px, 5vw, 48px) !important;
}

.ndl-home-page .ndl-home-lead {
  font-size: clamp(17px, 2vw, 19px);
  line-height: 1.65;
}

.ndl-home-page .ndl-home-hero-copy > * + * {
  margin-top: 16px;
}

.ndl-home-page .ndl-home-panel {
  padding: 24px;
}

.ndl-home-page .ndl-home-card {
  height: 100%;
}

.ndl-home-page .ndl-home-card > *:last-child,
.ndl-home-page .ndl-home-panel > *:last-child,
.ndl-home-page .ndl-home-notice > *:last-child {
  margin-bottom: 0;
}

.ndl-home-page .ndl-home-cta .wp-block-button,
.ndl-home-page .ndl-home-card .wp-block-button {
  width: 100%;
}

.ndl-home-page .ndl-home-cta .wp-block-button__link,
.ndl-home-page .ndl-home-card .wp-block-button__link {
  width: 100%;
}

@media (max-width: 920px) {
  .ndl-home-page .ndl-home-hero-columns,
  .ndl-home-page .ndl-home-card-columns {
    gap: 18px;
  }
}

@media (max-width: 600px) {
  .entry-content h1 {
    font-size: clamp(30px, 8vw, 40px);
    line-height: 1.08;
  }

  .entry-content h2 {
    font-size: clamp(24px, 6.4vw, 30px);
    line-height: 1.15;
  }

  .entry-content h3 {
    font-size: clamp(20px, 5.4vw, 22px);
  }

  .ndl-home-page .ndl-home-panel,
  .ndl-home-page .ndl-home-card,
  .ndl-home-page .ndl-home-notice {
    padding: 18px;
  }

  .ndl-home-page .ndl-home-cta {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .ndl-home-page .ndl-home-cta .wp-block-button,
  .ndl-home-page .ndl-home-cta .wp-block-button.has-custom-width {
    width: 100%;
  }

  .ndl-home-page .ndl-home-step {
    padding-left: 48px;
  }

  .ndl-home-page .ndl-home-card-columns {
    margin-top: 18px !important;
  }
}

/* ==========================================================
   Mobile spacing
   ========================================================== */
@media (max-width: 600px) {
  :root {
    --ndl-gutter: 16px;
  }

  /* Keep readable breathing room on small screens */
  .entry-content {
    padding-left: var(--ndl-gutter);
    padding-right: var(--ndl-gutter);
  }

  /* Full-width sections should not hug the viewport edge */
  .entry-content > .alignfull {
    padding-left: var(--ndl-gutter);
    padding-right: var(--ndl-gutter);
  }

  /* Back-compat for older Group markup */
  .entry-content > .alignfull > .wp-block-group__inner-container,
  .alignfull > .wp-block-group__inner-container {
    padding-left: var(--ndl-gutter);
    padding-right: var(--ndl-gutter);
  }
}

/* ==========================================================
   Footer
   ========================================================== */
.site-footer {
  margin-top: 64px;
  background: var(--ndl-charcoal);
  color: rgba(255,255,255,.88);
  border-top: 1px solid rgba(255,255,255,.08);
}

.site-footer a {
  color: #fff;
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  text-decoration: underline;
}

.site-footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  padding: 32px 0;
  color: rgba(255,255,255,.84);
  font-size: 14px;
}

.site-footer__brand {
  max-width: 460px;
}

.site-footer__title {
  margin: 0 0 8px;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
}

.site-footer__tagline {
  margin: 0 0 14px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(255,255,255,.78);
}

.site-footer__copyright {
  font-size: 0.92rem;
  line-height: 1.6;
  color: rgba(255,255,255,.72);
}

.site-footer__nav {
  flex-shrink: 0;
  width: auto;
  max-width: 100%;
}

.site-footer .footer-menu,
.site-footer ul.footer-menu,
.site-footer nav .footer-menu {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px 18px !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.site-footer .footer-menu li,
.site-footer ul.footer-menu li,
.site-footer nav .footer-menu li {
  display: inline-flex !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.site-footer .footer-menu a,
.site-footer ul.footer-menu a,
.site-footer nav .footer-menu a {
  display: inline-block !important;
  width: auto !important;
  padding: 6px 0 !important;
  font-weight: 500;
  white-space: nowrap;
}

@media (max-width: 820px) {
  .site-footer__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }

  .site-footer__nav {
    width: 100%;
  }

  .site-footer .footer-menu,
  .site-footer ul.footer-menu,
  .site-footer nav .footer-menu {
    gap: 8px 16px !important;
  }
}

@media (max-width: 600px) {
  .site-footer {
    margin-top: 40px;
  }

  .site-footer__inner {
    padding: 24px 0;
  }

  .site-footer__title {
    font-size: 1rem;
  }

  .site-footer__tagline,
  .site-footer__copyright {
    font-size: 0.9rem;
  }

  .site-footer .footer-menu,
  .site-footer ul.footer-menu,
  .site-footer nav .footer-menu {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 8px 14px !important;
  }

  .site-footer .footer-menu li,
  .site-footer ul.footer-menu li,
  .site-footer nav .footer-menu li {
    display: inline-flex !important;
    width: auto !important;
  }

  .site-footer .footer-menu a,
  .site-footer ul.footer-menu a,
  .site-footer nav .footer-menu a {
    display: inline-block !important;
    width: auto !important;
    padding: 6px 0 !important;
    font-size: 0.92rem;
  }
}

/* ==========================================================
   About page utilities
   ========================================================== */
.ndl-about-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(32px, 5vw, 48px) 20px;
}

.ndl-about-page a {
  word-break: break-word;
}

.ndl-about-page .ndl-about-header {
  text-align: center;
  margin-bottom: clamp(32px, 5vw, 50px);
}

.ndl-about-page .ndl-about-kicker {
  max-width: 850px;
  margin: 0 auto;
  font-size: clamp(18px, 2.2vw, 20px);
  line-height: 1.65;
  color: var(--ndl-color-muted);
}

.ndl-about-page .ndl-about-story {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: clamp(24px, 4vw, 40px);
  align-items: center;
  margin-bottom: clamp(40px, 6vw, 60px);
}

.ndl-about-page .ndl-about-media {
  display: grid;
  gap: 20px;
}

.ndl-about-page .ndl-about-media img {
  width: 100%;
  display: block;
  border-radius: 18px;
  box-shadow: var(--ndl-shadow-sm);
}

.ndl-about-page .ndl-about-story-copy > * + * {
  margin-top: 1em;
}

.ndl-about-page .ndl-about-section {
  margin-bottom: clamp(40px, 6vw, 60px);
}

.ndl-about-page .ndl-about-section:last-child {
  margin-bottom: 0;
}

.ndl-about-page .ndl-about-panel {
  background: rgba(255,255,255,.72);
  border: 1px solid var(--ndl-color-border);
  border-radius: var(--ndl-radius-lg);
  padding: clamp(24px, 4vw, 40px);
  box-shadow: var(--ndl-shadow-sm);
}

.ndl-about-page .ndl-about-panel--muted {
  background: rgba(0,0,0,.025);
}

.ndl-about-page .ndl-about-panel--accent {
  background: rgba(78,167,102,.10);
}

.ndl-about-page .ndl-about-panel--dark {
  background: var(--ndl-charcoal);
  color: #fff;
  border-color: rgba(255,255,255,.12);
}

.ndl-about-page .ndl-about-panel--dark p,
.ndl-about-page .ndl-about-panel--dark .ndl-about-kicker,
.ndl-about-page .ndl-about-panel--dark .ndl-about-muted {
  color: rgba(255,255,255,.84);
}

.ndl-about-page .ndl-about-panel--dark h2,
.ndl-about-page .ndl-about-panel--dark h3 {
  color: #fff;
}

.ndl-about-page .ndl-about-center {
  text-align: center;
}

.ndl-about-page .ndl-about-grid,
.ndl-about-page .ndl-about-services {
  display: grid;
  gap: 20px;
}

.ndl-about-page .ndl-about-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ndl-about-page .ndl-about-services {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ndl-about-page .ndl-about-card {
  height: 100%;
  background: var(--ndl-color-surface);
  border: 1px solid var(--ndl-color-border);
  border-radius: var(--ndl-radius);
  padding: 24px;
  box-shadow: var(--ndl-shadow-sm);
}

.ndl-about-page .ndl-about-card > *:last-child,
.ndl-about-page .ndl-about-panel > *:last-child {
  margin-bottom: 0;
}

.ndl-about-page .ndl-about-list {
  max-width: 650px;
  margin: 20px auto 0;
  padding-left: 22px;
}

.ndl-about-page .ndl-about-list li + li {
  margin-top: 10px;
}

.ndl-about-page .ndl-about-cta {
  margin-top: 24px;
}

.ndl-about-page .ndl-about-cta .wp-block-button__link,
.ndl-about-page .ndl-about-cta-button {
  min-height: 48px;
}

@media (max-width: 900px) {
  .ndl-about-page .ndl-about-story,
  .ndl-about-page .ndl-about-grid,
  .ndl-about-page .ndl-about-services {
    grid-template-columns: 1fr;
  }

  .ndl-about-page .ndl-about-story {
    align-items: start;
  }
}

@media (max-width: 600px) {
  .ndl-about-page {
    padding-left: 16px;
    padding-right: 16px;
  }

  .ndl-about-page .ndl-about-panel,
  .ndl-about-page .ndl-about-card {
    padding: 18px;
  }

  .ndl-about-page .ndl-about-media {
    gap: 14px;
  }

  .ndl-about-page .ndl-about-list {
    padding-left: 18px;
  }
}