

/* =========================================================
   LOOK & FEEL ALA unhas (Blue–Gold, clean, airy, premium)
   + HERO (video + circle Rector/Leader card) mobile-friendly
   + LATEST NEWS ala unhas (featured + list) connected to DB
   + FLOATING WHATSAPP BUTTON (ALWAYS VISIBLE ON SCROLL)
========================================================= */
:root{
  --primary:#0B2E5A;
  --primary-2:#12437F;
  --accent:#F2B705;
  --bg:#F4F7FB;
  --card:#FFFFFF;
  --text:#111827;
  --muted:#6B7280;

  --radius:18px;
  --shadow:0 12px 34px rgba(11,46,90,.12);
  --shadow-sm:0 7px 22px rgba(11,46,90,.10);
  --border:1px solid rgba(11,46,90,.10);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  font-family:"Poppins",sans-serif;
  background:var(--bg);
  color:var(--text);
  line-height:1.65;
}

/* make bootstrap container feel like campus portal width */
.container{
  max-width: 100% !important;
}

a{color:var(--primary);text-decoration:none}
a:hover{color:var(--primary-2);text-decoration:underline}

/* =========================================================
   HERO VIDEO SECTION
========================================================= */
.hero-video{
  position:relative;
  height:560px;
  border-radius:22px;
  overflow:hidden;
  margin:18px 0 34px;
  box-shadow:var(--shadow);
  background:#0b2e5a;
}
.hero-video video{
  width:100%;
  height:100%;
  object-fit:cover;
  filter:brightness(72%) saturate(110%);
  transform:scale(1.02);
}
.hero-media-fallback{
  position:absolute;
  inset:0;
  background:url('../../uploads/sosialisasi_pmr.jpeg') center center/cover no-repeat;
  filter:brightness(72%) saturate(110%);
  transform:scale(1.02);
}
.hero-overlay{
  position:absolute;
  inset:0;
  background:
    linear-gradient(90deg,
      rgba(11,46,90,.92) 0%,
      rgba(11,46,90,.62) 38%,
      rgba(11,46,90,.25) 70%,
      rgba(11,46,90,.10) 100%);
}

/* Text area */
.hero-content{
  position:absolute;
  left:56px;
  bottom:56px;
  z-index:10;
  color:#fff;
  max-width:780px;
}
.hero-title{
  font-size:44px;
  font-weight:800;
  line-height:1.15;
  letter-spacing:.2px;
  text-transform:none;
}
.hero-title::after{
  content:"";
  display:block;
  width:110px;
  height:6px;
  border-radius:999px;
  margin-top:14px;
  background:linear-gradient(90deg,var(--accent),rgba(242,183,5,.35));
}
.hero-sub{
  font-size:18px;
  margin-top:10px;
  color:rgba(255,255,255,.92);
}

/* =========================================================
   RECTOR/LEADER CARD (circle photo)
========================================================= */
.leader-card{
  position:absolute;
  right:26px;
  bottom:22px;
  z-index:11;
  width:360px;
  border-radius:22px;
  padding:16px 16px 14px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 18px 44px rgba(0,0,0,.22);
  backdrop-filter: blur(7px);
}
.leader-top{
  display:flex;
  align-items:center;
  gap:14px;
}
.leader-avatar{
  width:96px;
  height:96px;
  border-radius:50%;
  overflow:hidden;
  flex:0 0 96px;
  background: rgba(255,255,255,.12);
  border: 3px solid rgba(242,183,5,.88);
  box-shadow: 0 10px 24px rgba(0,0,0,.24);
}
.leader-avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.leader-meta{
  color:#fff;
  min-width:0;
}
.leader-meta .tag{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-weight:900;
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  background: rgba(242,183,5,.92);
  color:#0b2e5a;
}
.leader-meta .name{
  margin-top:10px;
  font-weight:900;
  font-size:16px;
  line-height:1.2;
  color:#fff;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.leader-meta .role{
  margin-top:6px;
  font-weight:700;
  font-size:12.5px;
  color:rgba(255,255,255,.88);
  line-height:1.3;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.leader-divider{
  height:1px;
  background: rgba(255,255,255,.14);
  margin:12px 0 10px;
}
.leader-cta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  color:rgba(255,255,255,.9);
  font-weight:700;
  font-size:12.5px;
}
.leader-cta a{
  color:#fff;
  text-decoration:none;
  font-weight:900;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
}
.leader-cta a:hover{
  background: rgba(255,255,255,.14);
  text-decoration:none;
}

