/* ==========================================================================
   SD LEARNING CENTER — CONTACT US STYLESHEET
   Scoped & Accessible (320px Mobile to 4K Displays)
   ========================================================================== */

:root {
  --bg-white: #ffffff;
  --bg-soft: #eef5ff;
  --bg-alt: #f8fafc;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --secondary: #0ea5e9;
  --accent: #f59e0b;
  --accent-hover: #d97706;
  --text-main: #111827;
  --text-muted: #4b5563;
  --text-light: #6b7280;
  --border-color: #e5e7eb;
  --border-focus: #93c5fd;
  --footer-bg: #1f2937;
  --footer-text: #9ca3af;
  --footer-heading: #ffffff;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;
  --header-height: 70px;
  --transition-speed: 250ms;
  --transition-ease: ease-in-out;
  --max-width: 1280px;
}

*, *::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-alt);
  color: var(--text-main);
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  width: 100%;
}

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: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  z-index: 9999;
  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;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background-color: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.header-container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.brand-logo {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-text {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.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.2rem 0.6rem;
  background-color: var(--bg-soft);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: 1px solid #dbeafe;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1.15rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--transition-speed) var(--transition-ease);
  white-space: nowrap;
  cursor: pointer;
}

.btn-outline {
  border: 1px solid var(--border-color);
  color: var(--text-main);
  background-color: var(--bg-white);
}
.btn-outline:hover {
  background-color: var(--bg-soft);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  border: 1px solid var(--primary);
}
.btn-primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
}

/* Layout */
main { flex: 1; width: 100%; overflow-x: hidden; }

.dashboard-section {
  padding: 2rem 1rem 3.5rem 1rem;
  width: 100%;
}

.dashboard-container {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.dashboard-panel {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
  transition: box-shadow var(--transition-speed);
  min-width: 0;
  overflow: hidden;
}

.fade-slide-up {
  animation: fadeSlideUp 0.4s ease-out forwards;
}
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Welcome Card */
.welcome-card {
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #3b82f6 100%);
  color: #ffffff;
  border: none;
  position: relative;
  overflow: hidden;
  padding: 2.25rem 2rem;
}

.welcome-card::after {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 260px;
  height: 260px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  pointer-events: none;
}

.welcome-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.welcome-heading {
  font-size: clamp(1.35rem, 3.5vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  word-break: break-word;
}

.location-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background-color: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(4px);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  white-space: nowrap;
}

.welcome-quote {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.6;
  max-width: 780px;
}

.content-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.content-grid-4 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

@media (min-width: 1024px) {
  .content-grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.panel-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.85rem;
}

.panel-icon-box {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background-color: var(--bg-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.panel-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
}

/* Info Cards */
.info-card-box {
  background-color: var(--bg-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: border-color var(--transition-speed), transform var(--transition-speed);
}

.info-card-box:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.info-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #dbeafe;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.25rem;
}

.info-card-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-light);
  letter-spacing: 0.03em;
}

.info-card-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  word-break: break-word;
  line-height: 1.45;
}

.info-card-link {
  color: var(--primary);
  transition: color var(--transition-speed);
}
.info-card-link:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.15rem;
}

@media (max-width: 640px) {
  .form-grid-2 {
    grid-template-columns: 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.required-star {
  color: #ef4444;
}

.form-input {
  font-family: inherit;
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  color: var(--text-main);
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-speed) var(--transition-ease),
              box-shadow var(--transition-speed) var(--transition-ease);
  outline: none;
}

.form-input::placeholder { color: var(--text-light); }

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3.5px rgba(37, 99, 235, 0.12);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234b5563' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.1rem;
  padding-right: 2.5rem;
}

textarea.form-input {
  resize: vertical;
  min-height: 120px;
}

.field-error-text {
  display: none;
  color: #dc2626;
  font-size: 0.8rem;
  font-weight: 500;
  margin-top: 0.2rem;
}

.form-group.has-error .form-input {
  border-color: #f87171;
  box-shadow: 0 0 0 3.5px rgba(239, 68, 68, 0.1);
}

.form-group.has-error .field-error-text {
  display: block;
}

.form-alert-banner {
  display: none;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
}

.form-alert-info {
  background-color: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.form-alert-error {
  background-color: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* Privacy & Dispatch Guidance Banner */
.privacy-dispatch-note {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 0.75rem 0.95rem;
  font-size: 0.825rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.privacy-dispatch-note svg {
  flex-shrink: 0;
  margin-top: 0.15rem;
  color: var(--primary);
}

/* Action button row */
.form-action-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

/* FAQ Accordion */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.faq-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background-color: var(--bg-alt);
  overflow: hidden;
  transition: border-color var(--transition-speed);
}

.faq-item[open] {
  border-color: #bfdbfe;
  background-color: var(--bg-white);
  box-shadow: var(--shadow-sm);
}

.faq-summary {
  padding: 1.1rem 1.25rem;
  font-size: 0.975rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  list-style: none;
  user-select: none;
}

.faq-summary::-webkit-details-marker {
  display: none;
}

.faq-icon {
  color: var(--primary);
  flex-shrink: 0;
  transition: transform var(--transition-speed) var(--transition-ease);
}

.faq-item[open] .faq-icon {
  transform: rotate(180deg);
}

.faq-content {
  padding: 0 1.25rem 1.1rem 1.25rem;
  font-size: 0.885rem;
  color: var(--text-muted);
  line-height: 1.6;
  border-top: 1px dashed transparent;
}

.faq-item[open] .faq-content {
  border-top-color: var(--border-color);
  padding-top: 0.85rem;
}

/* Location Card */
.location-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  background-color: var(--bg-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.location-details {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  max-width: 680px;
}

.location-details svg {
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 0.2rem;
}

@media (max-width: 900px) {
  .content-grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .brand-sdlc-desktop { display: none; }
  .brand-sdlc-mobile { display: inline-block; }
  .site-header { height: 62px; }
  .dashboard-section { padding: 1.15rem 0.75rem 2.5rem 0.75rem; }
  .dashboard-panel { padding: 1.25rem; }
  .welcome-card { padding: 1.5rem 1.25rem; }
  .content-grid-4 { grid-template-columns: 1fr; }
  .form-action-row { flex-direction: column; align-items: stretch; }
  .form-action-row .btn { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
  .dashboard-section { padding: 0.75rem 0.5rem 2rem 0.5rem; }
  .dashboard-panel { padding: 1rem; }
  .btn { padding: 0.45rem 0.85rem; font-size: 0.8rem; }
  .location-row { flex-direction: column; align-items: flex-start; }
}

.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;
}