/* Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overflow-y: auto;
  font-family: sans-serif;
  background: #111;
  color: #eee;
}

/* Remove flex layout from body */
body {
  display: block;
  background: #111;
}

/* Main feed fills available space above bottom nav */
main {
  display: block;
  min-height: calc(100vh - 3.5rem); /* leave room for bottom nav */
  overflow-y: auto;
  padding-bottom: 3vh;
  background: #111;
}

/* Typography and spacing fixes */
p {
  font-size: 1.5rem;
  display: block;
  line-height: 1.8;  /* now works properly */
  margin: 0.8rem 0;
}

#newsPanel p {
  font-size: 1.5rem;
  display: block;
  line-height: 1.5;  /* now works properly */
  margin: 0.8rem 0;
  padding: 1vw;
  padding-top: 0
}

h1, h2 {
  font-size: 3rem;
  margin: 1rem 0;
}

li {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

/* Horizontal rule */
hr {
  height: 1px;
  background: rgba(136, 136, 136, 0.1);
  border: none;
}

/* --- SIDE PANELS --- */
.sidebar {
  position: fixed;
  top: 0;
  width: 80%;
  height: 100%;
  overflow-y: auto;
  background: #111;
  color: #fff;
  padding: 1rem;
  transition: transform 0.3s ease;
  z-index: 100;
}

.sidebar.left {
  left: 0;
  transform: translateX(-100%);
  border-right: 1px solid rgba(136, 136, 136, 0.3);
}

.sidebar.right {
  right: 0;
  transform: translateX(100%);
  border-left: 1px solid rgba(136, 136, 136, 0.3);
}

.sidebar.open.left {
  transform: translateX(0);
}

.sidebar.open.right {
  transform: translateX(0);
}

/* --- BOTTOM NAV --- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #333;
  display: flex;
  justify-content: space-around;
  text-align: center;
  padding: 0.5rem 0;
  z-index: 200;
}

.bottom-nav button {
  padding: 0.75rem;
  color: #eee;
  background: none;
  border: none;
  font-size: 1rem;
}

.bottom-nav button:active {
  background: #444;
}

/* --- FEED STRUCTURE --- */
#feed section,
#feed .portfolio-large {
  border-top: 1px solid rgba(136, 136, 136, 0.3);
  border-right: 1px solid rgba(136, 136, 136, 0.3);
  border-left: 1px solid rgba(136, 136, 136, 0.3);
  padding: 1vw 3vw;
  margin: 0 auto;
  max-width: 100%;
}

#feed h1, #feed h2 {
  font-size: 1.5rem;
}

#feed p {
  line-height: 1.6; /* proper spacing for mobile readability */
}

.booking-button {
  display: inline-block;
  background: #2090ff;
  padding: 0.65vw 2vw;
  border-radius: 2vw;
  margin-left: auto;
  margin-right: 1vw;
}

.button {
  text-decoration: none;
  color: white;
}

/* Lists */
#why li {
  line-height: 1.8;
  list-style-position: inside;
}

/* Portfolio styling */
.portfolio-large {
  border-right: 1px solid rgba(136, 136, 136, 0.3);
  border-left: 1px solid rgba(136, 136, 136, 0.3);
}

.portfolio-large video {
  width: 100%;
  height: auto;
  display: block;
}

#newsPanel {
  overflow-y: auto;
  z-index: 201;
}

/* News panel tweaks */
#newsPanel section {
  padding: 0;
  margin: 1.5vw;
  width: auto;
  border: 1px solid rgba(136, 136, 136, 0.3);
  border-radius: 1vw;
}

#newsPanel h2 {
  font-size: 1.5rem;
  padding: 1vw;
}

#newsPanel div {
  padding: 1vw;
}

.portfolio-small {
  max-width: 80%;
  margin: 0 auto;
}

.sidebar * {
  line-height: normal;           /* don’t inherit the big value */
  font-size: clamp(0.8rem, 2vw, 1rem);  /* responsive font sizing */
  max-width: 100%;               /* prevent items from stretching */
  box-sizing: border-box;        /* keep padding predictable */
}

