
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    
}

body {
  font-family: 'Montserrat', sans-serif;
    background: #f5f5f5;
    margin: 0;
    font-size: 16px;
    overflow-x: hidden; 
}
::-webkit-scrollbar {
  display: none;
}

html {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
/*ini buat header yah, awalnya di sini*/
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'Montserrat', sans-serif;
  position: fixed;
  top: 0;   /* PASTIKAN INI ADA agar menempel di paling atas */
  left: 0;  /* PASTIKAN INI ADA agar menempel di paling kiri */
  right: 0; /* Menjamin lebar memenuhi dari ujung ke ujung */
  width: 100%;
  transition: all 0.3s ease;
  z-index: 99;
  height: clamp(5.625rem, 5.132rem + 1.974vw, 7.5rem);
}

.logoamsawhite {
    height: auto;
    width: clamp(3.125rem, 2.632rem + 1.974vw, 5rem);
    margin-left: clamp(0.938rem, 0.691rem + 0.987vw, 1.875rem);
}

.logoamsablack {
    height: auto;
    width: clamp(3.125rem, 2.632rem + 1.974vw, 5rem);
    margin-left: clamp(0.938rem, 0.691rem + 0.987vw, 1.875rem);
    display: none;
}

.amsa {
    color: #ffff;
    font-size: clamp(1.125rem, 0.768rem + 0.952vw, 1.625rem);
    margin-right: 0;
    margin-left: clamp(0.938rem, 0.337rem + 2.404vw, 2.5rem);
    font-weight: 600;
}

.universitasdiponegoro {
  font-size: clamp(0.938rem, 0.817rem + 0.481vw, 1.25rem);
  font-weight: 350;
}

.header.scrolled {
  background-color: white;
  color: black;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  height: clamp(5rem, 4.519rem + 1.923vw, 6.25rem);
}

.header.scrolled a {
  color: #001d51;
}

.header.scrolled .logoamsawhite {
  display: none;
}

.header.scrolled .logoamsablack {
  display: block;
}

.header.scrolled .amsa {
  color: #001d51;
}

.header.scrolled .menu li a:hover {
  color: #fff;
  background-color: #001d51;
  border-radius: 5px;
}

.header.scrolled .fa-bars {
  color: #001d51;
}

.menu-pcdisplay {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  background-color: none;
  font-size: clamp(0.75rem, 0.558rem + 0.769vw, 1.25rem);
  font-weight: 550;
  margin-right: clamp(0.938rem, 0.691rem + 0.987vw, 1.875rem);
  margin-left: auto;
}

.menu-pcdisplay > li {
  position: relative;
}

.CO-mobile {
  margin-top: 10px;
}

.menu-pcdisplay > li > a {
  color: white;
  text-decoration: none;
  padding-top: clamp(0.75rem, 0.654rem + 0.385vw, 1rem);
  padding-bottom: clamp(0.75rem, 0.654rem + 0.385vw, 1rem);
  padding-left: clamp(0.5rem, 0.404rem + 0.385vw, 0.75rem);
  padding-right: clamp(0.5rem, 0.404rem + 0.385vw, 0.75rem);
  display: block;
  transition: background-color 0.3s ease;
}

.menu-pcdisplay li a:hover {
  color: #001d51;
  background-color: #fff;
  border-radius: 5px;
}

.fa-caret-down {
  margin-left: 10px;
}

.drop-down {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-20px);
  transition: opacity 0.5s ease, transform 0.3s ease;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: white;
  list-style: none;
  padding: 0;
  margin: 0;
  border: 1px solid #ccc;
  min-width: 300px;
  z-index: 99;
  font-size: 1rem;
}

.drop-down li a {
  display: block;
  padding: 10px 16px;
  text-decoration: none;
  color: black;
}

.drop-down li a:hover {
  background-color: #f0f0f0; 
}

