/* Bootstrap re-implementation (incomplete) for Story template */
:root {
  --story-gutter-x: 1.5rem;
  --story-gutter-y: 0;
}

/* Accomodate WP admin bar */
body.admin-bar #story-header {
    top: var(--wp-admin--admin-bar--height, 0px); /* Fallback to 0 if var not set */
}

.story-row {
  --story-gutter-x: 1.5rem;
  --story-gutter-y: 0;
  display: flex;
  flex-wrap: wrap;
  margin-top: calc(var(--story-gutter-y) * -1);
  margin-right: calc(var(--story-gutter-x) * -0.5);
  margin-left: calc(var(--story-gutter-x) * -0.5);
}

.story-row > * {
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  padding-right: calc(var(--story-gutter-x) * 0.5);
  padding-left: calc(var(--story-gutter-x) * 0.5);
  margin-top: var(--story-gutter-y);
}

.story-col {
  flex: 1 0 0%;
}

.story-col-12 {
  flex: 0 0 auto;
  width: 100%;
}

.story-gy-5 {
  --story-gutter-y: 3rem;
}

.story-mt-5 {
  margin-top: 3rem !important;
}

.story-pb-5 {
  padding-bottom: 3rem !important;
}

.story-mx-5 {
  margin-right: 3rem !important;
  margin-left: 3rem !important;
}

.story-mx-md-0 {
  @media (min-width: 768px) {
    margin-right: 0 !important;
    margin-left: 0 !important;
  }
}

.story-pb-2 {
  padding-bottom: 0.5rem !important;
}

.story-pb-3 {
  padding-bottom: 1rem !important;
}

.story-fw-bold {
  font-weight: 700 !important;
}

.story-d-none {
  display: none !important;
}

.story-d-flex {
  display: flex !important;
}

.story-d-md-block {
  @media (min-width: 768px) {
    display: block !important;
  }
}

.story-d-xxl-flex {
  @media (min-width: 1400px) {
    display: flex !important;
  }
}

.story-justify-content-center {
  justify-content: center !important;
}

.story-justify-content-between {
  justify-content: space-between !important;
}

.story-justify-content-xl-start {
  @media (min-width: 1200px) {
    justify-content: flex-start !important;
  }
}

.story-justify-content-xl-end {
  @media (min-width: 1200px) {
    justify-content: flex-end !important;
  }
}

.story-align-items-center {
  align-items: center !important;
}

.story-text-center {
  text-align: center !important;
}

.story-text-white {
  color: #fff !important;
}

.story-text-decoration-none {
  text-decoration: none !important;
}

.story-list-unstyled {
  padding-left: 0;
  list-style: none;
}

.story-col-md-4 {
  @media (min-width: 768px) {
    flex: 0 0 auto;
    width: 33.33333333%;
  }
}

.story-col-md-12 {
  @media (min-width: 768px) {
    flex: 0 0 auto;
    width: 100%;
  }
}

.story-col-md-2 {
  @media (min-width: 768px) {
    flex: 0 0 auto;
    width: 16.66666667%;
  }
}

.story-col-md-8 {
  @media (min-width: 768px) {
    flex: 0 0 auto;
    width: 66.66666667%;
  }
}

.story-col-lg-3 {
  @media (min-width: 992px) {
    flex: 0 0 auto;
    width: 25%;
  }
}

.story-col-lg-6 {
  @media (min-width: 992px) {
    flex: 0 0 auto;
    width: 50%;
  }
}

.story-col-xl-4 {
  @media (min-width: 1200px) {
    flex: 0 0 auto;
    width: 33.33333333%;
  }
}

.story-col-xxl-1 {
  @media (min-width: 1400px) {
    flex: 0 0 auto;
    width: 8.33333333%;
  }
}

.story-col-xxl-2 {
  @media (min-width: 1400px) {
    flex: 0 0 auto;
    width: 16.66666667%;
  }
}

.story-col-xxl-4 {
  @media (min-width: 1400px) {
    flex: 0 0 auto;
    width: 33.33333333%;
  }
}

.story-col-xxl-10 {
  @media (min-width: 1400px) {
    flex: 0 0 auto;
    width: 83.33333333%;
  }
}

.story-container-fluid {
  width: 100%;
  padding-right: 0.75rem;
  padding-left: 0.75rem;
  margin-right: auto;
  margin-left: auto;
}

.story-px-3 {
  padding-right: 1rem !important;
  padding-left: 1rem !important;
}

.story-px-xl-5 {
  @media (min-width: 1200px) {
    padding-right: 3rem !important;
    padding-left: 3rem !important;
  }
}

