/* =========================================
   General Layout & Typography
   ========================================= */
html, body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #fff;
  color: #222;
  box-sizing: border-box;
}

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

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

/* =========================================
   Header & Logos
   ========================================= */
header.site-header {
  background-color: #610000;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center; /* CENTER logos on desktop */
  flex-wrap: nowrap;
}


header.site-header .logo-wrap a {
  display: flex;
  align-items: center;
  gap: 10px;
}

header.site-header img {
  height: 60px;
  margin-right: 0; /* remove old spacing rule */
}


/* =========================================
   Navigation
   ========================================= */
.main-nav {
  background-color: #8B1A1A;
  padding: 0.5rem;
  text-align: center;
  border-bottom: 2px solid #ffffff;
}

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

.main-nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 4px;
}

.main-nav a:hover {
  background-color: #610000;
}

/* =========================================
   Dropdown Menu Styles
   ========================================= */
.main-nav li {
  position: relative;
}

.main-nav .submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #8B1A1A;
  min-width: 280px;
  padding: 0.5rem 0;
  margin: 0;
  list-style: none;
  border-radius: 4px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}

.main-nav .submenu li {
  margin: 0;
}

.main-nav .submenu a {
  display: block;
  padding: 0.75rem 1rem;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  font-size: 0.9em;
}

.main-nav .submenu a:hover {
  background-color: #610000;
}

/* Ensure nested submenu parent has positioning context */
.main-nav .submenu li.has-submenu {
  position: relative;
}

/* Nested submenu styles (sub-submenus) */
.main-nav .submenu .submenu {
  position: absolute;
  top: 0;
  left: -280px; /* Position to the left of the entire parent submenu (280px wide) */
  min-width: 280px;
  display: none; /* Hidden by default */
  z-index: 1001; /* Above parent submenu */
}

/* Visual indicator for items with submenus (top level only) */
.main-nav > ul > li.has-submenu > a::after {
  content: " ▼";
  font-size: 0.7em;
  margin-left: 0.25rem;
}

/* Visual indicator for nested submenu items - remove down arrow, add left arrow */
.main-nav .submenu li.has-submenu > a::after {
  content: "";
  display: none;
}

.main-nav .submenu li.has-submenu > a::before {
  content: "◀ ";
  font-size: 0.7em;
  margin-right: 0.25rem;
}

/* Desktop: Show submenu on hover */
@media (min-width: 1025px) {
  .main-nav li.has-submenu:hover > .submenu {
    display: block;
  }
  
  .main-nav li.has-submenu:hover > a {
    background-color: #610000;
  }
  
  /* Show nested submenu only when directly hovering over its parent */
  .main-nav .submenu li.has-submenu:hover > .submenu {
    display: block;
  }
  
  /* Ensure nested submenus are hidden by default */
  .main-nav .submenu .submenu {
    display: none;
  }
}

/* Mobile: Show submenu when parent has submenu-open class */
.main-nav li.has-submenu.submenu-open .submenu {
  display: block;
  position: static;
  box-shadow: none;
  margin-top: 0.5rem;
}

/* =========================================
   Hero
   ========================================= */
.hero {
  background: url('hero.png') center/cover no-repeat;
  height: 300px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  text-align: center;
  padding: 2rem;
  background-color: rgba(0,0,0,0.6);
  background-blend-mode: overlay;
}

.hero-small {
  height: 150px;
}

.hero h1 {
  font-size: 2.5rem;
  margin: 0;
}

/* =========================================
   Container & Headings
   ========================================= */
.container {
  max-width: 900px;
  margin: auto;
  padding: 2rem;
}

h2 {
  color: #610000;
  font-size: 1.75rem;
  margin-top: 2rem;
}

/* =========================================
   Buttons
   ========================================= */
