/* ==========================================================================
   SD LEARNING CENTER — FAQ STYLESHEET
   100% Scoped & Accessible (320px Mobile to 4K Ultra-Wide)
   ========================================================================== */

:root {
  --bg-white: #ffffff;
  --bg-soft: #f0f7ff;
  --bg-alt: #f8fafc;
  --bg-canvas: #f1f5f9;

  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-border: #bfdbfe;
  --secondary: #0ea5e9;
  --accent: #f59e0b;
  --accent-hover: #d97706;

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-light: #64748b;

  --border-color: #e2e8f0;
  --border-card: #e5e7eb;
  --border-focus: #93c5fd;

  --footer-bg: #1f2937;
  --footer-text: #9ca3af;
  --footer-heading: #ffffff;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
  --shadow-md: 0 6px 14px -2px rgba(15, 23, 42, 0.07), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 14px 28px -4px rgba(15, 23, 42, 0.09), 0 6px 12px -2px rgba(15, 23, 42, 0.04);

  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  --header-height: 68px;
  --transition-speed: 200ms;
  --transition-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --max-width: 1040px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-canvas);
  background-image:
    radial-gradient(at 0% 0%, rgba(219, 234, 254, 0.5) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(254, 243, 199, 0.35) 0px, transparent 50%),
    linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  background-attachment: fixed;
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  width: 100%;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--primary);
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  z-index: 99999;
  font-weight: 600;
  transition: top var(--transition-speed) var(--transition-ease);
}
.skip-link:focus { top: 1rem; }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ==========================================================================
   SITE HEADER
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background-color: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.header-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.brand-logo {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-text {
  font-size: clamp(1.15rem, 2.5vw, 1.35rem);
  font-weight: 850;
  letter-spacing: -0.025em;
  line-height: 1.2;
  white-space: nowrap;
}

.brand-sd { color: var(--primary); }
.brand-learning { color: var(--text-main); margin: 0 2px; }
.brand-center { color: var(--accent); }
.brand-sdlc-desktop { display: inline-block; }
.brand-sdlc-mobile { display: none; }

.portal-badge-title {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.65rem;
  background-color: var(--primary-light);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 800;
  border-radius: var(--radius-sm);
  border: 1px solid var(--primary-border);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 1.15rem;
  font-size: 0.875rem;
  font-weight: 650;
  border-radius: var(--radius-md);
  transition: all var(--transition-speed) var(--transition-ease);
  white-space: nowrap;
  cursor: pointer;
  line-height: 1.2;
  border: 1px solid transparent;
}

.btn-outline {
  border: 1px solid var(--border-color);
  color: var(--text-main);
  background-color: var(--bg-white);
  box-shadow: var(--shadow-sm);
}

.btn-outline:hover {
  background-color: var(--bg-soft);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  border: 1px solid var(--primary);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.btn-text-desktop { display: inline; }
.btn-text-mobile { display: none; }

@media (max-width: 640px) {
  :root { --header-height: 58px; }
  .site-header { height: 58px; }
  .brand-sdlc-desktop { display: none; }
  .brand-sdlc-mobile { display: inline-block; }
  .header-container { padding: 0 0.85rem; }
  .brand-text { font-size: 1.15rem; }
  .portal-badge-title { display: none; }
  .btn-text-desktop { display: none !important; }
  .btn-text-mobile { display: inline !important; }
  .header-right .btn { padding: 0.42rem 0.75rem; font-size: 0.8rem; }
}

/* ==========================================================================
   PAGE LAYOUT & HERO CARD
   ========================================================================== */
main {
  flex: 1;
  width: 100%;
}

.page-section {
  padding: clamp(1.75rem, 4vw, 3rem) 1rem clamp(2.5rem, 5vw, 4rem) 1rem;
  width: 100%;
}

.page-container {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.fade-slide-up {
  animation: fadeSlideUp 0.35s ease-out forwards;
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero Section Card */
.faq-hero-card {
  background: linear-gradient(135deg, #090e1a 0%, #0f172a 45%, #1e293b 100%);
  color: #ffffff;
  border-radius: var(--radius-2xl);
  padding: clamp(2rem, 4.5vw, 3.25rem) clamp(1.5rem, 3.5vw, 2.75rem);
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.faq-hero-card::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -5%;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  filter: blur(25px);
}

.hero-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  color: #93c5fd;
  backdrop-filter: blur(8px);
  margin-bottom: 1rem;
}

.hero-badge-pill svg {
  color: var(--accent);
  flex-shrink: 0;
}

.faq-hero-title {
  font-size: clamp(1.85rem, 4.2vw, 2.75rem);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin-bottom: 0.85rem;
  text-wrap: balance;
}

.faq-hero-desc {
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  color: #cbd5e1;
  line-height: 1.65;
  max-width: 680px;
  margin-bottom: 1.75rem;
}

/* Search Bar */
.faq-search-wrapper {
  position: relative;
  width: 100%;
  max-width: 620px;
  margin-bottom: 1.25rem;
}

.faq-search-icon {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
  display: flex;
  align-items: center;
}

.faq-search-input {
  width: 100%;
  padding: 0.85rem 2.85rem 0.85rem 2.85rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-xl);
  outline: none;
  transition: all var(--transition-speed);
}

.faq-search-input::placeholder {
  color: #94a3b8;
}

.faq-search-input:focus {
  border-color: #60a5fa;
  background: rgba(15, 23, 42, 0.9);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.25);
}

.faq-search-clear-btn {
  position: absolute;
  right: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  display: none;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 50%;
}

.faq-search-clear-btn:hover { color: #ffffff; }

/* Filter Pills */
.faq-filter-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  width: 100%;
  max-width: 720px;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e2e8f0;
  cursor: pointer;
  transition: all var(--transition-speed);
  white-space: nowrap;
}

.filter-pill:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.filter-pill.active {
  background: #ffffff;
  color: #0f172a;
  border-color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   ACCORDION CONTAINER & QUESTION PANELS
   ========================================================================== */
.faq-accordion-group {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
}

.faq-card-item {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
  overflow: hidden;
}

.faq-card-item:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-md);
}

.faq-card-item.open {
  border-color: #bfdbfe;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.06);
}

.faq-question-btn {
  width: 100%;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
  background: transparent;
  cursor: pointer;
  user-select: none;
}

.faq-q-text {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.015em;
  line-height: 1.35;
}

.faq-q-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform var(--transition-speed), background-color var(--transition-speed), color var(--transition-speed);
}

