/**
 * @file jtarleton.css
 *
 * Crystal Bay — a refined blue-palette color scheme for the Jtarleton theme.
 *
 * COLOR PALETTE
 * ─────────────────────────────────────────────────────
 *  Page background   #eaf0f9  cool blue wash (distinct from cards)
 *  Surface / cards   #ffffff  pure white
 *  Card header       #d8e6f5  medium periwinkle-blue
 *  Card footer       #f2f6fc  near-white blue tint
 *  Sidebar           #ddeaf7  cooler cornflower tint
 *  Alt sections      #e4edf8  soft blue-gray
 *  Code bg           #e5eefa  light blue wash
 *  Body text         #1c2d45  deep navy-charcoal
 *  Headings          #0d1b38  midnight navy
 *  Muted text        #5270a0  steel blue-gray
 *  Primary (links)   #1755d4  vivid blue
 *  Primary hover     #1040b0  deep vivid blue
 *  Visited links     #5830c8  violet-blue
 *  Borders           #c4d4ec  soft blue-gray
 *  Header / footer   #0c1a34  rich midnight navy
 *  Header accent     #1e5ce0  bright blue strip
 *  Header text       #d8e8ff  cool blue-white
 *  Header links      #88bbff  sky blue
 * ─────────────────────────────────────────────────────
 */

/* ============================================================
   PICO CSS v2 CUSTOM PROPERTY OVERRIDES
   Pico loads its CSS variables on :root; overriding here
   cascades into all Pico-managed components automatically.
   ============================================================ */
:root {
  /* Primary accent — buttons, links, interactive highlights */
  --pico-primary:                            #1755d4;
  --pico-primary-background:                 #1755d4;
  --pico-primary-hover:                      #1040b0;
  --pico-primary-focus:                      rgba(23, 85, 212, 0.22);
  --pico-primary-inverse:                    #ffffff;

  /* Secondary / contrast actions */
  --pico-secondary:                          #5270a0;
  --pico-secondary-background:               #5270a0;
  --pico-secondary-hover:                    #3a5280;
  --pico-secondary-inverse:                  #ffffff;
  --pico-contrast:                           #0c1a34;
  --pico-contrast-hover:                     #000c20;
  --pico-contrast-inverse:                   #ffffff;

  /* Page background and body text */
  --pico-background-color:                   #eaf0f9;
  --pico-color:                              #1c2d45;

  /* Muted elements */
  --pico-muted-color:                        #5270a0;
  --pico-muted-border-color:                 #c4d4ec;

  /* Card / article surfaces */
  --pico-card-background-color:              #ffffff;
  --pico-card-sectioning-background-color:   #e4edf8;
  --pico-card-border-color:                  #c4d4ec;

  /* Form elements */
  --pico-form-element-background-color:      #ffffff;
  --pico-form-element-border-color:          #a8c0e0;
  --pico-form-element-color:                 #1c2d45;
  --pico-form-element-focus-color:           #1755d4;
  --pico-form-element-placeholder-color:     #7090b8;
  --pico-form-element-active-background-color: #ffffff;
  --pico-form-element-active-border-color:   #1755d4;
  --pico-form-element-invalid-border-color:  #c0392b;
  --pico-form-element-valid-border-color:    #1a8a4a;

  /* Tables */
  --pico-table-border-color:                 #c4d4ec;
  --pico-table-row-stripped-background-color: #e8f0fa;

  /* Code blocks */
  --pico-code-background-color:              #e5eefa;
  --pico-code-color:                         #1040b0;
  --pico-code-kbd-background-color:          #0c1a34;
  --pico-code-kbd-color:                     #d8e8ff;

  /* Blockquote */
  --pico-blockquote-border-color:            #1755d4;
  --pico-blockquote-footer-color:            #5270a0;

  /* Mark / highlight */
  --pico-mark-background-color:              #cce0ff;
  --pico-mark-color:                         #0c1a34;

  /* Borders */
  --pico-border-color:                       #c4d4ec;
  --pico-border-radius:                      6px;

  /* Typography */
  --pico-font-family:                        "Tahoma", "Segoe UI", system-ui, -apple-system, sans-serif;
  --pico-font-size:                          16px;
  --pico-line-height:                        1.65;

  /* Spacing */
  --pico-spacing:                            1.25rem;

  /* Scrollbar */
  --pico-scrollbar-thumb:                    #a8c0e0;
  --pico-scrollbar-track:                    #eaf0f9;
}