.menu-pcdisplay > li:hover > .drop-down {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.bar-mobile-display {
  position: fixed;
  top: 0;
  right: 0;
  height: auto;
  width: clamp(15.625rem, 5.609rem + 40.064vw, 31.25rem);
  z-index: 999;
  background-color: #fff;
  box-shadow: -10px 0 10px rgba(0, 0, 0, 0.1);
  list-style: none;
  text-decoration: none;
  display: none;
  flex-direction: column;
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1rem, 0.558rem + 0.769vw, 1.25rem);
  color: #001d51;
  margin-top: clamp(4.688rem, 4.207rem + 1.923vw, 5.938rem);
  width: 100%;
}

.bar-mobile-display li {
  padding: 10px 16px;
  background-color: #fff;
}

.bar-mobile-display li:hover {
  background-color: #ffffff; 
  cursor: pointer;
}

.bar-mobile-display a {
  text-decoration: none;
  color: #001d51;
  font-weight: 500;
}

.has-dropdown {
  margin: 0;
}

.drop-menu-mobile {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease;
  opacity: 0;
  padding-left: 0;
  list-style: none;
  width: 100%;
  display: none;
}

.drop-menu-mobile.show {
  max-height: 700px;
  opacity: 1;
  width: 100%;
  display: block;
}

.opt {
  display: none;
  margin: 0;
}

.fa-chevron-down {
  margin-left: 10px;
  transition: transform 0.3s ease;
}

.rotate {
    transform: rotate(180deg);
    transition: transform 0.3s ease;
}
/*akhiran headernya di sini bos*/


@media (max-width: 1024px) {
    .dissapear {
        display: none !important;
    }
    .opt {
        display: block;
    }
    .sidebar li a {
        background-color: #fff;
        transition: background-color 0.3s ease;
    }
    .sidebar li a:hover {
        background-color: #ccc;
    }
}
.header-title {
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;      
    color: #001d51;               
    font-family: 'Alex Brush', cursive;
    text-align: center;
    line-height: 1.4;
    font-size: clamp(2.8rem, 5vw, 2.5rem);
   padding-top: clamp(6rem, 12vw + 1rem, 15rem);
    margin: 0 0 clamp(-2rem, -4vw + 1rem, -4rem) 0; 
}

.header-subtitle {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: transparent;
    color: #555555;
  font-family: 'Montserrat', sans-serif;
    font-weight: 400 !important; 
    font-size: clamp(0.98rem, 1.3vw, 1.2rem) !important; /* Ukuran agak gede dikit */
    line-height: 1.5;
    padding: 0 20px;
    margin: 0.8rem auto 1.2rem auto !important; 
    max-width: 850px;
    position: relative;
    z-index: 5;
}

.header-subtitle h2 {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    font-weight: 400 !important; /* Tidak bold */
    margin: 0;
    padding: 0;
}

/* Background Utama Halaman */
.halaman1 {
    height: 40vh; 
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1; 
    background-color: transparent;
    background-image: url('ALLCAS.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    -webkit-mask-image: linear-gradient(rgb(0 0 0 / 1), rgb(0 0 0 / 0.8) 70%, rgb(0 0 0 / 0));
    mask-image: linear-gradient(rgb(0 0 0 / 1), rgb(0 0 0 / 0.8) 70%, rgb(0 0 0 / 0));
}

.halaman2 {
    align-items: center;
    justify-content: center;
    display: flex;
    z-index: 50;
    min-height: 100vh; 
}

.container {
    width: 90%;
    max-width: 1200px; 
    display: grid;
    /* Ubah 1fr di bagian belakang jadi ukuran maksimal card, misal 320px atau 350px */
    grid-template-columns: repeat(auto-fit, minmax(280px, 350px));
    /* Tambahkan justify-content center supaya kalau sisa 1 di bawah, posisinya langsung ke tengah dan nggak memanjang */
    justify-content: center;
    gap: 20px;
    margin: 20px auto 0;
    padding-bottom: 50px;
}

.card {
    background: white;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    font-size: 12px;
    height: 100%; 
}

.card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    object-position: center;
    background: #eee;
}

.card h3 {
    margin: 15px 10px 10px;
    padding: 0 5px;
}

.card p {
    font-size: 11px;
    text-align: left;
    padding: 0 20px 15px 20px; 
}

ol {
    list-style-type: circle;
    padding-left: 25px;
    margin-bottom: 15px;
}

