/* ================================================================
   Flygjakt – Huvudstil
   Mobil-first, semantisk, tillgänglig, snabb.
   ================================================================ */

/* ── Reset & Custom Properties ──────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand:        #1A5FB4;
  --brand-dark:   #103E80;
  --brand-light:  #EBF1FB;
  --brand-mid:    #3584E4;
  --cta:          #E66B2E;
  --cta-dark:     #C4531B;
  --surface:      #FFFFFF;
  --bg:           #F4F8FD;
  --text:         #1A1A2E;
  --text-muted:   #667085;
  --border:       #D0D5DD;
  --success:      #027A48;
  --success-bg:   #ECFDF3;
  --warn:         #B54708;
  --warn-bg:      #FFFAEB;
  --error:        #B42318;
  --error-bg:     #FEF3F2;
  --radius-sm:    6px;
  --radius:       12px;
  --radius-lg:    20px;
  --shadow-sm:    0 1px 4px rgba(0,0,0,0.06);
  --shadow:       0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg:    0 8px 32px rgba(0,0,0,0.12);
  --max-width:    1100px;
  --transition:   0.18s ease;
}

/* ── Base ────────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; display: block; }
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }

/* Skip-link accessibility */
.skip-link {
  position: absolute; top: -100%; left: 1rem;
  background: var(--brand); color: #fff;
  padding: .5rem 1rem; border-radius: var(--radius-sm);
  font-weight: 600; text-decoration: none; z-index: 9999;
}
.skip-link:focus { top: 1rem; }

/* ── Navigation ─────────────────────────────────────────────── */
.site-nav {
  background: var(--brand);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: .75rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.nav-logo {
  display: flex; align-items: center; gap: .5rem;
  text-decoration: none; color: #fff;
  font-size: 1.3rem; font-weight: 800; letter-spacing: -.5px;
  flex-shrink: 0;
}
.nav-logo svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 2; }
.nav-logo-text .nav-logo-tag {
  font-size: .55rem; font-weight: 400; opacity: .75;
  display: block; letter-spacing: .5px; text-transform: uppercase; line-height: 1;
}
.nav-links {
  display: flex; align-items: center; gap: 1.5rem;
  list-style: none;
}
.nav-links a {
  color: rgba(255,255,255,.88); text-decoration: none;
  font-size: .875rem; font-weight: 500;
  transition: color var(--transition);
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: #fff; }
.nav-cta-link {
  background: var(--cta) !important; color: #fff !important;
  padding: .4rem 1rem; border-radius: var(--radius-sm);
  font-weight: 700 !important;
}
.nav-cta-link:hover { background: var(--cta-dark) !important; }

/* Mobile hamburger */
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  color: #fff; padding: .25rem;
}
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 700px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--brand-dark); flex-direction: column; align-items: flex-start;
    padding: 1rem 1.25rem; gap: 1rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 1rem; }
}

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(145deg, #103E80 0%, #1A5FB4 55%, #2E7FCC 100%);
  padding: 3rem 1.25rem 2rem;
  position: relative; overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid; grid-template-columns: 1fr; gap: 2rem;
  position: relative; z-index: 1;
}
@media (min-width: 900px) {
  .hero-inner { grid-template-columns: 1fr 1.4fr; align-items: start; }
  .hero { padding: 4rem 1.25rem 3rem; }
}

.hero-text { color: #fff; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: .4rem;
  background: rgba(255,255,255,.15); color: rgba(255,255,255,.9);
  font-size: .8rem; font-weight: 600; letter-spacing: .5px; text-transform: uppercase;
  padding: .3rem .75rem; border-radius: 999px; margin-bottom: 1rem;
}
.hero-eyebrow svg { width: 14px; height: 14px; }
.hero-title {
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 800; line-height: 1.15; margin-bottom: .75rem;
  letter-spacing: -.5px;
}
.hero-subtitle {
  font-size: 1.05rem; opacity: .88; line-height: 1.6; max-width: 440px;
  margin-bottom: 1.5rem;
}
.hero-badges { display: flex; flex-wrap: wrap; gap: .5rem; }
.hero-badge {
  display: inline-flex; align-items: center; gap: .3rem;
  background: rgba(255,255,255,.15); color: rgba(255,255,255,.9);
  font-size: .78rem; padding: .25rem .65rem; border-radius: 999px;
}
.hero-badge svg { width: 12px; height: 12px; }

