/* =========================================================
   Pelham Lodge — main.css
   Design tokens → Reset → Layout → Typography → Nav →
   Banner → Components → Responsive
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap');

/* ---------------------------------------------------------
   1. Design tokens
   --------------------------------------------------------- */
:root {
  --colour-nav:        #2C4A5E;

  --colour-heading:    #955015;   /* original site brown */
  --colour-accent:     #CC3300;
  --colour-accent-dk:  #7A2800;
  --colour-highlight:  #E7AE6B;
  --colour-border:     #D8C8AA;
  --colour-text:       #333333;
  --colour-text-2:     #6A6A6A;
  --colour-bg:         #FFFFFF;
  --colour-bg-alt:     #F7F3EE;
  --colour-footer-bg:  #1e3344;
  --colour-footer-txt: #B8C8D4;

  --font-body: 'Open Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --wrapper-max:   900px;
  --sidebar-width: 200px;
  --gap:           24px;
  --radius:        8px;

  --banner-height: 336px;
}


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

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

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--colour-text);
  background: #FAE7DB;  /* light warm background behind the card */
}

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

a {
  color: var(--colour-accent);
  text-decoration: none;
  transition: color 0.15s;
}
a:hover, a:focus {
  color: var(--colour-accent-dk);
  text-decoration: underline;
}

ul, ol {
  padding-left: 1.4em;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 0.5em;
  color: var(--colour-heading);
  letter-spacing: 0.02em;
}
h1 { font-size: 1.75rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem;  }
h4 { font-size: 1rem;    }

p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }



/* ---------------------------------------------------------
   3. Page wrapper
   --------------------------------------------------------- */
#wrapper {
  max-width: var(--wrapper-max);
  margin: 0 auto;
  background: var(--colour-bg);
  box-shadow: 0 8px 48px rgba(0,0,0,0.18);
}


/* ---------------------------------------------------------
   4. Header — static banner image
   --------------------------------------------------------- */
header {
  position: relative;
  height: var(--banner-height);
  overflow: hidden;
  background: var(--colour-nav);
}

.banner-rotator {
  position: absolute;
  inset: 0;
}
.banner-rotator img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Top bar: logo + site name + Book Online — white semi-transparent */
.header-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem var(--gap);
  background: rgba(255, 255, 255, 0.5);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
}

.header-logo {
  height: 52px;
  width: auto;
}

.header-sitename {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--colour-nav);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.header-sitename:hover {
  color: var(--colour-heading);
  text-decoration: none;
}

/* Book Online button — sits in the topbar flex row */
.header-book-btn {
  background: var(--colour-accent);
  color: #fff;
  padding: 0.4em 1.2em;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.86rem;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: background 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
  white-space: nowrap;
}
.header-book-btn:hover, .header-book-btn:focus {
  background: var(--colour-accent-dk);
  color: #fff;
  text-decoration: none;
}

/* Bottom overlay: AA logo + taglines on the image */
.header-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.75rem var(--gap);
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.6) 0%,
    rgba(0,0,0,0.0) 100%
  );
}

.header-aa-logo {
  height: 50px;
  width: auto;
  flex-shrink: 0;
}

.header-taglines {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.header-tagline-1 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.05em;
  text-shadow: 0 1px 4px rgba(0,0,0,0.7);
  line-height: 1.2;
}

.header-tagline-2 {
  font-size: 0.83rem;
  color: rgba(255,255,255,0.9);
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
  line-height: 1.3;
}


/* ---------------------------------------------------------
   5. Body row: sidebar + main
   --------------------------------------------------------- */
#body-row {
  display: flex;
  align-items: stretch;
}

/* Sidebar — lighter blue-grey */
#sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: #4A7290;  /* medium steel blue, lighter than header/footer */
  padding: 1.25rem 0;
}

#sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
}
#sidebar-nav li {
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
#sidebar-nav a {
  display: block;
  padding: 0.55em 1rem;
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  font-weight: 400;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
}
#sidebar-nav a:hover,
#sidebar-nav a:focus {
  background: rgba(0,0,0,0.22);
  color: #fff;
  text-decoration: none;
}
#sidebar-nav a.current {
  background: rgba(0,0,0,0.3);
  color: #fff;
  font-weight: 600;
  border-left: 3px solid var(--colour-highlight);
  padding-left: calc(1rem - 3px);
}
#sidebar-nav a[target="_blank"]::after {
  content: ' ↗';
  font-size: 0.72em;
  opacity: 0.5;
}

