/* ==========================================================
   HINTechnologies — Global Stylesheet
   ========================================================== */

:root {
  /* Brand palette — sourced directly from the HINTechnologies logo
     (crimson red wordmark, teal accents, navy book icon, magenta swoosh) */
  --navy-950: #08141c;
  --navy-900: #0e222f;
  --navy-800: #19384d;
  --navy-700: #2e526b;
  --slate-500: #64748b;
  --slate-300: #cbd5e1;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;

  --primary: #115888;
  --primary-dark: #0b4165;
  --primary-light: #ebf4f9;
  --accent: #b90b0b;
  --accent-dark: #9a0909;
  --brand-teal: #059fc5;
  --brand-teal-dark: #04809f;
  --brand-teal-light: #e7f5f8;
  --brand-pink: #e0247f;
  --brand-pink-dark: #9c1657;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.10);
  --shadow-lg: 0 20px 45px rgba(15, 23, 42, 0.16);
  --container: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--navy-800);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5 { font-family: 'Poppins', 'Inter', sans-serif; color: var(--navy-950); line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0 0 1em; color: var(--navy-700); }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; display: block; }
ul { padding-left: 1.2em; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 48px; }
@media (max-width: 640px) { .container { padding: 0 20px; } }
.section { padding: 72px 0; }
.section-alt { background: var(--slate-50); }
.section-dark { background: var(--navy-950); color: var(--slate-300); }
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-dark p { color: var(--slate-300); }

.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand-teal-dark);
  background: var(--brand-teal-light);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.section-head { max-width: 640px; margin: 0 auto 44px; text-align: center; }
.section-head p { font-size: 1.05rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .18s ease;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 16px rgba(17,88,136,.28); }
.btn-primary:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 6px 16px rgba(185,11,11,.3); }
.btn-accent:hover { background: var(--accent-dark); color: #fff; transform: translateY(-1px); }
.btn-outline { background: transparent; border-color: rgba(255,255,255,.5); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-ghost { background: var(--slate-100); color: var(--navy-800); }
.btn-ghost:hover { background: var(--slate-300); }
.btn-sm { padding: 8px 16px; font-size: .85rem; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; color: #fff; }
.btn-block { width: 100%; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--slate-100);
}
.navbar { display: flex; align-items: center; padding: 16px 0; }
.navbar .brand { margin-left: 14px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 1.25rem; color: var(--navy-950); }
.brand .mark {
  width: 40px; height: 40px; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--brand-teal));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.05rem;
}
.brand-logo { height: 42px; width: auto; }
/* White rounded backdrop for the logo when it sits on a dark section (footer, dashboard sidebar) —
   keeps the logo's navy book icon and outline visible against a dark background. */
.logo-chip {
  display: inline-flex; align-items: center;
  background: #fff; padding: 7px 12px; border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.logo-chip .brand-logo { height: 30px; }
/* Nav links sit close after the logo, on the left side of the header. */
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0 0 0 clamp(24px, 3vw, 56px); padding: 0; }
.nav-links a { color: var(--navy-700); font-weight: 500; font-size: .95rem; }
.nav-links a.active, .nav-links a:hover { color: var(--primary); }
.nav-login-link {
  display: flex; align-items: center; gap: 7px !important;
  padding: 8px 16px; border-radius: 999px; background: var(--slate-100);
  font-size: .85rem !important; margin-left: clamp(20px, 3vw, 56px);
}
.nav-login-link i { font-size: .78rem; }
.nav-login-link:hover, .nav-login-link.active { background: var(--primary-light); color: var(--primary) !important; }
.nav-cta { display: flex; align-items: center; gap: 18px; margin-left: auto; padding-left: 24px; }
.nav-phone { font-size: .85rem; color: var(--slate-500); display: flex; align-items: center; gap: 7px; font-weight: 500; white-space: nowrap; }
.nav-phone:hover { color: var(--primary); }
.nav-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--navy-900); }

