/* GLOBAL STYLES             */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #f4f4f6;
  --text: #1e1e1e;
  --sub: #666;
  --card: #ffffffcc;
  --border: rgba(0, 0, 0, 0.1);
  --accent: #6a11cb;
  --accent2: #2575fc;
  --accent-soft: rgba(0, 0, 0, 0.05);
  --active-text: #fff;
  --radius: 12px;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

body.dark {
  --bg: #0f0f0f;
  --text: #f4f4f4;
  --sub: #bbbbbb;
  --card: #ffffff0a;
  --border: rgba(255, 255, 255, 0.15);
  --accent-soft: rgba(255, 255, 255, 0.14);
  --active-text: #111;
  --shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

body {
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: 0.3s ease;
  line-height: 1.55;
  scroll-behavior: smooth;
  padding-top: 70px; /* Top navbar height */
  margin-left: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

section {
  padding: 30px 40px;
}

/* TOP NAVBAR                */

.sidebar {
  width: 100%;
  height: 70px;
  position: fixed;
  top: 0;
  left: 0;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow);
  z-index: 999;
}

.logo-nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.logo {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  gap: 20px;
  margin-left: auto;
}

.nav-links a {
  padding: 8px 14px;
  font-size: 0.95rem;
  font-weight: 600;
  opacity: 0.75;
  border-radius: var(--radius);
  transition: 0.25s, transform 0.2s;
}

.nav-links a.active,
.nav-links a:hover {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: var(--active-text);
  opacity: 1;
  transform: translateY(-2px);
}

#toggleDark {
  padding: 8px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--accent-soft);
  font-size: 0.9rem;
  transition: 0.25s, transform 0.2s;
  margin-left: 20px;
}

#toggleDark:hover {
  transform: scale(1.05);
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: var(--active-text);
}


/* HERO SECTION */

#home {
  padding-top: 10px !important;
  padding-bottom: 0 !important;
  min-height: 50vh;
  display: flex;
  align-items: center;
}

.hero-wrapper {
  max-width: 900px;
  width: 100%;

}



.hero-title {
  font-size: 2.8rem;
  font-weight: 900;
}

.hero-sub {
  margin-top: 14px;
  color: var(--sub);
  font-size: 1rem;
  line-height: 1.7; /* increased from 1.6 */
  white-space: normal;
}

.btn-main {
  margin-top: 20px;
  padding: 14px 26px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  display: inline-block;
  transition: 0.3s;
}

.btn-main:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* SECTION TITLES            */

.section-title {
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 8px;
}

.section-sub {
  font-size: 1rem;
  color: var(--sub);
  margin-bottom: 20px;
}

/* CARDS + GRID              */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.card {
  padding: 20px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.5s ease;
  opacity: 0;
  transform: translateY(20px);
  cursor: pointer;
}

.card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* CONTACT FORM              */

.contact-box {
  max-width: 480px;
  background: var(--card);
  backdrop-filter: blur(12px);
  padding: 26px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: 0.3s;
}

input,
textarea {
  width: 100%;
  margin-top: 12px;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 0.95rem;
  color: var(--text);
  transition: 0.25s;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  outline: none;
}

button {
  width: 100%;
  margin-top: 16px;
  padding: 14px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  transition: 0.25s;
}

button:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* MODAL                     */

.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  justify-content: center;
  align-items: center;
}

.modal-content {
  display: flex;
  background: var(--card);
  border-radius: var(--radius);
  padding: 30px;
  max-width: 800px;
  width: 90%;
  position: relative;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
}

.modal-content video,
.modal-content img {
  width: 100%;
  max-width: 700px;
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.modal-content .desc {
  width: 100%;
  max-height: 400px; /* adjust height as needed */
  overflow-y: auto;
  text-align: left; /* better for lists */
  padding-right: 10px; /* for scrollbar spacing */
  margin-top: 12px;
  line-height: 1.5;
}

/* Two-column layout for TVET Competencies */
.modal-content .desc .competency-columns {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.modal-content .desc .competency-columns .left-col,
.modal-content .desc .competency-columns .right-col {
  flex: 1 1 300px;
  min-width: 250px;
}

/* Close button */
.modal-content .close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 1.5rem;
  cursor: pointer;
  font-weight: bold;
}

/* ANIMATIONS                */

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

/* RESPONSIVE                */

@media (max-width: 900px) {
  .nav-links {
    gap: 12px;
  }
}

@media (max-width: 768px) {
  .sidebar {
    flex-direction: row;
    align-items: center;
    height: 70px;
    padding: 0 20px;
  }

  .logo-nav-wrapper {
    flex-direction: row;
    align-items: center;
    width: auto;
  }

  .nav-links {
    display: none; /* still hiding nav links on mobile */
  }

  #toggleDark {
    margin-left: 12px;
    margin-top: 0;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

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

  .modal-content {
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  .hero-wrapper {
    width: 90%;      /* ensure enough width on tablets/mobiles */
  }
}


/* Scrollable description for long certificate content */
.modal-content .desc::-webkit-scrollbar {
  width: 6px;
}

.modal-content .desc::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 3px;
}

.modal-content .desc::-webkit-scrollbar-track {
  background: var(--accent-soft);
  border-radius: 3px;
}

/* TVET Card scrollable with fixed height */
.card[data-cert="TVET Competency Certification"] {
  height: 200px; /* fixed height */
  overflow-y: auto;
  padding-right: 10px; /* give space for scrollbar */
}

/* Optional: custom scrollbar for this card */
.card[data-cert="TVET Competency Certification"]::-webkit-scrollbar {
  width: 6px;
}

.card[data-cert="TVET Competency Certification"]::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 3px;
}

.card[data-cert="TVET Competency Certification"]::-webkit-scrollbar-track {
  background: var(--accent-soft);
  border-radius: 3px;
}

.card[data-cert="TVET Competency Certification"] p {
  font-size: 0.8rem; /* smaller text */
}
/* Center contact form horizontally */
#contact {
  display: flex;
  justify-content: center; /* horizontal center */
  align-items: center;     /* optional: vertical center if section height is big */
  flex-direction: column;  /* stack title and form vertically */
  padding: 30px 20px;      /* optional: adjust padding */
  text-align: center;      /* center text inside section */
}

.btn-download {
  display: inline-block;
  margin-top: 25px;
  padding: 14px 26px;
  background: linear-gradient(135deg, var(--accent), var(--accent2)) !important;
  color: #fff !important;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  transition: 0.3s ease;
  text-decoration: none !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.btn-download:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
