:root {
  --primary: #2851d8;
  --primary-dark: #1c39a3;
  --accent: #f5a623;
  --bg: #f7f8fb;
  --card-bg: #ffffff;
  --text: #1f2430;
  --text-light: #6b7280;
  --border: #e3e6ec;
  --success: #1f9d55;
  --danger: #d64545;
  --radius: 10px;
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.6; overflow-x: hidden; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

/* ---------- Navbar ---------- */
.navbar {
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.navbar .brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.3rem; color: var(--primary-dark); }
.navbar .brand .logo-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 1rem;
}
.navbar .brand .brand-logo-img { height: 150px; width: auto; max-width: 200px; object-fit: contain; }
.navbar nav { display: flex; gap: 22px; align-items: center; }
.navbar nav a { color: var(--text); font-weight: 500; }
.navbar .btn-login { background: var(--primary); color: #fff; padding: 9px 20px; border-radius: 8px; }
.navbar .btn-login:hover { background: var(--primary-dark); text-decoration: none; }

/* Placeholder shown when a course/internship has no uploaded image yet */
.img-placeholder {
  width: 100%; height: 170px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; font-size: 2.6rem; font-weight: 800; letter-spacing: 1px;
}
.img-placeholder.large { height: 100%; min-height: 320px; border-radius: 14px; }
.admin-thumb { width: 70px; height: 50px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }
.admin-thumb-placeholder {
  width: 70px; height: 50px; border-radius: 6px; border: 1px solid var(--border);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 0.85rem;
}
.image-manager-form { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.image-manager-form input[type="file"] { font-size: 0.78rem; max-width: 170px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 90px 0 110px;
  overflow: hidden;
}
.hero .container { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.hero-eyebrow {
  display: inline-block; background: rgba(255,255,255,0.15); padding: 6px 14px;
  border-radius: 20px; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em;
  margin-bottom: 18px; text-transform: uppercase;
}
.hero h1 { font-size: 2.6rem; line-height: 1.15; margin: 0 0 16px; }
.hero p.lead { font-size: 1.1rem; opacity: 0.92; max-width: 520px; margin-bottom: 28px; }
.hero .hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero .btn-white { background: #fff; color: var(--primary); padding: 12px 26px; border-radius: 8px; font-weight: 700; }
.hero .btn-white:hover { background: #eef1fd; text-decoration: none; }
.hero .btn-outline { border: 2px solid rgba(255,255,255,0.6); color: #fff; padding: 10px 24px; border-radius: 8px; font-weight: 700; }
.hero .btn-outline:hover { background: rgba(255,255,255,0.1); text-decoration: none; }
.hero-stats { display: flex; gap: 30px; margin-top: 36px; }
.hero-stats div strong { display: block; font-size: 1.6rem; }
.hero-stats div span { font-size: 0.82rem; opacity: 0.85; }

.hero-image-wrap { position: relative; }
.hero-image-wrap img {
  border-radius: 16px; box-shadow: 0 20px 50px rgba(10,20,60,0.35);
  width: 100%; aspect-ratio: 4/3; object-fit: cover;
}
.hero-badge {
  position: absolute; bottom: -18px; left: -18px;
  background: #fff; color: var(--text); padding: 14px 18px; border-radius: 12px;
  box-shadow: 0 10px 30px rgba(10,20,60,0.2); display: flex; align-items: center; gap: 10px;
  font-size: 0.85rem; font-weight: 700;
}
.hero-badge .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--success); }

.hero-wave { position: absolute; bottom: -1px; left: 0; width: 100%; line-height: 0; }

/* ---------- Sections ---------- */
.section { padding: 70px 0; }
.section.alt { background: #fff; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-head .kicker { color: var(--primary); font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; }
.section-head h2 { font-size: 2rem; margin: 8px 0 10px; }
.section-head p { color: var(--text-light); }

.grid { display: grid; gap: 24px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 1px 3px rgba(20,30,60,0.04);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(20,30,60,0.09); }
.card h3 { margin: 0 0 8px; font-size: 1.15rem; }
.card .meta { font-size: 0.85rem; color: var(--text-light); margin-bottom: 10px; }
.tag { display: inline-block; background: #eef1fd; color: var(--primary-dark); font-size: 0.75rem; padding: 3px 10px; border-radius: 20px; margin-right: 6px; }

/* Feature cards with icon circle */
.feature-card { text-align: left; }
.feature-icon {
  width: 50px; height: 50px; border-radius: 12px;
  background: #eef1fd; color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; margin-bottom: 16px;
}

/* Internship card with image */
.internship-card { overflow: hidden; padding: 0; }
.internship-card img { width: 100%; height: 170px; object-fit: cover; }
.internship-card .body { padding: 20px; }

/* Course card with image (same treatment as internship card) */
.course-card { overflow: hidden; padding: 0; }
.course-card img { width: 100%; height: 170px; object-fit: cover; transition: transform .4s ease; }
.course-card:hover img { transform: scale(1.06); }
.course-card .body { padding: 20px; }
.course-card .tag { margin-bottom: 8px; }

/* Testimonial cards */
.testimonial-card { display: flex; flex-direction: column; gap: 14px; }
.testimonial-card .stars { color: var(--accent); font-size: 1.1rem; letter-spacing: 2px; }
.testimonial-card .quote { color: var(--text); font-style: italic; flex: 1; margin: 0; }
.testimonial-person { display: flex; align-items: center; gap: 12px; }
.testimonial-person img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }

/* Image + text split section */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.split img { border-radius: 14px; box-shadow: 0 15px 40px rgba(20,30,60,0.12); width: 100%; object-fit: cover; aspect-ratio: 4/3; }
.split.reverse { direction: rtl; }
.split.reverse > * { direction: ltr; }

/* CTA banner */
.cta-banner {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff; border-radius: 18px; padding: 50px; text-align: center;
  margin: 0 20px;
}
.cta-banner h2 { margin: 0 0 10px; font-size: 1.8rem; }
.cta-banner p { opacity: 0.9; margin-bottom: 24px; }

/* ---------- Buttons / Forms ---------- */
.btn {
  display: inline-block; cursor: pointer; border: none;
  padding: 10px 20px; border-radius: 8px; font-weight: 600; font-size: 0.95rem;
  background: var(--primary); color: #fff; transition: background .15s;
}
.btn:hover { background: var(--primary-dark); color: #fff; text-decoration: none; }
.btn.secondary { background: #fff; color: var(--primary); border: 1px solid var(--primary); }
.btn.secondary:hover { background: #eef1fd; }
.btn.danger { background: var(--danger); }
.btn.danger:hover { background: #b73333; }
.btn.success { background: var(--success); }
.btn.small { padding: 6px 12px; font-size: 0.82rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

label { display: block; font-weight: 600; font-size: 0.88rem; margin: 14px 0 6px; }
input, select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 0.95rem; font-family: inherit; background: #fff;
}
textarea { resize: vertical; }
form.card { max-width: 480px; }

.alert { padding: 12px 16px; border-radius: 8px; margin: 14px 0; font-size: 0.9rem; }
.alert.success { background: #e7f8ee; color: var(--success); border: 1px solid #b7e8cb; }
.alert.error { background: #fdecec; color: var(--danger); border: 1px solid #f6c2c2; }

/* ---------- Login page ---------- */
.login-section { padding: 60px 20px 90px; display: flex; justify-content: center; }
.login-wrap {
  display: grid; grid-template-columns: 1fr 1fr; max-width: 900px; width: 100%;
  background: var(--card-bg); border-radius: 18px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(20,30,60,0.12); border: 1px solid var(--border);
}
.login-side {
  background: linear-gradient(160deg, var(--primary-dark), var(--primary) 70%);
  color: #fff; padding: 48px 40px; display: flex; align-items: center; position: relative; overflow: hidden;
}
.login-side::after {
  content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%;
  background: rgba(255,255,255,0.08); right: -80px; bottom: -80px;
}
.login-side::before {
  content: ""; position: absolute; width: 140px; height: 140px; border-radius: 50%;
  background: rgba(255,255,255,0.07); left: -40px; top: -40px;
}
.login-side-inner { position: relative; z-index: 1; }
.login-side h2 { font-size: 1.6rem; margin: 0 0 12px; }
.login-side p { opacity: 0.92; margin: 0 0 20px; }
.login-points { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.login-points li { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; opacity: 0.95; }
.login-points li::before { content: "✓"; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; background: rgba(255,255,255,0.18); border-radius: 50%; font-size: 0.75rem; flex-shrink: 0; }
.login-form-side { padding: 48px 40px; display: flex; align-items: center; }
.login-form { width: 100%; }
.login-title { margin: 0 0 4px; font-size: 1.5rem; }

@media (max-width: 820px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-side { padding: 36px 30px; }
  .login-form-side { padding: 36px 30px; }
}

/* ---------- Footer ---------- */
footer.site-footer { background: #131a33; color: #c7cbe0; padding: 50px 0 24px; margin-top: 0; font-size: 0.9rem; }
footer.site-footer .footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; margin-bottom: 30px; }
footer.site-footer h4 { color: #fff; margin: 0 0 12px; }
footer.site-footer a { color: #c7cbe0; display: block; margin-bottom: 8px; }
footer.site-footer a:hover { color: #fff; }
footer.site-footer .brand { color: #fff; font-weight: 800; font-size: 1.2rem; margin-bottom: 10px; }
footer.site-footer .bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; text-align: center; font-size: 0.82rem; opacity: 0.7; }

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: collapse; background: var(--card-bg); border-radius: var(--radius); overflow: hidden; }
table th, table td { padding: 10px 14px; border-bottom: 1px solid var(--border); text-align: left; font-size: 0.9rem; }
table th { background: #f0f2f8; font-weight: 700; }
.status-badge { padding: 3px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; }
.status-badge.active, .status-badge.approved, .status-badge.success, .status-badge.completed { background: #e7f8ee; color: var(--success); }
.status-badge.pending, .status-badge.scheduled { background: #fff4e0; color: #a86b00; }
.status-badge.disabled, .status-badge.failed, .status-badge.rejected { background: #fdecec; color: var(--danger); }

/* ---------- Dashboard layout ---------- */
.dash-layout { display: flex; min-height: calc(100vh - 68px); }
.sidebar { width: 230px; background: #16203f; color: #cfd5ec; padding: 24px 0; flex-shrink: 0; }
.sidebar .side-title { padding: 0 20px 16px; font-weight: 700; color: #fff; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.7; }
.sidebar a { display: block; width: 100%; text-align: left; background: none; border: none; color: #cfd5ec; padding: 11px 20px; font-size: 0.92rem; cursor: pointer; font-family: inherit; }
.sidebar a:hover, .sidebar a.active { background: #243162; color: #fff; text-decoration: none; }
.dash-main { flex: 1; padding: 30px; max-width: 1000px; }
.dash-main h2 { margin-top: 0; }

.flex-between { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.muted { color: var(--text-light); font-size: 0.88rem; }
.divider { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

/* ---------- Scroll reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }

@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-image-wrap { order: -1; }
  .split, .split.reverse { grid-template-columns: 1fr; direction: ltr; }
  footer.site-footer .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  .dash-layout { flex-direction: column; }
  .sidebar { width: 100%; display: flex; overflow-x: auto; padding: 10px; }
  .sidebar .side-title { display: none; }
  .sidebar a { width: auto; white-space: nowrap; }
}
