/* =============================================================
   The Sloop Inn, Llandogo — Shared Stylesheet
   Extracted from index.html — applies to all pages
   ============================================================= */

html { overflow-y: scroll; }

body {
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 15px;
  color: #333333;
  margin: 0;
  background-image: url(https://www.thesloopinn.co.uk/graphics/default/bg_0.png);
  background-repeat: repeat;
}

td { font-family: 'Trebuchet MS', sans-serif; font-size: 15px; color: #333333; }
th { font-family: 'Lucida Grande', sans-serif; font-size: 1.1em; color: #3e69ac; text-align: left; }
p  { text-align: justify; font-family: 'Trebuchet MS', sans-serif; font-size: 15px; color: #333333; }
h1, h2, h3, h4, h5, h6 { font-family: 'Lucida Grande', sans-serif; padding: 0; margin: 0; }

a:link    { font-family: 'Trebuchet MS', sans-serif; color: #6290d9; font-size: inherit; text-decoration: none; }
a:visited { font-family: 'Trebuchet MS', sans-serif; color: #6290d9; font-size: inherit; text-decoration: none; }
a:hover   { font-family: 'Trebuchet MS', sans-serif; color: #3e69ac; font-size: inherit; text-decoration: none; }
a:active  { font-family: 'Trebuchet MS', sans-serif; color: #6290d9; font-size: inherit; text-decoration: none; font-weight: bold; }

ul    { list-style-image: url("https://www.thesloopinn.co.uk/images/bullet.png"); list-style-position: outside; display: table; }
ol    { list-style-position: outside; display: table; }
li    { margin-left: 20px; }
table { border: 1px solid #e5e5e5; }


/* ─── Layout layers ─── */

.masterlayer {
  position: relative; left: 0; top: 0; width: 100%;
  margin-bottom: 40px; display: flex; flex-direction: column; justify-content: center;
}

.wrapperlayer {
  position: relative; top: 0; width: 100%; margin: 0 auto; opacity: 1;
  display: flex; flex-direction: column; justify-content: flex-start; box-sizing: border-box;
}

.wrapperlayer_24 {
  position: relative; top: 0; width: 100%; margin: 0 auto; margin-bottom: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; box-sizing: border-box;
}

.colparentlayer_nb {
  position: relative; left: 0; top: 0; width: 100%; background-color: transparent;
  padding: 0 10px; display: flex; flex-direction: column; justify-content: space-around; box-sizing: border-box;
}

.collayer {
  float: top; width: 100%; margin-top: 0; margin-bottom: 10px;
  padding: 0 10px 20px; display: flex; flex-direction: column; justify-content: flex-start; box-sizing: border-box;
}


/* ─── Fixed header ─── */

.fixed-header {
  position: fixed; left: 0; top: 0; width: 100%; z-index: 1800; height: 216px; margin-bottom: 20px;
}


/* ─── Navigation ─── */

#menubglayer {
  position: fixed; top: 0; left: 0; width: 100vw; height: 36px;
  background-color: #e5e5e5; display: flex; flex-direction: row;
  justify-content: space-around; z-index: 16000;
}

.rowlayer_menu {
  display: flex; flex-direction: row; margin: 0 auto;
}

.menurowlayer {
  float: left; margin: 0 auto; padding-top: 0; height: 36px;
  font-family: 'Trebuchet MS', sans-serif; font-weight: 500;
  display: flex; flex-direction: row; justify-content: space-between;
  box-sizing: border-box; z-index: 160000;
}

.menugrouplayer {
  position: relative; left: 0; top: 0; margin-bottom: 16px;
  min-height: 36px; line-height: 36px; display: block; text-align: center;
  font-family: 'Trebuchet MS', sans-serif; font-weight: 500; color: #6290d9; z-index: 1600;
}

.menuitemlayer {
  float: top; width: 100%; height: 36px; line-height: 36px; display: block;
  text-align: center; font-family: 'Trebuchet MS', sans-serif; font-weight: 500;
  color: #6290d9; background-color: #e5e5e5; cursor: pointer; z-index: 1600;
}

.menusublayer {
  position: relative; left: 0; top: 0; width: 100%;
  font-family: 'Trebuchet MS', sans-serif; font-weight: 500;
  display: none; text-align: center; flex-direction: column;
  z-index: 1600; background-color: #e5e5e5; cursor: pointer;
}


/* ─── Logo / header image ─── */

#hdrbglayer {
  position: fixed; top: 0; left: 0; width: 100vw; height: 216px;
  display: flex; flex-direction: row; justify-content: center; z-index: 1;
}

#logolayer {
  position: relative; left: 0; top: 36px; width: 1280px; margin: 0 auto;
  cursor: pointer; z-index: -16001; display: flex; flex-direction: row; justify-content: space-around;
}


/* ─── Page header ─── */

.headerlayer {
  float: top; margin-top: 236px; margin-bottom: 20px; width: 1280px;
  font-family: 'Lucida Grande', sans-serif; color: #3e69ac; font-size: 1.4em; font-weight: bold;
  z-index: 10; background-color: #FFFFFF; opacity: 1;
  border: 0 solid #cccccc; border-radius: 0.60em; box-shadow: 5px 5px 10px #cccccc;
  padding: 20px; box-sizing: border-box;
}


/* ─── Main content area ─── */

.contentlayer {
  position: relative; left: 0; top: 20px; width: 1280px; margin: 0 auto;
  font-family: 'Trebuchet MS', sans-serif; color: #333333; font-size: 15px;
  background-color: #FFFFFF; opacity: 1; border: 0 solid #cccccc;
  border-radius: 0.60em; box-shadow: 5px 5px 10px #cccccc; padding: 20px;
  display: flex; flex-direction: column; justify-content: center;
  z-index: 240; box-sizing: border-box;
}


/* ─── Content styling ─── */

.tightheaderlayer {
  margin: 0 auto; padding: 10px; width: 100%; min-height: 32px; line-height: 32px;
  display: flex; flex-direction: row; justify-content: flex-start; align-items: center;
  font-family: 'Lucida Grande', sans-serif; color: #3e69ac; font-size: 1.4em;
  font-weight: bold; box-sizing: border-box;
}

.tightheaderlayer_ic {
  margin: 0 auto; padding: 10px; width: 100%; min-height: 32px; line-height: 1.4;
  display: block; text-align: center; font-family: 'Lucida Grande', sans-serif;
  color: #3e69ac; font-size: 1.4em; font-weight: bold; font-style: oblique; box-sizing: border-box;
}

.tightheaderlayer_inv {
  position: relative; margin-bottom: 20px; padding: 20px; width: 100%; min-height: 32px;
  line-height: 32px; display: flex; flex-direction: row; justify-content: space-between;
  align-items: center; font-family: 'Lucida Grande', sans-serif; background-color: #3e69ac;
  color: #FFFFFF; font-size: 1.4em; font-weight: bold; box-sizing: border-box;
}

.gblayer_inv {
  position: relative; left: 0; top: 0; width: 96%; margin: 20px; color: #FFFFFF;
  background-color: #3e69ac; text-align: justify; display: flex; flex-flow: column wrap;
  justify-content: space-around; box-sizing: border-box;
}

.gridmemberlayer_fit_flat_inv {
  position: relative; left: 0; top: 0; width: 100%; padding: 10px; box-sizing: border-box;
}


/* ─── Grid / card system ─── */

.gridlayer {
  position: relative; left: 0; top: 0; width: 100%; padding: 0;
  background-color: #FFFFFF; display: flex; flex-wrap: wrap;
  justify-content: space-between; row-gap: 20px;
}

.gridmemberlayer_100 {
  float: left; width: 100%; padding: 20px; margin-bottom: 20px; margin-top: 10px;
  display: flex; flex-direction: column; justify-content: space-around;
  background-color: #ffffff; border: 0 solid #cccccc; border-radius: 0.60em;
  box-shadow: 5px 5px 10px #cccccc; box-sizing: border-box;
}

.gridmemberlayer {
  float: left; width: 600px; min-height: 600px; margin: 20px 0;
  display: flex; flex-direction: column; justify-content: space-around;
  background-color: #ffffff; border: 0 solid #cccccc; border-radius: 0.60em;
  box-shadow: 5px 5px 10px #cccccc; padding: 20px; box-sizing: border-box;
}

.gridhdrlayer {
  float: left; width: 100%; padding: 20px 0; display: flex; flex-direction: row;
  justify-content: center; text-align: center; color: #3e69ac;
  font-family: 'Lucida Grande', sans-serif; font-weight: 500; font-size: 1.2em; box-sizing: border-box;
}

.gridimglayer {
  float: left; width: 100%; margin: 0 auto; text-align: center; box-sizing: border-box;
}

.rowlayer {
  float: left; width: 100%; display: flex; flex-direction: row;
  justify-content: space-around; margin-top: 10px; margin-bottom: 0; padding: 0; box-sizing: border-box;
}


/* ─── Style helpers ─── */

.style4 {
  font-family: 'Lucida Grande', sans-serif; font-size: 1.4em; font-weight: bold;
  color: #3e69ac; padding-top: 0;
}

.modlinkfixlayer {
  position: relative; bottom: 0; left: 0; width: 100%; text-align: left; padding: 10px; font-size: 1.2em;
}

.showlayer_right {
  position: absolute; top: 0; right: 0; width: 36px; height: 36px; display: block;
  z-index: 1000000; cursor: pointer;
}

.colparentlayer_none {
  position: relative; left: 0; top: 0; background-color: #fff;
  border-radius: 0.6em; box-shadow: 5px 5px 10px #ccc; padding: 20px;
  display: none; flex-direction: column; justify-content: center; box-sizing: border-box;
}


/* ─── Footer ─── */

.footeroutlayer {
  position: relative; left: 0; top: 40px; padding: 20px 0;
  min-height: 240px; overflow: hidden; width: 100vw;
  display: flex; flex-direction: column; justify-content: space-between;
}

.rowlayer_head {
  position: relative; left: 0; top: 0; margin: 0 auto; margin-top: 0;
  width: 1280px; box-sizing: border-box; line-height: 2;
}

.rowlayer_head a    { font-size: 0.8em; }
.rowlayer_head span { font-size: 0.8em; }


/* ─── Cookies banner ─── */

#cookieouterframe {
  position: fixed; left: 0; bottom: 0; width: 100%; height: 24px;
  display: flex; flex-direction: row; z-index: 11101;
}

#cookieinnerframe {
  position: relative; left: 0; top: 0; width: 70%; height: 120px;
  background-color: #FFFFFF; color: #333333; text-align: center;
  padding: 10px 20px; opacity: 0.8; font-size: 0.8em;
}

#cookieoklayer {
  float: left; width: 30%; height: 120px; background-color: #e4e4e4; opacity: 0.8;
}

#cookieouterframe:hover                              { height: 120px; }
#cookieouterframe:hover #cookieinnerframe,
#cookieouterframe:hover #cookieoklayer              { opacity: 1; }

.cookie-btn {
  width: 180px; height: 24px; line-height: 24px; margin: 12px auto 0;
  background-color: #cccccc; color: #333333; text-align: center;
  font-weight: bold; font-size: 0.8em; border: 1px solid #ffffff;
  border-radius: 0.4em; cursor: pointer;
}

#bttnslayer {
  position: relative; width: 100%; height: 120px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
}

#policylayer {
  position: fixed; left: 0; bottom: 120px; width: 100%;
  display: none; flex-direction: row; justify-content: space-around; z-index: 12000;
  background: #fff; padding: 20px; box-sizing: border-box;
  border-top: 1px solid #ccc; font-size: 0.85em;
}


/* ─── Additional grid member sizes ─── */

.gridmemberlayer_3 {
  float: left; width: 380px; min-height: 380px; display: flex;
  flex-direction: column; justify-content: space-around;
  background-color: #ffffff; border: 0 solid #cccccc;
  border-radius: 0.60em; box-shadow: 5px 5px 10px #cccccc;
  padding: 20px; box-sizing: border-box;
}

/* ─── Image flip card ─── */

.img_flip {
  float: left; width: 100%; margin: 0 auto; text-align: center;
  cursor: pointer; box-sizing: border-box; transition: transform 0.5s;
}

.gridimglayer_flip {
  float: left; width: 100%; margin: 0 auto; text-align: center;
  cursor: pointer; box-sizing: border-box;
}

/* ─── Grid text layer (below image in cards) ─── */

.gridlayer_txt {
  float: top; margin-top: 10px; width: 100%; margin: 0 auto;
  text-align: left; padding: 10px; box-sizing: border-box;
}

/* ─── Misc ─── */

.header-spacer { height: 216px; display: block; }


/* =============================================================
   RESPONSIVE — Mobile & Tablet
   All rules additive; nothing above is changed.
   Breakpoints:
     ≤ 1280px  tablet landscape  — fluid widths
     ≤  900px  tablet portrait   — 2-col cards
     ≤  600px  mobile            — 1-col, hamburger nav
   ============================================================= */


/* ── Hamburger button (hidden on desktop) ── */

#hamburger {
  display: none;
  position: fixed;
  top: 4px;
  right: 12px;
  z-index: 20000;
  width: 36px;
  height: 28px;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  padding: 4px 0;
  box-sizing: border-box;
}