/* ============================================================
   BODY & PAGE LAYOUT
   ============================================================ */
body {
  max-width: 960px;
  margin: 0 auto;
  padding: 0;
  background-color: var(--pico-background-color);
  color: var(--pico-color);
}

/* ============================================================
   HEADINGS — Deep navy for strong visual hierarchy
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  color: #0d1b38;
  line-height: 1.3;
}

h1 {
  color: #0a1628;
  border-bottom: 2px solid #c4d4ec;
  padding-bottom: 0.3em;
  margin-bottom: 0.8em;
}

h2 {
  color: #0d1b38;
}

h3 {
  color: #162848;
}

h4, h5, h6 {
  color: #1a2e58;
}

/* ============================================================
   LINKS — Vivid blue, consistent with brand
   ============================================================ */
a {
  color: #1755d4;
  text-decoration-color: rgba(23, 85, 212, 0.35);
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

a:hover {
  color: #1040b0;
  text-decoration-color: #1040b0;
}

a:visited {
  color: #5830c8;
  text-decoration-color: rgba(88, 48, 200, 0.4);
}

/* ============================================================
   HEADER — Rich midnight navy with bright blue accent
   ============================================================ */
body > header,
[role="banner"],
header.site-header {
  background-color: #0c1a34;
  color: #d8e8ff;
  padding: 0.9rem 1.5rem;
  border-bottom: 3px solid #1e5ce0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

body > header h1,
body > header h2,
body > header h3,
[role="banner"] h1,
[role="banner"] h2 {
  color: #d8e8ff;
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

body > header a,
[role="banner"] a {
  color: #88bbff;
  text-decoration: none;
}

body > header a:hover,
[role="banner"] a:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* Site name / logo link */
.site-name a,
.site-branding a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
}

/* ============================================================
   NAVIGATION — Rich navy with sky-blue links & clear active
   ============================================================ */
nav {
  background-color: #0c1a34;
}

nav a,
nav li > a {
  color: #88bbff;
  text-decoration: none;
  border-radius: 4px;
  padding: 0.4rem 0.75rem;
  transition: background-color 0.15s ease, color 0.15s ease;
}

nav a:hover,
nav li > a:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.12);
}

nav a[aria-current="page"],
nav li.active > a {
  color: #ffffff;
  background-color: #1755d4;
  font-weight: 600;
}

/* Primary navigation menu */
.menu,
.nav-menu {
  background-color: #0c1a34;
  border-bottom: 1px solid rgba(136, 187, 255, 0.2);
}

.menu a,
.nav-menu a {
  color: #88bbff;
}

.menu a:hover,
.nav-menu a:hover {
  color: #ffffff;
}

/* ============================================================
   MAIN CONTENT AREA
   ============================================================ */
main {
  background-color: #ffffff;
  border-radius: 8px;
  padding: 2rem 2.25rem;
  box-shadow: 0 2px 14px rgba(12, 26, 52, 0.09);
  margin: 1.5rem auto;
  border: 1px solid #d8e6f4;
}

/* ============================================================
   ARTICLES & CARDS
   ============================================================ */
article {
  background-color: #ffffff;
  border: 1px solid #c4d4ec;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(12, 26, 52, 0.06);
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}

article:hover {
  box-shadow: 0 6px 20px rgba(23, 85, 212, 0.13);
  transform: translateY(-1px);
}