.sidebar-contact {
  padding: 0 1rem;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.7;
}
.sidebar-contact p { margin-bottom: 0.5em; }
.sidebar-contact a { color: var(--colour-highlight); }
.sidebar-contact a:hover { color: #fff; }
.sidebar-contact .w3w {
  font-size: 0.77rem;
  margin-top: 0.2em;
}

/* Main content */
main {
  flex: 1;
  padding: var(--gap);
  min-width: 0;
}

main section {
  margin-bottom: 1.75rem;
}
main section:last-child {
  margin-bottom: 0;
}


/* ---------------------------------------------------------
   6. Mobile nav toggle (hamburger)
   --------------------------------------------------------- */
#nav-toggle {
  display: none;
  background: var(--colour-nav);
  border: none;
  color: #fff;
  width: 100%;
  padding: 0.7em var(--gap);
  font-size: 1rem;
  font-family: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  letter-spacing: 0.04em;
}
#nav-toggle::before { content: '☰  '; }
#nav-toggle[aria-expanded="true"]::before { content: '✕  '; }


/* ---------------------------------------------------------
   7. Footer
   --------------------------------------------------------- */
footer {
  background: var(--colour-footer-bg);
  color: var(--colour-footer-txt);
  text-align: center;
  font-size: 0.85rem;
  padding: 1.25rem var(--gap);
  line-height: 1.8;
}
footer a { color: var(--colour-highlight); }
footer a:hover { color: #fff; }
footer p + p { margin-top: 0.2em; margin-bottom: 0; }


/* ---------------------------------------------------------
   8. Typography helpers
   --------------------------------------------------------- */
.section-heading {
  color: var(--colour-heading);
  margin-bottom: 1.1rem;
}
.section-heading::after {
  content: '';
  display: block;
  width: 2.5rem;
  height: 2px;
  background: var(--colour-highlight);
  margin-top: 0.35em;
}

.intro-tagline {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--colour-heading);
  margin-bottom: 1.1rem;
}

.text-muted { color: var(--colour-text-2); }


/* ---------------------------------------------------------
   9. Award badges
   --------------------------------------------------------- */
.award-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-top: 1.25rem;
}
.award-badges img {
  display: inline-block;
  max-height: 90px;
  width: auto;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.12));
}


/* ---------------------------------------------------------
   10. Room cards
   --------------------------------------------------------- */
.room-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 1rem;
}
.room-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  transition: box-shadow 0.2s, transform 0.2s;
}
.room-card:hover,
.room-card:focus {
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
  transform: translateY(-2px);
  color: inherit;
  text-decoration: none;
}
.room-card img {
  width: 100%;
  height: 155px;
  object-fit: cover;
}
.room-card-body {
  padding: 0.9rem;
}
.room-card-body h3 {
  margin-bottom: 0.3em;
}


/* ---------------------------------------------------------
   11. Tariff tables
   --------------------------------------------------------- */
.tariff-section {
  margin-bottom: 2rem;
}
.tariff-section > h3 {
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

/* Side-by-side weekday / weekend layout */
.tariff-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 0.5rem;
}
.tariff-pair-col > h3 {
  margin-top: 0;
  padding: 0.4em 0.7em;
  border-left: 3px solid var(--colour-highlight);
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.tariff-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.91rem;
}
.tariff-table th,
.tariff-table td {
  padding: 0.5em 0.7em;
  border: none;
  border-bottom: 1px solid var(--colour-border);
  text-align: left;
}
.tariff-table thead th {
  background: var(--colour-nav);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
}
.tariff-table tbody tr:nth-child(odd) {
  background: var(--colour-bg-alt);
}
.tariff-table td:last-child {
  font-weight: 600;
  white-space: nowrap;
}


/* ---------------------------------------------------------
   12. Photo gallery
   --------------------------------------------------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.6rem;
  margin-top: 1rem;
}
/* Each gallery-item is a cell: link (image) + plain caption below */
.gallery-item {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  transition: box-shadow 0.2s;
}
.gallery-item:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.22);
}
.gallery-thumb {
  display: block;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
  text-decoration: none;
  aspect-ratio: 5 / 6;  /* 20% taller than wide */
}
.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
  display: block;
}
.gallery-thumb:hover img {
  transform: scale(1.06);
}
.gallery-caption {
  font-size: 0.76rem;
  color: var(--colour-text-2);
  text-align: center;
  padding: 0.25em 0.4em 0.35em;
  border-radius: 0 0 var(--radius) var(--radius);
}