#hamburger span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: #3e69ac;
  border-radius: 2px;
  transition: all 0.3s;
}

/* Animate to X when open */
#hamburger.open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
#hamburger.open span:nth-child(2) { opacity: 0; }
#hamburger.open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }


/* ── Mobile nav drawer ── */

#mobile-nav {
  display: none;
  position: fixed;
  top: 36px;       /* sits below the nav bar strip */
  left: 0;
  width: 100%;
  background-color: #e5e5e5;
  z-index: 15000;
  flex-direction: column;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  max-height: calc(100vh - 36px);
  overflow-y: auto;
}

#mobile-nav.open { display: flex; }

.mob-item {
  display: block;
  padding: 12px 20px;
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 1em;
  font-weight: 500;
  color: #3e69ac;
  border-bottom: 1px solid #cccccc;
  cursor: pointer;
  text-decoration: none;
}

.mob-item:hover, .mob-item:active { background-color: #f4f4f4; color: #3e69ac; }

.mob-group-hdr {
  display: block;
  padding: 12px 20px;
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 0.85em;
  font-weight: 700;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background-color: #d8d8d8;
  border-bottom: 1px solid #cccccc;
}

.mob-sub {
  display: block;
  padding: 10px 20px 10px 36px;
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 0.95em;
  color: #6290d9;
  border-bottom: 1px solid #e0e0e0;
  cursor: pointer;
  text-decoration: none;
}

.mob-sub:hover { background-color: #f4f4f4; color: #3e69ac; }


/* ── Tablet landscape: fluid widths, logo scales ── */

@media (max-width: 1280px) {

  .headerlayer      { width: 100%; margin-top: 236px; }
  .contentlayer     { width: 100%; }
  .rowlayer_head    { width: 100%; padding: 0 16px; }

  #logolayer {
    width: 100%;
    top: 36px;
  }

  #logolayer img {
    width: 100%;
    height: auto;
  }

  /* Cards: allow them to flex rather than sit at fixed 380px */
  .gridmemberlayer_3 {
    width: calc(50% - 12px);
    min-height: 0;
  }
}


