/* ===== PRAXIS HIGH SCHOOL - COMMON STYLES ===== */

/* CSS Variables */
:root {
  --primary-color: #1a237e;
  --secondary-color: #0d47a1;
  --accent-color: #ffc107;
  --text-dark: #333;
  --text-light: #666;
  --white: #ffffff;
  --shadow-light: 0 2px 15px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 5px 15px rgba(0, 0, 0, 0.05);
  --transition: all 0.3s ease;
}

.bg-primary-custom {
  background-color: var(--secondary-color);
}

.text-dark-custom {
  color: var(--text-dark);
}

.text-light-custom {
  color: var(--text-light);
}

.text-primary-custom {
  color: var(--primary-color);
}

.bg-primary-custom {
  background-color: var(--primary-color);
}

.border-primary-custom {
  border-color: var(--primary-color);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeSlideDown {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes subtlePulse {
  0% {
    box-shadow: 0 0 0 rgba(255, 214, 0, 0);
  }
  50% {
    box-shadow: 0 0 15px rgba(255, 214, 0, 0.3);
  }
  100% {
    box-shadow: 0 0 0 rgba(255, 214, 0, 0);
  }
}

/* ===== GLOBAL STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: #f8f9fa;
  font-display: swap;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== HEADER STYLES ===== */
.main-header {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 1rem 0;
  position: sticky !important;
  top: 0;
  z-index: 9999 !important;
  animation: fadeSlideDown 0.8s ease-out forwards;
  box-shadow: var(--shadow-light);
}

header {
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.school-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.school-logo {
  height: 50px;
  width: auto;
  transition: var(--transition);
}

.school-logo:hover {
  transform: scale(1.05);
}

.brand-text h4 {
  margin: 0;
  font-size: 1.3rem;
  line-height: 1.2;
  color: var(--white);
}

.brand-text small {
  font-size: 0.8rem;
  opacity: 0.9;
  color: var(--white);
}

/* Header Logo Styles (for index.php) */
.header-logo {
  height: 40px;
  width: auto;
  transition: var(--transition);
}

.header-logo:hover {
  transform: scale(1.1);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 15px;
}

.school-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.school-title h1 {
  margin: 0;
  font-size: 1.8rem;
  color: var(--white);
  line-height: 1;
}

.school-title .subtitle {
  margin: 0;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  line-height: 1;
}

.divider {
  width: 100%;
  height: 1px;
  background-color: rgba(255, 255, 255, 0.2);
  margin: 0.5rem 0;
}

/* ===== NAVIGATION STYLES ===== */
.main-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 1.2rem;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 0.5rem 0;
  transition: var(--transition);
}

.nav-menu a:hover {
  color: var(--accent-color);
}

.nav-menu a.active {
  color: var(--accent-color);
}

.nav-menu a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-color);
  transition: width 0.3s;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
  width: 100%;
}

/* ===== DROPDOWN STYLES ===== */
.dropdown-menu {
  background-color: #f0f4ff; /* latar belakang dropdown */
  padding: 0.5rem 0;
  border-radius: 6px;
  box-shadow: var(--shadow-light);
  min-width: 180px;
}

.dropdown-menu .dropdown-item {
  color: var(--primary-color);
  padding: 0.5rem 1rem;
  display: block;
  text-align: left;
  transition: var(--transition);
}

.dropdown-menu .dropdown-item:hover {
  background-color: #ddd;
  color: #0d47a1;
}

/* Active state khusus untuk dropdown item */
.dropdown-menu .dropdown-item.active {
  background-color: var(--primary-color);
  color: #fff;
  font-weight: 600;
}

/* Pastikan dropdown relatif terhadap li */
.nav-menu .dropdown {
  position: relative;
}

/* Dropdown menu */
.nav-menu .dropdown-menu {
  display: none;
  position: absolute;
  top: 100%; /* muncul tepat di bawah menu utama */
  margin-top: 0; /* Remove gap */
  left: 0;
  background: #f8f9fa;
  padding: 0.5rem 0;
  min-width: 180px;
  border-radius: 5px;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);

  opacity: 0;
  visibility: hidden;
  /* transform: translateY(10px); */
  transition: all 0.3s ease;
  z-index: 99;
}

