/* ===================================================
   AUTOCAD TRAINING PORTAL — Styled to match Senthaalai Website
   Colors: Navy (#0D1B3E), Gold (#F0A500), White background
   Fonts: DM Sans (body), Playfair Display (headings)
=================================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600;700&family=Playfair+Display:wght@600;700&display=swap');

:root {
  --navy:       #0D1B3E;
  --navy-mid:   #112252;
  --navy-light: #1A2E60;
  --gold:       #F0A500;
  --gold-dark:  #C8880A;
  --gold-light: #FFD166;
  --white:      #FFFFFF;
  --off-white:  #F8F6F1;
  --bg-alt:     #F4F6FB;
  --text-main:  #1C2B4A;
  --text-muted: #6B7A99;
  --border:     rgba(240,165,0,0.25);
  --card-bg:    #FFFFFF;
  --shadow-sm:  0 2px 12px rgba(13,27,62,0.08);
  --shadow-md:  0 8px 32px rgba(13,27,62,0.14);
  --shadow-lg:  0 20px 60px rgba(13,27,62,0.18);
  --radius:     12px;
  --radius-lg:  20px;
  --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
}

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--off-white);
  color: var(--text-main);
  overflow-x: hidden;
}

/* ───── LOGIN SCREEN ───── */

.login-screen {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 60%, var(--navy-light) 100%);
}

.background-glow {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(240,165,0,0.12);
  filter: blur(90px);
  pointer-events: none;
}

.glow-1 { top: -120px; left: -120px; }
.glow-2 { bottom: -120px; right: -120px; }

.login-card {
  width: 440px;
  padding: 44px;
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 2;
}

.login-logo-section {
  text-align: center;
  margin-bottom: 32px;
}

.company-logo {
  width: 90px;
  margin-bottom: 16px;
}

.login-logo-section h1 {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  color: var(--white);
  margin-bottom: 6px;
}

.login-logo-section p {
  color: var(--gold);
  font-size: 0.95rem;
  font-weight: 500;
}

/* Back link */
.back-to-site {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
  text-decoration: none;
  margin-bottom: 24px;
  transition: color var(--transition);
}
.back-to-site:hover { color: var(--gold); }

/* Inputs */
.input-group {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  background: rgba(255,255,255,0.09);
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.1);
  transition: border-color var(--transition);
}

.input-group:focus-within {
  border-color: var(--gold);
}

.input-group i { color: var(--gold); font-size: 0.95rem; }

.input-group input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
}

.input-group input::placeholder { color: rgba(255,255,255,0.45); }

.login-options {
  display: flex;
  justify-content: space-between;
  margin-bottom: 24px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
}

.login-options a { color: var(--gold); text-decoration: none; }

.login-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: var(--radius);
  background: var(--gold);
  color: var(--navy);
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
  letter-spacing: 0.3px;
}

.login-btn:hover {
  background: var(--gold-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(240,165,0,0.35);
}

.hidden { display: none !important; }

/* ───── HEADER ───── */

.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 72px;
  background: rgba(13,27,62,0.97);
  border-bottom: 2px solid var(--gold);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 32px;
  z-index: 1000;
  box-shadow: var(--shadow-md);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-logo { width: auto; height: 65px; display:block }

.header-left h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  color: var(--white);
  font-weight: 700;
}

.header-left p {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 500;
  margin-top: 2px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-btn {
  padding: 10px 13px;
  border: none;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.08);
  color: var(--white);
  cursor: pointer;
  transition: background var(--transition);
}

.icon-btn:hover { background: rgba(255,255,255,0.15); }

.logout-btn {
  padding: 9px 20px;
  border: none;
  border-radius: var(--radius);
  background: var(--gold);
  color: var(--navy);
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.logout-btn:hover {
  background: var(--gold-dark);
  transform: translateY(-1px);
}

/* ───── SIDEBAR ───── */

.sidebar {
  position: fixed;
  top: 72px;
  left: 0;
  width: 240px;
  height: calc(100vh - 72px);
  background: var(--navy);
  border-right: 1px solid var(--border);
  padding: 28px 20px;
  overflow-y: auto;
}

.sidebar-top h3 {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 6px;
}

.sidebar ul { list-style: none; margin-top: 16px; }

.sidebar ul li {
  padding: 12px 16px;
  margin-bottom: 6px;
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,0.7);
  font-size: 0.92rem;
  font-weight: 500;
  transition: all var(--transition);
}

.sidebar ul li i { width: 18px; text-align: center; }

.sidebar ul li:hover {
  background: rgba(240,165,0,0.12);
  color: var(--gold);
}

.sidebar ul li.active {
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
}

/* ───── MAIN CONTENT ───── */

.main-content {
  margin-left: 240px;
  margin-top: 72px;
  padding: 32px;
  min-height: calc(100vh - 72px);
  background: var(--bg-alt);
}

/* Cards */
.card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
  border: 1px solid rgba(13,27,62,0.08);
  box-shadow: var(--shadow-sm);
}

/* ───── WELCOME SECTION ───── */

.welcome-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
  border: none;
}

.welcome-section h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.3rem, 2.5vw, 1.7rem);
  color: var(--white);
  margin-bottom: 6px;
}

.welcome-section p { color: rgba(255,255,255,0.72); font-size: 0.92rem; }

.search-box {
  background: rgba(255,255,255,0.12);
  padding: 11px 16px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255,255,255,0.15);
  min-width: 220px;
}

.search-box i { color: var(--gold); }

.search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  width: 100%;
}

.search-box input::placeholder { color: rgba(255,255,255,0.45); }

