/* =====================================================
   SENATE PAGE
   Loaded after main.css (which provides the navbar, footer,
   background canvas and base styles).
   ===================================================== */

#page-Wrapper > h1 {
  color: var(--electric-blue);
  text-shadow: 0 0 20px rgba(0, 123, 255, 0.4);
  font-size: clamp(2.2rem, 7vw, 3rem);
  font-weight: 700;
  letter-spacing: 2px;
  line-height: 1.2;
  margin-bottom: 16px;
}

#page-Wrapper {
  display: flex;
  flex-direction: column;
  align-items: center; /* cross axis = horizontal in a column, so this centers left/right */
  justify-content: flex-start; /* start at the top; see note below */

  max-width: 1200px; /* keeps content from stretching on wide screens */
  width: 100%;
  margin: 0 auto; /* centers the wrapper itself */
  padding: 60px 5% 80px; /* top space clears your navbar */
  text-align: center;
}

#SenateDef {
  max-width: 900px;
  color: var(--off-white);
  opacity: 0.8; /* softens the text without a new color */
  font-size: 1.05rem;
  text-align: center;
  padding-left: 20px;
  padding-right: 20px;
}

/* The wrapper: lays profiles out in a centered row */
#ModeratorsWrapper {
  display: flex;
  justify-content: center; /* center the cards horizontally */
  align-items: flex-start;
  flex-wrap: wrap; /* cards drop to the next line on small screens */
  gap: 30px; /* space between cards */
  padding: 60px 5%;
  width: 100%;
}

#ModHeading {
  position: relative; /* lets the corners position themselves against this box */
  display: inline-block; /* box shrinks to fit the text, so the corners hug it */
  padding: 14px 40px;
  margin: 60px 0 0px;

  font-size: 1.6rem;
  font-weight: 700;
  color: var(--off-white);
  text-transform: uppercase;
  letter-spacing: 3px;
}

/* shared look for both corners */
#ModHeading::before,
#ModHeading::after {
  content: ""; /* pseudo-elements don't exist without this */
  position: absolute;
  width: 22px;
  height: 22px;
  border: 0 solid var(--electric-blue);
  transition:
    width 0.55s cubic-bezier(0.16, 1, 0.3, 1),
    height 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

/* top-left corner: only top + left borders */
#ModHeading::before {
  top: 0;
  left: 0;
  border-top-width: 3px;
  border-left-width: 3px;
}

/* bottom-right corner: only bottom + right borders */
#ModHeading::after {
  bottom: 0;
  right: 0;
  border-bottom-width: 3px;
  border-right-width: 3px;
}

/* optional: corners grow when hovering */
#ModHeading:hover::before,
#ModHeading:hover::after {
  width: 100%;
  height: 100%;
}

/* The card */
.ModProfile {
  width: 350px;
  max-width: 100%;
  padding: 30px 20px;
  display: flex;
  flex-direction: column; /* stack image, name, role vertically */
  align-items: center; /* center each item horizontally */
  text-align: center;
  background: linear-gradient(180deg, rgba(22, 22, 22, 0.8), #0b0e14);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  transition:
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.4s ease;
}

.ModProfile:hover {
  transform: translateY(-8px);
  border-color: rgba(0, 123, 255, 0.4);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.8),
    0 0 30px rgba(0, 123, 255, 0.25);
}

/* The circular photo */
.ModProfile img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover; /* crop instead of squish */
  object-position: center top; /* keep faces in frame */
  border: 3px solid var(--electric-blue);
  box-shadow: 0 0 25px rgba(0, 123, 255, 0.3);
  margin-bottom: 20px;
  transition:
    box-shadow 0.5s ease,
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.ModProfile:hover img {
  box-shadow: 0 0 40px rgba(0, 123, 255, 0.55);
  transform: scale(1.04);
}

/* The name */
.ModProfile h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #f8f9fa;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

/* The role */
.ModProfile p {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--electric-blue);
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* =====================================================
   FOUNDING CABINET SECTION
   Matches your HTML: #FoundingCabH, .Top3Profiles (.Pres, .VicePres,
   .Genral.Sectretary), .CabinetCardsWrapper, .cabinetCard
   Needs root variables: --electric-blue, --off-white
   ===================================================== */

/* --- 1. Section heading with two corner brackets --- */
#FoundingCabH {
  position: relative;
  display: inline-block;
  padding: 14px 40px;
  margin: 70px 0 80px;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--off-white);
  text-transform: uppercase;
  letter-spacing: 3px;
}

#FoundingCabH::before,
#FoundingCabH::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border: 0 solid var(--electric-blue);
  transition:
    width 0.55s cubic-bezier(0.16, 1, 0.3, 1),
    height 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