/* ── Tablet portrait ── */

@media (max-width: 900px) {

  /* Header collapses — nav strip + taller logo */
  .fixed-header { height: 120px; }

  #menubglayer {
    height: 36px;
  }

  /* Hide desktop nav items; show hamburger */
  .menurowlayer  { display: none; }
  #hamburger     { display: flex; }

  /* Logo bar — taller at tablet to show more of the banner */
  #hdrbglayer { height: 120px; }
  #logolayer { position:fixed; top:36px; left:0; width:100%; height:150px; overflow:hidden }
  #logolayer a { display:block; width:100%; height:150px }
  #logolayer img { width:100%; height:150px; object-fit:cover; object-position:left top; display:block }

  /* Clearance = nav (36) + logo (150) + gap (20) */
  .headerlayer { margin-top:206px }

  /* Cards: 2 across, then 1 on mobile */
  .gridmemberlayer_3 {
    width: calc(50% - 12px);
    min-height: 0;
  }

  /* Stack the halflayer columns (contact/data policy) */
  .halflayer, .halflayer_r {
    width: 100%;
    float: none;
  }

  /* Row layouts that are flex-row → stack */
  .rowlayer_60, .rowlayer_30, .rowlayer_40, .rowlayer_50 {
    width: 100%;
    flex-direction: column;
  }

  /* Cookies banner */
  #cookieinnerframe { width: 100%; }
  #cookieoklayer    { width: 100%; }
}


