/* Import Font Poppins */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

/* Variabel Warna & Properti Kustom */
:root {
  --primary: #e75c5c;
  --secondary: #fe9b9b;
  --dark: #2d3436;
  --darker: #1e272e;
  --text-light: #f0f0f0;
  --text-gray: #b2bec3;
  --bg-card: rgba(30, 39, 46, 0.4);
  --border-card: rgba(255, 255, 255, 0.1);
  --rpl-icon-bg: rgba(108, 92, 231, 0.1);
  --tkj-icon-bg: rgba(92, 159, 231, 0.1);
  --rpl-color: #6c5ce7;
  --tkj-color: #5c9fe7;
  --loader: #e75c5c;
}

@property --gradient-size {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 40%;
}

::selection {
  background: var(--primary);
  color: #fff;
}

/* Reset & Gaya Dasar */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: "Poppins", sans-serif;
  background: radial-gradient(
    circle at center,
    #311818,
    #5a2929 var(--gradient-size),
    #000 100%
  );
  animation: pulseGradient 8s ease-in-out infinite;
  color: var(--text-light);
  line-height: 1.7;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #121212;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #311818, #5a2929);
  border-radius: 4px;
}

a {
  text-decoration: none;
}

/* Preloader */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}
.preloader.hidden {
  opacity: 0;
}
.preloader-content {
  text-align: center;
}
.preloader-logo {
  width: 150px;
  height: auto;
  margin-bottom: 30px;
  animation: pulse 2s infinite;
}
.pl1 {
  width: 8em;
  height: 8em;
}
.pl1__g,
.pl1__rect {
  animation: pl1-a 1.5s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}
.pl1__g {
  transform-origin: 64px 64px;
}
.pl1__rect:first-child {
  animation-name: pl1-b;
}
.pl1__rect:nth-child(2) {
  animation-name: pl1-c;
}

/* Navigasi Bawah */
.button-container {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  background: rgba(14, 14, 18, 0.7);
  width: 90%;
  max-width: 320px;
  height: 55px;
  align-items: center;
  justify-content: space-around;
  border-radius: 27.5px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.37);
  z-index: 1000;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.button {
  border: none;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: transform 0.3s, background-color 0.2s;
  cursor: pointer;
}
.button:hover {
  transform: translateY(-3px);
  background-color: rgba(255, 255, 255, 0.1);
}
.button i {
  font-size: 18px;
}

/* Chat Box */
.chat-box {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 90%;
  max-width: 320px;
  max-height: 450px;
  display: flex;
  flex-direction: column;
  background-color: #1a1a1a;
  border-radius: 15px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.37);
  overflow: hidden;
  z-index: 999;
  visibility: hidden;
  opacity: 0;
  transition: all 0.4s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.chat-header {
  padding: 12px 15px;
  background-color: #111;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
  font-weight: 600;
}
.chat-button {
  background: transparent;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
}
.chat-body {
  padding: 16px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chat-footer {
  display: flex;
  border-top: 1px solid #333;
  padding: 10px;
  gap: 8px;
}
.chat-footer input {
  flex: 1;
  padding: 10px 15px;
  border-radius: 20px;
  border: 1px solid #444;
  outline: none;
  background-color: #333;
  color: #fff;
}
.chat-footer button {
  padding: 10px 18px;
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 20px;
  cursor: pointer;
}
.bot {
  background-color: #333;
  padding: 10px 15px;
  max-width: 85%;
  border-radius: 15px 15px 15px 0;
  align-self: flex-start;
}
.user {
  background-color: var(--primary);
  padding: 10px 15px;
  max-width: 85%;
  border-radius: 15px 15px 0 15px;
  align-self: flex-end;
}

/* Hero Section */
#hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 100vh;
  padding: 0 20px;
}
#hero img {
  width: clamp(150px, 30vw, 250px);
  height: auto;
  margin-bottom: 20px;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.5));
}
.hero-text {
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 700;
  color: #fff;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  letter-spacing: 1px;
}
.hero-text span {
  display: inline-block;
}
.hero-subtext {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  color: var(--text-gray);
  margin-top: 10px;
}

/* Section Umum */
section {
  padding: clamp(60px, 10vh, 100px) 5%;
}
.section-title {
  text-align: center;
  margin-bottom: 3rem;
}
.section-title h2 {
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  margin-bottom: 1rem;
  color: #ffffff;
  border-bottom: 3px solid var(--primary);
  padding-bottom: 0.75rem;
  display: inline-block;
}
.section-title p {
  color: var(--text-gray);
  font-size: clamp(1rem, 2.5vw, 1.1rem);
  max-width: 600px;
  margin: 0 auto;
}

/* Section Tentang */
#tentang {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3rem;
}
#tentang .kolom-teks,
#tentang .kolom-gambar {
  flex: 1 1 300px;
}
#tentang .kolom-gambar {
  position: relative;
}
#tentang .kolom-gambar img {
  width: 100%;
  height: auto;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.teks-overlay {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  padding: 15px;
  border-radius: 10px;
  text-align: center;
}
.teks-overlay h1 {
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  color: #fff;
}
.teks-overlay h3 {
  font-size: clamp(0.9rem, 2vw, 1rem);
  color: var(--text-gray);
  font-weight: 400;
}

/* Section Keunggulan (BARU) */
.keunggulan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.keunggulan-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  backdrop-filter: blur(10px);
  padding: 2rem;
  border-radius: 15px;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}