/* =========================================================
   SECTION TITLE
========================================================= */
.section-title{
  font-size:26px;
  font-weight:900;
  color:var(--primary);
  margin:6px 0 18px;
  position:relative;
  padding-left:16px;
}
.section-title::before{
  content:"";
  position:absolute;
  left:0;
  top:.35em;
  width:7px;
  height:20px;
  background:var(--accent);
  border-radius:999px;
}
.section-title::after{
  content:"";
  width:76px;
  height:4px;
  background:rgba(11,46,90,.22);
  position:absolute;
  left:16px;
  bottom:-10px;
  border-radius:999px;
}

/* =========================================================
   LATEST NEWS ala unhas (featured + list)
========================================================= */
.latest-news{ margin: 8px 0 34px; }

.latest-news-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  margin-bottom:14px;
}

.latest-news-more{
  font-weight:800;
  color:var(--primary);
  background: rgba(11,46,90,.06);
  border: 1px solid rgba(11,46,90,.10);
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration:none !important;
  transition: transform .18s ease, background .18s ease;
}
.latest-news-more:hover{
  transform: translateY(-2px);
  background: rgba(11,46,90,.09);
  text-decoration:none !important;
}

.latest-news-grid{
  display:grid;
  grid-template-columns: 1.25fr .95fr;
  gap:18px;
}

.news-feature{
  position:relative;
  border-radius: 18px;
  overflow:hidden;
  border: var(--border);
  box-shadow: var(--shadow-sm);
  min-height: 340px;
  display:block;
  text-decoration:none !important;
}

.news-feature .nf-img{
  position:absolute;
  inset:0;
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
  transform: scale(1.03);
  filter: brightness(78%) saturate(110%);
}

.news-feature .nf-overlay{
  position:absolute;
  inset:0;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0) 46%,
    rgba(0,0,0,.78) 100%
  );
}

.news-feature .nf-content{
  position:absolute;
  left:18px;
  right:18px;
  bottom:16px;
  z-index:2;
  color:#fff;
}

.nf-badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  background: rgba(242,183,5,.96);
  color:#0b2e5a;
  font-weight:900;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.nf-meta{
  margin-top:10px;
  display:flex;
  align-items:center;
  gap:10px;
  color: rgba(255,255,255,.88);
  font-weight:700;
  font-size: 13px;
  flex-wrap:wrap;
}
.nf-dot{
  width:6px;height:6px;border-radius:50%;
  background: rgba(242,183,5,.95);
  box-shadow: 0 0 0 3px rgba(242,183,5,.18);
}

.nf-title{
  margin:10px 0 6px;
  font-size:22px;
  font-weight:900;
  line-height:1.25;
}

.nf-excerpt{
  margin:0;
  color: rgba(255,255,255,.92);
  font-size: 14px;
  line-height:1.55;
  max-width: 95%;
}