.story-py-5 {
  padding-top: 3rem !important;
  padding-bottom: 3rem !important;
}

.story-mx-lg-auto {
  @media (min-width: 992px) {
    margin-right: auto !important;
    margin-left: auto !important;
  }
}

.story-ps-xxl-5 {
  @media (min-width: 1400px) {
    padding-left: 3rem !important;
  }
}

.story-pe-xxl-5 {
  @media (min-width: 1400px) {
    padding-right: 3rem !important;
  }
}

.story-fs-2 {
  font-size: calc(1.325rem + 0.9vw) !important;
}

@media (min-width: 1200px) {
  .story-fs-2 {
    font-size: 2rem !important;
  }
}

.story-mb-0 {
  margin-bottom: 0 !important;
}

.story-mb-1 {
  margin-bottom: 0.5rem !important;
}

.story-mt-1 {
  margin-top: 0.5rem !important;
}

.story-mt-4 {
  margin-top: 1.5rem !important;
}

.story-mx-auto {
  margin-right: auto !important;
  margin-left: auto !important;
}

.story-mx-lg-0 {
  @media (min-width: 992px) {
    margin-right: 0 !important;
    margin-left: 0 !important;
  }
}

.story-me-0 {
  margin-right: 0 !important;
}

.story-circled {
  font-size: 32px;
  display: inline-block;
  line-height: 32px;
  position: relative;
  vertical-align: top;
  width: 1em;
  margin: 0 1rem 0 0;
}

.story-circled .bi.bi-circle {
  line-height: 32px;
  top: 0;
  left: 0;
  font-size: 32px;
}

.story-circled .bi {
  top: 0;
  left: .5em;
  line-height: 300%;
  position: absolute;
  font-size: 50%;
}

/* Styles for page-templates/page-story.php */

html {
        scroll-behavior: smooth;
}

#title {
        position: relative; /* Establishes positioning context */
}

.cis-logo-overlay {
        position: absolute; /* Takes image out of normal flow */
        top: 0; /* Aligns to top */
        left: 0; /* Aligns to left */
        z-index: 10; /* Ensures image is on top */
        height: 2rem; /* Maintain aspect ratio */
        width: auto; /* Adjust size as needed */
        margin: 2.5rem 7rem;
}
header.story-menu {
        --header-height: 4rem;          /* Variable for header height */
        --header-padding: 0.5rem;       /* Variable for padding */
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), rgba(51, 51, 51, 0.9)); /* Vertical gradient with 90% opacity */
        color: white;
        padding: var(--header-padding);
        height: var(--header-height);
        width: 100%;
        box-sizing: border-box;
        display: flex;
        align-items: center;
        font-family: "Source Sans Pro", Helvetica, sans-serif; /* Font family */
        position: fixed; /* Fix header to top, sticking during scroll */
        top: 0;         /* Align to top of viewport */
        left: 0;        /* Align to left of viewport */
        z-index: 1000;  /* Ensure header is above other content */
        backdrop-filter: blur(5px); /* Apply blur to content behind header */
        -webkit-backdrop-filter: blur(5px); /* Support for WebKit browsers */
}
.header-content {
        display: flex;
        align-items: center;
}
.header-content a {
        display: flex;
        align-items: center;
        text-decoration: none;
        color: white;
        font-size: 1rem; /* Explicit font size for logo text */
}
.header-content img {
        height: calc(var(--header-height) - 2 * var(--header-padding)); /* Constrained to internal height */
        max-height: calc(var(--header-height) - 2 * var(--header-padding));
        margin-right: 0.5rem;
        transition: filter 0.3s ease-in-out; /* Smooth transition for filter */
}
.header-content a span {
        transition: text-shadow 0.3s ease-in-out; /* Smooth transition for text glow */
}
.header-content a:hover img {
        filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5)); /* Soft white glow around the circle in SVG on hover */
}
.header-content a:hover span {
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.5); /* Soft white glow around text on hover */
}
.menu {
        margin-left: auto;
        display: flex;
        align-items: center; /* Ensure menu items are vertically centered */
        gap: 0.75rem; /* Reduced gap between menu items */
}
.menu a {
        color: white;
        text-decoration: none;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 2.5rem;          /* Fixed height for consistency */
        box-sizing: border-box;  /* Include padding and border in height */
        text-transform: uppercase;
        padding: 0 1rem;         /* Default padding to reserve space */
        border: 1px solid transparent; /* Transparent border to reserve space */
        border-radius: 5px;      /* Rounded corners for button-like appearance */
        font-size: 0.9rem;       /* Explicit font size for menu items */
        transition: color 0.3s ease-in-out, text-shadow 0.3s ease-in-out, border-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out; /* Smooth transitions */
}
.menu a:not(.button) {
        background-color: transparent; /* Transparent background for Contact and Subscribe */
}
.menu a:not(.button):hover {
        border-color: white; /* White border on hover */
        box-shadow: 0 0 10px rgba(255, Speakers, 255, 0.5); /* White glow effect */
        color: #E0E0E0; /* Lighter text color on hover */
        text-shadow: 0 0 5px rgba(255, 255, 255, 0.5); /* Subtle text glow */
}
.menu a.button {
        background-color: #B22222; /* Red background for Donate */
        border: none; /* No border for Donate button */
        font-weight: 600;
        color: white !important; /* Explicitly ensure white text on hover */
        transition: background-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out; /* Button transitions */
}
.menu a.button:hover {
        background-color: #CC3333; /* Less bright red on hover */
        box-shadow: 0 0 10px rgba(255, 0, 0, 0.5); /* Red glow effect */
        color: white !important; /* Explicitly ensure white text on hover */
        text-shadow: none; /* No text glow on button */
}

