/* ==========================================================================
   Raiganj University - Hero carousel + flash-news & scheme tickers
   File: assets/css/03-hero.css
   ======================================================================= */

/* ===== Hero ===== */
.hero{
  position:relative;
  background:var(--maroon-dark);
  color:#F7EFE0;
  overflow:hidden;
}

/* Hero carousel - full-bleed image, whole hero section */
.hero-carousel{
  position:relative;
  width:100%;
  height:78vh;
  min-height:460px;
  max-height:680px;
  overflow:hidden;
}
.hero-slides{
  position:relative;
  width:100%; height:100%;
}
.hero-slide{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  opacity:0;
  visibility:hidden;
  transition:opacity .9s ease, visibility 0s linear .9s;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
}
.hero-slide.active{
  position:relative;
  opacity:1;
  visibility:visible;
  transition:opacity .9s ease;
}
.hero-slide.active .hero-slide-bg{
  animation:heroKenBurns 9s ease-out forwards;
}
@keyframes heroKenBurns{
  from{ transform:scale(1.0); }
  to{ transform:scale(1.09); }
}
.hero-slide-bg{
  position:absolute; inset:0;
  width:100%; height:100%;
  object-fit:cover;
  object-position:center;
  z-index:0;
  display:block;
}
.hero-slide::before{
  content:"";
  position:absolute; inset:0; z-index:1;
  background:
    linear-gradient(180deg, rgba(20,9,7,0.32) 0%, rgba(20,9,7,0.06) 42%, rgba(20,9,7,0.55) 100%);
}
.hero-slide > .hero-slide-content{ position:relative; z-index:2; }
.hero-slide-content{ padding:0 24px; max-width:900px; }
.hero-college-name{
  font-size:clamp(32px, 6vw, 64px); line-height:1.06; color:#fff;
  text-shadow:0 4px 18px rgba(0,0,0,0.65), 0 2px 6px rgba(0,0,0,0.6);
}
.hero-established{
  display:inline-block; margin-top:18px;
  font-family:'IBM Plex Mono', monospace; font-size:14px; letter-spacing:.18em;
  text-transform:uppercase; color:var(--gold-soft);
  text-shadow:0 2px 10px rgba(0,0,0,0.6);
}
.hero-carousel-controls{
  position:absolute; left:0; right:0; bottom:26px;
  display:flex; align-items:center; justify-content:center; gap:18px;
  z-index:2;
}
.hero-dots{ display:flex; gap:8px; }
.hero-dot{
  width:26px; height:3px; padding:0; border:none; background:rgba(247,239,224,0.4);
  cursor:pointer; transition:background .25s ease, width .25s ease;
}
.hero-dot.active{ background:var(--gold); width:38px; }
.hero-arrows{ display:flex; gap:8px; }
.hero-arrow{
  width:38px; height:38px; display:flex; align-items:center; justify-content:center;
  border:1px solid rgba(247,239,224,0.5); background:rgba(0,0,0,0.2); color:#F7EFE0;
  cursor:pointer; font-family:'IBM Plex Mono', monospace; font-size:15px;
  transition:background .2s ease, border-color .2s ease;
}
.hero-arrow:hover{ background:rgba(255,255,255,0.15); border-color:var(--gold-soft); }

