@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ── Variables ────────────────────────────────────── */

/*

#00247D - resolution blue
#CF142B - lava (red)

#e3e3e3 - platinum (light gray)

#1448C9 - new car (light blue)
#820715 - red devil (dark red)

Based on the red
#00821C - dark green
#15CF3D - light green
#FF334B - pink

Based on the blue
#2D3038 - dark gray
#C98F00 - orange
#7A6021 - brown

*/

:root {
  --navy:        #1a2b4a;
  --navy-mid:    #243660;
  --accent:      #0057d9;
  --accent-light:#e8f0fb;
  --text:        #1a2b4a;
  --text-muted:  #5a6a85;
  --text-light:  #8a9ab8;
  --bg:          #ffffff;
  --bg-alt:      #f7f9fc;
  --border:      #dde4ef;
  --success:     #1a7a45;
  --error:       #c0392b;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}

h1 {
    font-family: 'Work Sans', sans-serif;
    font-weight: 500;
    line-height: 1.2em;
    font-size: 2em;
    letter-spacing: -0.01em;
    color: #1448C9;
    margin: 20px 0px 20px 0px;
    animation: none;
    white-space: normal;
    text-align: center;
}

/* ── Navigation ───────────────────────────────────────────── */

nav {
  background: var(--bg);
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── Hero ─────────────────────────────────────────────────── */

.hero {
  background: #f3f3f3;
  /*padding: clamp(3rem, 7vw, 5rem) clamp(1.5rem, 6vw, 5rem);*/
  padding-top: 1em;
  padding-left: 2em;
  padding-right: 2em;
  padding-bottom: 1em;
  color: #fff;
  box-shadow: 0 3px 7px rgba(0,0,0,0.15);
  border-radius: 3px;
}

.hero-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #00247D;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(1.9rem, 4.5vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  max-width: 800px;
}

.hero p {
  font-size: 0.975rem;
  color: #2D3038;
  line-height: 1.75;
  max-width: 650px;
}

/* ── Main Content ─────────────────────────────────────────── */

main {
  flex: 1;
  padding: clamp(2.5rem, 5vw, 4rem) clamp(1.5rem, 6vw, 5rem);
  max-width: 860px;
}

/* ── No Openings State ────────────────────────────────────── */

.no-openings {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3rem 2rem;
  text-align: center;
}

.no-openings h2 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: .5rem;
}

.no-openings p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.no-openings a {
  color: var(--accent);
  font-weight: 500;
  font-size: 0.9rem;
}

/* ── Job Card ─────────────────────────────────────────────── */

.job-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 1.25rem;
  overflow: hidden;
  transition: box-shadow .2s, border-color .2s;
}

.job-card:hover {
  box-shadow: 0 4px 20px rgba(26, 43, 74, .09);
  border-color: #aabcd8;
}

.job-summary {
  padding: 1.75rem 2rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
}

.job-info {
  flex: 1;
}

.job-type {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .5rem;
}

.job-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.25;
  margin-bottom: .65rem;
}

.job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1.25rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.job-meta span {
  display: flex;
  align-items: center;
  gap: .3rem;
}

.job-excerpt {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-top: .85rem;
}

/* ── Card Actions ─────────────────────────────────────────── */

.card-actions {
  flex-shrink: 0;
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: .5rem;
}

/* ── Apply Button (card) ──────────────────────────────────── */

.apply-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: .6rem 1.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .18s;
  white-space: nowrap;
}

.apply-btn:hover {
    background-color: #00247D;
    transition: 0.3s;
}

/* ── Copy Link Button ─────────────────────────────────────── */

.copy-link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: .45rem 1rem;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: color .18s, border-color .18s;
  white-space: nowrap;
}

.copy-link-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ── Expandable Job Detail ────────────────────────────────── */

.job-detail {
  display: none;
  border-top: 1px solid var(--border);
  padding: 2rem;
  background: var(--bg-alt);
}

.job-detail.open {
  display: block;
}

.detail-section {
  margin-bottom: 1.6rem;
}

.detail-section h3 {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .7rem;
}

.detail-section p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.detail-section ul {
  padding-left: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.detail-section ul li {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.detail-divider {
  height: 1px;
  background: var(--border);
  margin: 1.5rem 0;
}

/* ── Application Form ─────────────────────────────────────── */

.apply-section {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.75rem;
  margin-top: 1.5rem;
}

.apply-section h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: .25rem;
}

.apply-section > p {
  font-size: 0.83rem;
  color: var(--text-muted);
  margin-bottom: 1.4rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  margin-bottom: .85rem;
}

.field label {
  font-size: 0.73rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--navy);
}

.field input,
.field textarea {
  padding: .6rem .85rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  /*font-family: 'Inter', sans-serif;*/
  font-size: 0.875rem;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color .16s, box-shadow .16s;
  width: 100%;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 87, 217, .1);
}

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

/* ── CV Upload Drop Zone ──────────────────────────────────── */

.cv-drop {
  border: 2px dashed var(--border);
  border-radius: 5px;
  padding: 1.4rem;
  text-align: center;
  cursor: pointer;
  background: var(--bg-alt);
  transition: border-color .16s, background .16s;
  position: relative;
}

.cv-drop:hover,
.cv-drop.dragover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.cv-drop input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.cv-drop-icon {
  font-size: 1.4rem;
  margin-bottom: .35rem;
}

.cv-drop p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.cv-drop strong {
  color: var(--accent);
}

.cv-name {
  margin-top: .45rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--success);
  display: none;
}

/* ── Submit Button ────────────────────────────────────────── */

.submit-btn {
  width: 100%;
  padding: .72rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .16s;
  margin-top: .5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
}


.submit-btn:hover {
    background-color: #00247D;
    transition: 0.3s;
}


.submit-btn:disabled {
  background: var(--text-light);
  cursor: not-allowed;
}

.submit-btn .spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
  display: none;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Form Feedback Messages ───────────────────────────────── */

.form-msg {
  margin-top: .85rem;
  padding: .8rem 1rem;
  border-radius: 4px;
  font-size: 0.85rem;
  display: none;
}

.form-msg.success {
  background: #d4edda;
  color: var(--success);
  display: block;
}

.form-msg.error {
  background: #fde8e8;
  color: var(--error);
  display: block;
}

.required-note {
  font-size: 0.72rem;
  color: var(--text-light);
  margin-top: .35rem;
}

/* ── Detail Page ──────────────────────────────────────────── */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 1.75rem;
  transition: color .16s;
}

.back-link:hover {
  color: var(--accent);
}

.detail-header {
  margin-bottom: 1.5rem;
}

.detail-title {
  font-family: 'Work Sans', sans-serif;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: .5rem 0 .75rem;
  text-align: left;
}

/* ── Footer ───────────────────────────────────────────────── */




/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 560px) {
  .job-summary {
    flex-direction: column;
    gap: 1rem;
  }
  .card-actions {
    flex-direction: row;
  }
}

@media (max-width: 520px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}