/* ── Search Card ─────────────────────────────────────────────── */
.search-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 1.75rem;
}
.search-card-title {
  font-size: 1.1rem; font-weight: 700; color: var(--text);
  margin-bottom: 1.25rem; display: flex; align-items: center; gap: .5rem;
}
.search-card-title svg { color: var(--brand); width: 20px; height: 20px; }

/* ── Form ────────────────────────────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .875rem;
}
.form-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-full { grid-column: 1 / -1; }

@media (max-width: 560px) {
  .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 700px) and (min-width: 561px) {
  .form-grid-3 { grid-template-columns: 1fr 1fr; }
}

.form-group { display: flex; flex-direction: column; gap: .3rem; }

.form-label {
  font-size: .825rem; font-weight: 600; color: var(--text);
  display: flex; align-items: center; gap: .3rem;
}
.form-label abbr { text-decoration: none; color: var(--brand); }

.form-control {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .6rem .8rem;
  font-size: .95rem;
  background: var(--surface); color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
  -webkit-appearance: none; appearance: none;
}
.form-control:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(26,95,180,.18);
}
.form-control:invalid:not(:placeholder-shown) { border-color: var(--error); }
.form-control::placeholder { color: var(--text-muted); }

select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23667085' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .75rem center;
  padding-right: 2.25rem;
}

.form-hint { font-size: .73rem; color: var(--text-muted); margin-top: .15rem; }

/* Checkbox groups */
.checkbox-row { display: flex; flex-wrap: wrap; gap: 1rem; }
.checkbox-label {
  display: flex; align-items: center; gap: .45rem;
  font-size: .875rem; cursor: pointer; user-select: none;
}
.checkbox-label input[type="checkbox"] {
  width: 1rem; height: 1rem;
  accent-color: var(--brand); flex-shrink: 0;
}

/* Children ages */
.children-ages-section {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: .875rem;
  grid-column: 1 / -1;
}
.children-ages-label { font-size: .825rem; font-weight: 600; margin-bottom: .5rem; }
.age-inputs-row { display: flex; flex-wrap: wrap; gap: .625rem; }
.age-input-item {
  display: flex; flex-direction: column; gap: .2rem; width: 72px;
}
.age-input-item span { font-size: .72rem; color: var(--text-muted); }
.age-input-item input {
  width: 100%;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: .45rem .5rem; font-size: .9rem;
  text-align: center; background: var(--surface); color: var(--text);
  transition: border-color var(--transition);
}
.age-input-item input:focus { outline: none; border-color: var(--brand); }