/* ===== Flash News ticker ===== */
.flash-news{
  background:linear-gradient(135deg, #FBF3DE, #F3E4B8);
  border-bottom:2px solid var(--maroon);
  position:relative; z-index:4;
}
.flash-news-inner{
  max-width:1280px; margin:0 auto; padding:0 24px;
  display:flex; align-items:center; gap:22px; height:46px;
}
.flash-label{
  flex-shrink:0; display:flex; align-items:center; gap:8px;
  align-self:stretch;
  font-family:'IBM Plex Mono', monospace; font-size:11.5px; font-weight:700;
  letter-spacing:.1em; text-transform:uppercase; color:#fff;
  background:var(--maroon-dark);
  padding:0 16px; margin:0 4px 0 -24px;
  white-space:nowrap;
}
.flash-label .dot{
  width:8px; height:8px; border-radius:50%; background:#E43D3D;
  box-shadow:0 0 0 0 rgba(228,61,61,0.6);
  animation:flashPulse 1.6s ease-out infinite;
}
@keyframes flashPulse{
  0%{ box-shadow:0 0 0 0 rgba(228,61,61,0.5); }
  70%{ box-shadow:0 0 0 7px rgba(228,61,61,0); }
  100%{ box-shadow:0 0 0 0 rgba(228,61,61,0); }
}
.flash-track-wrap{ flex:1; overflow:hidden; height:100%; display:flex; align-items:center; }
.flash-track{
  display:flex; align-items:center; gap:36px; white-space:nowrap;
  animation:flashMarquee 32s linear infinite;
}
.flash-track:hover{ animation-play-state:paused; }
.flash-track .item{
  display:inline-flex; align-items:center; gap:10px;
  font-size:13px; color:var(--ink);
}
.flash-track .item a{ color:var(--maroon-dark); }
.flash-track .item a:hover{ color:var(--maroon); text-decoration:underline; }
.flash-track .item .fdate{
  font-family:'IBM Plex Mono', monospace; font-size:10.5px; color:var(--maroon);
}
.flash-track .sep{ color:rgba(110,20,35,0.35); }
@keyframes flashMarquee{
  from{ transform:translateX(0); }
  to{ transform:translateX(-50%); }
}

/* ===== Government Schemes ticker ===== */
.schemes-news{
  background:var(--paper);
  border-bottom:2px solid var(--gold);
  position:relative; z-index:4;
}
.schemes-news-inner{
  max-width:1280px; margin:0 auto; padding:0 24px 0 0;
  display:flex; align-items:center; gap:0; height:46px;
}
.schemes-label{
  flex-shrink:0; display:flex; align-items:center; gap:8px;
  align-self:stretch;
  font-family:'IBM Plex Mono', monospace; font-size:11.5px; font-weight:700;
  letter-spacing:.1em; text-transform:uppercase; color:var(--teal);
  background:var(--gold-soft);
  padding:0 16px 0 24px; margin:0 4px 0 0;
  white-space:nowrap;
}
.schemes-label svg{ width:14px; height:14px; flex-shrink:0; color:var(--maroon); }
.schemes-track-wrap{
  flex:1; align-self:stretch; overflow:hidden; display:flex; align-items:center;
  background:linear-gradient(135deg, var(--maroon-dark), #300A11);
  padding:0 22px;
}
.schemes-track{
  display:flex; align-items:center; gap:36px; white-space:nowrap;
  animation:schemesMarquee 34s linear infinite;
}
.schemes-track:hover{ animation-play-state:paused; }
.schemes-track .item{
  display:inline-flex; align-items:center; gap:9px;
  font-size:13px; color:#F1E4D8;
}
.schemes-track .item i{
  width:24px; height:24px; flex-shrink:0;
  display:inline-flex; align-items:center; justify-content:center;
  font-size:12px; color:var(--maroon-dark);
  background:var(--gold-soft);
  border-radius:50%;
}
.schemes-track .item a{ color:var(--gold-soft); font-weight:600; }
.schemes-track .item a:hover{ color:#fff; text-decoration:underline; }
.schemes-track .sep{ color:rgba(255,255,255,0.28); }
@keyframes schemesMarquee{
  from{ transform:translateX(0); }
  to{ transform:translateX(-50%); }
}
@media (max-width:768px){
  .schemes-news-inner{ padding:0 16px 0 0; }
  .schemes-label{ font-size:9.5px; padding:0 12px 0 16px; gap:6px; margin:0 2px 0 0; }
  .schemes-track-wrap{ padding:0 12px; }
  .schemes-track .item i{ width:20px; height:20px; font-size:10.5px; }
}

/* ---------- the band itself ----------
   .hero-carousel is declared twice in this file. The first declaration (top of
   the file) belongs to the designer's unused slide carousel and sets
   height:78vh / min-height:460px. A later rule only overrides the properties it
   names, so those two survived into the video band and fought with the fixed
   height on .hero-video-container - leaving up to 230px of empty maroon below
   the video on tablets and phones.

   Resetting to auto hands height control entirely to .hero-video-container, so
   the responsive rules further down only have to change one number. */
.hero-carousel {
    position: relative;
    width: 100%;
    height: auto; /* cancels height:78vh from the earlier declaration */
    min-height: 0; /* cancels min-height:460px from the earlier declaration */
    max-height: none; /* the child sets the height now */
    overflow: hidden;
}


.hero-video-container {
    position: relative;
    width: 100%;
    height: 550px;
    overflow: hidden;
    background: var(--teal); /* shows for the split second before the video paints */
}

/* Full-bleed 16:9 cover. Whichever dimension is short gets overflowed and
   clipped, so the video always fills the band with no letterboxing. */
#heroYtPlayer,
#heroYtPlayer iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 177.7778vh;
    min-width: 100%;
    height: 56.25vw;
    min-height: 100%;
    transform: translate(-50%,-50%);
    border: 0;
    pointer-events: none; /* clicks pass through; no YouTube chrome */
    z-index: 0;
}

/* Fallback still, used when no video is configured or none is ready */
.hero-still {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
}

/* Nothing configured at all - brand gradient rather than a black hole */
.hero-empty {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--maroon) 0%, var(--teal) 100%);
    z-index: 0;
}