.cta-button {
  display: inline-block;
  background-color: #610000;
  color: #fff;
  padding: 1rem 2rem;
  text-decoration: none;
  font-weight: bold;
  border-radius: 8px;
  margin-top: 1rem;
}

/* =========================================
   Footer Base
   ========================================= */
.footer {
  background-color: #eee;
  text-align: center;
  padding: 2rem;
  margin-top: 3rem;
  font-size: 0.9rem;
}

/* =========================================
   Layout Utilities
   ========================================= */
.two-col-flex {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin: 2rem 0;
}

.two-col-flex > div {
  flex: 1;
}

.profile-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;   /* THIS is what centers last lonely row */
  gap: 2rem;
  margin-top: 2rem;
}


.profile-item {
  flex: 0 1 200px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}


.profile-item img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #610000;
}

.profile-item h4 {
  margin: 0.5rem 0;
  color: #610000;
}

a.profile-item {
  text-decoration: none;
  color: inherit;
}

/* =========================================
   FOOTER BAND (RED SECTION)
   ========================================= */
.footer-band {
  background-color: #610000;
  padding: 3rem 2rem;
  margin: 3rem 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15),
              inset 0 -1px 0 rgba(0,0,0,0.15);
}

.footer-band h2 {
  color: #ffffff !important;
  margin-top: 0;
}

.footer-band p,
.footer-band a {
  color: #ffffff;
  opacity: 1;
  font-weight: 500;
}

.footer-band a:hover {
  text-decoration: underline;
}

.footer-band .two-col-flex {
  align-items: center;
}

/* Social links */
.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 768px) {
  .two-col-flex {
    flex-direction: column;
  }

  .main-nav ul {
    flex-direction: column;
  }
}

/* Mobile: show 2 profiles per row */
@media (max-width: 600px) {
  .profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }

  .profile-item img {
    width: 110px;
    height: 110px;
  }

  /* Center only if last row has a single item */
  .profile-grid .profile-item:nth-last-child(1):nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
  }
}

/* Hamburger button (hidden on desktop) */
.nav-toggle {
  display: none;
  background: transparent;
  border: 2px solid #fff;
  color: #fff;
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  font-size: 1.4rem;
  cursor: pointer;
}

/* Mobile / small screens */
@media (max-width: 1024px) {

  /* Hamburger button in header */
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
  }

  /* Header gets the white line on mobile */
  header.site-header {
    border-bottom: 2px solid #ffffff;
	justify-content: space-between; /* logos left, hamburger right */
  }

  /* Red nav bar disappears on mobile */
  .main-nav {
    background: transparent;
    border-bottom: none;
    padding: 0;
    text-align: left;
  }

  /* Dropdown menu (shown when hamburger is open) */
  .main-nav ul {
    display: none;
    flex-direction: column;

    align-items: flex-end;   /* RIGHT-align the items */
    text-align: right;       /* RIGHT-align the text */

    gap: 0.5rem;
    margin: 0;
    padding: 0.75rem 1.5rem;

    background-color: #8B1A1A;
    border-bottom: 2px solid #ffffff;
  }

  /* When hamburger is clicked */
  .main-nav.nav-open > ul {
    display: flex;
  }

  /* Full-width tappable links */
  .main-nav a {
    display: block;
  }

  /* Mobile submenu styling */
  .main-nav .submenu {
    position: static;
    box-shadow: none;
    margin-top: 0.5rem;
    padding-left: 1rem;
    display: none; /* Hidden by default on mobile */
  }
  
  /* Show submenu when parent has submenu-open class on mobile */
  .main-nav li.has-submenu.submenu-open .submenu {
    display: block;
  }
  
  /* Nested submenus on mobile */
  .main-nav .submenu .submenu {
    position: static;
    margin-left: 1rem;
    margin-top: 0.5rem;
  }
  
  /* Show nested submenu when parent has submenu-open class on mobile */
  .main-nav .submenu li.has-submenu.submenu-open .submenu {
    display: block;
  }
}

