/* --- Modern Coastal Elegance Redesign --- */

/* --- 1. Base Styles & Variables --- */
:root {
  --color-primary: #2c3e50;      /* Deep Slate Blue */
  --color-background: #fdfdfc; /* Warm Off-White */
  --color-accent: #c09553;      /* Muted Sand/Gold */
  --color-text: #333333;        /* Dark Readable Gray */
  --color-light-gray: #ecf0f1;  /* Light Gray for borders/backgrounds */
  
  --font-heading: 'Merriweather', serif;
  --font-body: 'Lato', sans-serif;
}

html {
  height: 100%;
  box-sizing: border-box;
}

*, *:before, *:after {
  box-sizing: inherit;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: #e4e6e7; /* Light neutral page background */
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease-in-out;
}

a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-primary);
  font-weight: 700;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

/* --- 2. Site Structure & Layout --- */
.site-container {
  max-width: 1100px;
  width: 100%;
  margin: 20px auto;
  background-color: var(--color-background);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  border-radius: 5px;
  overflow: hidden;
}

.site-header {
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-bottom: 1px solid var(--color-light-gray);
}

.site-logo img { max-width: 300px; }
.site-moewen { display: none; } /* Hide the second logo for a cleaner look */

.header-image {
  width: 100%;
  height: 300px; /* Give a consistent height */
  object-fit: cover; /* Ensures image covers the area without distortion */
}

.site-content {
  display: flex;
  flex-wrap: wrap;
  padding: 20px;
}

.main-content {
  flex: 3;
  min-width: 300px;
  padding-right: 30px;
}

.sidebar {
  flex: 1;
  min-width: 250px;
  padding-left: 30px;
  border-left: 1px solid var(--color-light-gray);
}

.text .left {
  float: left;
  margin: 0 20px 15px 0;
  max-width: 300px;
  border-radius: 4px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.site-footer {
  background: var(--color-primary);
  color: var(--color-background);
  padding: 2em;
  text-align: center;
}

.site-footer a {
  color: white;
  margin: 0 15px;
}
.site-footer a:hover {
  color: var(--color-accent);
}

/* --- 3. Modern Navigation --- */
.main-nav {
  width: 100%;
  padding: 10px 0;
}

.main-nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav li {
  margin: 0 10px;
}

.main-nav a {
  display: block;
  padding: 10px 15px;
  background: none; /* Removed image background */
  min-width: auto;
  height: auto;
  text-align: center;
  color: var(--color-primary);
  font-weight: 700;
  font-size: 1rem;
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease-in-out;
}

.main-nav a:hover {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
  text-decoration: none;
}

.main-nav a.current {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

.mobile-menu-button { display: none; }

/* --- 4. Sidebar & Components --- */
.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar #categories ul li {
  margin-bottom: 0;
  padding: 0;
  background: none; /* Removed image background */
  border-bottom: 1px solid var(--color-light-gray);
}
.sidebar #categories ul li:first-child {
  border-top: 1px solid var(--color-light-gray);
}
.sidebar #categories ul li.current a {
  color: var(--color-accent);
  font-weight: 700;
}
.sidebar #categories ul li a {
  display: block;
  padding: 12px 10px;
  font-size: 1rem;
  font-weight: normal;
  transition: background-color 0.2s;
}
.sidebar #categories ul li a:hover {
  background-color: var(--color-light-gray);
  text-decoration: none;
}

.home-link-container {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}
.home-link-container img.home { width: 30px; height: 30px; }

/* --- 5. Tables --- */
.table-container {
    overflow-x: auto;
    margin: 20px 0;
    border: 1px solid var(--color-light-gray);
    border-radius: 4px;
}
table {
    width: 100%;
    border-collapse: collapse;
}
table th {
    background-color: var(--color-light-gray);
    font-family: var(--font-body);
    font-weight: 700;
    padding: 12px;
    text-align: left;
}
table td {
    padding: 12px;
    border-bottom: 1px solid var(--color-light-gray);
}
table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* --- 6. Image Carousel (V2 - STABLE & OVERLAY) --- */
.image-carousel {
    position: relative;
    width: 100%;
    margin: 20px 0;
}

/* This is the key to preventing "jumping" content. */
.carousel-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 66.66%; /* This creates a 3:2 aspect ratio (2 / 3 * 100) */
    background-color: #f0f0f0; /* Fallback color while image loads */
    border-radius: 5px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    overflow: hidden; /* Hides any part of the image that might overflow */
}

.carousel-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; /* Scales the image to cover the container without distortion */
    display: block;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(44, 62, 80, 0.5);
    color: white;
    border: none;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    padding: 5px 15px;
    border-radius: 5px;
    transition: all 0.2s ease-in-out;
    opacity: 0; /* Hidden by default */
}

/* Show buttons on hover */
.image-carousel:hover .carousel-btn {
    opacity: 1;
}

.carousel-btn:hover {
    background-color: rgba(44, 62, 80, 0.8);
}

#prev-btn {
    left: 10px;
}

#next-btn {
    right: 10px;
}

.carousel-counter {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0,0,0,0.6);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-family: var(--font-body);
}

/* --- 6a. Modern Button Style (NEW) --- */
.btn {
    display: inline-block;
    padding: 12px 24px;
    margin-top: 10px;
    background-color: var(--color-accent); /* Muted Sand/Gold */
    color: white;
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.btn:hover {
    background-color: var(--color-primary); /* Deep Slate Blue */
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
/* --- 7. Media Queries for Responsiveness --- */
@media (max-width: 768px) {
  body {
    background: var(--color-background);
  }
  .site-container {
    margin: 0;
    width: 100%;
    border-radius: 0;
    box-shadow: none;
  }
  .site-content {
    flex-direction: column;
    padding: 15px;
  }
  .main-content {
    padding-right: 0;
    border-bottom: 2px solid var(--color-light-gray);
    margin-bottom: 20px;
  }
  .sidebar {
    border-left: none;
    padding-left: 0;
  }
  .main-nav .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 3px 5px rgba(0,0,0,0.1);
    z-index: 100;
  }
  .main-nav .nav-links.active { display: block; }
  .main-nav {
    position: relative;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 10px;
    background-color: var(--color-light-gray);
  }
  .main-nav ul { flex-direction: column; }
  .main-nav li { margin: 0; border-bottom: 1px solid var(--color-light-gray); }
  .main-nav a { text-align: left; }
  
  .mobile-menu-button {
    display: block;
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 8px 12px;
    font-size: 24px;
    cursor: pointer;
    border-radius: 5px;
  }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
}

@media (max-width: 480px) {
  .text .left {
    float: none;
    display: block;
    margin: 0 auto 20px auto;
  }
}

/* --- 8. UTILITY CLASSES --- */
.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

/* --- 9. Notification Banner --- */
#notification-banner {
    background-color: var(--color-primary);
    color: white;
    padding: 12px 40px 12px 20px;
    text-align: center;
    position: relative;
    font-size: 15px;
}
#notification-banner p {
    margin: 0;
    padding: 0;
}
#notification-banner a {
    color: white;
    font-weight: 700;
    text-decoration: underline;
}
#notification-banner a:hover {
    color: var(--color-accent);
}
#notification-close {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    padding: 0 5px;
    opacity: 0.7;
    transition: opacity 0.2s;
}
#notification-close:hover {
    opacity: 1;
}