/* ── Mobile ── */
@media (max-width: 600px) {

  .fixed-header { height: 132px; }
  #hdrbglayer   { height: 132px; }
  #logolayer    { position: fixed; top: 36px; left: 0; width: 100%; height: 96px; overflow: hidden; }
  #logolayer a   { display:block; width:100%; height:96px }
  #logolayer img { width:100%; height:96px; object-fit:cover; object-position:left top; display:block }

  /* Clearance = nav (36) + logo (96) + gap (14) = 146px */
  .headerlayer  { margin-top:146px; font-size:1.1em; padding:12px }
  .contentlayer { padding:12px; border-radius:0; box-shadow:none }

  /* Single column cards */
  .gridmemberlayer_3 {
    width: 100%;
    min-height: 0;
  }

  /* Flip cards: disable hover flip on touch (use click via existing onclick) */
  .img_flip { transition: none; }

  /* Page title smaller */
  .style4 { font-size: 1.15em; }

  /* Tighter section headers */
  .tightheaderlayer { font-size: 1.15em; line-height: 1.4; }
  .tightheaderlayer_inv { font-size: 1.1em; padding: 12px; margin-bottom: 12px; }

  /* Food menu items full-width */
  .menu-item { min-width: 100%; }

  /* Event blocks */
  .event-header { flex-direction: column; gap: 2px; }

  /* Footer link list: smaller, wraps naturally */
  .rowlayer_head { padding: 0 10px; line-height: 2.2; }

  /* Testimonial quotes slightly smaller font */
  .testimonial-quote { font-size: 1.5em; }

  /* Gallery grid */
  .gal-grid { gap: 8px; }
  .gal-thumb { width: calc(50% - 4px); }

  /* Blog images */
  .modimg_w { margin: 8px 0; }

  /* Data policy columns → stack */
  .halflayer[name="tgtlayer"] { min-height: 180px; }

  /* Contact form grid */
  .contact-grid { flex-direction: column; }

  /* Links columns */
  .links-cols { flex-direction: column; }

  /* Table on history page */
  table { font-size: 0.85em; }
  th, td { padding: 6px 4px; }
}
