    :root {
      --brand-blue: #246f91;
      --brand-green: #596c30;
      --brand-gold: #7d824c;
      --card-bg: rgba(238, 238, 238, 0.96);
      --text-main: #111;
      --text-muted: #444;
      --radius-lg: 18px;
      --shadow-soft: 0 18px 45px rgba(0,0,0,.25);
      --max-width: 1120px;
    }

    * {
      box-sizing: border-box;
    }

    html {
      scroll-behavior: smooth;
    }

    body {
      margin: 0;
      font-family: "Raleway", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      color: var(--text-main);
      min-height: 100vh;
    }

/* Background image – using your bckld.jpg */
body.bckld {
  position: relative;
  background-color: #e0e6dd;
  background-image: url("https://www.cottagesinparadise.co.uk/gifs/bckld.jpg");
  background-position: center top;
  background-repeat: no-repeat;
  background-size: 100% auto;   /* match old behaviour: full width, natural height */
}

/* Lighter, more “sunny” overlay – now safe on mobile */
body.bckld::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.18),
    rgba(0, 0, 0, 0.25)
  );
  z-index: 0;
  pointer-events: none;
}

/* Ensure content sits above the overlay */
.cip-shell {
  position: relative;
  z-index: 1;
}

IMG.fullscreen{width:100%;}
IMG.fullscreenall{width:100%;}

    .cip-shell {
      min-height: 100vh;
      display: flex;
      flex-direction: column;
    }

    .cip-inner {
      width: 100%;
      max-width: var(--max-width);
      margin: 0 auto;
      padding: 16px 16px 40px;
    }

    /* ===== NAVBAR / HEADER ===== */
    header.cip-header {
      position: sticky;
      top: 0;
      z-index: 30;
      backdrop-filter: blur(9px);
      background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.7),
        rgba(0,0,0,0.25)
      );
      border-bottom: 1px solid rgba(255,255,255,0.23);
    }

    .cip-header-inner {
      max-width: var(--max-width);
      margin: 0 auto;
      padding: 10px 16px;
      display: flex;
      align-items: center;
      gap: 18px;
    }

    .cip-logo-link {
      display: inline-flex;
      align-items: center;
      text-decoration: none;
    }

    .cip-logo {
      height: 72px;
      width: auto;
      border-radius: 10px;
      display: block;
    }

    .cip-site-title {
      font-family: "Caveat", cursive;
      color: #fff;
      font-size: 30px;
      letter-spacing: 1px;
      margin: 0;
      line-height: 1.1;
      text-shadow: 0 2px 6px rgba(0,0,0,.7);
      padding-left:34px;
      display:none;
    }

    .cip-nav-spacer {
      flex: 1;
    }

    /* If you want to keep using nav.css/dropdown.css, this wrapper just keeps it tidy */
    .cip-nav-wrapper {
      display: flex;
      align-items: center;
      justify-content: flex-end;
    }

    /* Ensure links in nav are legible on the dark header */
    .cip-nav-wrapper a {
      color: #fff;
    }

    /* ===== MAIN CARD ===== */
    main.cip-main {
      flex: 1;
      display: flex;
      justify-content: center;
      padding: 18px 16px 40px;
    }

    .cip-main-card {
      width: 100%;
      max-width: var(--max-width);
      background: var(--card-bg);
      border-radius: 24px;
      box-shadow: var(--shadow-soft);
      padding: 24px 22px 28px;
      display: grid;
      grid-template-columns: minmax(0, 3fr) minmax(0, 2.2fr);
      gap: 32px;
      margin-top: 270px;
    }

    @media (max-width: 900px) {
      .cip-main-card {
        grid-template-columns: minmax(0, 1fr);
        padding: 20px 18px 24px;
        margin-top: 14px;
        margin-top: 270px;
      }
    }

    /* ===== TYPOGRAPHY ===== */

    h1 {
      font-family: "Caveat", cursive;
      color: var(--brand-blue);
      font-size: 40px;
      line-height: 1.1;
      margin: 0 0 6px;
      letter-spacing: -0.5px;
    }

    .cip-subtitle {
      font-family: "Caveat", cursive;
      font-size: 30px;
      color: var(--brand-gold);
      margin: 0 0 14px;
      border-bottom: 1px solid rgba(0,0,0,0.14);
      padding-bottom: 8px;
    }

    h2 {
      font-family: "Caveat", cursive;
      color: var(--brand-gold);
      font-size: 32px;
      margin: 20px 0 8px;
      border-bottom: 1px solid rgba(0,0,0,0.18);
      padding-bottom: 6px;
    }

    h3 {
      font-family: "Caveat", cursive;
      color: #2c64b4;
      font-size: 22px;
      margin: 8px 0 4px;
    }

    p {
      margin: 8px 0;
      font-size: 15px;
      line-height: 1.6;
      color: var(--text-muted);
    }

    ul {
      padding-left: 1.2em;
      margin: 10px 0 0;
    }

    li {
      margin-bottom: 4px;
      font-size: 15px;
      line-height: 1.5;
      color: var(--text-muted);
      list-style: circle;
    }

    a {
      color: var(--brand-blue);
      text-decoration: none;
    }

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

    /* ===== FORM FIELDS AND BUTTONS ===== */

 .select { 
    border: 1px solid #c4c4c4; 
    width: 300px; 
    font-size: 13px; 
    padding: 4px 4px 4px 4px; 
    border-radius: 4px; 
    -moz-border-radius: 4px; 
    -webkit-border-radius: 4px; 
    box-shadow: 0px 0px 8px #d9d9d9; 
    -moz-box-shadow: 0px 0px 8px #d9d9d9; 
    -webkit-box-shadow: 0px 0px 8px #d9d9d9; 
} 
 
