/* ── Variables ─────────────────────────────────────────────── */
:root {
  --bg-dark:    #1a1714;
  --bg-header:  #1f1c18;
  --text-light: #d4cfc8;
  --text-dim:   #8a847c;
  --blue:       #4a90d9;
  --blue-light: #6baee8;
  --border:     #333028;
  --white:      #f0ede8;

  /* ───────────────────────────────────────────────────────────────
     FONT SETTINGS - Change ONE line to update fonts site-wide!
     ────────────────────────────────────────────────────────────── */

  --main-font:  'Lucida Grande', 'Lucida Sans Unicode', sans-serif;

  /* Try these alternatives (uncomment ONE, comment out others):

     Clean & Modern (Sans-serif):
     --main-font:  'Trebuchet MS', 'Lucida Grande', 'Lucida Sans Unicode', sans-serif;  ← Current! (clean, friendly, great readability)
     --main-font:  -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;  (system default, very clean)
     --main-font:  'Verdana', Geneva, Tahoma, sans-serif;  (highly readable, web-optimized)
     --main-font:  'Helvetica Neue', Helvetica, Arial, sans-serif;  (classic clean)
     --main-font:  'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;  (elegant humanist)
     --main-font:  'Lucida Sans', 'Lucida Grande', 'Lucida Sans Unicode', sans-serif;  (warm, friendly)

     Classic (Serif - more traditional):
     --main-font:  'Palatino Linotype', 'Book Antiqua', Palatino, serif;  (elegant, less ornate than Georgia)
     --main-font:  Georgia, serif;  (elegant but ornamental)
     --main-font:  'Garamond', 'Baskerville', 'Hoefler Text', serif;  (refined, academic)
  */

  --code-font:  'Courier New', monospace; /* For code/HTML editing only */
}

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

body {
  font-family: var(--main-font);
  background: #e8e8e8 url('/images/subtle_dots.png');
  color: #333;
  min-height: 100vh;
}

/* ── Override Radzen Fonts ─────────────────────────────────────── */
/* Force Radzen components to use our main font */
.rz-button,
.rz-dropdown,
.rz-textbox,
.rz-numeric,
.rz-datepicker,
.rz-checkbox,
.rz-radiobutton,
.rz-listbox,
.rz-grid,
.rz-panel,
.rz-card,
.rz-dialog,
.rz-tabview,
.rz-fieldset,
.rz-menu,
.rz-menuitem,
.rz-paginator,
.rz-chkbox-label,
.rz-dropdown-label,
.rz-dropdown-item,
.rz-button-text,
.rz-grid-table,
.rz-datatable,
.rz-datatable-scrollable-body,
.rz-cell,
.rz-form,
.rz-form-field,
.rz-htmleditor,
.rz-stack,
.rz-text,
input.rz-textbox,
textarea.rz-textbox,
.rz-state-default,
.rz-helper-hidden-accessible {
  font-family: var(--main-font) !important;
}

/* Radzen dialogs and overlays */
.rz-dialog-content,
.rz-dialog-title,
.rz-notification-summary,
.rz-notification-detail,
.rz-tooltip-text {
  font-family: var(--main-font) !important;
}

/* ── HEADER ────────────────────────────────────────────────── */
#header {
  background: #2b2622 url('/images/dark_wood.png');
  border-bottom: 3px solid #000;
  box-shadow: 0 4px 20px rgba(0,0,0,.7);
  position: relative;
  padding-top: 0;
}

.header-image-fixed {
  position: absolute;
  top: 30px;
  left: 20px;
  width: 150px;
  height: 180px;
  object-fit: cover;
  border: 4px solid #1a1714;
  box-shadow: 
    0 0 0 1px rgba(255,255,255,0.1),
    0 6px 20px rgba(0,0,0,.8);
  z-index: 10;
}

.ad { 
  text-align: right; 
  padding: 6px 16px 0;
  background: rgba(0,0,0,0.2);
}
.ad a { 
  color: #6a6460; 
  font-size: 10px; 
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.ad a:hover { color: var(--blue-light); }

.headBox {
  padding: 20px 20px 16px;
  text-align: right;
}

#brand { 
  font-size: 56px; 
  font-weight: 900; 
  letter-spacing: 4px; 
  margin-bottom: 4px;
  text-align: right;
  line-height: 1;
}
#brand a { color: var(--white); text-decoration: none; }
.brand-blue { color: var(--blue); }