/* Add a bridge between trigger and menu to maintain hover state */
.nav-menu .dropdown::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 20px;
  display: block;
}

/* Tampilkan saat hover */
.nav-menu .dropdown:hover .dropdown-menu {
  display: block;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Style item dropdown */
.nav-menu .dropdown-menu li {
  list-style: none;
}

.nav-menu .dropdown-menu a {
  display: block;
  padding: 10px 15px;
  color: #1a237e;
  text-decoration: none;
  transition: background 0.3s;
}

.nav-menu .dropdown-menu a:hover {
  background: #e9ecef;
}

/* Delay agar dropdown tidak langsung hilang */
.nav-item.dropdown {
  position: relative;
}

.nav-item.dropdown:hover > .dropdown-menu {
  display: block;
  margin-top: 0.1rem;
}

.nav-item.dropdown:hover .btn {
  color: #fff;
}

/* Perbesar area hover agar mouse tidak "lepas" */
.dropdown-menu {
  top: 100%;
  margin-top: 4px;
  pointer-events: auto;
}

/* ===== SOCIAL ICONS ===== */
.social-icons {
  display: flex;
  gap: 0.8rem;
}

.social-icons a {
  color: var(--white);
  font-size: 1.1rem;
  transition: var(--transition);
  text-decoration: none;
}

.social-icons a:hover {
  color: var(--accent-color);
  transform: translateY(-2px);
}

/* ===== MOBILE MENU ===== */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
}

.mobile-menu-btn:hover {
  color: var(--accent-color);
}

/* ===== MAIN CONTENT STYLES ===== */
.main-content {
  min-height: calc(100vh - 200px);
  padding: 2rem 0;
}

.section-title {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  text-align: center;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-light);
  text-align: center;
  margin-bottom: 3rem;
}

.divider {
  width: 60px;
  height: 3px;
  background-color: var(--accent-color);
  margin: 1rem auto 2rem;
}

/* ===== BUTTON STYLES ===== */
.btn-primary {
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  padding: 0.8rem 2rem;
  border-radius: 5px;
  text-decoration: none;
  display: inline-block;
  transition: var(--transition);
  font-weight: 500;
}

.btn-primary:hover {
  background-color: var(--secondary-color);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-light);
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  padding: 0.8rem 2rem;
  border-radius: 5px;
  text-decoration: none;
  display: inline-block;
  transition: var(--transition);
  font-weight: 500;
}

.btn-secondary:hover {
  background-color: var(--primary-color);
  color: var(--white);
  transform: translateY(-2px);
}

/* ===== CARD STYLES ===== */
.card {
  background: var(--white);
  border-radius: 10px;
  box-shadow: var(--shadow-medium);
  padding: 2rem;
  transition: var(--transition);
  border: none;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.card-title {
  color: var(--primary-color);
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.card-text {
  color: var(--text-light);
  line-height: 1.6;
}

/* ===== FOOTER STYLES ===== */
.main-footer {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 3rem 0;
  animation: fadeIn 1.2s ease-in-out;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 2fr 2fr; /* Brand | Links | Contact */
  grid-template-columns: 2fr 2fr 2fr; /* Brand | Links | Contact */
  gap: 2rem;
  align-items: stretch;
}

.footer-links-wrapper {
  display: flex;
  gap: 3rem;
}

.footer-brand {
  margin-bottom: 1.5rem;
}

.footer-logo {
  height: 60px;
  margin-bottom: 1rem;
}

.footer-brand h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--white);
}

.footer-brand p {
  opacity: 0.8;
  font-size: 0.9rem;
  color: var(--white);
}

.footer-links h4 {
  font-size: 1.1rem;
  margin-bottom: 1.2rem;
  position: relative;
  padding-bottom: 0.5rem;
  color: var(--white);
}

