html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100dvh;
  background-color: #B7CCC0  /* #B4CBBE #B5CBBD */;
}

body {
  font: 14px "Lucida Grande", Helvetica, Arial, sans-serif;
  width: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center; /* Optional: centers the main element itself */
  margin: 0;
}

/* child of body */
.page-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 25px;
  width: 90%;
}

/* child of .page-container */
.navbar {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Base style for all three columns */
.nav-side {
  flex: 1; /* Forces all three sections to be exactly equal width */
  display: flex;
  align-items: center;
}

/* Align center content perfectly in the middle */
.nav-center {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  justify-content:center;
  align-items: center;
  padding: 10px;
  margin: 10px;
  border:rgba(0, 0, 0, 0.3) 2px solid;
  border-radius: 8px;
  box-sizing: border-box;
}

.nav-center h5 {
  font-size: clamp(0.25rem, 1vw + 0.50rem, 0.86rem);  
}

.nav-center h1, .nav-center h2, .nav-center h5 {
  margin: 5px;
}

.nav-left {
  justify-content: flex-start;
  gap: 15px;
}

.nav-right {
  justify-content: flex-end;
  gap: 15px;
  font-size: 20px;
}

/* child of .page-container */
.services-portal-container {
    display: grid;
    /* CHANGED: auto-fit works best here to allow the dynamic centering logic */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    /* CRITICAL: This centers the active grid columns horizontally in the row */
    justify-content: center;
    /* Centers the cards within their individual grid cells */
    place-items: center;
    gap: 40px;
    width: 100%; 
    margin-left: auto;
    margin-right: auto;
    margin-top: 50px;
    margin-bottom: 20px;
    padding-bottom: 40px;
}

/* child of .services-portal-container */
.service-portal {
  display: flex;
  flex-direction: column;
  justify-content: center;
  place-items: center;
  font-size: 20px;
  box-shadow: 0px 2px 5px #888;
  border-radius: 8px;
  width: 100%;
  /* CRITICAL: Prevents the card from stretching too wide when it centers */
  max-width: 250px; 
  height: 100%;
  box-sizing: border-box; 
}

.resources-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-evenly;
  align-items: flex-start;
  
  /* Responsive Layout Fixes */
  width: 100%;
  max-width: 1200px;        /* Prevents the container from becoming too wide on large desktops */
  gap: 16px;                 /* Native flexbox spacing instead of reliant margins */
  margin: 0 auto 5px auto;  /* Centers the container horizontally and retains bottom spacing */
  
  padding: 5px;
  height: auto;
  border-radius: 8px;
  box-sizing: border-box;    /* Ensures padding doesn't break the 100% width math */
}

.resource-narrow {
  width:20%;
  height: auto;
}

#sig-submit-btn {
  text-size-adjust: inherit;
}

/* Ensure the child elements scale responsively inside the container */
.resources-container > * {
  flex: 1 1 250px;           /* Grow, shrink, and set a base width of 250px */
  max-width: 100%;           /* Prevents child elements from clipping on tiny screens */
}

.img-our-ponies {
  margin: 10px 0px;
  width: 200px;
  height: auto;           /* Allows the height to be calculated by the aspect ratio */
  aspect-ratio: 1 / 1;   /* Sets your desired ratio (e.g., 1:1, 4:3, 16:9) */
  object-fit: cover;      /* Crops the image to fit the container without distortion */
}

#gallery img {
  width: 200px;
  height: 300px;
}

#gallery img {
  height: 200px;
}

.resource-container {
  display: flex;
  align-items: center;
  flex-direction: column;
  border-radius: 8px;
  box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
  height: 50%;
  
  /* Spacing & Padding */
  padding: 10px;
  
  /* Hover Transition */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* child of .resource-container */
.centered-list {
  text-align: left;
  list-style-position: inside;
  padding-left: 0; /* Removes default browser spacing */
}

.centered-list li {
  font-size: 20px;
}

/* Hover Effect */
.product-container:hover {
  transform: translateY(-5px); /* Lifts the card slightly */
  box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.3); /* Darkens and grows the shadow */
}

/* Responsive Mobile Sizing */
@media (max-width: 768px) {
  .product-container {
    height: auto; /* Lets content dictate height on small screens */
    width: 100%;  /* Fills the screen width on mobile */
    padding: 15px;
  }
}

/* child of .page-container */
.sticky-footer {
  position:sticky;
  display: flex;
  align-items: center;
  margin-top: 20px;
  padding: 5px;
  width: 100%;
  background-color: #222;
  color: #d3d4d6;
  bottom: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

a {
  color: black;
}

.link-paragraph a {
  display: block;    /* Makes the link fill the width of the paragraph */
  padding: 15px;     /* Gives the clickable area some breathing room */
  color: #333;       /* Sets text color */
  text-decoration: none; /* Removes the default underline if desired */
  color: inherit;
  font: inherit;
}

/* Optional: Add a hover effect to signal interactivity */
.link-paragraph a:hover {
  background-color: #f0f0f0;
}

.buttons-container {
    display: flex;
    justify-content: space-around;
    margin: 10px;
}

/* Parent Form Container */
.grid-container {
  display: grid; /* Changed from inline-grid to occupy full available width */
  /* Dynamically fits columns based on content size, wraps automatically on mobile */
  grid-template-columns: repeat(auto-fit, minmax(max-content, 1fr)); 
  grid-template-rows: auto; 
  gap: 20px;
  margin: 0 auto;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  font-size: clamp(0.875rem, 1.2vw + 0.5rem, 1.25rem);  
}

#schedule-event {
  max-width: 800px; 
}

