/*
Theme Name: Lisleby LSU
Author: Lisleby LSU
Description: Et enkelt, klassisk WordPress-tema med tre spalter for Lisleby LSU: aktivitetskalender til venstre, hovedinnhold i midten og meny til høyre.
Version: 1.0.5
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
Text Domain: lsu-lisleby
*/

:root {
  --bg: #f7f4e8;
  --panel: #fffdf7;
  --panel-soft: #f4efe0;
  --text: #27251f;
  --muted: #5f5847;
  --border: #d8d1bb;
  --accent: #6a5f2e;
  --accent-soft: #ebe3c5;
  --shadow: 0 8px 22px rgba(65, 54, 22, 0.08);
  --content-max: 1440px;
  --left-col: 260px;
  --right-col: 290px;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.7;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

.site {
  min-height: 100vh;
}

.site-header {
  background: linear-gradient(to bottom, #fbf8ef 0%, #f4efdf 100%);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 3px 16px rgba(64, 52, 18, 0.05);
}

.header-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 22px 18px 18px;
  text-align: center;
}

.site-branding {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.custom-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.custom-logo {
  max-height: 110px;
  width: auto;
}

.site-title {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
}

.site-title a {
  color: var(--text);
}

.site-description {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.header-quick-links {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 0.95rem;
}

.page-shell {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 22px 18px 28px;
}

.content-grid {
  display: flex;
  gap: 22px;
  align-items: flex-start;
}

.left-sidebar,
.right-sidebar,
.content-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.left-sidebar,
.right-sidebar {
  padding: 18px;
  position: sticky;
  top: 16px;
}

.left-sidebar {
  width: var(--left-col);
  flex: 0 0 var(--left-col);
}

.content-panel {
  min-width: 0;
  flex: 1 1 auto;
  padding: 28px;
}

.right-sidebar {
  width: var(--right-col);
  flex: 0 0 var(--right-col);
}

.widget-title,
.sidebar-section-title,
.entry-title,
.archive-title,
.page-title {
  margin-top: 0;
  font-size: 1.35rem;
  line-height: 1.25;
  font-weight: 700;
}

.entry-title,
.page-title,
.archive-title {
  margin-bottom: 18px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: #2d291c;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  line-height: 1.3;
}

h1 {
  font-size: 1.85rem;
}

h2 {
  font-size: 1.45rem;
}

h3 {
  font-size: 1.2rem;
}

p,
ul,
ol,
blockquote,
table {
  margin-top: 0;
  margin-bottom: 1rem;
}

ul,
ol {
  padding-left: 1.2rem;
}

.entry-meta,
.activity-meta,
.calendar-date,
.help-text,
.menu-note,
.login-box,
.site-footer {
  color: var(--muted);
  font-size: 0.95rem;
}

.sidebar-card {
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 16px;
}

.sidebar-card:last-child {
  margin-bottom: 0;
}

.lsu-sidebar-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.lsu-sidebar-menu li {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid rgba(106, 95, 46, 0.15);
}

.lsu-sidebar-menu li:last-child {
  border-bottom: 0;
}

.lsu-sidebar-menu a {
  display: block;
  padding: 10px 0;
  color: var(--text);
  font-weight: 600;
}

.lsu-sidebar-menu .current-menu-item > a,
.lsu-sidebar-menu .current_page_item > a {
  color: var(--accent);
}

.calendar-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.calendar-item {
  padding: 10px 0;
  border-bottom: 1px dashed rgba(106, 95, 46, 0.2);
}

.calendar-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.calendar-item a {
  color: var(--text);
  font-weight: 600;
}

.calendar-date {
  display: block;
}

.sidebar-card--calendar {
  overflow-wrap: anywhere;
}

.sidebar-section-title--calendar {
  font-size: 1.1rem;
  line-height: 1.25;
}

.sidebar-section-title--calendar + .calendar-list,
.sidebar-section-title--calendar + p {
  margin-top: 10px;
}

.left-sidebar .calendar-item a {
  font-size: 0.98rem;
}

.left-sidebar .calendar-date {
  font-size: 0.88rem;
}

.button-link,
.wp-block-button__link,
input[type="submit"],
button,
.button,
.read-more-link {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.98rem;
}

.button-link:hover,
.button-link:focus,
.wp-block-button__link:hover,
.wp-block-button__link:focus,
button:hover,
button:focus {
  text-decoration: none;
  opacity: 0.92;
}

.widget {
  margin-bottom: 18px;
}

.widget:last-child {
  margin-bottom: 0;
}

.wp-block-search__button,
.search-submit {
  padding: 8px 12px;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
textarea,
select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fffef9;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border: 1px solid var(--border);
  padding: 10px;
  text-align: left;
}

blockquote {
  margin-left: 0;
  padding: 12px 16px;
  background: var(--panel-soft);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
}

.mobile-menu-toggle {
  display: none;
}

.mobile-menu-panel {
  display: none;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.screen-reader-text:focus {
  clip: auto;
  width: auto;
  height: auto;
  margin: 0;
  padding: 10px 14px;
  background: #fff;
  z-index: 100000;
}

.site-footer {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 18px 24px;
}

.footer-inner {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  text-align: center;
}

.entry-content > *:last-child,
.page-content > *:last-child {
  margin-bottom: 0;
}

.post-list-item {
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.post-list-item:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: 0;
}

.login-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.notice-box {
  background: #fffaf0;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
}

.activity-admin-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}


.inline-note {
  display: inline-block;
  color: var(--muted);
  font-size: 0.92rem;
  align-self: center;
}


.facebook-embed {
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
}

.facebook-embed iframe {
  display: block;
  width: 100% !important;
  max-width: 100%;
}

.protected-page-note {
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel-soft);
}


@media (max-width: 1120px) {
  .content-grid {
    gap: 16px;
  }

  .left-sidebar {
    flex-basis: 235px;
    width: 235px;
  }

  .right-sidebar {
    flex-basis: 255px;
    width: 255px;
  }

  .content-panel {
    padding: 22px;
  }
}

@media (max-width: 920px) {
  .content-grid {
    flex-direction: column;
  }

  .left-sidebar,
  .content-panel,
  .right-sidebar {
    width: 100%;
    flex: 1 1 auto;
    position: static;
  }

  .right-sidebar {
    order: 1;
  }

  .content-panel {
    order: 2;
  }

  .left-sidebar {
    order: 3;
  }

  .desktop-menu-card {
    display: none;
  }

  .mobile-menu-toggle {
    display: inline-block;
    width: 100%;
    margin-bottom: 14px;
  }

  .mobile-menu-panel {
    display: none;
  }

  .mobile-menu-panel.is-open {
    display: block;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 15px;
  }

  .header-inner,
  .page-shell,
  .site-footer {
    padding-left: 14px;
    padding-right: 14px;
  }

  .site-title {
    font-size: 1.55rem;
  }

  .content-panel,
  .left-sidebar,
  .right-sidebar {
    padding: 18px;
    border-radius: 12px;
  }

  h1 {
    font-size: 1.55rem;
  }

  h2,
  .entry-title,
  .page-title,
  .archive-title,
  .widget-title,
  .sidebar-section-title {
    font-size: 1.15rem;
  }

  .sidebar-section-title--calendar {
    font-size: 1rem;
  }
}


.content-grid--wide {
  display: block;
}

.content-grid--wide .content-panel {
  width: 100%;
  max-width: none;
}

.full-width-page .entry-header,
.full-width-page .page-content {
  max-width: none;
}

.full-width-page .page-content table,
.full-width-page .page-content .wp-block-table {
  display: block;
  width: 100%;
  overflow-x: auto;
}

.full-width-page .page-content table {
  min-width: 900px;
}

.full-width-page .page-content td,
.full-width-page .page-content th {
  white-space: nowrap;
}

@media (max-width: 920px) {
  .content-grid--wide .content-panel {
    width: 100%;
  }
}

.logged-in .site-header {
  margin-top: 0;
}
