/* =========================================================
   FrogSafe – Global Styles
   ========================================================= */

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-size: 16px;
  scroll-behavior: smooth;
}

html {
  scroll-padding-top: 70px; /* offset for fixed navbar */
}

@media (max-width: 576px) {
  html { font-size: 15px; }
}

/* =========================================================
   Home Page – Full-screen hero
   ========================================================= */

body.home-page {
  overflow-y: auto;
}

/* Stack header on top of the hero image */
body.home-page #site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
}

#site-main {
  position: relative;
}

/* Hero section fills the full viewport */
.hero-fullscreen {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

/* The actual background image */
.hero-image {
  position: absolute;
  inset: 0;
  background-image: url('/images/background/MossmanRiver.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

/* Gradient overlay that fades from dark at the very top (behind nav) to transparent */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.15) 25%,
    rgba(0, 0, 0, 0) 50%
  );
}

/* =========================================================
   Navbar – Home page variant (transparent, over the image)
   ========================================================= */

.navbar-home {
  background: transparent !important;
  border-bottom: none;
  padding-top: 1rem;
  padding-bottom: 1rem;
  transition: background 0.35s ease, box-shadow 0.35s ease;
}

/* Scrolled state – grey banner with gradient fade into page */
.navbar-home.scrolled {
  background: linear-gradient(
    to bottom,
    rgba(60, 60, 60, 0.88) 0%,
    rgba(60, 60, 60, 0.72) 70%,
    rgba(60, 60, 60, 0) 100%
  ) !important;
  box-shadow: none;
  padding-bottom: 2rem; /* extra height to give the gradient room to breathe */
}

.navbar-home .navbar-brand {
  color: #fff !important;
  font-weight: 700;
  font-size: 1.4rem;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.navbar-home .nav-link,
.navbar-home .navbar-toggler-icon {
  color: rgba(255, 255, 255, 0.92) !important;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.navbar-home .nav-link:hover,
.navbar-home .nav-link:focus {
  color: #fff !important;
}

/* Hamburger icon colour on transparent nav */
.navbar-home .navbar-toggler {
  border-color: rgba(255,255,255,0.5);
}
.navbar-home .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255,255,255,0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Collapsed mobile menu gets a semi-transparent dark background */
.navbar-home .navbar-collapse.show,
.navbar-home .navbar-collapse.collapsing {
  background: rgba(0, 0, 0, 0.75);
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  margin-top: 0.25rem;
}

/* =========================================================
   Navbar – Standard pages (white, solid)
   ========================================================= */

.navbar-standard {
  background: #fff !important;
  border-bottom: 1px solid #dee2e6;
  box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,.06);
}

.navbar-standard .navbar-brand {
  color: #28a745 !important;
  font-weight: 700;
}

.navbar-standard .nav-link {
  color: #333 !important;
}

.navbar-standard .nav-link:hover {
  color: #28a745 !important;
}

/* =========================================================
   Standard pages – layout
   ========================================================= */

body:not(.home-page) #site-main {
  padding-top: 5rem; /* room for the fixed navbar on home is separate */
}

body:not(.home-page) {
  padding-bottom: 4rem;
}

.site-footer {
  border-top: 1px solid #dee2e6;
  padding: 1rem 0;
  color: #6c757d;
  font-size: 0.875rem;
}

/* =========================================================
   Home Page – Welcome title block
   ========================================================= */

.hero-welcome {
    position: absolute;
    top: 12%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    text-align: center;
    width: 80%;
    max-width: 820px;
    pointer-events: none;
}

.hero-welcome-title {
    color: #fff;
    font-size: clamp(1.6rem, 4vw, 2.8rem);
    font-weight: 800;
    letter-spacing: 0.04em;
    text-shadow: 0 2px 12px rgba(0,0,0,0.8), 0 0 30px rgba(0,0,0,0.5);
    margin-bottom: 0.4rem;
}

.hero-welcome-subtitle {
    color: #e8ffe4;
    font-size: clamp(0.8rem, 1.5vw, 1.05rem);
    font-weight: 400;
    text-shadow: 0 1px 8px rgba(0,0,0,0.85);
    margin: 0;
    line-height: 1.5;
}

/* =========================================================
   Home Page – Hero navigation links (slanted staircase)
   ========================================================= */

.hero-links-panel {
    position: absolute;
    /* start at ~18% from left so the staircase ends well before centre */
    left: 18%;
    top: 50%;
    transform: translateY(-38%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 2px;
    /* clear transparent navbar */
    margin-top: 30px;
    pointer-events: all;
    /* never overlap the right-side frog slideshow */
    max-width: 44%;
}

.hero-link {
    display: block;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: clamp(0.88rem, 1.4vw, 1.12rem);
    letter-spacing: 0.03em;
    padding: 7px 0;
    background: none;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.85), 0 0 12px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    transition: transform 0.18s ease, color 0.18s ease;
}