/* ---------- readability overlay ----------
   Sits between the media and the caption. Darker top and bottom, lighter
   through the middle, so the video is still clearly visible. */
/* No scrim. It existed for the static caption, which is gone. The typewriter
   supplies its own text-shadow and its own background colour from the CMS.
   If a specific video ever needs help, set a Background_Color on that
   typewriter in the admin rather than dimming the whole band. */
.carousel-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: none;
}


/* ---------- responsive ---------- */
@media (max-width:900px) {
    .hero-video-container {
        height: 420px;
    }


    /* heading only on tablets */
}

@media (max-width:520px) {
    .hero-video-container {
        height: 320px;
    }   
}


/* ---------- Typewriter overlay ----------
   Position, colour, background and font-size come from the CMS as inline
   styles on .typewriter-container. These are only the defaults for when an
   admin leaves a field blank, plus the responsive sizing ported from
   vu-styles.css so the text scales the same way it did on VU. */
.typewriter-container {
    position: absolute;
    z-index: 10;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    padding: 10px 18px;
    text-align: center;
    color: #fff;
    font-family: 'Fraunces', serif;
    line-height: 1.15;
    pointer-events: none;
}

    /* An admin-set top/left overrides the centring above; drop the transform so
   the coordinates mean what they say. */
    .typewriter-container[style*="top:"],
    .typewriter-container[style*="left:"] {
        transform: none;
    }

.typewriter-text {
    font-family: inherit;
    white-space: pre-wrap;
}

/* Responsive font sizes, ported from vu-styles.css lines 5-62 */
@media (min-width: 1400px) {
    .typewriter-container {
        font-size: 250% !important;
    }
}

@media (max-width: 1399px) {
    .typewriter-container {
        font-size: 200% !important;
    }
}

@media (max-width: 1199px) {
    .typewriter-container {
        font-size: 180% !important;
    }
}

@media (max-width: 991px) {
    .typewriter-container {
        font-size: 150% !important;
    }
}

@media (max-width: 767px) {
    .typewriter-container {
        font-size: 120% !important;
    }
}

@media (max-width: 575px) {
    .typewriter-container {
        font-size: 100% !important;
    }
}

@media (max-width: 479px) {
    .typewriter-container {
        font-size: 80% !important;
    }
}

@media (max-width: 319px) {
    .typewriter-container {
        font-size: 70% !important;
    }
}