.keunggulan-icon {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 1rem;
  display: inline-block;
  background: rgba(231, 92, 92, 0.1);
  width: 70px;
  height: 70px;
  line-height: 70px;
  border-radius: 50%;
}
.keunggulan-card h3 {
  font-size: 1.4rem;
  color: #fff;
  margin-bottom: 0.5rem;
}
.keunggulan-card p {
  color: var(--text-gray);
}

/* Section Jurusan */
.jurusan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}
.jurusan-card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  text-align: center;
  color: #fff;
  border: 1px solid var(--border-card);
  transition: transform 0.3s, box-shadow 0.3s;
  transform-style: preserve-3d;
}
.jurusan-card img {
  width: 100%;
  max-width: 250px;
  height: 180px;
  object-fit: contain;
  margin-bottom: 1rem;
}
.jurusan-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--primary);
}
.jurusan-card p {
  color: var(--text-gray);
  margin-bottom: 1.5rem;
}
.jurusan-card a {
  display: inline-block;
  background-color: var(--primary);
  color: #fff;
  padding: 10px 25px;
  border-radius: 50px;
  font-weight: 600;
  transition: background-color 0.3s;
}
.jurusan-card a:hover {
  background-color: var(--secondary);
}

/* Section Statistik */
.dashboard-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}
.dashboard-card {
  background: var(--bg-card);
  border-radius: 15px;
  padding: 25px;
  backdrop-filter: blur(5px);
  border: 1px solid var(--border-card);
}
.dashboard-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}
.dashboard-icon {
  font-size: 24px;
  margin-right: 15px;
  padding: 15px;
  border-radius: 50%;
}
.rpl-icon {
  background: var(--rpl-icon-bg);
  color: var(--rpl-color);
}
.tkj-icon {
  background: var(--tkj-icon-bg);
  color: var(--tkj-color);
}
.dashboard-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #ffffff;
}
.dashboard-stats {
  display: flex;
  justify-content: space-around;
}
.stat-item {
  text-align: center;
}
.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-light);
}
.stat-label {
  font-size: 0.9rem;
  color: var(--text-gray);
}

/* Section Lokasi */
.map-container {
  width: 100%;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  height: 450px;
}
.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Footer */
.site-footer {
  background: #0e0e12;
  padding: 40px 5%;
  color: var(--text-gray);
}
.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 30px;
  border-bottom: 1px solid #333;
}
.footer-logo img {
  width: 100px;
  margin-bottom: 10px;
}
.footer-content h4 {
  font-size: 1.2rem;
  color: #fff;
  margin-bottom: 15px;
}
.footer-links ul {
  list-style: none;
}
.footer-links li {
  margin-bottom: 10px;
}
.footer-links a {
  color: var(--text-gray);
  transition: color 0.3s;
}
.footer-links a:hover {
  color: var(--primary);
}
.footer-kontak p {
  margin-bottom: 10px;
}
.footer-kontak i {
  margin-right: 10px;
  color: var(--primary);
}
.footer-bottom {
  text-align: center;
  padding-top: 20px;
  font-size: 0.9rem;
}

/* Animasi Keyframes */
@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}
@keyframes pulseGradient {
  0%,
  100% {
    --gradient-size: 40%;
  }
  50% {
    --gradient-size: 60%;
  }
}
@keyframes pl1-a {
  from {
    transform: rotate(0);
  }
  80%,
  to {
    animation-timing-function: steps(1, start);
    transform: rotate(90deg);
  }
}
@keyframes pl1-b {
  from {
    animation-timing-function: cubic-bezier(0.33, 0, 0.67, 0);
    width: 40px;
    height: 40px;
  }
  20% {
    animation-timing-function: steps(1, start);
    width: 40px;
    height: 0;
  }
  60% {
    animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1);
    width: 0;
    height: 40px;
  }
  80%,
  to {
    width: 40px;
    height: 40px;
  }
}
@keyframes pl1-c {
  from {
    animation-timing-function: cubic-bezier(0.33, 0, 0.67, 0);
    width: 40px;
    height: 40px;
    transform: translate(0, 48px);
  }
  20% {
    animation-timing-function: cubic-bezier(0.33, 1, 0.67, 1);
    width: 40px;
    height: 88px;
    transform: translate(0, 0);
  }
  40% {
    animation-timing-function: cubic-bezier(0.33, 0, 0.67, 0);
    width: 40px;
    height: 40px;
    transform: translate(0, 0);
  }
  60% {
    animation-timing-function: cubic-bezier(0.33, 1, 0.67, 1);
    width: 88px;
    height: 40px;
    transform: translate(0, 0);
  }
  80%,
  to {
    width: 40px;
    height: 40px;
    transform: translate(48px, 0);
  }
}

/* Media Queries untuk Responsivitas */
@media (max-width: 768px) {
  #tentang {
    text-align: center;
  }
  .teks-overlay {
    position: static;
    transform: none;
    background: none;
    backdrop-filter: none;
    padding: 15px 0 0 0;
  }
  .map-container {
    height: 350px;
  }
}
@media (max-width: 480px) {
  .button-container {
    height: 50px;
  }
  .button {
    width: 40px;
    height: 40px;
  }
  .chat-box {
    bottom: 80px;
  }
  .stat-number {
    font-size: 1.8rem;
  }
}
