.master-hero {
  position: relative;
  width: 100%;
  max-width: none;
  height: 100vh;
  margin-top: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  background-color: #000;
}
.master-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 1;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.master-bg-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  z-index: -2;
  opacity: 0.6;
}
.master-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.9) 0%,
    rgba(0, 0, 0, 0.7) 40%,
    rgba(0, 0, 0, 0.3) 70%,
    transparent 100%
  );
  z-index: -1;
}
.hero-content {
  max-width: none;
  margin: 0;
  margin-top: 80px;
  padding-left: 8%;
  width: 100%;
  height: 350px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
  z-index: 3;
}
.hero-eyebrow {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 15px;
  font-family: "Inter", sans-serif;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}
.hero-content h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 300;
  font-family: "Inter", sans-serif;
  color: #fff;
  margin: 0;
  line-height: 1.15;
  margin-bottom: 15px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}
.hero-content h1 span {
  display: block;
}
.hero-content .hero-sub {
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
  line-height: 1.6;
  margin-bottom: 25px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

/* Text Entry Animations */
@keyframes heroTextReveal {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.master-slide .hero-eyebrow,
.master-slide h1,
.master-slide .hero-sub {
  opacity: 0;
}

.master-slide.active .hero-eyebrow {
  animation: heroTextReveal 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards 0.4s;
}
.master-slide.active h1 {
  animation: heroTextReveal 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards 0.6s;
}
.master-slide.active .hero-sub {
  animation: heroTextReveal 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards 0.8s;
}

.breadcrumb {
  position: absolute;
  bottom: 60px;
  left: 5%;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Inter", sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  z-index: 20;
}
.breadcrumb a {
  color: #ffffff;
  text-decoration: none;
  transition: color 0.3s ease;
}
.breadcrumb a:hover {
  color: var(--maroon-light);
}
.breadcrumb span {
  color: #666;
}
.breadcrumb .active {
  color: #666;
}

@media (max-width: 768px) {
  .master-hero {
    width: 100%;
    margin: 0;
    height: 35vh;
    min-height: 250px;
    border-radius: 0;
  }
  .hero-content {
    height: auto;
    margin-top: 60px;
  }
  .hero-content h1 {
    font-size: 1.8rem !important;
    line-height: 1.2 !important;
  }
  .hero-content .hero-sub {
    font-size: 0.9rem !important;
  }
  .breadcrumb {
    bottom: 20px;
    font-size: 0.75rem;
  }
  .master-overlay {
    background: rgba(0, 0, 0, 0.75) !important;
  }
}

/* Show Actual Frame of Images in Gallery without Stretching */
#culture .gallery-grid {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center; /* Centers the bottom row of 2 items */
  gap: 25px;
  align-items: flex-start; /* Prevents cards from stretching vertically in the grid row */
}

#culture .gallery-item {
  height: auto !important;
  display: block !important;
  width: calc(33.333% - 17px); /* Forces exactly 3 items per row */
  min-width: 320px; /* Falls back to 1 or 2 items on smaller screens */
  flex-grow: 0;
  flex-shrink: 0;
}

#culture .gallery-item img {
  width: 100% !important;
  height: 280px !important;
  object-fit: cover !important;
  display: block;
  image-rendering: high-quality;
  transform: translateZ(0);
}

/* Force remove excessive spacing from style.css */
#culture.section-padding {
  padding-top: 20px !important;
}
#culture .section-header {
  padding-top: 0 !important;
  padding-bottom: 15px !important;
  margin-bottom: 10px !important;
}

/* Put 3 cards in one row for Opportunities */
@media (min-width: 992px) {
  .sleek-programs-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    max-width: 1200px !important;
  }
}

/* Unified Maroon Theme for Opportunity Cards */
.maroon-card .program-icon {
  color: var(--maroon-light) !important;
}
.maroon-card .card-apply-btn {
  background: rgba(180, 40, 40, 0.1) !important;
  color: var(--maroon-light) !important;
  border-color: rgba(180, 40, 40, 0.2) !important;
}
.maroon-card:hover .card-apply-btn {
  background: var(--maroon) !important;
  color: #fff !important;
}