/* Story version of the new CIS footer */
.story-footer {
        color: white;
        font-size: 16px; /* Override the inherited 18pt (approx 24px) to 16px */
        font-weight: 400;
        font-family: "Poppins", sans-serif;
}

footer#page_footer p {
        color: white;
        font-size: 16px; /* Override the inherited 18pt (approx 24px) to 16px */
        font-weight: 400;
        font-family: "Poppins", sans-serif;
        margin: 0px;
}

footer form#pardot-form-1 div input {
        background-color: white;
        height: 100%;
        padding: 6px 12px;
}

footer p {
        margin: 0 0 10px 0;
}

footer button {
        color: white;
}

.story-footer h2 {
        font-size: 32px; /* Set H2 to 32px as requested */
        font-weight: 500;
        color: white; /* Set H2 text color to white */
}
.story-footer input,
.story-footer textarea {
        color: #000;
        background-color: white;
        font-size: 16px;
        line-height: 16px;
        padding: 6px 12px;
        margin-bottom: 10px;
        height: 100%; /* Force height to 100% */
}
.story-footer input::placeholder,
.story-footer textarea::placeholder {
        color: #6c757d;
}
.story-footer label {
        color: white; /* Match default text color */
        font-size: 16px; /* Match default font size */
        font-weight: 400; /* Match default font weight */
        font-family: "Poppins", sans-serif; /* Match default font family */
}
.story-footer .submit,
.story-footer button[type="submit"] {
        background-color: #005953;
        color: #fff; /* Text color set to white */
        font-size: 16px;
        font-weight: 400;
        font-family: "Poppins", sans-serif;
        padding: 6px 12px; /* Corrected padding */
        border: none;
        border-radius: 4px;
        cursor: pointer;
        height: 100%; /* Force height to 100% of container */
        line-height: 100%; /* Force line-height to 100% */
        margin-bottom: 10px; /* Bottom margin */
}
.story-footer .submit:hover,
.story-footer button[type="submit"]:hover {
        background-color: #004742;
}
/* Target captcha (assuming .g-recaptcha class, adjust if different) */
.story-footer .g-recaptcha {
        margin-bottom: 10px; /* Added bottom margin to captcha */
}
.story-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        color: white;
        font-size: 2rem;
        font-weight: bold;
}

.story-footer-form input,
.story-footer-form button {
        margin-bottom: 10px;
}

.story-footer-logo {
        position: relative;
        top: -50px;
        left: 50%;
        transform: translateX(-50%);
        width: 100px;
        height: 100px;
        background-color: white;
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        color: white;
        font-size: 1.5rem;
        font-weight: bold;
        z-index: 1000;
        border: 1px solid;
}

.story-footer-logo img {
        width: 192px;
}

.story-footer-img {
        transition: transform .1s ease;
}

.story-footer-img:hover {
        transform: scale(1.025);
}

#logo_footer {
        width: 300px;
}

.story-content {
        padding-bottom: 80px; /* Adjust based on logo size */
}

.story-page-bottom {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px;
        background-color: #000000;
        position: relative;
        color: white;
        font-family: "Poppins";
}

.story-useful-links li a {
        text-decoration: none;
        color: white;
}
#footer_bottom {
        padding: 48px 16px; /* Default padding for XS and below */
}
@media (min-width: 1400px) {
        #footer_bottom {
                padding: 48px !important; /* Ensure XXL padding overrides other styles */
        }
}