.news-list{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.news-item{
  display:flex;
  gap:12px;
  align-items:stretch;
  background: var(--card);
  border: var(--border);
  border-radius: 16px;
  overflow:hidden;
  box-shadow: var(--shadow-sm);
  text-decoration:none !important;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.news-item:hover{
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: rgba(11,46,90,.18);
}

.ni-thumb{
  width: 132px;
  min-width: 132px;
  height: 104px;
  object-fit: cover;
  display:block;
  background:#e5e7eb;
}

.ni-body{
  padding: 12px 12px 12px 0;
  flex:1;
}

.ni-meta{
  display:flex;
  align-items:center;
  gap:10px;
  color: var(--muted);
  font-weight:800;
  font-size:12px;
}
.ni-dot{
  width:5px;height:5px;border-radius:50%;
  background: rgba(11,46,90,.35);
}

.ni-title{
  margin-top:6px;
  font-weight:900;
  color: var(--text);
  line-height:1.25;
}

.ni-excerpt{
  margin-top:6px;
  color: var(--muted);
  font-size: 13px;
  line-height:1.5;

  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.news-empty{
  background: var(--card);
  border: var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  padding: 18px;
  color: var(--muted);
}

/* =========================================================
   SAMBUTAN
========================================================= */
.rektor-section{
  background:var(--card);
  padding:30px 32px;
  border-radius:var(--radius);
  box-shadow:var(--shadow-sm);
  border:var(--border);
  position:relative;
}
.rektor-section::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  right:0;
  height:5px;
  background:linear-gradient(90deg,var(--accent),var(--primary));
}
.rektor-section p{margin:0 0 10px}
.rektor-section b{color:var(--primary)}

/* =========================================================
   LAYANAN UTAMA
========================================================= */
.service-card{
  background:var(--card);
  border-radius:18px;
  padding:26px 22px;
  text-align:left;
  box-shadow:var(--shadow-sm);
  border:var(--border);
  transition:transform .22s ease, box-shadow .22s ease, border-color .22s ease;
  height:100%;
}
.service-card i{
  color:var(--primary);
  font-size:36px;
  margin-bottom:14px;
}
.service-card h5{
  margin:0 0 8px;
  font-weight:800;
  color:var(--text);
}
.service-card p{
  margin:0;
  color:var(--muted) !important;
}
.service-card:hover{
  transform:translateY(-6px);
  box-shadow:var(--shadow);
  border-color:rgba(11,46,90,.18);
}
.service-card:hover i{color:var(--primary-2)}

/* =========================================================
   AGENDA
========================================================= */
.agenda-box{
  background:var(--card);
  padding:22px 24px;
  border-radius:var(--radius);
  height:280px;
  overflow:hidden;
  position:relative;
  box-shadow:var(--shadow-sm);
  border:var(--border);
}
.agenda-box::before,
.agenda-box::after{
  content:"";
  position:absolute;
  left:0; right:0;
  height:34px;
  z-index:2;
  pointer-events:none;
}
.agenda-box::before{
  top:0;
  background:linear-gradient(180deg, rgba(255,255,255,1), rgba(255,255,255,0));
}
.agenda-box::after{
  bottom:0;
  background:linear-gradient(0deg, rgba(255,255,255,1), rgba(255,255,255,0));
}
.agenda-scroll{animation:scrollAgenda 12s linear infinite}
@keyframes scrollAgenda{
  0%{transform:translateY(0)}
  100%{transform:translateY(-50%)}
}
.agenda-item{
  padding:12px 0;
  border-bottom:1px solid rgba(11,46,90,.08);
  color:var(--text);
}
.agenda-item b{color:var(--primary)}

/* =========================================================
   CAROUSEL MITRA
========================================================= */
.partner-wrapper{
  background:var(--card);
  padding:20px 18px;
  border-radius:var(--radius);
  box-shadow:var(--shadow-sm);
  border:var(--border);
  overflow:hidden;
}
.partner-slider{
  display:flex;
  gap:18px;
  align-items:center;
  animation:slidePartner 18s linear infinite;
}
.partner-slider img{
  height:82px;
  width:auto;
  border-radius:14px;
  box-shadow:0 8px 22px rgba(0,0,0,.10);
  filter:saturate(1.05) contrast(1.02);
}
@keyframes slidePartner{
  0%{transform:translateX(100%)}
  100%{transform:translateX(-120%)}
}

/* =========================================================
   FOOTER
========================================================= */
.footer-unhas{
  background:linear-gradient(180deg, var(--primary) 0%, #071A33 100%);
  color:rgba(255,255,255,.88);
  padding:52px 22px;
  margin-top:56px;
  border-top:4px solid var(--accent);
}
.footer-unhas h4{
  color:#fff;
  margin-bottom:16px;
  font-weight:900;
}
.footer-unhas p{margin:0 0 10px}
.footer-unhas a{
  color:rgba(255,255,255,.88);
  text-decoration:none;
}
.footer-unhas a:hover{
  color:#fff;
  text-decoration:underline;
}

.footer-brand{
  display:flex;
  align-items:center;
  gap:14px;
  margin-bottom:14px;
}
.footer-logo{
  width:72px;
  height:auto;
  flex:0 0 auto;
  display:block;
  opacity:.95;
  filter: drop-shadow(0 10px 24px rgba(0,0,0,.35));
}
.footer-brand-text h4{
  margin:0;
  font-weight:900;
}
.footer-brand-text .sub{
  margin-top:4px;
  font-weight:700;
  color: rgba(255,255,255,.78);
  font-size:13px;
}

/* Responsive footer logo */
@media (max-width: 576px){
  .footer-unhas{ text-align:center; }
  .footer-brand{
    justify-content:center;
    flex-direction:column;
    gap:10px;
  }
}

/* =========================================================
   FLOATING WHATSAPP BUTTON (FIXED TO VIEWPORT)
   IMPORTANT:
   - some templates apply transform to a wrapper, making "fixed" behave like "absolute"
   - JS below will move this button directly under <body> to guarantee it stays on scroll
========================================================= */
.wa-float{
  all: unset;                           /* reset: prevent footer/link styles affecting it */
  position: fixed !important;
  right: 18px !important;
  bottom: 18px !important;
  z-index: 2147483647 !important;

  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;

  width: 58px;
  height: 58px;
  border-radius: 999px;

  background:#25D366;
  color:#fff !important;
  cursor: pointer;

  box-shadow:0 14px 34px rgba(0,0,0,.22);
  border:1px solid rgba(255,255,255,.18);

  pointer-events: auto !important;
  text-decoration:none !important;

  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.wa-float:hover{
  transform: translateY(-3px);
  box-shadow:0 18px 40px rgba(0,0,0,.26);
  filter: brightness(1.02);
}

.wa-icon{
  width:44px;
  height:44px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:rgba(255,255,255,.16);
  border:1px solid rgba(255,255,255,.18);
}
.wa-icon svg{display:block}

/* Optional: show text on larger screens (uncomment HTML span wa-text below if needed) */
.wa-text{
  display:none;
  line-height:1.05;
  white-space:nowrap;
  font-family:"Poppins",sans-serif;
  font-weight:900;
}
.wa-text small{
  display:block;
  font-weight:800;
  opacity:.92;
  font-size:11px;
  margin-top:2px;
}

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 992px){
  .hero-video{height:520px}
  .hero-content{left:28px; bottom:34px; max-width:78%}
  .hero-title{font-size:38px}
  .latest-news-grid{ grid-template-columns: 1fr; }

  .leader-card{
    width:320px;
    right:18px;
    bottom:18px;
  }
  .leader-avatar{width:88px;height:88px;flex:0 0 88px;}
}

/* MOBILE: circle leader card tetap muncul */
@media (max-width: 768px){
  .hero-video{
    height:auto;
    min-height:560px;
    border-radius:18px;
  }

  .hero-overlay{
    background:
      linear-gradient(180deg,
        rgba(11,46,90,.80) 0%,
        rgba(11,46,90,.55) 42%,
        rgba(11,46,90,.82) 100%);
  }

  .hero-content{
    left:16px;
    right:16px;
    top:22px;
    bottom:auto;
    max-width:none;
    text-align:center;
  }

  .hero-title{font-size:28px}
  .hero-title::after{margin-left:auto;margin-right:auto}
  .hero-sub{font-size:14.5px}

  .leader-card{
    left:50%;
    right:auto;
    transform:translateX(-50%);
    bottom:16px;
    width:min(92vw, 360px);
  }
}

/* =========================================================
   FULL RECTORATE CLASS ERM
========================================================= */
.erm-rectorate-wrap{
  position:relative;
  overflow:hidden;
  border-radius:28px;
  padding:42px 28px;
  background:
    linear-gradient(135deg,#ffffff,#f8fbff);
  border:1px solid rgba(11,46,90,.08);
  box-shadow:0 22px 54px rgba(11,46,90,.10);
}

.erm-bg-light{
  position:absolute;
  inset:0;
  background:
    radial-gradient(circle at 20% 30%, rgba(242,183,5,.08), transparent 30%),
    radial-gradient(circle at 80% 70%, rgba(11,46,90,.06), transparent 35%);
  animation:bgMove 10s linear infinite alternate;
}

@keyframes bgMove{
  0%{transform:translateX(0)}
  100%{transform:translateX(20px)}
}

.erm-rectorate-flow{
  position:relative;
  z-index:2;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
  gap:12px;
}

.erm-node{
  position:relative;
  padding:14px 24px;
  border-radius:999px;
  background:linear-gradient(135deg,#0B2E5A,#12437F);
  color:#fff;
  font-weight:900;
  font-size:14px;
  box-shadow:0 10px 24px rgba(11,46,90,.18);
  animation:nodeFloat 3s ease-in-out infinite;
}

.erm-node:nth-child(even){
  animation-delay:.5s;
}

@keyframes nodeFloat{
  0%,100%{transform:translateY(0)}
  50%{transform:translateY(-4px)}
}

.erm-link{
  width:54px;
  height:4px;
  border-radius:999px;
  background:
    linear-gradient(90deg,
      rgba(242,183,5,.2),
      #F2B705,
      rgba(11,46,90,.2));
  animation:linkGlow 1.2s linear infinite;
}

@keyframes linkGlow{
  0%{opacity:.35}
  50%{opacity:1}
  100%{opacity:.35}
}

.erm-caption{
  position:relative;
  z-index:2;
  margin-top:28px;
  text-align:center;
  color:#6B7280;
  font-size:14px;
  line-height:1.7;
  max-width:900px;
  margin-left:auto;
  margin-right:auto;
}

@media(max-width:768px){

  .erm-node{
    font-size:12px;
    padding:10px 16px;
  }

  .erm-link{
    width:26px;
  }

  .erm-caption{
    font-size:13px;
  }
}

/* very small phones */
@media (max-width: 420px){
  .hero-video{min-height:540px}
  .hero-title{font-size:25px}
  .leader-avatar{width:82px;height:82px;flex:0 0 82px;}
  .ni-thumb{ width: 108px; min-width: 108px; height: 92px; }
}
