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

/* Centralized input fix for all forms */
input,
textarea,
select {
  font-size: 16px; /* prevent mobile zoom-in */
}

/* Define the font-family variable */
:root {
  --font-family: "Inter", sans-serif;
}

/* Ensuring html and body take full height and use flexbox */
html,
body {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
  min-height: 100vh; /* Ensures body takes full viewport height */
  display: flex;
  flex-direction: column;
}

h1 {
  text-align: center;
}
h6 {
  color: #000;
}

.link-to-next-back {
  text-align: center;
  margin-bottom: 20px;
}

.link-to-next-back a {
  display: inline-block;
  padding: 10px 20px;
  background-color: var(--org-primary-color, #01535b);
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.link-to-next-back a:hover {
  background-color: var(--org-primary-hover, #002a25);
  text-decoration: none;
  cursor: pointer;
}

.link-to-next-back i {
  margin-right: 5px;
  height: 20px;
  width: 20px;
}

.header-welcome {
  display: block;
}

.logo {
  width: 55px;
  height: auto;
  margin-right: 10px;
}

nav {
  /* background-color: black; */
  text-align: center;
  padding: 10px 0;
}

nav ul {
  display: flex;
  justify-content: space-evenly;
  list-style-type: none;
  padding: 0;
  margin: 0;
  color: #f8f8f8;
}

nav ul li {
  display: inline;
  margin: 0 15px;
}

nav ul li:hover {
  opacity: 7;
  color: #0066cc;
}

nav ul li a {
  text-decoration: none;
  color: white;
  font-size: 1em;
}

.account-link {
  display: flex;
  margin-top: 10px;
}

/* Main content area - takes remaining height */

#loginbutton {
  border: 1px solid black;
  border-radius: 10px;
  padding: 4px 10px;
  text-decoration: none;
  color: black;
  font-size: large;
  transition: background-color 0.3s ease, color 0.3s ease;
}

#loginbutton:hover {
  background-color: #004b5e;
  color: white;
  box-shadow: 0 2px 8px rgba(47, 64, 60, 0.2);
}

/* h2 {
  color: #333;
} */

/* Styling form elements */
/* form {
  background-color: #fff;
  margin: 20px auto;
  border-radius: 5px;
  max-width: 600px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
} */

label {
  display: block;
  margin-top: 10px;
  font-weight: bold;
}

input[type="text"],
input[type="email"],
input[type="password"] {
  width: calc(100% - 20px);
  /* padding: 8px; */
  /* margin-top: 5px; */
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* Base button - inherits from buttons.css */
button {
  color: var(--btn-primary-text, white);
  background-color: var(--btn-primary-bg, #01535b);
  padding: 10px 15px;
  border: none;
  border-radius: var(--btn-radius, 8px);
  cursor: pointer;
  margin-top: 20px;
  width: 100%;
  font-weight: 600;
  transition: all 0.2s ease;
}

button:hover {
  background-color: var(--btn-primary-bg-hover, #013a40);
  color: var(--btn-primary-text, white);
}

/* Link styling */
a {
  color: black;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Checkbox for showing passwords */
.form-group input[type="checkbox"] {
  margin-top: 5px;
}

/* Notices and alerts */
.notice {
  color: #ff0000;
}

.notice li,
.error li {
  list-style-type: none;
}

form label {
  font-weight: bold;
  /* margin-bottom: 8px; */
  display: block;
}

/* form {
  max-width: 600px;
  width: 100%;
  margin: 20px auto;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
} */

.form-group {
  margin-bottom: 20px;
}

/* Button styling - use unified button system */
button[type="submit"] {
  background-color: var(--btn-primary-bg, #01535b);
  color: var(--btn-primary-text, white);
  border: 2px solid var(--btn-primary-bg, #01535b);
  padding: 12px 24px;
  cursor: pointer;
  border-radius: var(--btn-radius, 8px);
  margin-top: 20px;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(1, 83, 91, 0.2);
}

button[type="submit"]:hover {
  background-color: var(--btn-primary-bg-hover, #013a40);
  border-color: var(--btn-primary-bg-hover, #013a40);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(1, 83, 91, 0.28);
}

form input[type="text"],
form select,
form textarea {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 20px;
  top: 10px;
  position: relative;
}

form textarea {
  height: 100px;
}

/* Hamburger menu styles */
.hamburger {
  display: block;
  cursor: pointer;
}

.hamburger .bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  background-color: #013e43;
  transition: all 0.3s ease-in-out;
}

.nav-menu {
  display: none;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-item {
  padding: 10px 0;
}

.nav-item a {
  text-decoration: none;
  color: #333;
  display: block;
}

.nav-item a:hover {
  background-color: #4a9ba3;
  color: #ffffff;
}

.nav-menu.show {
  display: block !important;
  position: absolute;
  background-color: #f8f8f8;
  box-shadow: 0px 10px 20px 3px rgba(0, 0, 0, 0.2);
  right: 0;
  top: 40px;
  width: 250px;
  z-index: 11010;
}

.hamburger.active .bar:nth-child(2) {
  opacity: 0;
}

.hamburger.active .bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.active .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Management tools dropdown */
/* Dropdown and Arrow Styling */
.submenu-toggle {
  color: var(--org-primary-color); /* Org theme color for main menu items */
  font-weight: bold;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  transition: color 0.3s ease, background-color 0.3s ease;
  padding: 8px 10px;
  border-radius: 4px;
}

.submenu-toggle:hover {
  background-color: var(--org-primary-color);
  color: #ffffff;
}

/* Specific styling for 'Management Tools', 'Settings', and 'Logout' links */
.submenu-toggle.management {
  color: var(--org-primary-color);
}

.submenu-toggle.settings {
  color: var(--org-primary-color);
}

.nav-item a.logout {
  color: #ff6347; /* Distinct logout color */
  font-weight: bold;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 4px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-item a.logout:hover {
  background-color: var(--org-primary-color);
  color: #ffffff;
}

/* Arrow styling and animation */
.submenu-toggle .arrow {
  margin-left: 10px;
  transition: transform 0.3s ease-in-out; /* Rotat arrow */
}

.arrow.open {
  transform: rotate(180deg); /* Rotate arrow to indicate open state */
}

/* Submenu items */
.submenu {
  display: none;
  background-color: #ffffff;
  border: 1px solid #ddd;
  margin-top: 5px;
}

.submenu.show {
  display: block;
}

.management-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.management-links li {
  border-bottom: 1px solid #ddd; /* Separate items with a border */
}

.management-links a {
  display: block;
  padding: 10px;
  color: #555; /* Dark gray for submenu items */
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.management-links a:hover {
  background-color: var(--org-primary-color);
  color: #ffffff; /* White text on org color background when hovering */
}

/* Index page specific styles */
.index-container {
  text-align: center;
  padding: 20px;
}

.image-section {
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 20px 0;
}

.image-section img {
  width: 100%;
  max-width: 1200px;
  height: auto;
  display: block;
  border-radius: 5px;
}

.buttons {
  margin-top: 20px;
}

.buttons .button-link button {
  padding: 10px 20px;
  background-color: #4e9096;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.buttons .button-link button:hover {
  background-color: #59a5ab;
}

.image-container {
  width: 80%;
  overflow: hidden;
}

.image-container img {
  width: 90%;
  height: 300px;
  display: block;
  border-radius: 5px; /* Optional: Adds rounded corners to the image */
  object-fit: cover;
}

.video-container {
  position: relative;
  width: 100%;
  overflow: hidden;
}

#hero-video {
  width: 100%;
  height: 95%;
  object-fit: cover;
}

#herostuff h2 {
  font-size: 18px;
  margin: 0;
  color: white;
  bottom: 10px;
}

/* Flash Messages */
/* Flash Message Wrapper */
/* Fade animation keyframes */
@keyframes flashFadeInOut {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }
  10% {
    opacity: 1;
    transform: translateY(0);
  }
  85% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-20px);
  }
}

/* Apply the animation */
.flash-wrapper {
  position: fixed;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  pointer-events: none;
}

.flash-message {
  animation: flashFadeInOut 15s ease-in-out forwards;
  margin-bottom: 5px;
  padding: 12px 32px 12px 24px; /* ✅ more padding on right for close button */
  border-radius: 5px;
  text-align: center;
  white-space: normal; /* ✅ allow wrapping */
  word-wrap: break-word; /* ✅ wrap long words */
  overflow-wrap: break-word; /* ✅ wrap long words */
  max-width: 90vw; /* ✅ max width on small screens */
  width: auto; /* ✅ auto-width based on content */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: center; /* ✅ center content */
  align-items: center; /* ✅ center content vertically */
  pointer-events: auto;
  margin: 0 auto; /* ✅ center horizontally */
  line-height: 1.4; /* ✅ line height for readability */
  position: relative; /* ✅ needed for absolute positioning of close button */
  touch-action: pan-y;
  user-select: none;
}

.flash-close {
  position: absolute; /* ✅ position absolutely within flash message */
  top: 4px; /* ✅ closer to top edge */
  right: 6px; /* ✅ closer to right edge */
  font-size: 14px; /* ✅ even smaller size */
  color: #6b7280; /* ✅ neutral gray color instead of red */
  cursor: pointer;
  z-index: 2;
  background: none;
  border: none;
  padding: 2px; /* ✅ minimal padding */
  line-height: 1;
  transition: all 0.2s ease; /* ✅ smooth transition */
  border-radius: 2px; /* ✅ smaller border radius */
  width: 18px; /* ✅ smaller fixed width */
  height: 18px; /* ✅ smaller fixed height */
  display: flex;
  align-items: center;
  justify-content: center;
}
.flash-close:hover {
  color: #374151; /* ✅ darker gray on hover */
  background-color: rgba(0, 0, 0, 0.05); /* ✅ subtle background on hover */
  transform: scale(1.1); /* ✅ slight scale effect */
}

@media (max-width: 768px) {
  .flash-close {
    display: none;
  }
  .flash-message {
    /* Make swipe easier on mobile */
    min-height: 48px;
  }
}

/* Success */
.flash-message.success,
.flash-success {
  background: linear-gradient(135deg, var(--org-primary-color), var(--org-primary-hover));
  color: white;
  border: 1px solid var(--org-primary-hover);
}

/* Error */
.flash-message.error,
.flash-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Info */
.flash-message.info,
.flash-info {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}
.account-personalization-form-container {
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.account-personalization-form-container form {
  width: 100%;
  max-width: 400px;
  margin: 20px auto;
  padding: 20px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Media queries */
@media (max-width: 768px) {
  nav ul {
    flex-direction: column;
    align-items: flex-start;
  }

  main {
    width: 100%;
  }

  .image-container img {
    width: 80%;
    height: 200px;
    object-fit: cover;
  }

  .info {
    width: 100%;
    margin: 10px 0;
  }

  .hamburger {
    display: block;
  }

  .hamburger .bar {
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: #333;
    transition: all 0.3s ease-in-out;
  }

  .nav-menu {
    display: none;
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .nav-item {
    padding: 10px 0;
  }

  .nav-item a {
    text-decoration: none;
    color: #333;
    display: block;
  }

  .nav-item a:hover {
    background-color: #f0f0f0;
  }

  .nav-menu.show {
    display: block;
    position: absolute;
    background-color: #f8f8f8;
    box-shadow: 0px 10px 20px 3px rgba(0, 0, 0, 0.2);
    right: 0;
    top: 40px;
    width: 250px;
  }

  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
  .management-links a:hover {
    background-color: #68adb4;
    color: #ffffff; /* White text on blue background when hovering */
  }
}

@media (max-width: 500px) {
  #herostuff {
    position: absolute;
    top: 85%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 3px;
    padding-bottom: 0px;
    border-radius: 50px;
    width: 100%;
  }

  #herostuff h2 {
    font-size: 15px;
    margin: 0;
    color: white;
    bottom: 5px;
  }

  #img-feature {
    width: 100px;
    height: 100px;
    border-radius: 10px;
  }

  .feature p {
    font-size: 15px;
  }
}

@media (min-width: 768px) {
  .prev,
  .next {
    font-size: 16px;
    padding: 12px;
  }

  .info p,
  .feature p {
    font-size: 14px;
  }

  .services h2 {
    font-size: 20px;
  }

  #img-feature {
    width: 120px;
    height: 120px;
    border-radius: 10px;
  }

  .feature h3 {
    font-size: 20px;
  }

  #features {
    display: flex;
    padding-right: 5px;
    justify-content: center;
  }

  #herostuff h2 {
    font-size: 13px;
    padding: 5px;
  }

  #hero {
    height: 50vh;
  }
}

@media (max-width: 1200px) and (min-width: 769px) {
  main {
    width: 100%;
  }

  .header-welcome {
    display: none;
  }

  .info {
    width: 100%;
  }

  #hero {
    height: 50vh;
  }

  #herostuff h2 {
    font-size: 40px;
  }
}