.waiver-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  place-items: center;
  box-shadow: 0px 2px 5px #888;
  border-radius: 8px;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  font-size: clamp(0.875rem, 1.2vw + 0.5rem, 1.25rem); 
  width:50%; 
}

/* child of .grid-container*/
.fields-container {
  display: flex;
  flex-direction: column; /* Stack label above input */
  gap: 8px;
  padding: 15px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 6px;
  background-color: #ffffff;
}

.fields-container h3 {
  align-self: center;
}

/* Actual Form Controls (Inputs, Selects, etc.) */
.field input, 
.field select, 
.field textarea {
  width: 100%;
  padding: 8px;
  box-sizing: border-box; /* Prevents padding from breaking width */
}

input[type="checkbox"] {
    width: 22px;
    height: 22px;
    cursor: pointer;
}

/* Desktop Adjustment for 2-Column enforcement */
@media (min-width: 650px) {
  .grid-container {
    grid-template-columns: repeat(2, 1fr); /* Forces exactly 2 equal columns */
  }
}

.form-submit-div {
  margin-top: 10px;
}

.clear-div {
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  text-align: center;
}

.no-full-width {
  width:auto;
}

.full-width {
  grid-column: 1 / -1;
  width: 100%;
}

/* Styles the select text color ONLY when the placeholder is active */
.custom-select:invalid {
  color: #999999; /* Your placeholder gray color */
}

.custom-select option[disabled] {
  display: none;
}

/* Styles the actual options inside the dropdown menu back to standard dark text */
.custom-select option {
  color: #000000; 
}

.responsive-input {
  /* Scale width */
  width: clamp(100px, 50vw, 200px);
  /* Scale padding */
  padding: clamp(0.25rem, 1vw, 0.5rem);
}

#event-type-reset {
  display: none;
}

#other-event-type {
  display: none;
}

.responsive-text-input, .responsive-text-label {
  margin: 5px 0px 5px 0px;
  /* Scale width */
  width: clamp(250px, 50vw, 800px);
  /* Scale padding */
  padding: clamp(0.25rem, 1vw, 0.5rem);
}

.styled-border {
  /* Standard styling borders */
  border: 2px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
  padding: 5px;
}

.downstream-req-body-data {
  display: none;
}

.responsive-input:focus {
border-color: #0066cc;
outline: none;
}

.standard-underline {
  text-decoration: underline;
}

/* used with canvas */
.actions {
  margin-top: 10px;
}

canvas { 
  border: 2px dashed #ccc; 
  border-radius: 4px; 
  background: #fafafa; 
  cursor: crosshair; 
  max-width: 100%; 
  touch-action: none;
}

.sig-controls { margin-top: 10px; margin-bottom: 20px; }

button, a.cancel-button {
  max-width: 100px;
  box-sizing: border-box;
  padding: 10px;
  /* Fixed: Removed horizontal margin to prevent container overflow */
  margin: 5px 0; 
  font-size: 20px;
  border: 1px solid #03362a;
  border-radius: 8px;
  color: white;             
  cursor: pointer;           /* Changes cursor to a hand on hover */
  transition: background-color 0.2s ease-in-out; /* Smooth hover transition */
}

button a {
  color: #03362a;             
}
a.cancel-button, button a {
  text-decoration: none;
}

.submit-button span {
  cursor: pointer;
  transition: background-color 0.2s ease-in-out; /* Smooth hover transition */
}

.submit-button {
  background-color: pink;
  color: #03362a;
  border: 1px solid #03362a;
  border-radius: 8px;
  text-decoration: none;
}

.cancel-button {
  background-color: gray; 
}

button span:hover {
  color: #00adb5;
  transition: color 0.2s ease-in-out; /* Smooth hover transition */
}

label {
  margin-top: 10px;
  margin-bottom: 5px;
  font-weight: bold;
}

hr {
  border: none;             /* Removes the default 3D border */
  height: 1px;              /* Sets the thickness of your line */
  background-color: rgba(0, 0, 0, 0.3); /* Changes the actual color */
  opacity: 1;               /* Overrides any default browser transparency */
  width: 90%;
  margin-top: 50px;
  margin-bottom: 50px;
}

.logo-container .title-container {
  display: flex;
}

.title-container h1, .title-container h2, .title-container h3, .title-container h4 {
  text-align: center;
}

h2 {
  font-style: italic;
}

.navbar img {
  width: 125px; 
  height: 125px;
}

/* Hover and active states */
a:hover,
a.active {
    color: #00adb5;
}

@media screen and (min-width: 860px) {
  .sticky-footer {
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
  }
}

@media screen and (max-width: 859px){
  .sticky-footer {
      display:flow-root;
      text-align: center;
      padding: 10px;
  }
}

.sticky-footer p span {
  font-size: 20px;
  padding: 0 5px 0 5px;
}

.sticky-footer img {
  width: 100px;
  height: 75px;
  padding-top: 5px;
  padding: 5px;
}

.sticky-footer a {
  color: lightgray;
}

.socials {
  display: flex;
}

.socials span {
padding-left: 15px;
padding-right: 15px;
}

.socials img {
  width: 40px;
  height: 40px;
}

.socials img:hover {
  opacity: 0.5;
}