@media (max-width: 900px) {
  .nav-links { position: fixed; inset: 72px 0 0 0; background: #fff; flex-direction: column; align-items: flex-start; padding: 30px 24px; gap: 20px; margin-left: 0; transform: translateX(100%); transition: transform .25s ease; overflow-y: auto; }
  .nav-links.open { transform: translateX(0); }
  .nav-login-link { margin-left: 0; }
  .nav-toggle { display: block; }
  .nav-cta .btn:not(.always-show) { display: none; }
  .nav-phone { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  background: radial-gradient(1200px 500px at 10% -10%, var(--navy-800) 0%, var(--navy-950) 55%, var(--navy-950) 100%);
  color: #fff;
  padding: 90px 0 80px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; right: -120px; top: -80px; width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(224,36,127,.22), transparent 70%);
}
.hero::before {
  content: ''; position: absolute; left: -140px; bottom: -120px; width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(5,159,197,.18), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; position: relative; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.hero p.lead { color: var(--slate-300); font-size: 1.1rem; max-width: 560px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 26px; }
.hero-stats { display: flex; gap: 32px; margin-top: 40px; flex-wrap: wrap; }
.hero-stats div strong { display: block; font-size: 1.6rem; font-family: 'Poppins', sans-serif; color: #fff; }
.hero-stats div span { color: var(--slate-300); font-size: .85rem; }
.hero-card {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius-lg); padding: 28px; backdrop-filter: blur(6px);
}
.hero-card h3 { color: #fff; }
.hero-card ul { list-style: none; padding: 0; margin: 18px 0 0; }
.hero-card li { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px dashed rgba(255,255,255,.12); color: var(--slate-300); font-size: .92rem; }
.hero-card li:last-child { border-bottom: none; }

/* ---------- Cards / Grids ---------- */
.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--slate-100); border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm); overflow: hidden; transition: box-shadow .2s ease, transform .2s ease;
  display: flex; flex-direction: column;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.card-img { height: 170px; background: linear-gradient(135deg, var(--primary-light), var(--brand-teal-light)); display: flex; align-items: center; justify-content: center; font-family: 'Poppins',sans-serif; font-weight: 700; color: var(--primary); font-size: 1.1rem; text-align:center; padding: 10px;}
.tag { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--primary); background: var(--primary-light); padding: 4px 10px; border-radius: 6px; margin-bottom: 10px; width: fit-content; }
.meta-row { display: flex; gap: 16px; font-size: .85rem; color: var(--slate-500); margin: 10px 0 16px; flex-wrap: wrap; }
.meta-row span { display: flex; align-items: center; gap: 6px; }
.price { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 1.3rem; color: var(--navy-950); }

.icon-box { width: 52px; height: 52px; border-radius: 14px; background: var(--primary-light); color: var(--primary); display:flex; align-items:center; justify-content:center; font-size: 1.4rem; margin-bottom: 16px; }

.avatar { width: 84px; height: 84px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--brand-teal)); color:#fff; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:1.4rem; font-family:'Poppins',sans-serif;}

/* ---------- Forms ---------- */
.form-group { margin-bottom: 18px; }
label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; color: var(--navy-800); }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date], input[type=time], input[type=number], select, textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--slate-300); border-radius: var(--radius-sm);
  font-size: .95rem; font-family: inherit; background: #fff; color: var(--navy-900); transition: border-color .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); }
textarea { resize: vertical; min-height: 110px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 620px) { .form-row { grid-template-columns: 1fr; } }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; }
@media (max-width: 780px) { .form-row-3 { grid-template-columns: 1fr; } }
.form-card { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 36px; border: 1px solid var(--slate-100); }
.form-hint { font-size: .8rem; color: var(--slate-500); margin-top: 4px; }
.form-section-title { font-size: 1.05rem; font-weight: 700; color: var(--navy-900); margin: 34px 0 16px; padding-top: 22px; border-top: 1px solid var(--slate-100); }
.form-section-title:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.form-section-hint { font-size: .85rem; color: var(--slate-500); margin: -12px 0 18px; }