/* Unified Maroon Hover Overlay Glow */
.maroon-card:hover {
  border-color: rgba(179, 27, 27, 0.3) !important;
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.6),
    0 -5px 25px rgba(179, 27, 27, 0.15) !important;
  background: rgba(179, 27, 27, 0.02) !important;
}

.testimonial-section {
  background-color: #080808;
  padding: 30px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
  position: relative;
}
.testimonial-slider-wrap {
  width: 100%;
  overflow: hidden;
  display: flex;
  position: relative;
  padding: 10px 0;
}
/* Fade edges for smooth entry/exit */
.testimonial-slider-wrap::before,
.testimonial-slider-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100px;
  z-index: 2;
  pointer-events: none;
}
.testimonial-slider-wrap::before {
  left: 0;
  background: linear-gradient(to right, #080808, transparent);
}
.testimonial-slider-wrap::after {
  right: 0;
  background: linear-gradient(to left, #080808, transparent);
}
.testimonial-track {
  display: flex;
  gap: 20px;
  width: max-content;
  /* Slide left to right: start -50%, end 0% */
  animation: scroll-left-to-right 50s linear infinite;
}
.testimonial-track:hover {
  animation-play-state: paused;
}
@keyframes scroll-left-to-right {
  0% {
    transform: translateX(-50%);
  }
  100% {
    transform: translateX(0);
  }
}
.testimonial-card {
  background: #111;
  border: 1px solid #222;
  border-radius: 10px;
  padding: 15px 20px;
  width: 300px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition:
    transform 0.3s ease,
    border-color 0.3s ease;
}
.testimonial-card:hover {
  transform: translateY(-3px);
  border-color: var(--maroon);
}
.testimonial-stars {
  color: #ffc107;
  font-size: 1rem;
}
.testimonial-text {
  color: #aaa;
  font-size: 0.85rem;
  line-height: 1.4;
  font-style: italic;
  flex-grow: 1;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 5px;
  border-top: 1px solid #222;
  padding-top: 10px;
}
.author-avatar {
  width: 35px;
  height: 35px;
  background: rgba(138, 21, 21, 0.2);
  border: 1px solid var(--maroon);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
}
.author-info h4 {
  color: #fff;
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
}
.author-info span {
  color: var(--maroon-light);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Global Mobile Card Size Reductions */
@media (max-width: 768px) {
    .maroon-card, .testimonial-card { padding: 15px !important; }
    .maroon-card h3, .testimonial-card h4 { font-size: 1.1rem !important; }
    .maroon-card p, .testimonial-card p { font-size: 0.85rem !important; }
}
/* Global Mobile Responsiveness for Career Page */
@media (max-width: 768px) {
    /* Reduce culture section padding */
    #culture.section-padding { padding-top: 15px !important; padding-bottom: 25px !important; }
    #culture .section-header { margin-bottom: 5px !important; }

    /* Reduce gallery gaps */
    #culture .gallery-grid { gap: 15px !important; }
    
    /* Make gallery items smaller and 2 per row if possible, or 1 per row if tight */
    #culture .gallery-item {
        min-width: 100% !important;
        margin-bottom: 5px;
    }

    /* Reduce testimonial section */
    .testimonial-section { padding: 20px 0 !important; }
    .testimonial-card { 
        width: 260px !important; 
        padding: 15px !important; 
        gap: 8px !important;
    }
    .author-avatar { width: 30px !important; height: 30px !important; font-size: 0.8rem !important; }
    .author-info h4 { font-size: 0.85rem !important; }
    .author-info span { font-size: 0.7rem !important; }

    /* Fix maroon cards */
    .sleek-programs-grid { gap: 15px !important; padding: 0 15px !important; }
}