ol li {
    font-size: 11px;
    text-align: left;
    padding: 0 20px 4px 0;
    font-weight: 500;
}

.sub-text {
    display: block;
    font-style: italic;
    color: #9d9d9d;
    margin-top: 2px;
}
.bottom {
  margin-top: clamp(0.3rem, 0.1rem + 1vw, 1.5rem); 
  height: clamp(60px, 4rem + 4vw, 12vh); 
  background-color: #001d51;
  width: 100%;
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
  font-family: 'Montserrat', sans-serif;
}

.whitebawah {
  height: clamp(2.5rem, 1.5rem + 3vw, 4.375rem); 
}

.saundip {
  color: #fff;
  font-family: 'Montserrat', sans-serif;
}

.fa-bars {
  color: #fff;
  font-size: clamp(1.1rem, 0.8rem + 1vw, 1.8rem); 
  margin-right: clamp(0.938rem, 0.337rem + 2.404vw, 2.5rem);
  z-index: 9999;
}

.fa-xmark {
  font-size: clamp(1.1rem, 0.8rem + 1vw, 1.8rem); 
}

/* FIX MOBILE HEADER TITLE */
@media (max-width: 767px) {

  .header-title {
    position: relative !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;

    /* UKURAN TITLE SAJA */
    font-size: 2.2rem !important;
    line-height: 1 !important;
  }

  .header-title h1 {
    position: relative !important;
    top: 0 !important;
    margin: 0 !important;

    font-family: 'Alex Brush', cursive !important;
    font-size: 2.2rem !important;
    line-height: 1 !important;
  }

  /* SUBTITLE LEBIH DEKAT */
  .header-subtitle {
    margin-top: 0 !important;
    margin-bottom: 2.5rem !important;
    padding: 0 20px !important;
  }

  .header-subtitle h2 {
    margin: 0 !important;
    font-family: 'montserrat regular', sans-serif !important;
    font-size: 0.9rem !important;
    font-weight: 400 !important;
    line-height: 1.2 !important;
  }

}
@media (min-width: 320px) and (max-width: 767px) {
  
  /* 1. Kunci .header (Ganti .headerisi jadi .header) agar nempel tepat di paling atas */
  .header {
    display: flex !important;
    position: fixed !important; 
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    justify-content: space-between !important; 
    align-items: center !important;
    padding: 0 10px !important; 
    box-sizing: border-box !important;
    z-index: 99999 !important; /* Supaya header selalu di atas latar background */
  }

  .logo, .logoblack {
    margin-left: 10px !important;
    margin-right: 0 !important;
  }

  .slogan {
    margin-left: 10px !important;
    margin-right: auto !important; 
    text-align: left !important;
  }

  .menu {
    display: flex !important;
    margin-left: auto !important; 
    margin-right: 10px !important;
  }

  .header .opt {
    display: block !important;
    margin: 0 !important;
  }

  .hide-menu-pcdisplay, .dissapear {
    display: none !important;
  }

  .halaman1 {
    display: block !important;
    position: absolute !important; 
    height: 18vh !important;       
    width: 100% !important;
    z-index: 1 !important;
    top: 0 !important;
  }

  /* 3. Posisi Menu Sidebar HP Tepat Di Bawah Header */
  .bar-mobile-display {
    position: fixed !important;
    top: 70px !important; /* Tepat di bawah batas header HP */
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    margin-top: 0 !important;
  }

  .deskripsidivisiplusfoto {
    display: flex;
    flex-direction: column;
  }

  .finance {
    height: 30vh;
  }

  .cardbaris1, .cardbaris2 {
    flex-direction: column;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .cardbaris11, .cardbaris12, .cardbaris21 {
    margin: 0 0 35px 0 !important;
  }

  .cardbaris22 {
    margin: 0 !important;
  }

  .card p {
    padding: 0 15px 15px 15px !important;
  }
}


/* 1. KONDISI TABLET & MOBILE (layar 1024px ke bawah) */
@media (max-width: 1024px) {
  
  /* Sembunyikan menu desktop & Tampilkan tombol hamburger */
  .hide-menu-pcdisplay {
    display: none !important;
  }
  
  .opt, 
  li.opt {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    cursor: pointer !important;
    margin-left: auto !important;
  }

  .fa-bars {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: #ffffff !important;
    font-size: 1.6rem !important;
  }

  .header.scrolled .fa-bars {
    color: #001d51 !important;
  }

  /* Penyesuaian Header di Tablet & Mobile */
  .header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0 20px !important;
    box-sizing: border-box !important;
  }

  .logoamsawhite, 
  .logoamsablack {
    margin-left: 0 !important;
    width: 45px !important;
  }

  .amsa {
    margin-left: 10px !important;
    margin-right: auto !important; 
    font-size: 1.1rem !important;
  }

/* Styling Judul Events */
.header-title {
    display: flex;
    justify-content: center;
    align-items: center;
    color: #001d51;               
    font-family: 'Alex Brush', cursive;
    text-align: center;
    font-size: clamp(3.5rem, 6vw, 5rem);
    margin-top: 300px !important; /* DITURUNKAN LAGI (dari 140px ke 170px) */
    position: relative !important;
    z-index: 5 !important;
}

/* Styling Subtitle (TANPA BAYANGAN) */
.header-subtitle {
    display: block !important;       
    padding: 0 10px !important;
    text-align: center !important;
    position: relative !important;
    z-index: 5 !important;
    max-width: 850px;
}

.header-subtitle h2 {
    color: #555 !important;
    text-shadow: none !important; /* BAYANGAN DIHAPUS */
    font-size: clamp(0.95rem, 1.8vw, 1.15rem) !important;
    font-weight: 400 !important;
    line-height: 1;
}

.halaman1 {
    height: 450px !important; /* Tinggikan jadi 450px statis agar muat untuk judul & subtitle */
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 1 !important;
}

  /* Dropdown / Sidebar Mobile Menu */
  .bar-mobile-display {
    top: 70px !important;
    width: 100% !important;
    margin-top: 0 !important;
  }

  .bar-mobile-display li,
  .bar-mobile-display a,
  .drop-menu-mobile li {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
  }
}

