/* pkarmik-shared.css - shared styles for all pages */
:root {
  --primary: #1a56db;
  --primary-dark: #1145b5;
  --primary-light: #ebf1ff;
  --accent: #f97316;
  --accent-dark: #ea6c0a;
  --success: #16a34a;
  --sky: #0284c7;
  --dark: #0f172a;
  --dark-2: #1e293b;
  --muted: #64748b;
  --light: #f8fafc;
  --border: #e2e8f0;
  --white: #ffffff;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'DM Sans', sans-serif; color: var(--dark); background: var(--white); line-height: 1.6; overflow-x: hidden; }
h1, h2, h3, h4, h5, h6 { font-family: 'Sora', sans-serif; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* NAVBAR */
.navbar { position: sticky; top: 0; z-index: 1000; background: rgba(255,255,255,0.96); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); padding: 0 24px; }
.nav-inner { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 68px; }
.nav-brand { display: flex; align-items: center; gap: 10px; font-family: 'Sora', sans-serif; font-size: 1.5rem; font-weight: 800; color: var(--primary); letter-spacing: -0.5px; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-links a { padding: 8px 14px; border-radius: 8px; font-size: 0.92rem; font-weight: 500; color: var(--dark-2); transition: background 0.2s, color 0.2s; }
.nav-links a:hover, .nav-links a.active { background: var(--primary-light); color: var(--primary); }
.dropdown { position: relative; }
.dropdown-menu { display: none; position: absolute; top: calc(100% + 8px); left: 0; background: var(--white); border: 1px solid var(--border); border-radius: 12px; min-width: 200px; box-shadow: 0 8px 24px rgba(0,0,0,0.1); padding: 8px; z-index: 100; }
.dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu a { display: block; padding: 10px 14px; border-radius: 8px; font-size: 0.9rem; color: var(--dark-2); }
.dropdown-menu a:hover { background: var(--primary-light); color: var(--primary); }
.dropdown > a::after { content: " ▾"; font-size: 0.7rem; }
.nav-actions { display: flex; gap: 10px; align-items: center; }
.btn-outline { padding: 9px 20px; border: 1.5px solid var(--primary); border-radius: 9px; font-size: 0.88rem; font-weight: 600; color: var(--primary); background: transparent; cursor: pointer; transition: all 0.2s; font-family: 'DM Sans', sans-serif; }
.btn-outline:hover { background: var(--primary-light); }
.btn-solid { padding: 9px 22px; border: none; border-radius: 9px; font-size: 0.88rem; font-weight: 600; color: var(--white); background: var(--primary); cursor: pointer; transition: all 0.2s; font-family: 'DM Sans', sans-serif; }
.btn-solid:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-logout { padding: 9px 20px; border: 1.5px solid #ef4444; border-radius: 9px; font-size: 0.88rem; font-weight: 600; color: #ef4444; background: transparent; cursor: pointer; transition: all 0.2s; font-family: 'DM Sans', sans-serif; display: inline-flex; align-items: center; gap: 6px; }
.btn-logout:hover { background: #fef2f2; }
.nav-user-greeting { font-size: 0.88rem; font-weight: 600; color: var(--dark-2); display: flex; align-items: center; gap: 6px; }
.nav-user-greeting i { color: var(--success); }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 6px; border: none; background: none; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--dark); border-radius: 2px; transition: all 0.3s; }
.mobile-menu { display: none; background: var(--white); border-bottom: 1px solid var(--border); padding: 16px 24px; }
.mobile-menu.open { display: block; }
.mobile-menu a { display: block; padding: 12px 0; border-bottom: 1px solid var(--border); font-weight: 500; color: var(--dark-2); }
.mobile-menu a:last-child { border: none; }
.mobile-actions { display: flex; gap: 10px; margin-top: 16px; }

/* PAGE HERO */
.page-hero { background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 60%, #1d4ed8 100%); padding: 56px 0 52px; position: relative; overflow: hidden; }
.page-hero::before { content: ''; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); }
.page-hero-orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.2; }
.page-hero-content { position: relative; z-index: 2; }
.page-hero-badge { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); border-radius: 50px; padding: 5px 14px; color: #bfdbfe; font-size: 0.82rem; font-weight: 500; margin-bottom: 16px; }
.page-hero h1 { font-size: clamp(1.6rem, 4vw, 2.6rem); font-weight: 800; color: white; letter-spacing: -0.5px; line-height: 1.2; margin-bottom: 12px; }
.page-hero h1 span { color: #60a5fa; }
.page-hero p { color: #94a3b8; font-size: 1rem; max-width: 620px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; margin-top: 20px; font-size: 0.85rem; color: rgba(255,255,255,0.5); }
.breadcrumb a { color: rgba(255,255,255,0.7); transition: color 0.2s; }
.breadcrumb a:hover { color: white; }
.breadcrumb i { font-size: 0.7rem; }

/* PAGE HERO META PILLS */
.hero-pills { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.hero-pill { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12); border-radius: 50px; padding: 6px 14px; color: rgba(255,255,255,0.8); font-size: 0.82rem; font-weight: 500; }
.hero-pill i { font-size: 0.75rem; }

/* SECTION LABELS */
.section-label { display: inline-block; font-size: 0.78rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--primary); background: var(--primary-light); padding: 5px 14px; border-radius: 50px; margin-bottom: 14px; }
.section-title { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 800; letter-spacing: -0.5px; }
.section-sub { color: var(--muted); font-size: 0.95rem; margin-top: 8px; }

/* TEST CARDS GRID */
.tests-section { padding: 72px 0; }
.tests-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 40px; flex-wrap: wrap; gap: 16px; }
.login-notice { display: inline-flex; align-items: center; gap: 8px; background: #fefce8; border: 1px solid #fde68a; border-radius: 10px; padding: 10px 16px; font-size: 0.85rem; color: #92400e; font-weight: 500; }
.login-notice i { color: #d97706; }
.tests-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }

/* TEST CARD */
.test-card { background: var(--white); border: 1px solid var(--border); border-radius: 14px; padding: 20px; transition: all 0.25s; position: relative; overflow: hidden; display: flex; flex-direction: column; }
.test-card::before { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px; }
.test-card.cgl1::before { background: var(--primary); }
.test-card.cgl2::before { background: var(--sky); }
.test-card.chsl::before { background: var(--success); }
.test-card:hover { box-shadow: 0 8px 28px rgba(0,0,0,0.09); transform: translateY(-3px); }
.test-card-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }
.test-card h5 { font-size: 0.95rem; font-weight: 700; color: var(--dark); flex: 1; }
.badge-new { font-size: 0.68rem; font-weight: 700; color: white; background: var(--accent); border-radius: 6px; padding: 2px 7px; letter-spacing: 0.5px; animation: newBadgePulse 2s infinite; flex-shrink: 0; margin-left: 6px; margin-top: 2px; }
@keyframes newBadgePulse { 0%,100%{ background:var(--accent); } 50%{ background:var(--accent-dark); } }
.test-meta { display: flex; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.meta-item { text-align: center; }
.meta-val { font-size: 0.9rem; font-weight: 700; color: var(--dark); }
.meta-lbl { font-size: 0.72rem; color: var(--muted); }
.btn-start { display: block; text-align: center; padding: 10px; border: 1.5px solid var(--primary); border-radius: 9px; color: var(--primary); font-size: 0.86rem; font-weight: 600; transition: all 0.2s; margin-top: auto; font-family: 'DM Sans', sans-serif; cursor: pointer; background: transparent; width: 100%; }
.btn-start:hover { background: var(--primary); color: white; }
.btn-attempted { display: block; text-align: center; padding: 10px; border: 1.5px solid var(--border); border-radius: 9px; color: var(--muted); font-size: 0.86rem; font-weight: 600; background: var(--light); cursor: pointer; width: 100%; font-family: 'DM Sans', sans-serif; }
.btn-attempted i { margin-right: 4px; color: var(--success); }

/* SIDEBAR */
.sidebar { background: var(--light); border: 1px solid var(--border); border-radius: 16px; padding: 24px; }
.sidebar h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 16px; color: var(--dark); }
.sidebar-links { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.sidebar-links a { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 9px; font-size: 0.88rem; color: var(--dark-2); font-weight: 500; transition: all 0.2s; border: 1px solid transparent; }
.sidebar-links a:hover { background: var(--primary-light); color: var(--primary); border-color: #bfdbfe; }
.sidebar-links a i { font-size: 0.8rem; color: var(--primary); width: 16px; }

/* INFO SECTION */
.info-section { padding: 72px 0; background: var(--light); }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.info-card { background: var(--white); border-radius: 16px; padding: 32px; border: 1px solid var(--border); }
.info-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 16px; color: var(--dark); display: flex; align-items: center; gap: 10px; }
.info-card h3 .icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; flex-shrink: 0; }
.info-card p { color: var(--muted); font-size: 0.9rem; line-height: 1.75; margin-bottom: 12px; }
.info-card ul { padding-left: 20px; color: var(--muted); font-size: 0.9rem; line-height: 1.8; }
.info-card ul li { margin-bottom: 4px; }
.info-card strong { color: var(--dark-2); }
.info-note { background: #fefce8; border: 1px solid #fde68a; border-radius: 10px; padding: 12px 16px; font-size: 0.85rem; color: #92400e; margin-top: 16px; display: flex; gap: 8px; align-items: flex-start; }
.info-note i { color: #d97706; margin-top: 2px; flex-shrink: 0; }

/* FOOTER */
footer { background: var(--dark); color: rgba(255,255,255,0.6); padding: 72px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 56px; border-bottom: 1px solid rgba(255,255,255,0.07); }
.footer-brand { display: flex; align-items: center; gap: 10px; font-family: 'Sora', sans-serif; font-size: 1.4rem; font-weight: 800; color: white; margin-bottom: 16px; }
.footer-col p { font-size: 0.88rem; line-height: 1.75; margin-bottom: 24px; }
.newsletter { display: flex; gap: 8px; }
.newsletter input { flex: 1; padding: 11px 16px; border-radius: 9px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.05); color: white; font-family: 'DM Sans', sans-serif; font-size: 0.88rem; outline: none; }
.newsletter input::placeholder { color: rgba(255,255,255,0.35); }
.newsletter button { padding: 11px 18px; border-radius: 9px; border: none; background: var(--primary); color: white; font-weight: 600; cursor: pointer; transition: background 0.2s; font-family: 'DM Sans', sans-serif; }
.newsletter button:hover { background: var(--primary-dark); }
.footer-col h4 { color: white; font-size: 0.95rem; font-weight: 700; margin-bottom: 18px; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 0.88rem; color: rgba(255,255,255,0.5); transition: color 0.2s; }
.footer-links a:hover { color: white; }
.social-links { display: flex; gap: 12px; margin-top: 20px; }
.social-links a { width: 38px; height: 38px; border-radius: 9px; border: 1px solid rgba(255,255,255,0.12); display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.5); font-size: 0.9rem; transition: all 0.2s; }
.social-links a:hover { background: var(--primary); border-color: var(--primary); color: white; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding: 20px 0; font-size: 0.82rem; flex-wrap: wrap; gap: 10px; }
.footer-bottom a { color: rgba(255,255,255,0.5); transition: color 0.2s; }
.footer-bottom a:hover { color: white; }

.back-top { position: fixed; bottom: 28px; right: 28px; width: 44px; height: 44px; background: var(--primary); color: white; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; cursor: pointer; box-shadow: 0 4px 16px rgba(26,86,219,0.35); transition: all 0.2s; opacity: 0; pointer-events: none; }
.back-top.visible { opacity: 1; pointer-events: auto; }
.back-top:hover { transform: translateY(-3px); }

/* LAYOUT */
.page-layout { display: flex; gap: 32px; align-items: flex-start; }
.main-col { flex: 1; min-width: 0; }
.sidebar-col { width: 240px; flex-shrink: 0; position: sticky; top: 88px; }

/* RESPONSIVE */
@media (max-width: 900px) {
  .nav-links, .nav-actions { display: none; }
  .hamburger { display: flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .page-layout { flex-direction: column; }
  .sidebar-col { width: 100%; position: static; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
  .tests-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 420px) {
  .tests-grid { grid-template-columns: 1fr; }
}