.footer-links h4::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 2px;
  background-color: var(--accent-color);
}

.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.7rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: var(--transition);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--accent-color);
  padding-left: 5px;
}

.contact-info li {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.8);
}

.contact-info i {
  margin-top: 0.2rem;
  color: var(--accent-color);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

/* ===== UTILITY CLASSES ===== */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.mb-1 {
  margin-bottom: 0.5rem;
}
.mb-2 {
  margin-bottom: 1rem;
}
.mb-3 {
  margin-bottom: 1.5rem;
}
.mb-4 {
  margin-bottom: 2rem;
}
.mb-5 {
  margin-bottom: 3rem;
}

.mt-1 {
  margin-top: 0.5rem;
}
.mt-2 {
  margin-top: 1rem;
}
.mt-3 {
  margin-top: 1.5rem;
}
.mt-4 {
  margin-top: 2rem;
}
.mt-5 {
  margin-top: 3rem;
}

.p-1 {
  padding: 0.5rem;
}
.p-2 {
  padding: 1rem;
}
.p-3 {
  padding: 1.5rem;
}
.p-4 {
  padding: 2rem;
}
.p-5 {
  padding: 3rem;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 821px) {
  .header-container {
    flex-direction: column;
    gap: 1rem;
  }

  .logo-right {
    display: none !important;
  }

  .main-nav {
    flex-direction: column;
    width: 100%;
  }

  .logo-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0 1rem;
  }

  .nav-menu {
    flex-direction: column;
    width: 100%;
    text-align: center;
    gap: 1rem;
  }

  .mobile-menu-btn {
    display: block;
  }

  .main-nav {
    display: none;
  }

  .main-nav.active {
    display: flex;
  }

  .footer-grid {
    display: flex;
    flex-direction: column;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }

  .footer-links-wrapper {
    justify-content: flex-start; /* dorong ke kanan */
    gap: 2rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .card {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .header-container {
    padding: 0 1rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .card {
    padding: 1rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== ACCESSIBILITY ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus styles for better accessibility */
a:focus,
button:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

/* Skip to main content link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary-color);
  color: var(--white);
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 1001;
}

.skip-link:focus {
  top: 6px;
}

/* ===== MOBILE: Dropdown selalu tampil ===== */
@media (max-width: 800px) {
  /* RESET JARAK ANEH */
  .nav-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .nav-menu li {
    margin: 0;
    padding: 0;
  }

  .nav-menu a {
    text-align: center;
  }

  /* =====================
     FLATTEN ACADEMICS
  ===================== */

  .nav-menu .dropdown > a {
    display: none;
  }

  .nav-menu .dropdown-menu {
    display: block;
    opacity: 1;
    visibility: visible;
    position: static;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
  }

  .nav-menu .dropdown-menu .dropdown-item {
    color: #fff;
    font-weight: 500;
    text-align: center;
  }

  /* =====================
     LANGUAGE BUTTON
  ===================== */

  #langDropdown {
    display: none;
  }

  .nav-item.dropdown {
    margin-top: 10px;
    display: flex;
    justify-content: center;
  }

  .nav-item.dropdown .dropdown-menu {
    display: flex;
    position: static;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
  }
  .dropdown-menu .dropdown-item:hover {
    background-color: var(--secondary-color);
    color: #0d47a1;
  }

  .nav-item.dropdown .dropdown-item {
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 10px;
    color: #fff;
    font-size: 0.85rem;
  }
  .lang-switch {
    display: flex !important;
    justify-content: center;
    gap: 12px; /* jarak antar ID & EN */
    margin-top: 1.5rem;
  }

  /* Tombolnya biar rapi */
  .lang-switch button {
    display: inline-flex !important;
    white-space: nowrap;
    min-width: 52px;
    padding: 6px 14px;
    border-radius: 8px;
    font-weight: 600;
  }
}

/* ROADMAP SECTION */
.roadmap-section {
  background: #f9f9f9;
  padding: 5rem 0;
}

.timeline-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.5rem;
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
}

/* Garis di atas step */
.timeline-grid::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 0;
  width: 100%;
  height: 4px;
  background: #ddd;
  z-index: 1;
}

/* Step number */
.timeline-step {
  width: 45px;
  height: 45px;
  background: #fff;
  border: 3px solid var(--accent-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: var(--primary-color);
  margin: 0 auto 1rem;
  position: relative;
  z-index: 2;
}

/* Card content */
.timeline-content {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow-light);
  text-align: left;
  min-height: 200px;
}

.timeline-content h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.timeline-content ul {
  padding-left: 1.2rem;
  margin: 0;
}

.timeline-content li {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

@media (max-width: 1200px) {
  .timeline-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding: 0 1rem;
  }

  .timeline-grid::before {
    display: none; /* hide line di tablet & mobile */
  }
}

/* Responsive */
@media (max-width: 992px) {
  .timeline-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .timeline-grid {
    grid-template-columns: 1fr;
  }

  .timeline-grid::before {
    display: none; /* sembunyikan garis */
  }

  .timeline-step {
    margin-left: 0;
  }
}

/* === Who We Are Section === */
.who-section {
  background: #ffffff;
}

.who-section .lead {
  max-width: 800px;
  margin: 0 auto;
  color: #555;
}
.who-section h4 {
  margin-bottom: 1rem;
}
.who-section ul {
  padding-left: 0;
  list-style: none;
}
.who-section ul li {
  margin-bottom: 0.5rem;
  padding-left: 1.5rem;
  position: relative;
  font-weight: 500;
  color: #333;
}
.who-section ul li::before {
  content: "✔";
  color: var(--accent-color);
  position: absolute;
  left: 0;
}

/* === The Future of Jobs Section === */
.future-section {
  background: #f8f9fa;
}

.future-section .lead {
  max-width: 850px;
  margin: 0 auto;
  color: #444;
}
.future-section h4 {
  margin-bottom: 1rem;
}
.future-section ul {
  list-style: none;
  padding: 0;
}
.future-section ul li {
  margin-bottom: 0.6rem;
  padding-left: 1.5rem;
  position: relative;
  color: #333;
  font-weight: 500;
}
.future-section ul li::before {
  content: "▸";
  color: var(--accent-color);
  position: absolute;
  left: 0;
  font-size: 1rem;
}

/* === General Responsive === */
@media (max-width: 800px) {
  .who-section h2,
  .future-section h2 {
    font-size: 2rem;
  }
  .who-section .lead,
  .future-section .lead {
    font-size: 1rem;
  }
}

/* Chat style */

.chat-container {
  width: 400px;
  max-width: 100%;
  margin: 20px auto;
  border: 1px solid #ddd;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  background: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.chat-box {
  height: 400px;
  overflow-y: auto;
  padding: 1rem;
  border-bottom: 1px solid #ddd;
  display: flex;
  flex-direction: column; /* pesan dari atas ke bawah */
  gap: 8px; /* jarak antar bubble */
  scroll-behavior: smooth; /* scroll halus */
}

.chat-message {
  max-width: 70%;
  padding: 10px 15px;
  border-radius: 18px;
  word-wrap: break-word;
  font-size: 0.95rem;
  line-height: 1.4;
}

/* Bubble user */
.chat-message.user {
  align-self: flex-end;
  background: #007bff;
  color: #fff;
  border-bottom-right-radius: 4px; /* sudut khas */
  white-space: pre-wrap;
}

/* Bubble bot */
.chat-message.bot {
  align-self: flex-start;
  background: #f1f1f1;
  color: #333;
  border-bottom-left-radius: 4px; /* sudut khas */
}

.chat-input {
  display: flex;
  border-top: 1px solid #ddd;
}

.chat-input input {
  flex: 1;
  padding: 10px;
  border: none;
  outline: none;
  font-size: 0.95rem;
}

.chat-input button {
  padding: 10px 15px;
  border: none;
  background: #007bff;
  color: #fff;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.3s;
}

.chat-input button:hover {
  background: #0056b3;
}
