/* Minimal structural styles to align with Challenger brand assets.
   This file complements the site's CSS and can be extended safely. */

:root {
  --brand-blue: #004c97;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: #222;
  background: #fff;
}

img,
video {
  max-width: 100%;
  height: auto;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Buttons */
.button {
  display: inline-block;
  padding: .5rem .9rem;
  border: 1px solid var(--brand-blue);
  color: var(--brand-blue);
  background: #fff;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background: #f5f9ff;
}

.button-primary {
  background: var(--brand-blue);
  color: #fff;
  border-color: var(--brand-blue);
}

.button-primary:hover {
  background: #0b59a8;
}

/* Notices */
.notice {
  padding: .75rem 1rem;
  border-left: 4px solid #aaa;
  background: #f5f5f5;
  margin: 1rem 0;
}

.notice-info {
  border-color: #1e87f0;
  background: #eef6ff;
}

.notice-success {
  border-color: #46b450;
  background: #eefbee;
}

.notice-warning {
  border-color: #ffb900;
  background: #fff8e5;
}

.notice-error {
  border-color: #dc3232;
  background: #fdeaea;
}

.site-header {
  background: #fff;
  border-bottom: 4px solid var(--brand-blue);
  color: var(--brand-blue);
}

.site-header .header-inner,
.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .5rem 0;
}

.brand-logo {
  max-height: clamp(40px, 8vw, 55px);
  height: auto;
  width: auto;
  display: block;
  margin: .5rem 0;
}

.site-nav a {
  margin-left: 1rem;
  color: var(--brand-blue);
  text-decoration: none;
  font-weight: 600;
}

.site-nav a:hover {
  text-decoration: underline;
}

.site-header a,
.site-header button {
  color: inherit;
}

.site-main h1,
.site-main h2,
.site-main .card-title,
.site-main .lead {
  color: var(--brand-blue);
}

/* Responsive nav */
.site-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.menu-toggle {
  display: none;
  background: transparent;
  color: var(--brand-blue);
  border: 1px solid var(--brand-blue);
  border-radius: 4px;
  padding: .4rem .6rem;
  cursor: pointer;
}

@media (width <= 700px) {
  .menu-toggle {
    display: inline-block;
  }

  /* Collapsible mobile nav with slide-down */
  .site-nav {
    display: flex;
    flex-direction: column;
    background: #fff;
    padding: 0;
    gap: .25rem;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform-origin: top;
    transform: scaleY(.98);
    transition: max-height .25s ease, opacity .2s ease, transform .2s ease;
  }

  .site-nav a {
    margin: .25rem 0;
  }

  .site-nav.open {
    max-height: 320px;
    opacity: 1;
    transform: scaleY(1);
  }


  /* Form tables stack on small screens */
  .form-table,
  .form-table tbody,
  .form-table tr,
  .form-table th,
  .form-table td {
    display: block;
    width: 100%;
    margin: .25rem 0 .75rem;
  }

  .form-table th {
    margin-top: .75rem;
  }

  .regular-text,
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  input[type="password"],
  select,
  textarea {
    width: 100% !important;
    max-width: 100%;
  }

  .submit {
    text-align: right;
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

@media (width <= 1024px) and (width >= 701px) {
  .form-table th {
    width: 200px;
  }
}

.site-main {
  padding: 2rem 0;
}

.site-footer {
  background: #f7f7f7;
  border-top: 1px solid #e5e5e5;
  padding: 1.5rem 0;
  color: #666;
  font-size: .95rem;
}

/* Helper classes for forms and notices already come from admin CSS; this
   file only adjusts spacing within our container. */
.submit {
  margin-top: 1rem;
}

/* Basic form table layout */
.form-table {
  width: 100%;
  border-collapse: collapse;
}

.form-table th {
  width: 240px;
  text-align: left;
  vertical-align: top;
  padding: .5rem .5rem .5rem 0;
}

.form-table td {
  padding: .5rem 0;
}

.regular-text {
  padding: .4rem .5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.hero-banner {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 1.5rem;
}

.form-error {
  color: #dc3232;
  margin: .25rem 0 0;
  font-size: .9rem;
}

.page-title {
  margin: 0 0 .75rem;
  color: var(--brand-blue);
}

.lead {
  margin: 0 0 1.5rem;
  font-size: 1.1rem;
  color: #555;
}

.option-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
}

@media (width >= 720px) {
  .option-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.option-card {
  background: #fff;
  border: 1px solid #e1e5eb;
  border-radius: 10px;
  padding: 1.75rem;
  box-shadow: 0 8px 18px rgb(0 0 0 / 6%);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.option-card h2 {
  margin: 0;
  color: var(--brand-blue);
  font-size: 1.4rem;
}

.option-card p {
  margin: 0;
  color: #444;
  flex-grow: 1;
}

.option-card .button {
  align-self: flex-start;
}

/* Responsive layout fixes for test environment */
.row_inner {
  max-width: 100% !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: clamp(0.75rem, 3vw, 2rem);
  padding-right: clamp(0.75rem, 3vw, 2rem);
  box-sizing: border-box;
}

.module_row,
.module_subrow {
  max-width: 100% !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box;
}

.row_inner > .module_column,
.module_row > .module_column,
.module_subrow > .module_column {
  max-width: 100% !important;
}

@media (width >= 1200px) {
  .row_inner {
    padding-left: 0;
    padding-right: 0;
  }
}

@media (width <= 1024px) {
  .row_inner > .module_column,
  .module_row > .module_column,
  .module_subrow > .module_column {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .module_row,
  .module_subrow {
    flex-wrap: wrap !important;
    display: flex !important;
  }
}

@media (width <= 768px) {
  .client-logos > .module_column,
  .accreditation-logos > .module_column {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0;
    padding-right: 0;
    justify-content: center;
  }

  .accreditation-logos .accreditation-logo,
  .client-logos .client-logo {
    width: calc(50% - 30px) !important;
    margin: 20px 15px !important;
  }
}

@media (width <= 540px) {
  .accreditation-logos .accreditation-logo,
  .client-logos .client-logo {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}
