/* ============================================================
   F341 Absalon — Modern CSS
   Migrated from FrontPage Sky theme to clean CSS Grid/Flexbox
   ============================================================ */

/* --- Reset & Base ------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Colors inspired by the original Sky theme */
  --color-bg: #f4f5f7;
  --color-surface: #ffffff;
  --color-primary: #282a55;
  --color-primary-light: #3d4080;
  --color-accent: #0563c1;
  --color-text: #2c2c2c;
  --color-text-muted: #666;
  --color-border: #bec0cf;
  --color-nav-bg: #282a55;
  --color-nav-text: #cfcfd7;
  --color-nav-hover: #ffffff;
  --font-main: 'Segoe UI', Verdana, Arial, Helvetica, sans-serif;
  --max-width: 1200px;
  --nav-width: 220px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

/* --- Site Header ------------------------------------------- */
.site-header {
  background: var(--color-primary);
  color: #fff;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-header__title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.site-header__subtitle {
  font-size: 1rem;
  font-weight: 400;
  opacity: 0.85;
}

/* --- Layout: Sidebar + Main -------------------------------- */
.page-layout {
  display: grid;
  grid-template-columns: var(--nav-width) 1fr;
  max-width: var(--max-width);
  margin: 0 auto;
  gap: 0;
  min-height: calc(100vh - 160px);
}

/* --- Sidebar Navigation ------------------------------------ */
.sidebar-nav {
  background: var(--color-nav-bg);
  padding: 1.5rem 0;
  position: sticky;
  top: 0;
  height: fit-content;
  max-height: 100vh;
}

.sidebar-nav__list {
  list-style: none;
}

.sidebar-nav__link {
  display: block;
  padding: 0.6rem 1.25rem;
  color: var(--color-nav-text);
  font-size: 0.9rem;
  transition: background 0.15s, color 0.15s;
  border-left: 3px solid transparent;
}

.sidebar-nav__link:hover,
.sidebar-nav__link--active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-nav-hover);
  border-left-color: var(--color-accent);
  text-decoration: none;
}

/* --- Main Content Area ------------------------------------- */
.main-content {
  background: var(--color-surface);
  padding: 2rem 2.5rem;
}

.main-content h1 {
  font-size: 1.75rem;
  color: var(--color-primary);
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--color-border);
  padding-bottom: 0.5rem;
}

.main-content h2 {
  font-size: 1.35rem;
  color: var(--color-primary);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.main-content h3 {
  font-size: 1.1rem;
  color: var(--color-primary-light);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.main-content p {
  margin-bottom: 1rem;
}

.main-content ul,
.main-content ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.main-content li {
  margin-bottom: 0.3rem;
}

/* --- Content Sections / Cards ------------------------------ */
.content-section {
  margin-bottom: 2.5rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card__media {
  display: block;
}

.card__media img,
.card__media video {
  width: 100%;
  border-radius: 0;
}

.card__body {
  padding: 1rem;
}

.card__body p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* --- Image with caption ------------------------------------ */
.figure {
  margin-bottom: 1.5rem;
}

.figure img {
  border-radius: 4px;
}

.figure figcaption {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 0.4rem;
}

/* --- Data tables (specs, sonar info) ----------------------- */
.info-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
}

.info-table th,
.info-table td {
  border: 1px solid var(--color-border);
  padding: 0.6rem 0.8rem;
  text-align: left;
  vertical-align: top;
}

.info-table th {
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
}

.info-table tr:nth-child(even) {
  background: var(--color-bg);
}

/* --- Photo Gallery Grid ------------------------------------ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.gallery-item {
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  transition: transform 0.2s, box-shadow 0.2s;
}

.gallery-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.gallery-item img {
  width: 100%;
  border-radius: 0;
}

.gallery-item__caption {
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  background: var(--color-surface);
}

/* --- Footer ------------------------------------------------ */
.site-footer {
  background: var(--color-primary);
  color: var(--color-nav-text);
  text-align: center;
  padding: 1rem 2rem;
  font-size: 0.85rem;
}

.site-footer a {
  color: var(--color-nav-text);
  margin: 0 0.5rem;
}

.site-footer a:hover {
  color: #fff;
}

/* --- Video link overlay ------------------------------------ */
.video-link {
  position: relative;
  display: block;
}

.video-link::after {
  content: '▶';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2.5rem;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.4);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: background 0.2s;
}

.video-link:hover::after {
  background: rgba(0, 0, 0, 0.6);
}

/* --- Responsive -------------------------------------------- */
@media (max-width: 768px) {
  .page-layout {
    grid-template-columns: 1fr;
  }

  .sidebar-nav {
    position: static;
    display: flex;
    overflow-x: auto;
    padding: 0;
    background: var(--color-nav-bg);
  }

  .sidebar-nav__list {
    display: flex;
    white-space: nowrap;
  }

  .sidebar-nav__link {
    border-left: none;
    border-bottom: 3px solid transparent;
    padding: 0.75rem 1rem;
  }

  .sidebar-nav__link:hover,
  .sidebar-nav__link--active {
    border-left-color: transparent;
    border-bottom-color: var(--color-accent);
  }

  .main-content {
    padding: 1.5rem 1rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .site-header {
    flex-direction: column;
    text-align: center;
  }
}