.header-subtitle {
  color: var(--text-dim);
  font-style: italic;
  font-size: 15px;
  text-align: right;
  margin-bottom: 12px;
}

/* ── Top navigation ────────────────────────────────────────── */
.top_nav {
  width: 100%;
  background: rgba(0,0,0,0.4) url('/images/classy_fabric.png');
  border-top: 1px solid rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(0,0,0,0.5);
}

.top_nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  list-style: none;
  justify-content: flex-end;
  margin: 0;
  padding: 10px 20px;
}
.top_nav a {
  color: #c8c4be;
  text-decoration: none;
  font-size: 12px;
  padding: 6px 22px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  border-right: 1px solid rgba(255,255,255,0.1);
  transition: all .3s ease;
  font-weight: 400;
  display: block;
}
.top_nav li:last-child a { border-right: none; }
.top_nav a:hover, .top_nav a.active { 
  color: var(--blue-light);
  background: rgba(255,255,255,0.03);
}
.nav-flag img { 
  width: 18px; 
  vertical-align: middle;
  opacity: 0.85;
  transition: opacity .3s;
}
.nav-flag:hover img {
  opacity: 1;
}

/* ── MAIN WRAPPER ──────────────────────────────────────────── */
#wrapper {
  max-width: 1400px;
  margin: 24px auto;
  padding: 20px;
  display: flex;
  gap: 24px;
  align-items: flex-start;
  justify-content: center;
}

img{
    margin:0 10px 10px 0;
}

#news {
  width: 190px;
  flex-shrink: 0;
  background: #ffffff;
  padding: 14px 14px;
  font-size: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.3);
  border: 1px solid #ddd;
  order: 1; /* News on the left */
}

#mainContent {
  max-width: 1100px;
  width: 100%;
  background: #ffffff;
  padding: 24px 28px;
  min-height: 400px;
  box-shadow: 0 2px 10px rgba(0,0,0,.3);
  border: 1px solid #ddd;
  order: 2; /* Main content on the right */
}

