/* Reset & base */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  height: 100%;
  background-color: #f0f0f0;
}

body {
  height: 100%;
  font-family: "Ubuntu", sans-serif;
  color: #999999;
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -moz-font-feature-settings: "liga" on;
  overflow-x: hidden;
}

/* Navigation Bar */
nav {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  text-align: center;
  border-bottom: 4px solid #0c2340;
  background: #d44500;
  padding: 1em 0;
  position: relative;
  z-index: 10;
}

@media screen and (max-width: 900px) {
  nav {
    grid-template-columns: 100%;
    grid-gap: 1em;
  }
}

.item1 {
  grid-column: 1;
}
.item2 {
  grid-column: 2;
}
.item3 {
  grid-column: 4;
}
.item4 {
  grid-column: 5;
}

.logo {
  grid-column: 3;
  background-image: url("imgs/cuselogo.png");
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  height: 10vh;
}

.navLinks {
  font-size: 1.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: white;
}

.navLinks:hover {
  color: #0c2340;
  border-left: 1px solid white;
  border-right: 1px solid white;
  padding: 1em 1em;
}

/* Background Video */
#myVideo {
  position: fixed;
  top: 0;
  left: 0;
  min-width: 100%;
  min-height: 100%;
  object-fit: cover;
  z-index: 1;
}

/* Hero Overlay */
.hero-overlay {
  position: relative;
  width: 100%;
  height: 100vh; /* full viewport height */
  display: flex;
  flex-direction: column;
  align-items: center; /* horizontal center */
  justify-content: center; /* vertical center */
  z-index: 2;
  text-align: center;
  color: #e66221;
  text-shadow: 3px 3px 6px #0c2340;
  padding: 0 1rem;
  font-family: ShermanSerif, Georgia, serif;
  font-weight: 700;
  font-style: normal;
  margin-top: 0; /* remove extra margin so it's truly centered */
}

.hero-content {
  z-index: 3;
  max-width: 80%;
  animation: fadeInUp 1s ease-out;
  margin-bottom: 1.5rem;
  text-align: center; /* center text */
  margin-top: 700px;
}


.hero-content h1 {
  font-size: 4rem;
  opacity: 0;
  animation: fadeIn 1.5s ease-in forwards 0.5s;
}

.hero-content p {
  font-size: 1.5rem;
  margin-top: 1rem;
  opacity: 0;
  animation: fadeIn 1.5s ease-in forwards 1s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2.5rem;
  }
  .hero-content p {
    font-size: 1.2rem;
  }
}

/* Apply Button */
.btn-7 {
  position: relative;
  display: inline-block;
  background: linear-gradient(
    0deg,
    rgba(255, 151, 0, 1) 0%,
    rgba(251, 75, 2, 1) 100%
  );
  color: white;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  border-radius: 4px;
  height: 50px;
  padding: 0 2rem;
  cursor: pointer;
  overflow: hidden;
  transition: background 0.3s ease-in-out;
}

.btn-7 span {
  position: relative;
  z-index: 2;
}

.btn-7::before,
.btn-7::after {
  content: "";
  position: absolute;
  background: rgba(251, 75, 2, 1);
  transition: all 0.3s ease-in-out;
  z-index: 1;
}

.btn-7::before {
  width: 0;
  height: 100%;
  left: 0;
  top: 0;
}

.btn-7::after {
  height: 0;
  width: 100%;
  left: 0;
  bottom: 0;
}

.btn-7:hover::before {
  width: 100%;
}

.btn-7:hover::after {
  height: 100%;
}

.btn-7:hover {
  background: transparent;
  color: white;
}

.white-box {
  position: relative;
  z-index: 3;
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  color: #0c2340;
  font-family: ShermanSerif, Georgia, serif;
  font-weight: 600;
  text-align: center;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(-50vw + 50%);
  height: 700px;
  margin-top: 150px;
  opacity: 0; /* Start hidden */
  transition: opacity 1s ease-in;
  pointer-events: none;
}

.white-box.visible {
  opacity: 0.9;
  pointer-events: auto;
}

.wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  max-width: 80rem;
  margin: 0 auto;
  padding-top: 3rem;
}

.cols {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 100px;
}

.col {
  width: calc(25% - 2rem);
  margin: 1rem;
  cursor: pointer;
  perspective: 1000px;
}

.container {
  transform-style: preserve-3d;
  perspective: 1000px;
  position: relative;
}

.front,
.back {
  background-size: cover;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.25);
  border-radius: 10px;
  background-position: center;
  transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
  backface-visibility: hidden;
  text-align: center;
  min-height: 360px; /* increased height */
  height: auto;
  border-radius: 10px;
  color: #fff;
  font-size: 1.5rem;
}

.back {
  background: linear-gradient(45deg, #cedce7 0%, #596a72 100%);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  transform: rotateY(180deg);
  transform-style: preserve-3d;
  border-radius: 10px;
  color: #fff;
}

.front:after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  opacity: 0.6;
  background-color: #000;
  backface-visibility: hidden;
  border-radius: 10px;
}

.container:hover .back {
  transform: rotateY(0deg);
}

.container:hover .front {
  transform: rotateY(-180deg);
}

.container .front {
  transform: rotateY(0deg);
  transform-style: preserve-3d;
}

.front .inner p {
  font-size: 2rem;
  margin-bottom: 2rem;
  position: relative;
}

.front .inner p:after {
  content: "";
  width: 4rem;
  height: 2px;
  position: absolute;
  background: #c6d4df;
  display: block;
  left: 0;
  right: 0;
  margin: 0 auto;
  bottom: -0.75rem;
}

.front .inner span {
  color: rgba(255, 255, 255, 0.7);
  font-family: "Montserrat", sans-serif;
  font-weight: 300;
}

.inner {
  transform: translateY(-50%) translateZ(60px) scale(0.94);
  top: 50%;
  position: absolute;
  left: 0;
  width: 100%;
  padding: 2rem;
  box-sizing: border-box;
  outline: 1px solid transparent;
  perspective: inherit;
  z-index: 2;
}

/* Responsive cards */
@media screen and (max-width: 64rem) {
  .col {
    width: calc(33.333333% - 2rem);
  }
}

@media screen and (max-width: 48rem) {
  .col {
    width: calc(50% - 2rem);
  }
}

@media screen and (max-width: 32rem) {
  .col {
    width: 100%;
    margin: 0 0 2rem 0;
  }
}