/* Gallery / Slides tweaks */
.gallery.style2.cis-gallery article {
        aspect-ratio: 4 / 3;
}

.gallery.style2.cis-gallery article .image {
        height: 100%;
}

.gallery.style2.cis-gallery article .image img {
        object-fit: cover;
        object-position: center;
        height: 100%;
}

.gallery.style2.cis-gallery article .caption {
        background-color: rgba(0, 0, 0, 0.2);
        opacity: 1;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 1);
}

.gallery.style2.cis-gallery article .caption h2, .gallery.style2 article .caption h3, .gallery.style2 article .caption h4, .gallery.style2 article .caption h5, .gallery.style2 article .caption h6 {
        font-weight: 400;
}

.gallery.style2.cis-gallery article .caption p {
        font-weight: 400;
}

.gallery.style2.cis-gallery article:hover .caption {
        background-color: rgba(0, 0, 0, 0.66);
}

/* Accordion styles adapted to match Story template look */
.accordion {
        font-family: 'Source Sans Pro', sans-serif;
        font-weight: 400;
        line-height: 1.65;
        color: #484848;
        background-color: #fff;
        margin: 0;
        padding: 0 2rem;

        max-width: 60rem;
        margin: 0 auto;
}

.accordion-button {
        font-family: 'Source Sans Pro', sans-serif;
        font-weight: 400;
        line-height: 1.65;
        color: #484848;
        background-color: #fff;
        margin: 0;
        padding: 0 2rem;

        max-width: 60rem;
        margin: 0 auto;

        position: relative;
        display: flex;
        align-items: center;
        width: 100%;
        padding: 1.5rem 2rem;
        font-size: 1.25rem;
        font-weight: 700;
        color: #383838;
        text-align: left;
        background-color: #ffffff;
        border: 0;
        border-radius: 0.5rem 0.5rem 0 0;
        overflow-anchor: none;
        transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

@media (prefers-reduced-motion: reduce) {
        .accordion-button {
                transition: none;
        }
}

.accordion-button:hover {
        z-index: 2;
        color: #005953;
}

.accordion-button:focus {
        z-index: 3;
        outline: 0;
        box-shadow: 0 0 0 0.25rem rgba(0, 89, 83, 0.25);
}

.accordion-button:not(.collapsed) {
        color: #005953;
        background-color: #ffffff;
        box-shadow: none;
}

.accordion-button:not(.collapsed)::after {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23005953'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
        transform: rotate(-180deg);
}

.accordion-button::after {
        flex-shrink: 0;
        width: 1.25rem;
        height: 1.25rem;
        margin-left: auto;
        content: "";
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23383838'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-size: 1.25rem;
        transition: transform 0.2s ease-in-out;
}

@media (prefers-reduced-motion: reduce) {
        .accordion-button::after {
                transition: none;
        }
}

.accordion-header {
        margin-bottom: 0;
}

.accordion-item {
        background-color: #ffffff;
        border: 0;
        margin-bottom: 2rem;
        border-radius: 0.5rem;
        box-shadow: 0 0 2rem rgba(0, 0, 0, 0.075);
}

.accordion-item:first-of-type {
        border-top-left-radius: 0.5rem;
        border-top-right-radius: 0.5rem;
}

.accordion-item:first-of-type .accordion-button {
        border-top-left-radius: 0.5rem;
        border-top-right-radius: 0.5rem;
}

.accordion-item:not(:first-of-type) {
        border-top: 0;
}

.accordion-item:last-of-type {
        border-bottom-left-radius: 0.5rem;
        border-bottom-right-radius: 0.5rem;
        margin-bottom: 0;
}

.accordion-item:last-of-type .accordion-button.collapsed {
        border-bottom-left-radius: 0.5rem;
        border-bottom-right-radius: 0.5rem;
}

.accordion-item:last-of-type .accordion-collapse {
        border-bottom-left-radius: 0.5rem;
        border-bottom-right-radius: 0.5rem;
}

.accordion-body {
        padding: 0 2rem 2rem 2rem;
}

.accordion-body strong {
        font-weight: 700;
}

.accordion-body code {
        font-family: monospace;
        color: #005953;
}

/* Collapse styles */
.collapse:not(.show) {
        display: none;
}

.collapsing {
        position: relative;
        height: 0;
        overflow: hidden;
        transition: height 0.35s ease;
}

@media (prefers-reduced-motion: reduce) {
        .collapsing {
                transition: none;
        }
}