.hero-link:hover,
.hero-link:focus {
    color: #c8ffc0;
    transform: translateX(6px);
    outline: none;
}

/* Staircase – each link steps 18px further right */
.hero-link:nth-child(1)  { padding-left: 0px;   }
.hero-link:nth-child(2)  { padding-left: 18px;  }
.hero-link:nth-child(3)  { padding-left: 36px;  }
.hero-link:nth-child(4)  { padding-left: 54px;  }
.hero-link:nth-child(5)  { padding-left: 72px;  }
.hero-link:nth-child(6)  { padding-left: 90px;  }
.hero-link:nth-child(7)  { padding-left: 108px; }
.hero-link:nth-child(8)  { padding-left: 126px; }
.hero-link:nth-child(9)  { padding-left: 144px; }
.hero-link:nth-child(10) { padding-left: 162px; }

/* =========================================================
   Home Page – Frog slideshow (right side, on the rock)
   ========================================================= */

.frog-slideshow-wrap {
    position: absolute;
    left: 72%;
    top: 50%;
    transform: translate(-50%, -44%);
    z-index: 10;
    width: clamp(260px, 30vw, 480px);
    margin-top: 20px;
    pointer-events: none;
}

.frog-slideshow {
    position: relative;
    width: 100%;
}

.frog-slideshow img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    border-radius: 12px;
    opacity: 0;
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.55);
    transition: opacity 1.2s ease-in-out;
    object-fit: cover;
}

/* First image visible before JS runs */
.frog-slideshow img:first-child {
    opacity: 1;
    position: relative; /* defines the container height */
}

.frog-slideshow img.frog-active {
    opacity: 1;
}

.frog-caption {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 10px;
    font-size: clamp(0.82rem, 1.1vw, 1rem);
    color: #fff;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9), 0 0 18px rgba(0, 0, 0, 0.7);
    font-style: italic;
    pointer-events: none;
    line-height: 1.4;
}

#frogCaptionName {
    transition: opacity 0.5s ease-in-out;
    font-weight: 600;
    font-style: normal;
}

/* Mobile – smaller, move to bottom-right corner */
@media (max-width: 767px) {
    .hero-welcome {
        top: 6%;
        width: 92%;
    }

    .hero-welcome-title {
        font-size: clamp(1.2rem, 6vw, 1.6rem);
    }

    .hero-welcome-subtitle {
        font-size: 0.78rem;
    }

    .hero-links-panel {
        left: 0;
        right: 0;
        top: auto;
        bottom: 80px;
        transform: none;
        margin-top: 0;
        max-width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 5px;
        padding: 0 8px;
        justify-content: flex-start;
    }

    .hero-link {
        font-size: 0.73rem;
        padding: 6px 12px !important;
            background: none;
    }

    .hero-link:nth-child(n) { padding-left: 12px; }

    .frog-slideshow-wrap {
        left: auto;
        right: 8px;
        top: auto;
        bottom: 8px;
        transform: none;
        width: clamp(90px, 28vw, 140px);
        margin-top: 0;
    }

    .frog-caption {
        font-size: 0.75rem;
    }
}

/* =========================================================
   Content pages – header block
   ========================================================= */

.cms-page-header {
    padding: 2rem 0 1.5rem;
    border-bottom: 2px solid #dee2e6;
    margin-bottom: 2rem;
}

.cms-page-header h1 {
    color: #2d6a4f;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.cms-page-header .lead {
    color: #495057;
    font-size: 1.1rem;
    margin-bottom: 0;
}

/* =========================================================
   Cards
   ========================================================= */

.card {
  margin-bottom: 1rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,.075);
  transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
  box-shadow: 0 0.5rem 1rem rgba(0,0,0,.15);
}

/* =========================================================
   CMS Admin Toolbar
   ========================================================= */

.cms-admin-toolbar {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 0.5rem 0.75rem;
  z-index: 9999;
  border-radius: 0 0 0 0.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.cms-admin-toolbar.show {
  display: block;
}

/* Focus styles */
.btn:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.2rem rgba(38,143,255,.4);
}

/* =========================================================
   Home Page – Notice Board Section
   ========================================================= */

.notice-board-section {
    background: linear-gradient(160deg, #1b3a2b 0%, #2d5a3d 60%, #1e4530 100%);
    padding: 5rem 0 6rem;
    position: relative;
}

.notice-board-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #28a745, #7ed957, #28a745);
}

.notice-board-header {
    text-align: center;
    margin-bottom: 3rem;
}

.notice-board-title {
    color: #fff;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 800;
    letter-spacing: 0.02em;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.notice-board-subtitle {
    color: rgba(255, 255, 255, 0.72);
    font-size: 1.05rem;
    margin: 0;
}

.notice-articles-panel {
    max-width: 820px;
    margin: 0 auto;
    background: #fff;
    border-radius: 14px;
    padding: 2.5rem 3rem;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.35);
}

