/* ==========================================================================
   Base & Variables
   ========================================================================== */
:root {
  --brand-color: #512ABD;
  --text-color: #121212;
  --link-color: #3B82F6;
  --background-color: #FFFFFF;
  --grey-100: #F7F7F7;
  --grey-200: #EFEFEF;
  --grey-800: #333333;
  --font-family: 'Inter', sans-serif;
}

body {
  background-color: var(--background-color);
  color: var(--text-color);
  font-family: var(--font-family);
  line-height: 1.6;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

a { color: var(--link-color); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { font-weight: 700; margin: 0 0 1rem 0; color: var(--text-color); }
h1 { font-size: 2.5rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }

/* ==========================================================================
   Header & Footer
   ========================================================================== */
.header { background-color: var(--background-color); border-bottom: 1px solid var(--grey-200); padding: 1rem 0; }
.header__inner { display: flex; justify-content: space-between; align-items: center; }
.header__brand img { max-height: 32px; display: block; }
.header__nav { display: flex; align-items: center; gap: 1.5rem; }
.sign-in-link { font-weight: 500; }

.footer { background-color: var(--grey-800); color: #FFFFFF; padding: 3rem 0; margin-top: 4rem; font-size: 0.9rem; }
.footer a { color: #FFFFFF; opacity: 0.8; }
.footer a:hover { opacity: 1; }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; padding-bottom: 2rem; margin-bottom: 2rem; border-bottom: 1px solid rgba(255,255,255,0.2); }
.footer__logo img { max-height: 24px; filter: brightness(0) invert(1); }
.footer__links { display: flex; gap: 4rem; }
.footer__column ul { list-style: none; padding: 0; }
.footer__column li { margin-bottom: 0.5rem; }
.footer__title { color: #FFFFFF; font-size: 1rem; margin-bottom: 1rem; }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; color: rgba(255,255,255,0.7); }
.footer__bottom .dropdown-toggle { color: #FFFFFF; }
.footer__legal-links { list-style: none; padding: 0; margin: 0; display: flex; gap: 1.5rem; }

/* ==========================================================================
   Dropdowns
   ========================================================================== */
.dropdown { position: relative; }
.dropdown-toggle { background: none; border: none; cursor: pointer; display: flex; align-items: center; gap: 0.5rem; font-family: var(--font-family); font-size: 1rem; }
.dropdown-menu { display: none; position: absolute; top: calc(100% + 10px); right: 0; background-color: var(--background-color); border: 1px solid var(--grey-200); border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); min-width: 200px; padding: 0.5rem 0; z-index: 10; }
.dropdown-menu[aria-expanded="true"] { display: block; }
.dropdown-menu a { display: block; padding: 0.75rem 1rem; color: var(--text-color); }
.dropdown-menu a:hover { background-color: var(--grey-100); text-decoration: none; }
.dropdown-divider { height: 1px; background-color: var(--grey-200); margin: 0.5rem 0; }
.footer .dropdown-menu { border-color: rgba(255,255,255,0.2); background-color: var(--grey-800); }
.footer .dropdown-menu a { color: #FFFFFF; }
.footer .dropdown-menu a:hover { background-color: rgba(255,255,255,0.1); }

/* ==========================================================================
   Homepage
   ========================================================================== */
.hero { background-color: var(--grey-100); text-align: center; padding: 4rem 0; }
.hero__title { margin-bottom: 1.5rem; }
.hero__search .search-box { max-width: 600px; margin: 0 auto; }
.search input[type="search"] { width: 100%; padding: 1rem; font-size: 1rem; border-radius: 8px; border: 1px solid var(--grey-200); }
.category-grid { padding: 4rem 0 3rem; }
.category-grid__title { text-align: center; font-size: 1.5rem; margin-bottom: 2rem; }
.category-grid__item-description { margin: 0; color: #666; }

/* Category cards: 4 columns on desktop, 2 on tablet, 1 on mobile */
.category-grid__list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; list-style: none; padding: 0; margin: 0; }
@media (max-width: 992px) { .category-grid__list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 576px) { .category-grid__list { grid-template-columns: 1fr; } }

.category-grid__item a {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 100%;
  box-sizing: border-box;
  padding: 2.5rem 1.5rem 2rem;
  border: 1px solid var(--grey-200);
  border-radius: 16px;
  color: var(--text-color);
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.category-grid__item a:hover { text-decoration: none; border-color: var(--brand-color); box-shadow: 0 12px 32px rgba(18,18,18,0.08); transform: translateY(-3px); }

.category-grid__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 1.25rem;
  border-radius: 50%;
  font-size: 1.5rem;
  color: var(--brand-color);
  background-color: #EEE9FB;
  background-color: color-mix(in srgb, var(--brand-color) 10%, white);
  transition: background-color 0.2s ease, color 0.2s ease;
}
.category-grid__item a:hover .category-grid__icon { background-color: var(--brand-color); color: #FFFFFF; }
.category-grid__item-title { margin: 0 0 0.75rem; font-size: 1.2rem; }
.category-grid__cta { margin-top: auto; font-size: 0.875rem; font-weight: 500; color: var(--brand-color); }
.category-grid__cta span { display: inline-block; transition: transform 0.2s ease; }
.category-grid__item a:hover .category-grid__cta span { transform: translateX(4px); }

/* "Get in touch" call to action */
.contact-cta {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 3rem;
  border-radius: 20px;
  background-color: #121212;
  color: #FFFFFF;
}
.contact-cta::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -80px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--brand-color) 0%, transparent 70%);
  opacity: 0.6;
  pointer-events: none;
}
.contact-cta__content, .contact-cta__actions { position: relative; }
.contact-cta__content { flex: 1 1 380px; }
.contact-cta__title { color: #FFFFFF; font-size: 1.75rem; margin-bottom: 0.5rem; }
.contact-cta__text { margin: 0; color: rgba(255,255,255,0.75); max-width: 520px; }
.contact-cta__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.contact-cta .button { padding: 0.85rem 1.5rem; font-size: 1rem; }
@media (max-width: 576px) {
  .contact-cta { padding: 2rem 1.5rem; }
  .contact-cta__actions, .contact-cta .button { width: 100%; box-sizing: border-box; text-align: center; }
}

/* ==========================================================================
   Breadcrumbs & Page Header
   ========================================================================== */
.breadcrumbs { padding: 1.5rem 0; list-style: none; font-size: 0.9rem; color: #666; }
.breadcrumbs li { display: inline; }
.breadcrumbs li:not(:last-child)::after { content: '/'; margin: 0 0.5rem; }

/* Breadcrumbs + compact search bar on category, section, article and search pages */
.sub-nav { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1.25rem 0; }
.sub-nav .breadcrumbs { flex: 1; min-width: 0; margin: 0; padding: 0; }
.sub-nav__search { flex: 0 1 360px; }
.sub-nav__search .search { position: relative; margin: 0; }
.sub-nav__search .search::before {
  content: '';
  position: absolute;
  left: 1rem;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  background-color: #666;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='7' cy='7' r='5.5' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M11 11l3.5 3.5' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='7' cy='7' r='5.5' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M11 11l3.5 3.5' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
  pointer-events: none;
  transition: background-color 0.2s ease;
}
.sub-nav__search .search:focus-within::before { background-color: var(--brand-color); }
.sub-nav__search .search input[type="search"] {
  box-sizing: border-box;
  height: 44px;
  padding: 0 1rem 0 2.75rem;
  border: 1px solid transparent;
  border-radius: 50px;
  background-color: var(--grey-100);
  font-family: var(--font-family);
  font-size: 0.95rem;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.sub-nav__search .search input[type="search"]:hover { border-color: var(--grey-200); }
.sub-nav__search .search input[type="search"]:focus {
  outline: none;
  background-color: var(--background-color);
  border-color: var(--brand-color);
  box-shadow: 0 0 0 3px rgba(81, 42, 189, 0.15);
}
@media (max-width: 768px) {
  .sub-nav { flex-direction: column-reverse; align-items: stretch; gap: 1rem; }
  .sub-nav__search { flex-basis: auto; }
}
.page-header { padding-bottom: 2rem; border-bottom: 1px solid var(--grey-200); margin-bottom: 2rem; }
.page-header h1 { margin-bottom: 0.5rem; }
.page-header__description { font-size: 1.1rem; color: #666; margin: 0; }

/* ==========================================================================
   Category & Section Pages
   ========================================================================== */
.section-list, .article-list { list-style: none; padding: 0; }
.section-list__item, .article-list__item { border-bottom: 1px solid var(--grey-200); }
.section-list__link, .article-list__link { display: flex; justify-content: space-between; align-items: center; padding: 1.5rem 1rem; color: var(--text-color); font-size: 1.1rem; font-weight: 500; }
.section-list__link:hover, .article-list__link:hover { background-color: var(--grey-100); text-decoration: none; }
.section-list__description { font-size: 0.9rem; font-weight: 400; color: #666; margin-top: 0.25rem; }
.article-list__empty { color: #666; padding: 1.5rem 1rem; margin: 0; }

/* ==========================================================================
   Article Page
   ========================================================================== */
.article-container { display: flex; flex-direction: column-reverse; gap: 3rem; padding-top: 2rem; }
@media (min-width: 992px) { .article-container { flex-direction: row; } }
.article-content { flex: 1; min-width: 0; }
.article-header h1 { margin-bottom: 0.5rem; }
.article-meta { font-size: 0.9rem; color: #666; margin-bottom: 2rem; }
.article-meta__item:not(:last-child)::after { content: '•'; margin: 0 0.5rem; }
.article-body { line-height: 1.7; }
.article-body h2 { margin-top: 2.5rem; border-bottom: 1px solid var(--grey-200); padding-bottom: 0.5rem; }
.article-body img { max-width: 100%; height: auto; border-radius: 8px; }
.article-sidebar { flex-basis: 300px; flex-shrink: 0; }
.article-sidebar__title { font-size: 1rem; font-weight: 700; text-transform: uppercase; color: #666; padding-bottom: 0.5rem; border-bottom: 1px solid var(--grey-200); margin-bottom: 1rem; }
.article-sidebar__list { list-style: none; padding: 0; }
.article-sidebar__link { display: block; padding: 0.75rem 0; color: var(--text-color); font-size: 0.9rem; border-bottom: 1px solid var(--grey-100); }
.article-sidebar__link.is-current { font-weight: 700; color: var(--brand-color); }
.article-sidebar__link:hover { text-decoration: none; color: var(--link-color); }
.article-footer { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--grey-200); text-align: center; }
.article-votes__question { margin-bottom: 1rem; }
.vote-button { background: none; border: 1px solid var(--grey-200); padding: 0.5rem 1rem; margin: 0 0.25rem; border-radius: 20px; cursor: pointer; }
.vote-button:hover { background-color: var(--grey-100); }
.vote-button[aria-selected="true"] { border-color: var(--brand-color); background-color: #E8E4F8; }
.related-articles { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--grey-200); }
.related-articles__list { list-style: none; padding: 0; }
.related-articles__list a { display: block; padding: 0.5rem 0; }

/* Button Styles */
.button {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}

.button:hover {
  text-decoration: none;
}

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

.button--primary:hover {
  background-color: #411d8a; /* A slightly darker brand color */
  border-color: #411d8a;
  color: #FFFFFF;
}

.button--light { background-color: #FFFFFF; color: #121212; border-color: #FFFFFF; }
.button--light:hover { background-color: #E8E4F8; border-color: #E8E4F8; color: #121212; }
.button--outline-light { background-color: transparent; color: #FFFFFF; border-color: rgba(255,255,255,0.5); }
.button--outline-light:hover { border-color: #FFFFFF; background-color: rgba(255,255,255,0.08); color: #FFFFFF; }

.sign-in-link {
  font-weight: 500;
  padding: 0.5rem 0; /* Align vertically with button */
}

/* ==========================================================================
   Announcement Banner
   ========================================================================== */
.announcement { background-color: var(--brand-color); color: #FFFFFF; font-size: 0.9rem; }
.announcement[hidden] { display: none; }
.announcement__inner { display: flex; align-items: center; gap: 0.75rem; padding-top: 0.6rem; padding-bottom: 0.6rem; }
.announcement__badge { flex-shrink: 0; padding: 0.15rem 0.6rem; border-radius: 50px; background-color: rgba(255,255,255,0.18); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.announcement__text { flex: 1; margin: 0; }
.announcement__link { color: #FFFFFF; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.announcement__link:hover { opacity: 0.85; }
.announcement__close { flex-shrink: 0; display: flex; padding: 0.4rem; border: none; border-radius: 50%; background: none; color: #FFFFFF; cursor: pointer; }
.announcement__close:hover { background-color: rgba(255,255,255,0.15); }
@media (max-width: 576px) { .announcement__badge { display: none; } }

/* ==========================================================================
   Footer certification badges
   ========================================================================== */
.footer__badges { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; }
.footer__badges-label { font-size: 0.75rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255,255,255,0.6); }
.footer__badges-list { display: flex; gap: 0.75rem; list-style: none; margin: 0; padding: 0; }
.footer__badge { display: flex; align-items: center; height: 56px; padding: 0 0.85rem; border-radius: 10px; background-color: #FFFFFF; }
.footer__badge img { display: block; max-height: 44px; width: auto; }
.footer__inner { align-items: center; }

/* ==========================================================================
   Request Form Styling
   ========================================================================== */

/* The container for the form fields */
.form-container {
  max-width: 700px; /* Constrain width for readability */
  margin: 2rem auto;   /* Center the form */
}

/* Ticket form picker: replaces the "choose your issue" drop-down with cards */
.form-field.is-replaced { display: none; }
.form-picker { max-width: 900px; margin: 2rem auto 0; }
.form-picker[hidden] { display: none; }
.form-picker__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; list-style: none; margin: 0; padding: 0; }
.form-picker__card {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 100%;
  box-sizing: border-box;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--grey-200);
  border-radius: 16px;
  color: var(--text-color);
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.form-picker__card:hover, .form-picker__card:focus-visible { text-decoration: none; border-color: var(--brand-color); box-shadow: 0 12px 32px rgba(18,18,18,0.08); transform: translateY(-2px); outline: none; }
.form-picker__icon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.15rem;
  color: var(--brand-color);
  background-color: #EEE9FB;
  background-color: color-mix(in srgb, var(--brand-color) 10%, white);
  transition: background-color 0.2s ease, color 0.2s ease;
}
.form-picker__card:hover .form-picker__icon, .form-picker__card:focus-visible .form-picker__icon { background-color: var(--brand-color); color: #FFFFFF; }
.form-picker__name { flex: 1; font-weight: 500; line-height: 1.4; }
.form-picker__arrow { color: var(--brand-color); transition: transform 0.2s ease; }
.form-picker__card:hover .form-picker__arrow { transform: translateX(4px); }

.form-picker__selected { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; max-width: 700px; margin: 0 auto; padding: 1rem 1.25rem; border-radius: 12px; background-color: var(--grey-100); }
.form-picker__selected-name { font-weight: 700; }
.form-picker__change { font-weight: 500; color: var(--brand-color); }

/* Wrapper for each field (label + input) */
.form-field {
  margin-bottom: 1.5rem; /* Add space between fields */
}

.form-field label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

/* Style for all text inputs, textareas, and select dropdowns */
.form-field input[type="text"],
.form-field textarea,
.nesty-input { /* Zendesk's class for dropdowns */
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--grey-200);
  border-radius: 4px;
  font-size: 1rem;
  font-family: var(--font-family);
  background-color: var(--background-color);
  transition: border-color 0.2s ease;
  height: 44px; /* Set a consistent height */
}

/* Specific fix for Zendesk dropdown vertical alignment */
.nesty-input {
  display: flex;
  align-items: center;
  padding-top: 0; /* Adjust padding for flex alignment */
  padding-bottom: 0; /* Adjust padding for flex alignment */
}

.form-field input[type="text"]:focus,
.form-field textarea:focus,
.nesty-input:focus {
  outline: none;
  border-color: var(--brand-color);
  box-shadow: 0 0 0 2px rgba(81, 42, 189, 0.2); /* Use a shade of the brand color */
}

.form-field textarea {
  min-height: 150px;
  resize: vertical;
}

/* Style for the attachment area */
.upload-dropzone {
  border: 2px dashed var(--grey-200);
  border-radius: 4px;
  padding: 2rem;
  text-align: center;
  transition: border-color 0.2s ease;
}

.upload-dropzone:hover {
  border-color: var(--brand-color);
}

/* Style for the submit button */
.request-form input[type="submit"] {
  /* Reuse the button styles we created for the header */
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  background-color: var(--brand-color);
  color: #FFFFFF;
  -webkit-appearance: none; /* Removes default browser styling */
}

.request-form input[type="submit"]:hover {
  background-color: #411d8a; /* A slightly darker brand color */
  border-color: #411d8a;
  color: #FFFFFF;
}
/* -- Sticky Footer Solution v2 -- */
html {
  height: 100%;
}

body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

/* This targets the main container of each page template
   and tells it to grow and fill all available vertical space. */
main, .container {
  flex: 1 0 auto;
}

/* We reset the flex property for containers inside the footer 
   to prevent the footer itself from stretching. */
.footer .container {
  flex: none;
}