.alert { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 20px; font-size: .92rem; border: 1px solid transparent; }
.alert-success { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.alert-error { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.alert-info { background: var(--primary-light); color: var(--primary-dark); border-color: #c3dced; }
.alert-warning { background: #fffbeb; color: #92400e; border-color: #fde68a; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-950); color: var(--slate-300); padding: 60px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.3fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.1); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { color: #fff; font-size: .95rem; margin-bottom: 16px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a { color: var(--slate-300); font-size: .9rem; }
.footer-grid a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 22px; font-size: .82rem; flex-wrap: wrap; gap: 10px; }
.social-row { display: flex; gap: 10px; }
.social-row a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; color: #fff; }
.social-row a:hover { background: var(--primary); }

/* ---------- Tables (dashboards) ---------- */
.table-wrap { overflow-x: auto; background: #fff; border-radius: var(--radius-md); border: 1px solid var(--slate-100); box-shadow: var(--shadow-sm); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
thead th { background: var(--slate-50); text-align: left; padding: 13px 16px; font-weight: 700; color: var(--navy-800); border-bottom: 1px solid var(--slate-100); white-space: nowrap; }
tbody td { padding: 13px 16px; border-bottom: 1px solid var(--slate-100); color: var(--navy-700); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--slate-50); }
.badge { display: inline-block; padding: 4px 11px; border-radius: 999px; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: var(--primary-light); color: var(--primary-dark); }
.badge-muted { background: var(--slate-100); color: var(--slate-500); }

/* ---------- Dashboard layout ---------- */
.dash-wrap { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
@media (max-width: 900px) { .dash-wrap { grid-template-columns: 1fr; } }
.dash-sidebar { background: var(--navy-950); color: var(--slate-300); padding: 24px 16px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
@media (max-width: 900px) { .dash-sidebar { position: relative; height: auto; } }
.dash-sidebar .brand { color: #fff; padding: 0 8px 20px; margin-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,.1); }
.dash-nav { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.dash-nav a { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: var(--radius-sm); color: var(--slate-300); font-weight: 500; font-size: .92rem; }
.dash-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.dash-nav a.active { background: var(--primary); color: #fff; }
.dash-main { padding: 28px 32px; background: var(--slate-50); }
.dash-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; gap: 16px; flex-wrap: wrap; }
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 28px; }
@media (max-width: 900px) { .stat-cards { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 560px) { .stat-cards { grid-template-columns: 1fr; } }
.stat-card { background: #fff; border-radius: var(--radius-md); padding: 20px; box-shadow: var(--shadow-sm); border: 1px solid var(--slate-100); }
.stat-card .num { font-family: 'Poppins',sans-serif; font-size: 1.8rem; font-weight: 700; color: var(--navy-950); }
.stat-card .label { color: var(--slate-500); font-size: .85rem; margin-top: 2px; }
.panel { background: #fff; border-radius: var(--radius-md); border: 1px solid var(--slate-100); box-shadow: var(--shadow-sm); padding: 24px; margin-bottom: 24px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; flex-wrap: wrap; gap: 10px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* Read-only label/value grid (Admission detail page, etc.) */
.detail-grid { display: grid; grid-template-columns: 220px 1fr; gap: 10px 20px; margin: 0; }
.detail-grid dt { font-weight: 600; color: var(--slate-500); font-size: .82rem; }
.detail-grid dd { margin: 0; color: var(--navy-900); }
@media (max-width: 620px) { .detail-grid { grid-template-columns: 1fr; } .detail-grid dt { margin-top: 10px; } }

/* Comment / Q&A thread on a study material */
.comment-thread { display: flex; flex-direction: column; gap: 12px; margin: 16px 0; }
.comment-bubble { max-width: 80%; padding: 10px 14px; border-radius: var(--radius-md); font-size: .9rem; }
.comment-bubble .comment-meta { display: block; font-size: .72rem; opacity: .7; margin-bottom: 4px; }
.comment-bubble.from-student { align-self: flex-start; background: var(--slate-100); color: var(--navy-900); }
.comment-bubble.from-admin { align-self: flex-end; background: var(--primary); color: #fff; }
.comment-bubble.from-admin .comment-meta { color: rgba(255,255,255,.8); }

/* In-browser study material viewer (PDF / embedded video) */
.viewer-frame { position: relative; width: 100%; height: 80vh; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--slate-100); background: var(--slate-100); }
.viewer-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.viewer-frame-video { height: auto; aspect-ratio: 16 / 9; }

/* Live class session cards */
.session-card { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; padding: 16px 18px; border: 1px solid var(--slate-100); border-radius: var(--radius-md); margin-bottom: 12px; }
.session-card.is-live { border-color: var(--success); background: #f0fdf4; }
.session-meta { font-size: .85rem; color: var(--slate-500); margin-top: 2px; }

/* Batch-grouped session list (admin > Live Sessions) */
.batch-session-group { border: 1px solid var(--slate-100); border-radius: var(--radius-md); margin-bottom: 14px; overflow: hidden; }
.batch-session-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 10px 10px 10px 18px; background: var(--slate-50, #f8fafc); }
.batch-toggle-btn { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; background: none; border: none; padding: 4px 0; cursor: pointer; text-align: left; font: inherit; }
.batch-toggle-btn .chevron { display: inline-block; color: var(--slate-500); transition: transform .15s; }
.batch-toggle-btn[aria-expanded="true"] .chevron { transform: rotate(90deg); }
.batch-toggle-btn strong { font-size: .98rem; color: var(--navy-900); }
.batch-header-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.batch-session-body .table-wrap { border: none; border-top: 1px solid var(--slate-100); border-radius: 0; box-shadow: none; }
.batch-session-body table { margin: 0; }

/* utility */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.muted { color: var(--slate-500); }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; }
.w-full { width: 100%; }
.empty-state { text-align: center; padding: 50px 20px; color: var(--slate-500); }

/* ---------- Home: Technology Carousel (Home page only) ----------
   Slides are full images (design + copy baked in by the source graphic).
   Each slide keeps a fixed 2:1 frame with a navy fill so any image, regardless
   of its own aspect ratio, is shown in full — never cropped — and the small
   letterbox strip (when present) blends into the image's own dark background. */
.carousel-viewport { position: relative; overflow: hidden; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); background: var(--navy-950); }
.carousel-track { display: flex; transition: transform .6s ease; }
.carousel-slide { flex: 0 0 100%; position: relative; aspect-ratio: 2 / 1; background: var(--navy-950); }
.carousel-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.carousel-dots { display: flex; justify-content: center; gap: 10px; margin-top: 20px; }
.carousel-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--slate-300); border: none; cursor: pointer; padding: 0; transition: background .2s, transform .2s; }
.carousel-dot.active { background: var(--primary); transform: scale(1.25); }
.carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.3); color: #fff;
  display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 1.1rem; z-index: 2;
}
.carousel-arrow:hover { background: rgba(255,255,255,.28); }
.carousel-arrow-prev { left: 16px; }
.carousel-arrow-next { right: 16px; }
@media (max-width: 640px) {
  .carousel-slide { aspect-ratio: 4 / 3; }
  .carousel-arrow { display: none; }
}