.notice-articles {
    margin: 0;
}

.notice-article {
    padding: 2.4rem 0;
    border-bottom: 1px solid #dee2e6;
}

.notice-article:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.notice-article:first-child {
    padding-top: 0;
}

.notice-article-meta {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 0.75rem;
}

.notice-article-tag {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #1a3a2a;
    background: #7ed957;
    padding: 0.2rem 0.65rem;
    border-radius: 3px;
    line-height: 1.6;
}

.notice-article-date {
    font-size: 0.82rem;
    color: #6c757d;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.notice-article-title {
    color: #1a3a2a;
    font-size: clamp(1.15rem, 2vw, 1.45rem);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.9rem;
}

.notice-article-body {
    color: #495057;
    font-size: 0.97rem;
    line-height: 1.75;
}

.notice-article-body p:last-child {
    margin-bottom: 0;
}

/* .notice-board-footer removed – footer is now .home-footer below the contact section */

.home-footer {
    background: #1b3a2b;
    padding: 1.25rem 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

.home-footer .cms-editable {
    cursor: default;
}

@media (max-width: 600px) {
    .notice-articles-panel {
        padding: 1.5rem 1.25rem;
        border-radius: 10px;
    }
}

/* =========================================================
   Notice Board – Carousel (prev/next paging)
   ========================================================= */

.notice-carousel-wrap {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    max-width: 940px;
    margin: 0 auto;
}

/* Let the panel shrink/grow inside the flex row */
.notice-carousel-wrap .notice-articles-panel {
    flex: 1;
    min-width: 0;
    margin: 0;
}

.notice-carousel-btn {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.2s, border-color 0.2s, opacity 0.2s;
}

.notice-carousel-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.9);
}

.notice-carousel-btn:disabled {
    opacity: 0.2;
    cursor: not-allowed;
}

.notice-page {
    display: none;
}

.notice-page.active {
    display: block;
}

.notice-page-indicator {
    text-align: center;
    margin-top: 1rem;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.85rem;
    letter-spacing: 0.07em;
}

@media (max-width: 576px) {
    .notice-carousel-wrap {
        gap: 0.5rem;
    }
    .notice-carousel-btn {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }
}

/* =========================================================
   Home Page – Contact Section
   ========================================================= */

.contact-section {
    background: #f8f9fa;
    padding: 5rem 0 6rem;
    position: relative;
}

.contact-inner {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 4rem;
    align-items: start;
    max-width: 1000px;
    margin: 0 auto;
}

/* Left: contact details */
.contact-heading {
    color: #1a3a2a;
    font-size: clamp(1.6rem, 2.5vw, 2.2rem);
    font-weight: 800;
    margin-bottom: 0.75rem;
}

.contact-intro {
    color: #495057;
    font-size: 0.97rem;
    line-height: 1.65;
    margin-bottom: 2rem;
}

.contact-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}

.contact-info-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #28a745;
    margin-bottom: 0.2rem;
}

.contact-info-value,
.contact-info-list address {
    font-size: 0.97rem;
    color: #1a3a2a;
    font-style: normal;
    line-height: 1.55;
}

.contact-info-value a {
    color: inherit;
    text-decoration: none;
}

.contact-info-value a:hover {
    text-decoration: underline;
    color: #28a745;
}

/* Right: form */
.contact-form-wrap {
    background: #fff;
    border-radius: 14px;
    padding: 2.5rem 2.75rem;
    box-shadow: 0 8px 36px rgba(0, 0, 0, 0.09);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.contact-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.1rem;
}

.contact-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.contact-form-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #1a3a2a;
    letter-spacing: 0.03em;
}

.contact-form-group input,
.contact-form-group textarea {
    border: 1px solid #ced4da;
    border-radius: 6px;
    padding: 0.55rem 0.85rem;
    font-size: 0.95rem;
    color: #212529;
    background: #fdfdfd;
    transition: border-color 0.15s, box-shadow 0.15s;
    resize: vertical;
    width: 100%;
}

.contact-form-group input:focus,
.contact-form-group textarea:focus {
    outline: none;
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.18);
    background: #fff;
}

.contact-submit {
    align-self: flex-start;
    background: #28a745;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.65rem 2rem;
    font-size: 0.97rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.contact-submit:hover {
    background: #1e7e34;
}

.contact-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    font-size: 0.97rem;
}

.contact-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 0.9rem 1.2rem;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

@media (max-width: 860px) {
    .contact-inner {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

@media (max-width: 520px) {
    .contact-form-wrap {
        padding: 1.75rem 1.25rem;
    }
    .contact-form-row {
        grid-template-columns: 1fr;
    }
}