#FoundingCabH::before {
  /* top-left */
  top: 0;
  left: 0;
  border-top-width: 3px;
  border-left-width: 3px;
}

#FoundingCabH::after {
  /* bottom-right */
  bottom: 0;
  right: 0;
  border-bottom-width: 3px;
  border-right-width: 3px;
}

#FoundingCabH:hover::before,
#FoundingCabH:hover::after {
  width: 100%;
  height: 100%;
}

/* --- 2. Shared card look (top 3 + cabinet cards) --- */
.Pres,
.VicePres,
.Genral,
.cabinetCard {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: linear-gradient(180deg, rgba(22, 22, 22, 0.8), #0b0e14);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  transition:
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.4s ease;
}

.Pres:hover,
.VicePres:hover,
.Genral:hover,
.cabinetCard:hover {
  transform: translateY(-8px);
  border-color: rgba(0, 123, 255, 0.45);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.8),
    0 0 30px rgba(0, 123, 255, 0.25);
}

/* --- 3. Shared image look: circle, no stretching --- */
.Pres img,
.VicePres img,
.Genral img,
.cabinetCard img {
  display: block;
  aspect-ratio: 1 / 1; /* always a perfect square, so the circle is perfect */
  border-radius: 50%;
  object-fit: cover; /* crops instead of squishing */
  object-position: center top; /* keeps faces in frame */
  border: 3px solid var(--electric-blue);
  box-shadow: 0 0 25px rgba(0, 123, 255, 0.3);
  background: rgba(0, 123, 255, 0.1); /* shows while the image loads */
  transition:
    box-shadow 0.5s ease,
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.Pres:hover img,
.VicePres:hover img,
.Genral:hover img,
.cabinetCard:hover img {
  box-shadow: 0 0 40px rgba(0, 123, 255, 0.55);
  transform: scale(1.04);
}

/* --- 4. Shared text look (scoped so the page's main h1 isn't touched) --- */
.Pres h1,
.VicePres h1,
.Genral h1,
.cabinetCard h1 {
  color: #f8f9fa;
  font-weight: 800;
  letter-spacing: 1px;
  text-shadow: none;
  margin-bottom: 8px;
}

.Pres p,
.VicePres p,
.Genral p,
.cabinetCard p {
  color: var(--electric-blue);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* =====================================================
   HIERARCHY: President on top, VP + General Secretary below
   ===================================================== */
.Top3Profiles {
  display: grid;
  grid-template-columns: repeat(2, 280px);
  justify-content: center;
  column-gap: 40px;
  row-gap: 70px; /* room for the connector line */
  margin-bottom: 80px;
}

/* Tier 1: President (spans both columns, biggest) */
.Pres {
  grid-column: 1 / -1;
  justify-self: center;
  position: relative;
  width: 340px;
  padding: 45px 25px;
  border-color: rgba(0, 123, 255, 0.5);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.8),
    0 0 45px rgba(0, 123, 255, 0.3);
}

.Pres img {
  width: 180px;
  border-width: 4px;
  margin-bottom: 25px;
}

.Pres h1 {
  font-size: 1.7rem;
}

.Pres p {
  font-size: 0.9rem;
}

/* Tier 2: Vice President + General Secretary */
.VicePres,
.Genral {
  width: 100%;
  padding: 35px 20px;
}

.VicePres img,
.Genral img {
  width: 140px;
  margin-bottom: 20px;
}

.VicePres h1,
.Genral h1 {
  font-size: 1.4rem;
}

/* =====================================================
   REST OF CABINET: 4 x 2 grid
   ===================================================== */
.CabinetCardsWrapper {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

.cabinetCard {
  width: 100%;
  padding: 28px 16px;
}

.cabinetCard img {
  width: 110px;
  margin-bottom: 18px;
}

.cabinetCard h1 {
  font-size: 1.15rem;
}

/* =====================================================
   Go Back Home Button
   ===================================================== */
#goBackHomeBtn {
  position: relative;
  z-index: 1;
  cursor: pointer;
  letter-spacing: 1.5px;
  transition:
    color 0.4s ease,
    box-shadow 0.4s ease,
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 20px 60px;
  background-color: transparent;
  border: 2px solid var(--electric-blue);
  border-radius: 5px;
  margin: 40px auto 0px;
  overflow: hidden;
  font-size: 0.95rem;
  font-weight: 600;
  color: #e8e8e8;
}

/* The "Charging" Background Animation */
#goBackHomeBtn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  transform: translateX(-101%); /* Hidden to the left */
  width: 100%;
  height: 100%;
  background: var(--electric-blue);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: -1;
}

