/* =============================================
   Sailstar – Course Information Stylesheet
   css/style.css
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Source+Sans+3:wght@300;400;600&display=swap');

:root {
  --navy:      #1a2f4b;
  --navy-dark: #0f1e30;
  --gold:      #b8943f;
  --gold-light:#d4a94e;
  --white:     #ffffff;
  --off-white: #f5f3ef;
  --light-grey:#e8e5e0;
  --mid-grey:  #7a7570;
  --text:      #2c2c2c;
  --radius:    6px;
  --shadow:    0 2px 12px rgba(26,47,75,0.10);
  --transition:0.22s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Source Sans 3', Georgia, sans-serif;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--off-white);
}
img { max-width: 100%; height: auto; display: block; }
a   { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-light); text-decoration: underline; }

/* ── Bilingual toggle: Swedish default ── */
.lang-en { display: none; }
.lang-sv { display: block; }
span.lang-sv { display: inline; }
span.lang-en { display: none; }

body.en .lang-sv { display: none !important; }
body.en span.lang-sv { display: none !important; }
body.en .lang-en { display: block; }
body.en span.lang-en { display: inline; }

.lang-toggle {
  display: flex;
  align-items: center;
  border: 2px solid var(--gold);
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}
.lang-toggle button {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.65);
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.32rem 0.8rem;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.lang-toggle button.active {
  background: var(--gold);
  color: var(--navy-dark);
}
.lang-toggle button:hover:not(.active) {
  background: rgba(184,148,63,0.25);
  color: var(--white);
}

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--navy); line-height: 1.2;
}
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 600; margin-bottom: 0.5rem; }
h3 { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.4rem; }
h4 { font-size: 1rem; font-weight: 600; color: var(--gold);
     text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.3rem; }
p  { margin-bottom: 0.9rem; }
ul, ol { padding-left: 1.4rem; margin-bottom: 0.9rem; }
li { margin-bottom: 0.3rem; }

/* ── Header ── */
.site-header { background: var(--navy-dark); color: var(--white); border-bottom: 3px solid var(--gold); }
.header-inner {
  max-width: 1100px; margin: 0 auto; padding: 1.6rem 2rem;
  display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
}
.site-header .logo {
  font-family: 'Playfair Display', serif; font-size: 2rem; font-weight: 700;
  letter-spacing: 0.05em; color: var(--white); flex-shrink: 0;
}
.site-header .logo span { color: var(--gold); }
.header-text { flex: 1; min-width: 180px; }
.header-subtitle { font-size: 0.88rem; color: rgba(255,255,255,0.5); font-weight: 300; letter-spacing: 0.04em; }
.header-title { color: rgba(255,255,255,0.88); font-size: 1.1rem; margin-top: 0.25rem;
                font-family: 'Source Sans 3', sans-serif; font-weight: 300; }

/* ── Nav ── */
.course-nav { background: var(--navy); position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 8px rgba(0,0,0,0.25); }
.course-nav ul { list-style: none; padding: 0; display: flex; max-width: 1100px; margin: 0 auto; overflow-x: auto; }
.course-nav li a {
  display: block; padding: 0.9rem 1.15rem;
  color: rgba(255,255,255,0.7); font-size: 0.86rem; font-weight: 600;
  letter-spacing: 0.03em; white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: color var(--transition), border-color var(--transition);
  text-decoration: none;
}
.course-nav li a:hover, .course-nav li a.active {
  color: var(--white); border-bottom-color: var(--gold); text-decoration: none;
}

/* ── Layout ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }
main { padding: 3rem 0 4rem; }
.section { margin-bottom: 4rem; }
.section-title {
  display: flex; align-items: center; gap: 0.9rem;
  margin-bottom: 1.5rem; padding-bottom: 0.7rem; border-bottom: 2px solid var(--gold);
}
.section-title .icon { font-size: 1.5rem; }

/* ── Cards ── */
.card { background: var(--white); border-radius: var(--radius); padding: 1.6rem 2rem; box-shadow: var(--shadow); margin-bottom: 1.5rem; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }

/* ── Course cards ── */
.course-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; border-top: 4px solid var(--navy); }
.course-card.jolle { border-top-color: #2a6496; }
.course-card.liten { border-top-color: #1a7a4a; }
.course-card.stor  { border-top-color: var(--gold); }
.course-card-header { padding: 1.4rem 1.6rem 1rem; background: var(--off-white); border-bottom: 1px solid var(--light-grey); }
.course-card-body   { padding: 1.4rem 1.6rem; }

.badge { display: inline-block; padding: 0.15rem 0.6rem; border-radius: 20px; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 0.5rem; }
.badge-blue  { background: #d0e8f5; color: #1a4a6b; }
.badge-green { background: #d0f0e0; color: #145a30; }
.badge-gold  { background: #f5e8c8; color: #7a5a10; }

.equipment-list { list-style: none; padding: 0; margin: 0 0 1.2rem; }
.equipment-list li { padding: 0.42rem 0; border-bottom: 1px solid var(--light-grey); display: flex; align-items: flex-start; gap: 0.55rem; font-size: 0.95rem; margin: 0; }
.equipment-list li:last-child { border-bottom: none; }
.equipment-list .check { color: var(--gold); flex-shrink: 0; }
.equipment-list .note  { font-size: 0.82rem; color: var(--mid-grey); display: block; }

.provided-tag { font-size: 0.73rem; background: #eaf5ea; color: #2a6b2a; padding: 0.1rem 0.45rem; border-radius: 3px; margin-left: 0.3rem; font-weight: 600; white-space: nowrap; }
.cost-tag     { font-size: 0.73rem; background: #fdf5e0; color: #7a5a10; padding: 0.1rem 0.45rem; border-radius: 3px; margin-left: 0.3rem; font-weight: 600; white-space: nowrap; }

/* ── Info boxes ── */
.info-box { display: flex; gap: 1rem; background: #eef4fb; border-left: 4px solid var(--navy); border-radius: 0 var(--radius) var(--radius) 0; padding: 1rem 1.4rem; margin-bottom: 1.2rem; }
.info-box.warning { background: #fdf6e8; border-left-color: var(--gold); }
.info-box.alert   { background: #fdf0f0; border-left-color: #c0392b; }
.info-box .info-icon { font-size: 1.4rem; flex-shrink: 0; }

/* ── Map ── */
.map-figure { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-top: 1rem; max-width: 600px; }
.map-figure img { width: 100%; }
.map-figure figcaption { padding: 0.7rem 1.2rem; font-size: 0.87rem; color: var(--mid-grey); border-top: 1px solid var(--light-grey); text-align: center; }

/* ── Contact ── */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0.8rem; }
.contact-item { background: var(--white); border-radius: var(--radius); padding: 0.85rem 1.1rem; box-shadow: var(--shadow); border-left: 3px solid var(--gold); }
.contact-item .name  { font-weight: 600; font-size: 0.93rem; color: var(--navy); }
.contact-item .phone { font-size: 0.9rem; color: var(--mid-grey); }

/* ── Certificate table ── */
.cert-table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.cert-table th { background: var(--navy); color: var(--white); padding: 0.7rem 1rem; text-align: left; font-family: 'Source Sans 3', sans-serif; font-weight: 600; }
.cert-table td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--light-grey); vertical-align: top; }
.cert-table tr:last-child td { border-bottom: none; }
.cert-table tr:nth-child(even) td { background: var(--off-white); }

/* ── Schedule tabs ── */
.schedule-tabs { display: flex; border-bottom: 2px solid var(--light-grey); margin-bottom: 1.5rem; overflow-x: auto; gap: 0; }
.schedule-tab-btn {
  background: none; border: none; border-bottom: 3px solid transparent;
  margin-bottom: -2px; padding: 0.7rem 1.3rem;
  font-family: 'Source Sans 3', sans-serif; font-size: 0.9rem; font-weight: 600;
  color: var(--mid-grey); cursor: pointer; white-space: nowrap;
  transition: color var(--transition), border-color var(--transition);
}
.schedule-tab-btn:hover { color: var(--navy); }
.schedule-tab-btn.active { color: var(--navy); border-bottom-color: var(--gold); }
.schedule-panel { display: none; }
.schedule-panel.active { display: block; }

.day-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.day-card { background: var(--white); border-radius: var(--radius); padding: 1.1rem 1.3rem; box-shadow: var(--shadow); border-top: 3px solid var(--navy); }
.day-card h4 { color: var(--navy); font-size: 0.95rem; text-transform: none; letter-spacing: 0; margin-bottom: 0.5rem; }
.day-card p  { font-size: 0.9rem; margin-bottom: 0.45rem; }
.day-card p:last-child { margin-bottom: 0; }
.day-card .time { font-weight: 700; color: var(--navy); }

[id] { scroll-margin-top: 60px; }

/* ── Footer ── */
.site-footer { background: var(--navy-dark); color: rgba(255,255,255,0.6); padding: 2rem; text-align: center; font-size: 0.88rem; border-top: 3px solid var(--gold); }
.site-footer a { color: var(--gold-light); }

/* ── Responsive ── */
@media (max-width: 680px) {
  .header-inner { gap: 0.8rem; }
  .container { padding: 0 1rem; }
  main { padding: 2rem 0 3rem; }
  .card { padding: 1.1rem 1.2rem; }
  .course-card-header, .course-card-body { padding: 1.1rem 1.2rem; }
}