.faq-card-item.open .faq-q-icon {
  transform: rotate(180deg);
  background: var(--primary);
  color: #ffffff;
}

.faq-answer-panel {
  display: none;
  padding: 0 1.5rem 1.35rem 1.5rem;
  font-size: 0.935rem;
  color: var(--text-muted);
  line-height: 1.65;
  border-top: 1px dashed var(--border-color);
  padding-top: 1rem;
}

.faq-card-item.open .faq-answer-panel {
  display: block;
  animation: fadeSlideUp 0.25s ease-out forwards;
}

.faq-answer-panel p {
  margin-bottom: 0.75rem;
}

.faq-answer-panel p:last-child {
  margin-bottom: 0;
}

.faq-answer-panel ul,
.faq-answer-panel ol {
  padding-left: 1.4rem;
  margin: 0.5rem 0 0.75rem 0;
}

.faq-answer-panel li {
  margin-bottom: 0.35rem;
}

.faq-answer-panel a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.faq-answer-panel a:hover {
  color: var(--primary-hover);
}

/* Empty Search Results Box */
.faq-empty-search {
  display: none;
  background: var(--bg-white);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-2xl);
  padding: 3.5rem 1.5rem;
  text-align: center;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.faq-empty-search.show {
  display: flex;
}

.empty-search-icon {
  font-size: 2.5rem;
  line-height: 1;
}

.empty-search-title {
  font-size: 1.25rem;
  font-weight: 850;
  color: var(--text-main);
}

.empty-search-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 440px;
  line-height: 1.55;
}

/* ==========================================================================
   STILL HAVE QUESTIONS? CALLOUT CARD
   ========================================================================== */
.faq-contact-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-2xl);
  padding: 2rem 2.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  border-left: 5px solid var(--primary);
}

.contact-card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-xl);
  background: var(--bg-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--primary-border);
}

.contact-card-content {
  flex: 1;
  min-width: 260px;
}

.contact-card-title {
  font-size: 1.25rem;
  font-weight: 850;
  color: var(--text-main);
  letter-spacing: -0.015em;
  margin-bottom: 0.25rem;
}

.contact-card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.contact-card-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background-color: var(--footer-bg);
  color: var(--footer-text);
  padding: 3.5rem 1rem 2rem 1rem;
  border-top: 1px solid #374151;
  margin-top: auto;
}

@media (max-width: 640px) {
  .page-section { padding: 1.25rem 0.75rem 3rem 0.75rem; }
  .faq-hero-card { padding: 1.75rem 1.15rem; border-radius: var(--radius-xl); }
  .faq-question-btn { padding: 1.1rem 1.15rem; }
  .faq-answer-panel { padding: 0 1.15rem 1.15rem 1.15rem; font-size: 0.9rem; }
  .faq-contact-card { padding: 1.5rem 1.15rem; border-radius: var(--radius-xl); }
  .contact-card-actions { width: 100%; }
  .contact-card-actions .btn { width: 100%; }
}