/* Hover States */
#goBackHomeBtn:hover {
  color: var(--matte-black);
  box-shadow: 0 0 25px rgba(0, 123, 255, 0.5);
  transform: translateY(-2px);
}

#goBackHomeBtn:hover::before {
  transform: translateX(0); /* Background slides in */
}

#goBackHomeBtn:active {
  transform: scale(0.98); /* Slight click feedback */
}

#goBackHomeBtn {
  animation: neonPulse 2.5s infinite ease-in-out;
}



/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 1100px) {
  .CabinetCardsWrapper {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 650px) {
  #ModHeading {
    font-size: 1.2rem;
    padding: 12px 24px;
  }

  #ModeratorsWrapper {
    padding: 40px 0;
  }

  #SenateDef {
    padding: 0;
  }

  #FoundingCabH {
    font-size: 1.1rem;
    padding: 12px 24px;
  }

  .Top3Profiles {
    grid-template-columns: 1fr;
    justify-items: center;
    row-gap: 30px;
  }

  .Pres::after {
    display: none;
  }

  .Pres,
  .VicePres,
  .Genral {
    width: 100%;
    max-width: 340px;
  }

  .Pres img {
    width: 150px;
  }

  .CabinetCardsWrapper {
    grid-template-columns: 1fr;
  }
}

#CurrentCabH {
  position: relative; /* lets the corners position themselves against this box */
  display: inline-block; /* box shrinks to fit the text, so the corners hug it */
  padding: 14px 40px;
  margin: 60px 0 80px;

  font-size: 1.6rem;
  font-weight: 700;
  color: var(--off-white);
  text-transform: uppercase;
  letter-spacing: 3px;
}

/* shared look for both corners */
#CurrentCabH::before,
#CurrentCabH::after {
  content: ""; /* pseudo-elements don't exist without this */
  position: absolute;
  width: 22px;
  height: 22px;
  border: 0 solid var(--electric-blue);
  transition:
    width 0.55s cubic-bezier(0.16, 1, 0.3, 1),
    height 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

/* top-left corner: only top + left borders */
#CurrentCabH::before {
  top: 0;
  left: 0;
  border-top-width: 3px;
  border-left-width: 3px;
}

/* bottom-right corner: only bottom + right borders */
#CurrentCabH::after {
  bottom: 0;
  right: 0;
  border-bottom-width: 3px;
  border-right-width: 3px;
}

/* optional: corners grow when hovering */
#CurrentCabH:hover::before,
#CurrentCabH:hover::after {
  width: 100%;
  height: 100%;
}

/* FOOTER FOOTER FOOTER */

/* =====================================================
   PHONES: compact two-column cabinet grid
   ===================================================== */
@media (max-width: 650px) {
  #page-Wrapper {
    padding: 36px 4% 60px;
  }
  #FoundingCabH {
    margin: 50px 0 40px;
  }
  .ModProfile {
    padding: 24px 16px;
  }
  .ModProfile img {
    width: 120px;
    height: 120px;
  }
  .ModProfile h1 {
    font-size: 1.3rem;
  }
  .Top3Profiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 14px;
    row-gap: 14px;
    width: 100%;
    max-width: 480px;
    margin-bottom: 14px;
  }
  .Pres {
    grid-column: 1 / -1;
    max-width: 100%;
    padding: 30px 20px;
  }
  .VicePres,
  .Genral {
    max-width: none;
    padding: 22px 10px;
  }
  .VicePres img,
  .Genral img {
    width: 96px;
    margin-bottom: 14px;
  }
  .VicePres h1,
  .Genral h1 {
    font-size: 1rem;
  }
  .CabinetCardsWrapper {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    max-width: 480px;
  }
  .cabinetCard {
    padding: 20px 10px;
  }
  .cabinetCard img {
    width: 84px;
    margin-bottom: 12px;
  }
  .cabinetCard h1 {
    font-size: 0.95rem;
    letter-spacing: 0.3px;
  }
  .Pres p,
  .VicePres p,
  .Genral p,
  .cabinetCard p {
    font-size: 0.64rem;
    letter-spacing: 1.2px;
    line-height: 1.5;
  }
  #goBackHomeBtn {
    padding: 16px 36px;
  }
}

@media (max-width: 340px) {
  .CabinetCardsWrapper,
  .Top3Profiles {
    grid-template-columns: 1fr;
  }
}

/* Touch screens: no hover lift that "sticks" after a tap */
@media (hover: none) {
  .ModProfile:hover,
  .Pres:hover,
  .VicePres:hover,
  .Genral:hover,
  .cabinetCard:hover {
    transform: none;
  }
}