.select:focus { 
    outline: none; 
    border: 1px solid #7bc1f7; 
    box-shadow: 0px 0px 8px #7bc1f7; 
    -moz-box-shadow: 0px 0px 8px #7bc1f7; 
    -webkit-box-shadow: 0px 0px 8px #7bc1f7; 
} 


  .smallselect { 
    border: 1px solid #c4c4c4; 
    width: 140px; 
    font-size: 13px; 
    padding: 4px 4px 4px 4px; 
    border-radius: 4px; 
    -moz-border-radius: 4px; 
    -webkit-border-radius: 4px; 
    box-shadow: 0px 0px 8px #d9d9d9; 
    -moz-box-shadow: 0px 0px 8px #d9d9d9; 
    -webkit-box-shadow: 0px 0px 8px #d9d9d9; 
} 
 
.smallselect:focus { 
    outline: none; 
    border: 1px solid #7bc1f7; 
    box-shadow: 0px 0px 8px #7bc1f7; 
    -moz-box-shadow: 0px 0px 8px #7bc1f7; 
    -webkit-box-shadow: 0px 0px 8px #7bc1f7; 
} 

    .button {
      background-color: var(--brand-green);
      color: #fff;
      border: none;
      padding: 11px 26px;
      font-size: 15px;
      font-weight: 600;
      border-radius: 999px;
      text-transform: uppercase;
      cursor: pointer;
      transition: background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 8px 20px rgba(0,0,0,.18);
      text-decoration: none;
      letter-spacing: 0.05em;
      margin-top: 10px;
    }

    .button span {
      white-space: nowrap;
    }

    .button:hover {
      background-color: #727d3b;
      transform: translateY(-1px);
      box-shadow: 0 12px 26px rgba(0,0,0,.22);
      text-decoration: none;
      color: #fff;
    }

    .button:focus-visible {
      outline: 2px solid #fff;
      outline-offset: 3px;
    }

    .button-secondary {
      background-color: #ffffff;
      color: var(--brand-blue);
      border: 1px solid rgba(0,0,0,.12);
      box-shadow: 0 4px 12px rgba(0,0,0,.12);
    }

    .button-secondary:hover {
      background-color: #f7faf7;
      color: #000;
    }

    /* ===== HERO CONTENT ===== */

    .cip-hero-text p:first-of-type {
      margin-top: 4px;
    }

    .cip-hero-actions {
      margin-top: 16px;
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
    }

    /* ===== COTTAGE CARDS ===== */

    .cottages-section {
      margin-top: 4px;
    }

    .cottages-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 18px;
      margin-top: 10px;
    }

    @media (max-width: 900px) {
      .cottages-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }

    @media (max-width: 600px) {
      .cottages-grid {
        grid-template-columns: minmax(0, 1fr);
      }
    }

    .cottage-card {
      background: #fdfdfd;
      border-radius: 16px;
      box-shadow: 0 8px 18px rgba(0,0,0,.12);
      overflow: hidden;
      display: flex;
      flex-direction: column;
    }

    .cottage-card a {
      text-decoration: none;
      color: inherit;
    }

    .cottage-card img {
      display: block;
      width: 100%;
      height: 190px;
      object-fit: cover;
    }

    .cottage-body {
      padding: 10px 12px 12px;
    }

    .cottage-name {
      font-family: "Caveat", cursive;
      font-size: 24px;
      margin: 2px 0 6px;
      color: var(--brand-blue);
    }

    .cottage-features {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-top: 6px;
      margin-bottom: 6px;
      flex-wrap: wrap;
    }

    .cottage-features img {
      height: 22px;
      width: auto;
    }

    .cottage-occupancy {
      margin-top: 4px;
      font-size: 14px;
      color: var(--text-muted);
      display: flex;
      align-items: center;
      gap: 3px;
      flex-wrap: wrap;
    }

    .cottage-occupancy img {
      height: 12px;
      width: auto;
    }

    .cottage-occupancy span {
      margin-left: 4px;
      font-weight: 600;
      color: #333;
    }

    /* ===== DISCOVER SECTION ===== */

    .discover-section {
      margin-top: 16px;
    }

    /* ===== IMAGE STRIP (SIMPLE GALLERY INSTEAD OF JSSOR) ===== */

    .gallery-section {
      margin-top: 18px;
    }

    .gallery-strip {
      position: relative;
      overflow-x: auto;
      display: flex;
      gap: 8px;
      scroll-snap-type: x mandatory;
      padding-bottom: 4px;
      scrollbar-width: thin;
      scrollbar-color: rgba(0,0,0,.4) transparent;
    }

    .gallery-strip::-webkit-scrollbar {
      height: 6px;
    }

    .gallery-strip::-webkit-scrollbar-track {
      background: transparent;
    }

    .gallery-strip::-webkit-scrollbar-thumb {
      background: rgba(0,0,0,.4);
      border-radius: 999px;
    }

    .gallery-slide {
      flex: 0 0 100%;
      max-width: 100%;
      scroll-snap-align: center;
      border-radius: 16px;
      overflow: hidden;
      box-shadow: 0 10px 24px rgba(0,0,0,.24);
    }

    .gallery-slide img {
      display: block;
      width: 100%;
      height: 320px;
      object-fit: cover;
    }

    @media (min-width: 900px) {
      .gallery-slide {
        flex-basis: 70%;
        margin-inline: auto;
      }

      .gallery-slide img {
        height: 360px;
      }
    }

    .gallery-note {
      font-size: 13px;
      color: #666;
      margin-top: 6px;
    }

    /* ===== FOOTER ===== */

    .cip-footer {
      margin-top: 3px;
      background: #deeaf0 url("https://www.cottagesinparadise.co.uk/gifs/nslide8.jpg") center top no-repeat;
      background-size: cover;
      color: #000;
      padding: 26px 16px 34px;
      padding-top:675px;
    }

    .cip-footer-inner {
      max-width: var(--max-width);
      margin: 0 auto;
      background: rgba(255,255,255,0.84);
      border-radius: 16px;
      padding: 16px 18px 18px;
      display: flex;
      flex-wrap: wrap;
      align-items: flex-start;
      gap: 16px;
      font-size: 14px;
    }

    .footer-logo {
      flex: 0 0 auto;
    }

    .footer-logo img {
      display: block;
      width: 150px;
      height: auto;
    }

    .footer-text {
      flex: 1 1 220px;
    }

    .footer-text p {
      margin: 4px 0;
      font-size: 14px;
      color: #222;
    }

    .footer-text img {
      vertical-align: middle;
    }

    .footer-meta {
      flex: 0 0 200px;
      font-size: 13px;
      text-align: right;
    }

    @media (max-width: 700px) {
      .cip-footer-inner {
        text-align: left;
      }
      .footer-meta {
        text-align: left;
      }
    }

    /* ===== COOKIE BANNER ===== */

    .cookie-banner {
      position: fixed;
      inset-inline: 0;
      bottom: 0;
      padding: 10px 14px;
      background: rgba(178,175,175,0.96);
      font-size: 13px;
      line-height: 1.4;
      z-index: 40;
      display: flex;
      justify-content: center;
      box-shadow: 0 -4px 10px rgba(0,0,0,.3);
    }

    .cookie-inner {
      max-width: var(--max-width);
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      align-items: center;
    }

    .cookie-inner p {
      margin: 0;
      color: #111;
    }

    .cookie-inner a {
      color: #000;
      font-weight: 600;
    }

    .cookie-actions {
      margin-left: auto;
      display: flex;
      gap: 8px;
    }

    @media (max-width: 650px) {
      .cookie-banner {
        padding: 10px;
      }
      .cookie-inner {
        flex-direction: column;
        align-items: flex-start;
      }
      .cookie-actions {
        margin-left: 0;
      }
    }