/* Mengurangi space kosong bawah untuk Tablet & Mobile */
@media (max-width: 1024px) {
  
  /* Kurangi min-height & padding bawah wrapper utama */
  .events-page-wrapper {
    min-height: auto !important; /* Mencegah halaman dipaksa ditarik terlalu panjang */
    padding-bottom: 20px !important; /* Dipangkas agar mepet ke footer */
  }

  .events-main-container {
    width: 90% !important;
    margin-top: 30px !important;
    margin-bottom: 10px !important; /* Jarak bawah container dikurangi */
  }

  /* Penyesuaian margin footer */
  .bottom {
    margin-top: 20px !important; /* Jarak pas antara kartu terendah dengan footer */
  }
}

/* 2. KONDISI KHUSUS MOBILE (< 768px) */
@media (max-width: 767px) {
  .events-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  .events-main-container {
    width: 90% !important;
    margin-top: 40px !important; /* Beri jarak dari subtitle */
    position: relative;
    z-index: 10;
}

  .event-img-container {
    height: 190px !important;
  }

  .event-card-body {
    padding: 18px 15px !important;
  }

  .halaman1 {
    height: 25vh !important;
  }

  .header-title {
    margin-top: 90px !important;
    font-size: clamp(2.5rem, 12vw, 3.5rem) !important;
  }

  .bottom {
    height: 70px !important;
    gap: 10px !important;
  }

  .logoamsawhitebottom {
    height: 2.2rem !important;
  }
}

/* =========================
   FINAL HP HEADER
   ========================= */
@media (max-width: 767px) {

  .header-title {
    margin-top: 150px !important;
    font-size: 3.5rem !important;
    line-height: 1 !important;
    margin-bottom: 0 !important;
  }

  .header-subtitle {
    margin-top: 0 !important;
    margin-bottom: 2.5rem !important;
    padding: 0 10px !important;
    width: 90% !important;
  }

  .header-subtitle h2 {
    font-size: 0.9rem !important;
    line-height: 1.2 !important;
    font-weight: 400 !important;
    margin: 0 !important;
  }

}

@media (max-width: 767px) {
  .header-title h1 {
    font-size: 3.5rem !important;
  }
}