/* Submit */
.form-submit-row { margin-top: .5rem; }
.btn-search {
  width: 100%; background: var(--cta); color: #fff; border: none;
  border-radius: var(--radius-sm); padding: .875rem 2rem;
  font-size: 1.05rem; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  transition: background var(--transition), transform .1s;
}
.btn-search:hover { background: var(--cta-dark); }
.btn-search:active { transform: scale(.98); }
.btn-search:disabled { background: #9ca3af; cursor: not-allowed; transform: none; }
.btn-search svg { width: 18px; height: 18px; }

.spinner {
  display: inline-block; width: 16px; height: 16px;
  border: 2.5px solid rgba(255,255,255,.35);
  border-top-color: #fff; border-radius: 50%;
  animation: spin .65s linear infinite; flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

.form-error-msg {
  margin-top: .75rem; padding: .65rem .875rem;
  background: var(--error-bg); border: 1px solid #FECDCA;
  border-radius: var(--radius-sm); color: var(--error);
  font-size: .875rem;
}

/* ── Main content wrapper ─────────────────────────────────────── */
main { flex: 1; }
.container {
  max-width: var(--max-width);
  margin: 0 auto; padding: 0 1.25rem;
}

/* ── Results ─────────────────────────────────────────────────── */
.results-section {
  padding: 2rem 1.25rem;
  max-width: var(--max-width); margin: 0 auto;
}
.results-header { margin-bottom: 1rem; }
.results-title { font-size: 1.25rem; font-weight: 700; margin-bottom: .25rem; }
.results-subtitle {
  font-size: .875rem; color: var(--text-muted);
}
.results-info {
  background: var(--brand-light); border: 1px solid #BFDBFE;
  border-radius: var(--radius-sm); padding: .65rem 1rem;
  font-size: .85rem; color: var(--brand); margin-bottom: 1.25rem;
  display: flex; align-items: center; gap: .5rem;
}
.results-info svg { width: 16px; height: 16px; flex-shrink: 0; }

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.result-card {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 1.1rem 1.2rem;
  display: flex; flex-direction: column; gap: .6rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), border-color var(--transition), transform .1s;
}
.result-card:hover {
  border-color: var(--brand); box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.result-card.is-exact { border-left: 3px solid var(--brand); }
.result-card.is-cheapest { border-left: 3px solid var(--success); }

.card-origin { font-weight: 700; font-size: .875rem; color: var(--text); }
.card-route {
  font-size: 1.05rem; font-weight: 700; color: var(--brand);
  display: flex; align-items: center; gap: .3rem;
}
.card-route svg { width: 14px; color: var(--text-muted); }
.card-price { font-size: 1.2rem; font-weight: 800; color: var(--success); }

.card-badges { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .1rem; }
.badge {
  display: inline-block;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 4px; padding: .15rem .5rem;
  font-size: .72rem; color: var(--text-muted); white-space: nowrap;
}
.badge-brand { background: var(--brand-light); color: var(--brand); border-color: #BFDBFE; }
.badge-success { background: var(--success-bg); color: var(--success); border-color: #A6F4C5; }
.badge-warn { background: var(--warn-bg); color: var(--warn); border-color: #FEDF89; }

.card-cta {
  display: block; margin-top: auto; padding-top: .5rem;
  text-align: center;
  padding: .65rem 1rem; background: var(--brand); color: #fff;
  border-radius: var(--radius-sm); text-decoration: none;
  font-size: .875rem; font-weight: 700;
  transition: background var(--transition);
}
.card-cta:hover { background: var(--brand-dark); color: #fff; }

/* Warnings */
.warnings-list {
  margin-top: 1rem; display: flex; flex-direction: column; gap: .5rem;
}
.warning-item {
  background: var(--warn-bg); border: 1px solid #FEDF89;
  border-radius: var(--radius-sm); padding: .6rem .875rem;
  font-size: .85rem; color: var(--warn);
  display: flex; align-items: flex-start; gap: .4rem;
}
.warning-item svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: .15rem; }

/* Error card */
.error-section {
  max-width: var(--max-width); margin: 0 auto; padding: 2rem 1.25rem;
}
.error-card {
  background: var(--error-bg); border: 1px solid #FECDCA;
  border-radius: var(--radius); padding: 2rem; text-align: center;
}
.error-card h2 { color: var(--error); margin-bottom: .75rem; }
.error-card p { color: var(--text-muted); margin-bottom: 1.25rem; }

/* ── Content Sections ────────────────────────────────────────── */
.section { padding: 4rem 1.25rem; }
.section-alt { background: var(--surface); }
.section-inner { max-width: var(--max-width); margin: 0 auto; }

.section-label {
  font-size: .8rem; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--brand); margin-bottom: .5rem;
}
.section-title {
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 800; color: var(--text); line-height: 1.2; margin-bottom: .75rem;
  letter-spacing: -.3px;
}
.section-lead { font-size: 1.05rem; color: var(--text-muted); max-width: 560px; }

/* How it works */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 2rem; margin-top: 3rem;
}
.step-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: .75rem;
}
.step-number {
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 800; flex-shrink: 0;
}
.step-title { font-size: 1.05rem; font-weight: 700; }
.step-desc { font-size: .9rem; color: var(--text-muted); line-height: 1.6; }

/* Benefits */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem; margin-top: 2.5rem;
}
.benefit-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.benefit-icon {
  width: 2.75rem; height: 2.75rem;
  background: var(--brand-light); border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: .875rem;
  color: var(--brand);
}
.benefit-icon svg { width: 20px; height: 20px; }
.benefit-title { font-size: 1rem; font-weight: 700; margin-bottom: .375rem; }
.benefit-desc { font-size: .875rem; color: var(--text-muted); line-height: 1.6; }

/* Trust */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem; margin-top: 2.5rem;
}
.trust-item { display: flex; flex-direction: column; gap: .4rem; }
.trust-item-title { font-size: .95rem; font-weight: 700; }
.trust-item-desc { font-size: .85rem; color: var(--text-muted); line-height: 1.6; }