/* Mobile header / nav fixes */
@media (max-width: 800px) {
  .cip-header-inner {
    flex-wrap: wrap;
    gap: 10px;
  }

  .cip-logo {
    height: 60px;
  }

  .cip-site-title {
    font-size: 24px;
  }

  .cip-nav-wrapper {
    width: 100%;
    justify-content: flex-start; /* or center if you prefer */
    margin-top: 6px;
  }

  .cip-nav-wrapper .navbar-inner {
    width: 100%;
  }

  .cip-nav-wrapper .nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .cip-nav-wrapper a {
    font-size: 14px;
    white-space: nowrap;
  }
}
}
@media (max-width: 800px) {
  body.bckld {
    background-size: 1200px auto;  /* fixed width, so you see more of the scene */
    background-position: center top;
  }
}

/* Mobile hero: ensure we see a tall slice of the background image */
@media (max-width: 800px) {
  html,
  body {
    overflow-x: hidden;          /* hide any horizontal overflow */
  }

  body.bckld {
    /* Scale image so its height is ~555px; width can overflow off-screen */
    background-size: auto 755px;
    background-position: left top;
  }

  /* Push the main content card down so the first 555px is mostly background */
  .cip-main-card {
    margin-top: 355px;
  }
}

/* ===== Dolgenau Hir – page-specific hero image ===== */