/* ── NEWS SIDEBAR ──────────────────────────────────────────── */
.news-heading { font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.news-date { font-weight: 700; }
#news a { color: #333; text-decoration: none; }
#news a:hover { color: var(--blue); }
#news p { margin-bottom: 2px; }
.news-all { text-align: left; margin-top: 12px; }

/* ── CONTENT ───────────────────────────────────────────────── */
.mainPage h2 { font-size: 20px; margin-bottom: 16px; border-bottom: 1px solid #ddd; padding-bottom: 8px; }
.mainScreen { line-height: 1.7; font-size: 14px; }
.mainScreen img.floatLeft { float: left; margin: 0 20px 12px 0; max-width: 200px; }
.mainScreen p { margin-bottom: 12px; }

/* ── Books ─────────────────────────────────────────────────── */
.book-list { display: flex; flex-direction: column; gap: 24px; }
.book-item { display: flex; gap: 20px; align-items: flex-start; padding-bottom: 20px; border-bottom: 1px solid #eee; }
.book-cover { width: 100px; flex-shrink: 0; box-shadow: 2px 2px 8px rgba(0,0,0,.2); }
.book-info h3 { font-size: 16px; margin-bottom: 4px; }
.book-subtitle { color: #666; font-style: italic; }
.book-year { color: #888; font-size: 12px; }

/* ── Gallery ───────────────────────────────────────────────── */
.gallery-tabs { margin-bottom: 16px; display: flex; gap: 8px; }
.gallery-tabs button { padding: 6px 18px; border: 1px solid #ccc; background: #f0f0f0; cursor: pointer; font-family: inherit; }
.gallery-tabs button.active { background: var(--bg-dark); color: var(--white); border-color: var(--bg-dark); }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.gallery-item img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.gallery-caption { font-size: 11px; color: #666; text-align: center; margin-top: 4px; }

/* ── News ──────────────────────────────────────────────────── */
.news-entry { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid #eee; }
.news-date-detail { color: #888; font-size: 13px; margin-bottom: 8px; }

/* ── ADMIN LOGIN ───────────────────────────────────────────── */
.admin-login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
}
.admin-login-box {
  background: #1e1b17;
  border: 1px solid #333;
  padding: 40px 48px;
  width: 380px;
  box-shadow: 0 8px 40px rgba(0,0,0,.6);
}
.admin-login-box h1 { color: var(--white); font-size: 22px; font-weight: 900; margin-bottom: 4px; }
.admin-login-sub { color: var(--text-dim); font-size: 13px; margin-bottom: 24px; }
.admin-login-hint { color: var(--text-dim); font-size: 13px; margin-bottom: 16px; }

/* ── ADMIN SHELL ───────────────────────────────────────────── */
.admin-shell { display: flex; min-height: 100vh; }

.admin-sidebar {
  width: 220px;
  background: #161310;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #2a2520;
}
.admin-logo {
  padding: 20px 16px 16px;
  border-bottom: 1px solid #2a2520;
  color: var(--white);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 1px;
}
.admin-logo small { display: block; color: var(--text-dim); font-weight: 400; font-size: 11px; margin-top: 2px; }
.admin-logo .blue { color: var(--blue); }

.admin-nav { display: flex; flex-direction: column; padding: 12px 0; flex: 1; }
.admin-nav a {
  color: var(--text-dim);
  text-decoration: none;
  padding: 9px 16px;
  font-size: 13px;
  transition: background .15s, color .15s;
  border-left: 3px solid transparent;
}
.admin-nav a:hover, .admin-nav a.active {
  background: #231f1a;
  color: var(--white);
  border-left-color: var(--blue);
}
.admin-nav hr { border: none; border-top: 1px solid #2a2520; margin: 8px 0; }
.logout-link { color: #b55 !important; margin-top: auto; }
.logout-link:hover { color: #e66 !important; }

.admin-main {
  flex: 1;
  background: #f5f3f0;
  padding: 32px 40px;
  overflow-y: auto;
}

/* ── Admin components ──────────────────────────────────────── */
.admin-page-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #1a1714;
  border-bottom: 2px solid #ddd;
  padding-bottom: 10px;
}
.admin-form-card {
  background: #fff;
  border: 1px solid #ddd;
  padding: 24px;
  margin: 20px 0;
  border-radius: 4px;
  max-width: 700px;
}
.admin-form-card h3 { font-size: 16px; margin-bottom: 16px; color: #333; }
.admin-form-card label { display: block; font-size: 13px; color: #555; margin: 12px 0 4px; }
.admin-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ccc;
  font-size: 14px;
  font-family: inherit;
  background: #fafafa;
  outline: none;
  transition: border-color .2s;
}
.admin-input:focus { border-color: var(--blue); background: #fff; }
.admin-textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ccc;
  font-size: 13px;
  font-family: var(--code-font);
  background: #fafafa;
  resize: vertical;
}
.admin-otp { font-size: 22px; letter-spacing: 4px; text-align: center; }
.admin-remember { font-size: 13px; color: #555; display: flex; align-items: center; gap: 6px; margin: 12px 0; }
.admin-form-actions { display: flex; gap: 12px; margin-top: 20px; }

.admin-btn {
  background: var(--blue);
  color: #fff;
  border: none;
  padding: 9px 22px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: background .2s;
}
.admin-btn:hover { background: var(--blue-light); }
.admin-btn-ghost {
  background: transparent;
  color: #555;
  border: 1px solid #ccc;
  padding: 9px 22px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}
.admin-btn-sm {
  background: var(--blue);
  color: #fff;
  border: none;
  padding: 5px 14px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  margin-bottom: 12px;
}
.admin-btn-danger-sm {
  background: #c0392b;
  color: #fff;
  border: none;
  padding: 5px 14px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
}

.admin-table { width: 100%; border-collapse: collapse; background: #fff; margin-top: 8px; font-size: 13px; }
.admin-table th { background: #1a1714; color: var(--white); padding: 9px 12px; text-align: left; font-weight: 600; }
.admin-table td { padding: 8px 12px; border-bottom: 1px solid #eee; vertical-align: middle; }
.admin-table tr:hover td { background: #f8f6f2; }
.admin-table td:last-child { display: flex; gap: 6px; align-items: center; }

.admin-error   { background: #fde; border: 1px solid #c00; color: #900; padding: 10px 14px; margin: 10px 0; font-size: 13px; }
.admin-success { color: #2a7a2a; font-size: 13px; margin-top: 8px; font-weight: 600; }
.admin-hint    { color: #666; font-size: 13px; margin-top: 20px; }

.admin-dashboard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; margin-bottom: 24px; }
.admin-card {
  background: #fff;
  border: 1px solid #ddd;
  padding: 20px 16px;
  text-align: center;
  text-decoration: none;
  color: #333;
  font-size: 13px;
  transition: box-shadow .2s, border-color .2s;
  display: block;
  line-height: 1.8;
}
.admin-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.12); border-color: var(--blue); }
.admin-card span { color: #888; font-size: 11px; }

/* Gallery admin */
.gallery-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-top: 20px; }
.gallery-admin-item { background: #fff; border: 1px solid #ddd; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.gallery-admin-item img { width: 100%; aspect-ratio: 1; object-fit: cover; }

/* 2FA */
.tfa-qr-wrapper { margin: 16px 0; }
.tfa-secret-hint { font-size: 12px; color: #666; margin-bottom: 12px; }
.tfa-secret-hint code { background: #eee; padding: 2px 6px; letter-spacing: 2px; }

/* ── File Upload Styling ───────────────────────────────────── */
.rz-fileupload-choose,
input[type="file"] {
  display: block;
  width: 100%;
  padding: 10px 14px;
  font-size: 13px;
  color: #333;
  background: #fff;
  border: 2px dashed #ccc;
  border-radius: 4px;
  cursor: pointer;
  transition: all .3s ease;
}

.rz-fileupload-choose:hover,
input[type="file"]:hover {
  border-color: var(--blue);
  background: #f8f9fa;
}

.rz-fileupload-choose::file-selector-button,
input[type="file"]::file-selector-button {
  padding: 8px 16px;
  margin-right: 12px;
  background: var(--blue);
  color: white;
  border: none;
  border-radius: 3px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background .2s;
}

.rz-fileupload-choose::file-selector-button:hover,
input[type="file"]::file-selector-button:hover {
  background: var(--blue-light);
}

/* ── Checkbox Styling ──────────────────────────────────────── */
/* Hide default checkbox */
.rz-chkbox input[type="checkbox"],
input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

/* Custom checkbox container */
.rz-chkbox,
label:has(input[type="checkbox"]) {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  font-size: 14px;
}

/* Create custom checkbox */
.rz-chkbox .rz-chkbox-box,
input[type="checkbox"] + span,
input[type="checkbox"]::before {
  position: relative;
  display: inline-block;
  width: 20px;
  height: 20px;
  background: #fff;
  border: 2px solid #ccc;
  border-radius: 3px;
  transition: all .2s ease;
  flex-shrink: 0;
}

/* Checkbox hover state */
.rz-chkbox:hover .rz-chkbox-box,
input[type="checkbox"]:hover::before {
  border-color: var(--blue);
}

/* Checkbox checked state */
.rz-chkbox input[type="checkbox"]:checked + .rz-chkbox-box,
input[type="checkbox"]:checked::before {
  background: var(--blue);
  border-color: var(--blue);
}

/* Checkbox checkmark */
.rz-chkbox input[type="checkbox"]:checked + .rz-chkbox-box::after,
input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 14px;
  font-weight: bold;
}

/* Radzen specific checkbox styling */
.rz-chkbox .rz-chkbox-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  background: #fff;
  border: 2px solid #ccc;
  border-radius: 3px;
  transition: all .2s ease;
}

.rz-chkbox:hover .rz-chkbox-box {
  border-color: var(--blue);
}

.rz-chkbox .rz-chkbox-box.rz-state-active {
  background: var(--blue);
  border-color: var(--blue);
}

.rz-chkbox .rz-chkbox-icon {
  color: white;
  font-size: 12px;
}

/* ── Responsive ────────────────────────────────────────────── */
/* Tablet and smaller */
@media (max-width: 900px) {
  /* Hide header image on smaller screens */
  .header-image-fixed {
    display: none;
  }

  /* Move news to bottom instead of hiding */
  #wrapper {
    flex-direction: column;
    padding: 20px 10px;
  }

  #news {
    width: 100%;
    order: 2;
    margin-top: 20px;
  }

  /* Make main content full width and appear first */
  #mainContent {
    max-width: 100%;
    width: 100%;
    order: 1;
  }
}

/* Mobile specific */
@media (max-width: 600px) {
  /* Split brand name - ANDERS on one line, HAMMARLUND on next */
  #brand {
    font-size: 32px;
    letter-spacing: 2px;
    line-height: 1.1;
  }

  /* Force line break after ANDERS */
  .brand-blue::before {
    content: '\A';
    white-space: pre;
  }

  .headBox {
    padding: 15px 10px 12px;
  }

  .header-subtitle {
    font-size: 13px;
    padding-right: 10px;
  }

  /* Adjust navigation for mobile */
  .top_nav ul {
    justify-content: center;
    flex-wrap: wrap;
    padding: 8px 10px;
  }

  .top_nav a {
    font-size: 10px;
    padding: 5px 12px;
    letter-spacing: 0.8px;
  }

  .nav-flag img {
    width: 16px;
  }

  /* Ensure wrapper and content are visible on mobile */
  #wrapper {
    display: flex !important;
    flex-direction: column;
    padding: 10px;
    margin: 10px auto;
  }

  #mainContent {
    display: block !important;
    padding: 16px;
    min-height: auto;
  }

  #news {
    display: block !important;
    width: 100%;
  }

  /* Admin panel responsive */
  .admin-shell {
    flex-direction: column;
  }

  .admin-sidebar {
    width: 100%;
  }
}

.blue { color: var(--blue); }

/* ── Gallery (Masonry Layout) ──────────────────────────────── */
.columns {
  width: 910px;
  -moz-column-count: 6;
  -moz-column-gap: 2px;
  -moz-column-width: 15%;
  -webkit-column-count: 6;
  -webkit-column-gap: 2px;
  -webkit-column-width: 15%;
  column-count: 6;
  column-gap: 2px;
  column-width: 15%;
  margin: 0 0 0 60px;
}

.photos {
  margin: 0;
  display: inline-block;
  -webkit-column-break-inside: avoid;
  -moz-column-break-inside: avoid;
  column-break-inside: avoid;
  -webkit-transition: all .2s ease;
  -moz-transition: all .2s ease;
  -o-transition: all .2s ease;
  transition: all .2s ease;
  background: #000;
  overflow: hidden; /* Prevent any overflow */
  line-height: 0; /* Remove line-height spacing */
}

.photos img {
  width: 100%; /* Make image fill container width */
  height: auto; /* Maintain aspect ratio */
  display: block; /* Remove inline spacing */
  border: 1px solid black;
}

.photos img:hover {
  -webkit-filter: brightness(100%);
  z-index: 22;
}

/* Music/audio gallery items */
.roll {
  background: url('/images/play.PNG') center center no-repeat;
  position: relative;
  top: 0;
  display: block;
  z-index: 999;
  line-height: 0;
}

.roll img {
  width: 100%;
  height: auto;
  display: block;
}

/* Gallery category header */
#over {
  margin: 20px 0 10px 60px;
}

#over h6 {
  font-size: 12px;
  font-weight: 800;
  color: #000;
}

/* Responsive gallery columns */
@media (min-width: 0px) and (max-width: 950px) {
  .columns {
    width: 500px;
    -moz-column-count: 3;
    -webkit-column-count: 3;
    column-count: 3;
  }
}

@media (min-width: 950px) and (max-width: 1150px) {
  .columns {
    width: 700px;
    -moz-column-count: 4;
    -webkit-column-count: 4;
    column-count: 4;
  }
}

@media (min-width: 1150px) and (max-width: 2920px) {
  .columns {
    -webkit-column-count: 5;
    -moz-column-count: 5;
    column-count: 5;
  }
}