.sidebar {
  flex: 0 1 auto;                /* don’t force it to expand */
  overflow: hidden;              /* if needed to clip overflow */
}

.sidebar img, .sidebar svg {
  height: auto;
  width: clamp(1rem, 5vw, 2rem);
}

#newsPanel img {
  width: 100%;
}

.link-bubble {
display: flex;
align-items: center;
margin: 2vh;
padding: 2vh;
font-size: 1.4rem;
gap: 0.5rem;
}

.link-bubble img {
width: 10% !important;
}

nav a {
text-decoration: none;
color: white;
}

nav li {
list-style: none;
color: white;
padding: 1rem;
border-radius: 2rem;
transition: all 0.15s linear;
}

nav ul li:hover {
background: #333;
}


/* ========== Tablet layout (nav + feed visible, news toggleable) ========== */
@media (min-width: 600px) and (max-width: 1023px) {

  section p {
    line-height: 1.5rem;
  }

  p {
    font-size: 1.5rem;
    padding-top: 1rem;
  }
  
  h1, h2 {
    font-size: 3rem;
  }
  
  li {
    font-size: 1.5rem;
  }

  /* Layout container */
  body {
    display: flex;
    flex-direction: row;
    overflow: hidden;
  }

  /* Left nav now always visible */
  .sidebar.left {
    position: static;
    transform: none;
    width: 35%;
    max-width: 300px;
    height: 100vh;
    border-right: 1px solid rgba(136, 136, 136, 0.3);
  }

  /* Main feed takes the rest of the width */
  main {
    flex: 1;
    height: 100vh;
    overflow-y: auto;
  }

  /* News panel still slides in/out */
  .sidebar.right {
    position: fixed;
    right: 0;
    top: 0;
    width: 45%;
    max-width: 400px;
    height: 100%;
    transform: translateX(100%);
    border-left: 1px solid rgba(136, 136, 136, 0.3);
  }

  /* Hide the bottom nav button for nav (we don’t need it) */
  #navBtn {
    display: none;
  }

  /* Optional: smaller bottom bar since we now have more room */
  .bottom-nav {
    height: 3rem;
  }
}


/* ========== Desktop layout (3-column view) ========== */
@media (min-width: 1024px) {

  .bottom-nav {
    display: none;
  }
  
  /* turn off the mobile slide transforms */
  .sidebar {
    transform: none !important;
    position: static; /* reset fixed position from mobile */
    width: auto;
    overflow: visible !important;
  }
  
  p {
    font-size: 1rem;
    display: block;
    line-height: 1.8;  /* now works properly */
    margin: 0.8rem 0;
  }
  
  #newsPanel p {
    font-size: 1rem;
    display: block;
    line-height: 1.5;  /* now works properly */
  }
  
  h1, h2 {
    font-size: 2rem;
  }
  
  li {
    font-size: 1rem;
  }

  body {
    display: grid;
    grid-template-columns: 25% 45% 35%;
    min-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
  }

  /* LEFT SIDEBAR — should never scroll */
  .sidebar.left {
    position: sticky !important;
    top: 0;
    align-self: start;
    height: 100vh;
    overflow: hidden;
    z-index: 10;
    border: none;
  }

  /* MAIN — scrolls with the page */
  main {
    overflow: visible;
    height: auto;
    min-height: 100vh;
    background: #111;
    color: #eee;
    border: none;
  }

  /* RIGHT SIDEBAR — scrolls with main, then stops */
  .sidebar.right {
    position: relative !important;
    align-self: start;
    margin-right: 5vw;
    border: none;
  }

  .sidebar.right .right-inner {
    position: sticky;
    top: 0;
  }
}


/* ========== Big Monitor Desktop layout (5-column view (2 padding)) ========== */
@media (min-width: 2000px) {
  body {
    grid-template-columns: 25% 12.5% 22.5% 20% 22.5%;
    grid-template-areas: "pad1 nav feed news pad2";
  }
  
  #navPanel {
    grid-area: nav;
  }
  
  #feed {
    grid-area: feed;
  }
  
  #newsPanel {
    grid-area: news;
  }
}