/* Desktop / default */
body.bckld.dolgenauhir {
  background-image: url("https://www.cottagesinparadise.co.uk/gifs/nslide5.jpg");
}

/* Mobile – keep same behaviour as home but with this image */
@media (max-width: 800px) {
  body.bckld.dolgenauhir {
    background-size: auto 555px;    /* tall hero slice */
    background-position: center top;
  }
}

/* ===== Lower Dolgenau – page-specific hero image ===== */

body.bckld.lowerdolgenau {
  background-image: url("https://www.cottagesinparadise.co.uk/gifs/lowerd2025.jpg");
}

/* (mobile shares the same size rules as other bckld pages) */

/* Town Cottage - custom background image */
body.bckld.towncottage {
  background-image: url("https://www.cottagesinparadise.co.uk/gifs/nslide3.jpg");
}

body.bckld.contactpage {
  background-image: url("https://www.cottagesinparadise.co.uk/gifs/bck2026.jpg"); /* or another contact bg */
}


/* ==== Guestbook layout / width fix ==== */

/* Drop the grid and make the card narrower + centred */
body.guestbookpage .cip-main-card {
  display: block;                /* no grid, simple block layout */
  max-width: 880px;              /* narrower than the site max */
  margin: 40px auto 32px;        /* centre horizontally, nice top/bottom spacing */
  margin-top: 270px;
}