article > header,
article header {
  background-color: #d8e6f5;
  border-bottom: 1px solid #c4d4ec;
  border-radius: 7px 7px 0 0;
  color: #1c2d45;
}

article > header a,
article header a {
  color: #1755d4;
}

article > footer,
article footer {
  background-color: #f2f6fc;
  border-top: 1px solid #c4d4ec;
  border-radius: 0 0 7px 7px;
  color: #5270a0;
  font-size: 0.875em;
}

/* ============================================================
   SIDEBAR / ASIDE
   ============================================================ */
aside {
  background-color: #ddeaf7;
  border-left: 3px solid #a8c4e8;
  border-radius: 0 6px 6px 0;
  padding: 1rem 1.25rem;
}

aside h2,
aside h3,
aside h4,
aside h5 {
  color: #0d1b38;
  border-bottom: 1px solid #b8ccec;
  padding-bottom: 0.4em;
  margin-bottom: 0.75em;
}

/* ============================================================
   FOOTER — Matching rich midnight navy
   ============================================================ */
body > footer,
footer[role="contentinfo"],
.site-footer {
  background-color: #0c1a34;
  color: #a8c4de;
  padding: 2rem 1.5rem;
  border-top: 3px solid #1e5ce0;
  margin-top: 2.5rem;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.2);
}

body > footer a,
footer[role="contentinfo"] a,
.site-footer a {
  color: #88bbff;
  text-decoration: none;
}

body > footer a:hover,
footer[role="contentinfo"] a:hover,
.site-footer a:hover {
  color: #ffffff;
  text-decoration: underline;
}

body > footer h2,
body > footer h3,
footer[role="contentinfo"] h2,
footer[role="contentinfo"] h3 {
  color: #d8e8ff;
  border-bottom-color: rgba(136, 187, 255, 0.25);
}

/* ============================================================
   BUTTONS
   ============================================================ */
button,
[type="submit"],
[type="button"],
[type="reset"],
[role="button"] {
  background-color: #1755d4;
  border-color: #1755d4;
  color: #ffffff;
  border-radius: 5px;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

button:hover,
[type="submit"]:hover,
[type="button"]:hover,
[role="button"]:hover {
  background-color: #1040b0;
  border-color: #1040b0;
  box-shadow: 0 3px 10px rgba(23, 85, 212, 0.35);
}

button:focus,
[type="submit"]:focus,
[role="button"]:focus {
  outline: 3px solid rgba(23, 85, 212, 0.3);
  outline-offset: 2px;
}

/* Secondary buttons */
button.secondary,
[type="button"].secondary {
  background-color: transparent;
  border-color: #1755d4;
  color: #1755d4;
}

button.secondary:hover,
[type="button"].secondary:hover {
  background-color: #e4edf8;
  border-color: #1040b0;
  color: #1040b0;
}

/* Contrast / dark buttons */
button.contrast,
[type="button"].contrast {
  background-color: #0c1a34;
  border-color: #0c1a34;
  color: #ffffff;
}

button.contrast:hover,
[type="button"].contrast:hover {
  background-color: #060e1e;
  border-color: #060e1e;
}

/* ============================================================
   FORMS
   ============================================================ */
label {
  color: #1c2d45;
  font-weight: 600;
}

input:not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  border-color: #a8c0e0;
  background-color: #ffffff;
  color: #1c2d45;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #1755d4;
  box-shadow: 0 0 0 3px rgba(23, 85, 212, 0.15);
  outline: none;
}

fieldset {
  border-color: #c4d4ec;
  border-radius: 6px;
  background-color: #f6f9fd;
}