/* ───── DASHBOARD STATS ───── */

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.dashboard-card {
  margin-bottom: 0;
  border-top: 3px solid var(--gold);
}

.dashboard-card h3 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.dashboard-card h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: var(--navy);
}

/* ───── INFO GRID ───── */

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.profile-content {
  display: flex;
  align-items: center;
  gap: 20px;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--gold);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 28px;
  flex-shrink: 0;
  border: 2px solid var(--gold);
}

.profile-card h2,
.notification-card h2,
.recent-activity h2,
.modules-section h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: var(--navy);
  margin-bottom: 4px;
}

.profile-content h3 {
  font-size: 1rem;
  color: var(--navy);
  font-weight: 600;
}

.profile-content p { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; }

.notification-card ul { padding-left: 18px; margin-top: 14px; }

.notification-card li {
  margin-bottom: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ───── RECENT ACTIVITY ───── */

.activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  font-size: 0.9rem;
  color: var(--text-main);
}

.activity-item i { color: var(--gold); font-size: 1rem; }

/* ───── MODULES ───── */

.modules-section { margin-bottom: 30px; }

.section-title {
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}

.section-title h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: var(--navy);
}

.modules-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 860px;
  margin: 0 auto;
}

.module-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 26px;
  border: 1px solid rgba(13,27,62,0.08);
  border-top: 3px solid var(--gold);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.module-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.module-number {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold);
}

.module-status {
  float: right;
  background: #fff8e1;
  color: var(--gold-dark);
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(240,165,0,0.3);
}

.module-card h3 {
  margin: 14px 0 8px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
}

.module-card p {
  font-size: 0.87rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 10px;
}

.progress-container {
  width: 100%;
  height: 8px;
  background: rgba(13,27,62,0.08);
  border-radius: 30px;
  overflow: hidden;
  margin-top: 16px;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 30px;
  transition: width 0.5s ease;
}

.module-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.module-btn {
  padding: 10px 16px;
  border: none;
  border-radius: var(--radius);
  background: var(--gold);
  color: var(--navy);
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.module-btn:hover {
  background: var(--gold-dark);
  transform: translateY(-1px);
}

.complete-btn {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}

.complete-btn:hover { background: #c8e6c9; }

/* ───── CERTIFICATE ───── */

.certificate-section { margin-bottom: 30px; }

.certificate-card {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  border: 2px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 52px;
  text-align: center;
  color: var(--white);
}

.certificate-header img { width: 90px; margin-bottom: 20px; }

.certificate-header h1 {
  font-family: 'Playfair Display', serif;
  color: var(--gold);
  font-size: 2rem;
  margin-bottom: 24px;
}

.certificate-body p { color: rgba(255,255,255,0.75); font-size: 1rem; }

.certificate-body h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  color: var(--white);
  margin: 16px 0;
}

.certificate-body h3 {
  color: var(--gold);
  font-size: 1.15rem;
  margin: 16px 0;
}

.completion-date { margin-top: 12px; font-size: 0.9rem; }
.completion-date span { color: var(--gold-light); font-weight: 600; }

.achievement-badge {
  margin: 28px auto;
  display: inline-flex;
  gap: 10px;
  align-items: center;
  padding: 14px 22px;
  border-radius: var(--radius);
  background: rgba(240,165,0,0.15);
  border: 1px solid rgba(240,165,0,0.3);
  color: var(--gold-light);
  font-weight: 600;
}

.achievement-badge i { font-size: 1.2rem; }

.download-btn {
  margin-top: 20px;
  padding: 13px 28px;
  border: none;
  border-radius: var(--radius);
  background: var(--gold);
  color: var(--navy);
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.download-btn:hover {
  background: var(--gold-dark);
  transform: translateY(-2px);
}

/* ───── RESPONSIVE ───── */

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

@media (max-width: 900px) {
  .sidebar {
    position: relative;
    top: 0;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .main-content { margin-left: 0; }
}

@media (max-width: 768px) {
  .main-header { height: auto; padding: 16px 20px; flex-wrap: wrap; gap: 12px; }
  .main-content { margin-top: 0; padding: 20px; }
  .welcome-section { flex-direction: column; align-items: flex-start; }
  .login-card { width: 92%; padding: 32px 24px; }
  .certificate-card { padding: 32px 20px; }
}

/* ── LANGUAGE SELECTOR BUTTONS ───────────────────── */
.lang-btn {
  padding: 6px 16px;
  border: 2px solid var(--gold);
  border-radius: 50px;
  background: transparent;
  color: var(--navy);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-btn:hover {
  background: rgba(240,165,0,0.15);
}

.lang-active {
  background: var(--gold) !important;
  color: var(--navy) !important;
  font-weight: 700;
}

/* ───── YOUTUBE EMBED ───── */

.yt-embed-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  margin-bottom: 4px;
}

.yt-embed-wrap iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.yt-external-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #FF0000;
  color: #fff;
  text-decoration: none;
  padding: 7px 16px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 700;
}

.yt-external-btn:hover { background: #cc0000; }

/* ── MODULE LOCK / UNLOCK ─────────────────────────── */
.module-locked {
  opacity: 0.75;
  background: #f9f9f9;
  border-top-color: #ccc !important;
  position: relative;
}

.lock-overlay {
  text-align: center;
  padding: 24px 16px;
  color: #999;
}

.lock-overlay i {
  font-size: 2rem;
  color: #ccc;
  margin-bottom: 10px;
  display: block;
}

.lock-overlay p {
  font-size: 0.85rem;
  margin: 4px 0;
  color: #aaa;
}