/* Centre all direct children as a column with comfortable line length */
body.guestbookpage .cip-main-card > * {
  max-width: 70ch;               /* readable line length */
  margin-left: auto;
  margin-right: auto;
}

/* Keep a bit of space under the intro block */
body.guestbookpage .cip-hero-text {
  margin-bottom: 24px;
}

/* ==== Contact page layout / width fix ==== */

/* Drop the grid and make the card narrower + centred */
body.contactpage .cip-main-card {
  display: block;                /* no grid, simple block layout */
  max-width: 880px;              /* narrower than the site max */
  margin: 40px auto 32px;        /* centre horizontally, nice top/bottom spacing */
  margin-top: 270px;
}

/* Centre all direct children as a column with comfortable line length */
body.contactpage .cip-main-card > * {
  max-width: 70ch;               /* readable line length */
  margin-left: auto;
  margin-right: auto;
}

/* Keep a bit of space under the intro block */
body.contactpage .cip-hero-text {
  margin-bottom: 24px;
}

body.guestbookpage .cip-main-card {
  display: block;
  max-width: 880px;
  margin: 40px auto 32px;
  margin-top: 270px;
}

body.guestbookpage .cip-main-card > * {
  max-width: 70ch;
  margin-left: auto;
  margin-right: auto;
}

/* Availability page – narrow card like guestbook / cottages */
body.availabilitypage .cip-main-card {
  display: block;
  max-width: 960px;
  margin: 40px auto 32px;
  margin-top: 270px;
}

/* Make the text column comfortable */
body.availabilitypage .cip-hero-text,
body.availabilitypage .availability-section,
body.availabilitypage .booking-form-section {
  max-width: 70ch;
  margin-left: auto;
  margin-right: auto;
}

/* Mobile fix for availability page */
@media (max-width: 800px) {
  body.availabilitypage.bck20203 {
    background-attachment: scroll;   /* stop the zoomy fixed behaviour */
    background-position: center top;
    background-size: cover;
  }
}

/* Spacing between calendars */
body.availabilitypage .availability-section h2 {
  margin-top: 32px;
  margin-bottom: 8px;
}

/* Booking iframes – full width, tidy inside card */
body.availabilitypage .booking {
  width: 100%;
  max-width: 100%;
  min-height: 430px;
  border: 0;
  border-radius: 18px;
  background:#ffffff;
  box-shadow: 0 8px 20px rgba(0,0,0,.06);
  margin-bottom: 24px;
}

/* Availability page background */
body.bck20203 {
  position: relative;
  background: #e0e6dd url("https://www.cottagesinparadise.co.uk/gifs/bck2020-3.jpg")
              center top no-repeat fixed;
  background-size: cover;
}

/* Mobile fix – avoid weird fixed behaviour on phones */
@media (max-width: 800px) {
  body.bck20203 {
    background-attachment: scroll;
    background-position: center top;
    background-size: cover;
  }
}

/* Background for the Cottages overview page */
body.cottagespage {
  background: #e0e6dd url("https://www.cottagesinparadise.co.uk/gifs/bck2020-5.jpg")
              center top no-repeat fixed;
  background-size: cover;
  position: relative;
}

/* Mobile behaviour — avoid fixed backgrounds jumping on iOS */
@media (max-width: 800px) {
  body.cottagespage {
    background-attachment: scroll;
    background-position: center top;
    background-size: cover;
  }
}