legend {
  color: #0d1b38;
  font-weight: 700;
  font-size: 0.95em;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Search input */
[type="search"] {
  border-color: #a8c0e0;
  background-color: #ffffff;
  color: #1c2d45;
}

[type="search"]::placeholder {
  color: #7090b8;
}

/* ============================================================
   TABLES
   ============================================================ */
table {
  border-collapse: collapse;
  width: 100%;
}

table caption {
  color: #1c2d45;
  font-weight: 600;
  font-size: 0.95em;
  margin-bottom: 0.5rem;
  text-align: left;
}

thead {
  background: linear-gradient(135deg, #0c1a34 0%, #1a3060 100%);
  color: #d8e8ff;
}

thead th {
  color: #d8e8ff;
  border-color: #1e5ce0;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.75rem 1rem;
}

tbody td {
  border-color: #c4d4ec;
  color: #1c2d45;
  padding: 0.65rem 1rem;
}

tbody tr:nth-child(even) {
  background-color: #e8f0fa;
}

tbody tr:hover {
  background-color: #dce8f8;
}

tfoot {
  background-color: #eef4fc;
  border-top: 2px solid #c4d4ec;
}

tfoot td {
  color: #5270a0;
  font-size: 0.9em;
}

/* ============================================================
   CODE BLOCKS
   ============================================================ */
code,
var,
samp {
  background-color: #e5eefa;
  color: #1040b0;
  border: 1px solid #c4d4ec;
  border-radius: 4px;
  padding: 0.1em 0.4em;
  font-size: 0.9em;
}

pre {
  background-color: #e5eefa;
  border: 1px solid #c4d4ec;
  border-left: 4px solid #1755d4;
  border-radius: 0 6px 6px 0;
  padding: 1.25rem 1.5rem;
}

pre code {
  background-color: transparent;
  border: none;
  padding: 0;
  font-size: 1em;
}

kbd {
  background-color: #0c1a34;
  color: #d8e8ff;
  border: 1px solid #1a3060;
  border-radius: 4px;
  padding: 0.1em 0.5em;
  font-size: 0.85em;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.35);
}

/* ============================================================
   BLOCKQUOTE
   ============================================================ */
blockquote {
  border-left: 4px solid #1755d4;
  background-color: #e4edf8;
  color: #1c2d45;
  border-radius: 0 6px 6px 0;
  margin-left: 0;
  padding: 1rem 1.25rem;
}

blockquote footer,
blockquote cite {
  color: #5270a0;
  font-style: italic;
}

/* ============================================================
   DETAILS / SUMMARY (accordion-style)
   ============================================================ */
details {
  border: 1px solid #c4d4ec;
  border-radius: 6px;
  background-color: #ffffff;
  overflow: hidden;
}

summary {
  color: #1755d4;
  font-weight: 600;
  background-color: #e4edf8;
  padding: 0.75rem 1rem;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.15s ease;
}

summary:hover {
  background-color: #d8e6f5;
}

summary::marker,
summary::-webkit-details-marker {
  display: none;
}

summary::before {
  content: "▶ ";
  font-size: 0.75em;
  color: #5270a0;
  transition: transform 0.15s ease;
  display: inline-block;
  margin-right: 0.4em;
}

details[open] > summary {
  border-bottom: 1px solid #c4d4ec;
  border-radius: 5px 5px 0 0;
  background-color: #ccddf5;
}

details[open] > summary::before {
  content: "▼ ";
}

/* ============================================================
   HORIZONTAL RULE
   ============================================================ */
hr {
  border: none;
  border-top: 2px solid #c4d4ec;
  margin: 2rem 0;
}

/* ============================================================
   MARK & TEXT SELECTION
   ============================================================ */
mark {
  background-color: #cce0ff;
  color: #0c1a34;
  padding: 0.1em 0.25em;
  border-radius: 3px;
}

::selection {
  background-color: rgba(23, 85, 212, 0.2);
  color: #0c1a34;
}

/* ============================================================
   PROGRESS BAR
   ============================================================ */
progress {
  accent-color: #1755d4;
  border-radius: 4px;
  height: 6px;
}

progress::-webkit-progress-bar {
  background-color: #c4d4ec;
  border-radius: 4px;
}

progress::-webkit-progress-value {
  background-color: #1755d4;
  border-radius: 4px;
}

/* ============================================================
   FIGURES & IMAGES
   ============================================================ */
figure {
  border: 1px solid #c4d4ec;
  border-radius: 6px;
  background-color: #eaf0f9;
  padding: 0.75rem;
}

figcaption {
  color: #5270a0;
  font-size: 0.875em;
  text-align: center;
  margin-top: 0.5rem;
}

img {
  border-radius: 4px;
}

/* ============================================================
   DRUPAL MESSAGES — clear semantic colors, readable on white
   ============================================================ */
.messages--status {
  background-color: #e6f2ff;
  border-left: 4px solid #1755d4;
  color: #0d2a5c;
  border-radius: 0 6px 6px 0;
  padding: 0.85rem 1rem;
}

.messages--warning {
  background-color: #fffbea;
  border-left: 4px solid #d97706;
  color: #442500;
  border-radius: 0 6px 6px 0;
  padding: 0.85rem 1rem;
}

.messages--error {
  background-color: #fff1f1;
  border-left: 4px solid #dc2626;
  color: #6b0000;
  border-radius: 0 6px 6px 0;
  padding: 0.85rem 1rem;
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb,
nav.breadcrumb {
  background-color: transparent;
  color: #5270a0;
  font-size: 0.9em;
  padding: 0.5rem 0;
}

.breadcrumb a,
nav.breadcrumb a {
  color: #1755d4;
}

.breadcrumb a:hover,
nav.breadcrumb a:hover {
  color: #1040b0;
}

.breadcrumb li::after {
  content: " / ";
  color: #7090b8;
  padding: 0 0.3em;
}

/* ============================================================
   PAGER
   ============================================================ */
.pager__item a {
  color: #1755d4;
  border: 1px solid #c4d4ec;
  border-radius: 4px;
  padding: 0.3em 0.75em;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
  background-color: #ffffff;
}

.pager__item a:hover {
  background-color: #e4edf8;
  border-color: #1755d4;
}

.pager__item--current a,
.pager__item.is-active a {
  background-color: #1755d4;
  color: #ffffff;
  border-color: #1755d4;
}

/* ============================================================
   TAXONOMY TAGS
   ============================================================ */
.tags a,
.field--name-field-tags a {
  background-color: #e4edf8;
  color: #1755d4;
  border: 1px solid #c4d4ec;
  border-radius: 20px;
  padding: 0.2em 0.75em;
  font-size: 0.85em;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.tags a:hover,
.field--name-field-tags a:hover {
  background-color: #1755d4;
  color: #ffffff;
  border-color: #1755d4;
}

/* ============================================================
   VIEWS / LISTS
   ============================================================ */
.view-content .views-row {
  border-bottom: 1px solid #c4d4ec;
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
}

.views-row:last-child {
  border-bottom: none;
}

/* ============================================================
   NODE CONTENT
   ============================================================ */
.node__title a {
  color: #0d1b38;
  text-decoration: none;
}

.node__title a:hover {
  color: #1755d4;
  text-decoration: underline;
}

.node__submitted,
.node__meta {
  color: #5270a0;
  font-size: 0.875em;
}

/* ============================================================
   FIELD LABELS
   ============================================================ */
.field__label {
  color: #0d1b38;
  font-weight: 700;
  font-size: 0.875em;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ============================================================
   SKIP LINK (ACCESSIBILITY)
   ============================================================ */
.skip-link,
.visually-hidden.focusable:active,
.visually-hidden.focusable:focus {
  background-color: #1755d4;
  color: #ffffff;
  border-radius: 0 0 4px 4px;
  padding: 0.5rem 1rem;
  text-decoration: none;
  font-weight: 600;
}