/* ── Static pages content ────────────────────────────────────── */
.page-header {
  background: linear-gradient(135deg, #103E80 0%, #1A5FB4 100%);
  padding: 3rem 1.25rem;
  color: #fff;
}
.page-header-inner { max-width: var(--max-width); margin: 0 auto; }
.page-header h1 {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 800; margin-bottom: .5rem;
}
.page-header p { font-size: 1rem; opacity: .85; max-width: 560px; }

.page-content {
  max-width: 760px; margin: 0 auto; padding: 3rem 1.25rem;
}
.page-content h2 {
  font-size: 1.3rem; font-weight: 700; margin: 2rem 0 .75rem;
  color: var(--text);
}
.page-content h2:first-child { margin-top: 0; }
.page-content p { margin-bottom: 1rem; color: var(--text); line-height: 1.7; }
.page-content ul, .page-content ol {
  padding-left: 1.5rem; margin-bottom: 1rem; display: flex; flex-direction: column; gap: .4rem;
}
.page-content li { line-height: 1.6; color: var(--text); }
.page-content a { color: var(--brand); }

/* Contact form */
.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2rem;
  align-items: start;
}
@media (max-width: 700px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-info { display: flex; flex-direction: column; gap: 1.25rem; }
.contact-info-item { display: flex; gap: .75rem; align-items: flex-start; }
.contact-info-icon {
  width: 2rem; height: 2rem; background: var(--brand-light); border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  color: var(--brand);
}
.contact-info-icon svg { width: 16px; height: 16px; }
.contact-info-text { font-size: .9rem; }
.contact-info-label { font-weight: 700; font-size: .8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .3px; }
.contact-info-value { color: var(--text); }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .65rem 1.5rem; border-radius: var(--radius-sm);
  font-size: .9rem; font-weight: 700; cursor: pointer;
  text-decoration: none; border: 2px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn-outline:hover { background: var(--brand-light); }

/* ── Footer ──────────────────────────────────────────────────── */
.site-footer {
  background: #1A1A2E; color: rgba(255,255,255,.75);
  padding: 3rem 1.25rem 1.5rem;
  margin-top: auto;
}
.footer-inner {
  max-width: var(--max-width); margin: 0 auto;
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2rem; margin-bottom: 2.5rem;
}
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-inner { grid-template-columns: 1fr; } }

.footer-brand .footer-logo {
  font-size: 1.2rem; font-weight: 800; color: #fff;
  display: flex; align-items: center; gap: .4rem; margin-bottom: .75rem;
}
.footer-brand p { font-size: .85rem; line-height: 1.6; max-width: 260px; }
.footer-col-title {
  font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  color: rgba(255,255,255,.5); margin-bottom: .875rem;
}
.footer-links { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.footer-links a {
  color: rgba(255,255,255,.7); text-decoration: none; font-size: .875rem;
  transition: color var(--transition);
}
.footer-links a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1); padding-top: 1.25rem;
  max-width: var(--max-width); margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .75rem;
  font-size: .8rem; color: rgba(255,255,255,.5);
}
.footer-bottom a { color: rgba(255,255,255,.5); }
.footer-bottom a:hover { color: rgba(255,255,255,.8); }

/* ── Utilities ───────────────────────────────────────────────── */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }

/* 404 page */
.not-found-section {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 60vh; padding: 3rem 1.25rem; text-align: center;
}
.not-found-code {
  font-size: 6rem; font-weight: 900; color: var(--border); line-height: 1; margin-bottom: 1rem;
}
.not-found-title { font-size: 1.5rem; font-weight: 700; margin-bottom: .75rem; }
.not-found-desc { color: var(--text-muted); margin-bottom: 2rem; max-width: 400px; }