/* CSS lightbox via :target */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.lightbox-overlay:target {
  display: flex;
}
.lightbox-overlay img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  box-shadow: 0 0 60px rgba(0,0,0,0.8);
  border-radius: 2px;
}
.lightbox-close {
  position: fixed;
  top: 1rem;
  right: 1.25rem;
  color: #fff;
  font-size: 2.5rem;
  line-height: 1;
  text-decoration: none;
  z-index: 1001;
  opacity: 0.8;
  transition: opacity 0.2s;
}
.lightbox-close:hover { opacity: 1; color: #fff; }


/* ---------------------------------------------------------
   13. Discount card lists
   --------------------------------------------------------- */
.discount-section ul {
  list-style: none;
  padding: 0;
}
.discount-section ul + h2 {
  margin-top: 2rem;
}
.discount-section li {
  padding: 0.4em 0;
  border-bottom: 1px solid var(--colour-border);
  font-size: 0.9rem;
  line-height: 1.45;
}
.discount-section li:last-child { border-bottom: none; }
.discount-section li a {
  font-weight: 600;
  color: var(--colour-heading);
}
.discount-section li a:hover {
  color: var(--colour-accent-dk);
}



/* ---------------------------------------------------------
   14. Reviews
   --------------------------------------------------------- */
.review-list {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
}
.review-item {
  background: var(--colour-bg-alt);
  border-left: 4px solid var(--colour-highlight);
  padding: 0.8rem 1rem;
  margin-bottom: 1.1rem;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.review-item h3 {
  margin-bottom: 0.2em;
  font-size: 1rem;
}
.review-meta {
  font-size: 0.82rem;
  color: var(--colour-text-2);
  margin-bottom: 0.4em;
}
.review-body {
  font-size: 0.91rem;
  line-height: 1.65;
}

.review-archives {
  margin-top: 1.75rem;
  font-size: 0.9rem;
}
.review-archives h3 {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}
.archive-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
}
.archive-links a {
  display: inline-block;
  padding: 0.3em 0.75em;
  border: 1px solid var(--colour-border);
  border-radius: var(--radius);
  font-size: 0.86rem;
  background: var(--colour-bg-alt);
  color: var(--colour-heading);
  transition: background 0.15s, color 0.15s;
}
.archive-links a:hover {
  background: var(--colour-nav);
  color: #fff;
  border-color: var(--colour-nav);
  text-decoration: none;
}

.tripadvisor-badge { margin-bottom: 1.25rem; }


/* ---------------------------------------------------------
   15. Location page
   --------------------------------------------------------- */
.location-intro {
  display: flex;
  justify-content: space-between;
  gap: 1.25rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.location-intro .map-embed {
  flex: 0 0 33%;
  max-width: 33%;
  margin: 0;
}

.location-intro .address-block {
  flex: 1;
  margin-bottom: 0;
}

.nearby-list {
  columns: 2;
  column-gap: 2rem;
}

.map-embed {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.map-embed img {
  width: 100%;
  height: auto;
  display: block;
}

.address-block {
  border-left: 4px solid var(--colour-highlight);
  padding: 0.8rem 1rem;
  margin-bottom: 1.1rem;
  font-size: 1.05rem;
  line-height: 1.8;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.address-block a { color: var(--colour-accent); }


/* ---------------------------------------------------------
   16. What's on page
   --------------------------------------------------------- */
.btn {
  display: inline-block;
  background: var(--colour-nav);
  color: #fff;
  padding: 0.5em 1.4em;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.2s;
}
.btn:hover, .btn:focus {
  background: var(--colour-accent-dk);
  color: #fff;
  text-decoration: none;
}

.guide-img {
  display: block;
  max-width: 100%;
  margin: 1.5rem 0;
  border-radius: var(--radius);
}


/* ---------------------------------------------------------
   17. Terms & Conditions / Staying with us sections
   --------------------------------------------------------- */
.terms-section {
  margin-bottom: 1.5rem;
  padding-bottom: 0.1rem;
}
.terms-section h2 {
  margin-bottom: 0.65em;
  font-size: 1.1rem;
}
.terms-section ul,
.terms-section ol {
  margin-top: 0.4em;
}
.terms-section li { margin-bottom: 0.2em; }



/* ---------------------------------------------------------
   18. Responsive — 768px breakpoint
   --------------------------------------------------------- */
@media (max-width: 768px) {

  :root {
    --banner-height: 228px;
  }

  #nav-toggle { display: block; }
  #sidebar {
    width: 100%;
    padding: 0;
  }
  #sidebar-nav {
    display: none;
    margin-bottom: 0;
  }
  #sidebar-nav.open { display: block; }
  .sidebar-contact {
    display: none;
    padding: 0.9rem 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
  }
  .sidebar-contact.open { display: block; }

  #body-row { flex-direction: column; }

  main { padding: 1.1rem; }

  .header-topbar { padding: 0.45rem 0.9rem; }
  .header-logo { height: 38px; }
  .header-sitename { font-size: 1rem; }
  .header-book-btn { font-size: 0.78rem; padding: 0.35em 0.7em; }
  .header-overlay { padding: 0.6rem 0.9rem; gap: 0.6rem; }
  .header-aa-logo { height: 36px; }
  .header-tagline-1 { font-size: 0.88rem; }
  .header-tagline-2 { font-size: 0.76rem; }

  .tariff-pair {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }

  .tariff-table { font-size: 0.83rem; }
  .tariff-table th,
  .tariff-table td { padding: 0.4em 0.45em; }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  }

  .location-intro {
    flex-direction: column;
  }
  .location-intro .map-embed {
    flex: 0 0 75%;
    max-width: 75%;
    margin: 0;
  }
  .nearby-list {
    columns: 1;
  }
}

@media (max-width: 480px) {
  :root { --gap: 14px; }

  .room-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .header-sitename { display: none; } /* logo only at very narrow */
}
