:root {
  /* Layout */
  --max-width-main: 1407px;
  --max-width-secondary: 800px;

  /* Colors */
  --color-primary: #003f5e;
  --color-secondary: #dcb941;
  --color-dark: #003a57;
  --color-light: #ffffff;
  --color-muted: #82a3b4;
  --color-black: #000000;
  --color-hover-link: #003a57;
  --color-hover-bg: #f3f4f6;
  --color-green: #005e48;
  --color-red: #90003A;
  --color-beige: #f4f1ec;

  /* Fonts */
  --font-family-base: 'Lato', sans-serif;
  --font-family-secondary: "Libre Caslon Text", serif;
  --font-family-tiertery: 'Gill Sans, Sans-serif';

  --font-size-h1: 46px;
  --font-size-h2: 36px;
  --font-size-h3: 28px;
  --font-size-h4: 22px;
  --font-size-paragraph: 20px;
  --font-size-paragraph-small: 16px;
  --font-size-link-small: 13px;
  --font-size-button: 12px;

  /* Spacing */
  --padding-footer: 40px;
  --gap-section: 40px;
  --padding-bottom-top: 48px;
  --padding-bottom-bottom: 34px;
  --margin-small: 10px;

  /* Logo & Icon */
  --logo-width: 186px;
  --icon-size: 24px;

  /* Button */
  --button-padding-y: 1rem;
  --button-padding-x: 2rem;
  --button-letter-spacing: 0.24px;
}


/* TYPOGRAPHY ------------------------ */
h1 {
  font-weight: var(--font-size-h1);
  font-family: var(--font-family-secondary);
  margin-bottom: 20px;
  line-height: 125%;
}

h2 {
  font-weight: var(--font-size-h2);
  font-family: var(--font-family-secondary);
  margin-bottom: 20px;
  line-height: 125%;
}

h3 {
  font-weight: var(--font-size-h3);
  font-family: var(--font-family-secondary);
  line-height: 125%;
  margin-bottom: 12px;
}

h4 {
  font-weight: var(--font-size-h4);
  font-family: var(--font-family-secondary);
  line-height: 125%;
  margin-bottom: 12px;
}

h6 {
  font-family: var(--font-family-base);
  font-size: 12px;
  line-height: 120%;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #757575;
  margin-bottom: 12px;
}

.title {
  font-family: var(--font-family-base);
  font-size: var(--font-size-paragraph-small);
  text-transform: uppercase;
}

p {
  font-size: var(--font-size-paragraph);
  font-family: var(--font-family-base);
  line-height: 160%;
  color: var(--color-black);
  margin-top: 0;
  margin-bottom: 40px;
  transition: font-size 0.4s;
}

.toned{
  color: var(--color-primary);
}

.light-text {
  color: var(--color-light);
}

.link {
  color: var(--color-primary);
  font-size: var(--font-size-paragraph-small);
  font-family: var(--font-family-base);
  text-decoration: none;
  text-transform: uppercase;
  margin-bottom: var(--margin-small);
}

.link:hover {
  text-decoration: underline;
  color: var(--color-primary);
}

.light-link{
  color: var(--color-light);
  font-size: var(--font-size-paragraph-small);
  font-family: var(--font-family-base);
  text-decoration: none;
  text-transform: uppercase;
  margin-bottom: var(--margin-small);
}
.light-link:hover {
  text-decoration: underline;
  color: var(--color-light);
}


.form-group{
  margin-top: var(--margin-small);
  margin-bottom: var(--margin-small);
}

/* BODY BACKGROUND EFFECTS ------------------------ */
body::before,
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -2;
}

body::before {
  background: url('https://www.riddarhuset.se/wp-content/uploads/2022/07/bg-1-692x520.webp') center center / cover no-repeat;
  filter: blur(8px);
}

body::after {
  background: rgba(0, 0, 0, 0.5);
  z-index: -1;
}

/* MAIN AREA ------------------------ */
#mainArea {
  max-width: var(--max-width-main);
  padding-bottom: 96px;
}

/* BUTTONS ------------------------ */
.p1-btn {
  font-size: var(--font-size-button);
  font-family: var(--font-family-base);
  letter-spacing: var(--button-letter-spacing);
  background-color: var(--color-primary);
  color: var(--color-light);
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1.4;
  padding: var(--button-padding-y) var(--button-padding-x);
  margin: 0;
  border: none;
}

.p1-btn:hover {
  color: var(--color-light);
  background-color: var(--color-dark);
}

.btn-secondary {
  background-color: var(--color-secondary);
  color: var(--color-black);
}

.p1-btn-green {
  background: var(--color-green);
}

.p1-btn-green:hover,
.p1-btn-green:active {
  background: var(--color-green);
}

.p1-btn-red {
  background: var(--color-red);
}

.p1-btn-red:hover,
.p1-btn-red:active {
  background: var(--color-red);
}

/* NAVBAR ------------------------ */
.nav-container {
  width: 100%;
  background-color: var(--color-light);
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0px;
  max-width: var(--max-width-main);
  margin: 0 auto;
  width: 100%;
  transition: padding 0.5s ease;
}

#topLogo {
  transition: height 0.5s ease;
  width: 233px;
}

.navbar.shrunk .nav-inner {
  padding: 4px 0px;
  /* less padding to make it smaller */
}

.navbar.shrunk #topLogo {
  width: 160px;
  /* your desired logo height on scroll */
}

.nav-items {
  display: none;
  gap: 40px;
}

.nav-items a {
  font-family: var(--font-family-base);
  font-size: var(--font-size-paragraph-small);
  text-decoration: none;
  text-transform: uppercase;
  color: var(--color-black);
  transition: box-shadow 0.3s ease;
}

.nav-items a:hover {
  box-shadow: inset 0px -2px 0px 0px #dcb941;
}

.menu-toggle-checkbox {
  display: none;
}

.menu-toggle-label {
  font-size: 24px;
  color: var(--color-primary);
  cursor: pointer;
  display: block;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  position: absolute;
  padding: 26px 20px;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--color-primary);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.mobile-menu a {
  padding: 6px 0px;
  text-decoration: none;
  color: var(--color-light);
  font-weight: var(--font-size-paragraph);
  text-transform: uppercase;
  transition: box-shadow 0.3s;
}

.mobile-menu a:hover {
  box-shadow: inset 0px -2px 0px 0px #dcb941;
}

.menu-toggle-checkbox:checked~.mobile-menu {
  display: flex;
}

/* HEADER SECTION ------------------------ */
.section_headline {
  color: var(--color-light);
  text-align: center;
  margin-bottom: 88px;
}

#mainArea {
  margin-top: 200px;
}

.header-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-bottom: 24px;
  min-height: 200px;
}

.section__breadcrumbs {
  display: flex;
  justify-content: center;
}

.breadcrumb {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 0.5rem;
}

.breadcrumb-item {
  font-size: var(--font-size-paragraph);
  font-weight: 800;
}

.fa-castle {
  text-decoration: none;
  color: var(--color-secondary);
}

.breadcrumb-item.active {
  color: var(--color-light);
}

.breadcrumb-item+.breadcrumb-item::before {
  content: "›";
  padding-right: 0.5rem;
  color: var(--color-light);
}

/* MAIN CONTAINER ------------------------ */
.main-container {
  background-color: var(--color-light);
  padding: 96px 118px;
}

/* ARTICLES ------------------------ */
/* The card now takes full width inside its column */
.event-card {
  background: var(--color-light, #f9f9f9);
  border: none;
  height: 100%;
  /* makes cards equal height in row */
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.3s ease;
  cursor: pointer;
}

.event-card-image {
  position: relative;
  width: 100%;
  padding-bottom: 75%;
  /* 4:3 ratio = 3/4 = 75% */
  overflow: hidden;
}

.event-card-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.event-card:hover .event-card-image img {
  transform: scale(1.1);
}

.event-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  border-top: 8px solid #d9e2e7;
}

.event-card-body h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.event-card-body .ingress {
  flex: 1;
  font-weight: 600;
  font-size: 12px;
  line-height: 14px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #757575;
}

.event-card-body .meta,
.modal-body .meta {
  font-size: 0.85rem;
  color: #888;
}

/* Read more button aligned at bottom */
.event-card-body .p1-btn {
  margin-top: auto;
}

/* Evenemang delatagare */
.beigeBg {
   background-color: var(--color-beige);
} 

.greenBg {
   background-color: var(--color-green);
   color: var(--color-light);
   padding: 10px 20px;
} 

.redBg {
   background-color: var(--color-red);
   color: var(--color-light);
   padding: 6px 20px;
   font-size: var(--font-size-paragraph-small);
} 

/* MODAL ------------------------ */

.modal-content {
  border: none;
  border-radius: 0px;
}

.modal-body {
  padding: 24px 24px;
}

.accordion-button:not(.collapsed){
    color: var(--color-black);
    background-color: var(--color-beige);
}
.accordion-button:focus {
    z-index: 3;
    border-color: var(--color-black);
    outline: 0;
    box-shadow: var(--color-black);
}

.accordion-button:not(.collapsed)::after {
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23212529'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}


/* FOOTER ------------------------ */
.footer {
  background-color: var(--color-primary);
  color: var(--color-light);
  padding-left: 0px !important;
  padding-right: 0px !important;
}

.footer .footer-top {
  padding-top: 88px;
  padding-bottom: 64px;
}

.footer .logo img {
  width: var(--logo-width);
  height: auto;
}

.footer .contact-info {
  display: flex;
  gap: var(--gap-section);
}

.footer .title {
  font-family: var(--font-family-base);
  font-size: var(--font-size-paragraph-small);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.footer a,
.footer p {
  color: var(--color-light);
  font-size: var(--font-size-paragraph-small);
  text-decoration: none;
  margin-bottom: 12px;
}

.footer .social-media {
  display: flex;
  /* ensures items are in a row horizontally */
  gap: 16px;
  /* optional: controls spacing between icons */
}

.footer .social-media a {
  display: flex;
  /* make the <a> a flex container */
  align-items: center;
  /* center the icon vertically */
  justify-content: center;
  /* center the icon horizontally */
  width: 48px;
  height: 48px;
  color: var(--color-dark);
  margin-right: 0;
  /* remove old margin-right */
  background-color: var(--color-light);
  border-radius: 100%;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
  /* just in case */
}

.footer .fa-phone,
.footer .fa-envelope {
  color: var(--color-secondary);
  margin-right: 8px;
}

.footer-section {
  padding: 10px 0;
}

#footer-map a i {
  display: inline-block;
  transition: transform 0.2s ease;
  margin-left: 12px;
  color: var(--color-secondary);
}

#footer-map a:hover i {
  transform: translateX(6px);
}



/* FOOTER BOTTOM PART ------------------------ */


.footer-bottom {
  background-color: var(--color-dark);
}

.footer .bottom-content {
  padding: var(--padding-bottom-top) 0 var(--padding-bottom-bottom);
  text-align: left;
  color: var(--color-muted);
}

.footer .bottom-content a {
  font-size: var(--font-size-link-small);
  color: var(--color-muted);
  text-decoration: none;
  margin: 0 10px;
}

.go-to-top {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 64px;
  height: 64px;
  background: var(--color-secondary);
  color: var(col);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  z-index: 20;
  cursor: pointer;
  border-radius: 50%;
  transform: translateY(20px);
  border: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s, background 0.2s;
}

/* when visible */
.go-to-top--visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

/* mobile adjustments */
@media (max-width: 768px) {
  .go-to-top {
    bottom: 20px;
    right: 20px;
    /* also on right side for mobile */
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
}



/* RESPONSIVE ------------------------ */

@media (max-width: 991.98px) {

  /* For iPads and below */
  .footer-section {
    text-align: center;
  }
}

@media (min-width: 799px) {
  .nav-items {
    display: flex;
  }

  .menu-toggle-label,
  .mobile-menu {
    display: none !important;
  }

  .nav-inner {
    padding: 16px 20px;
  }

  .navbar.shrunk .nav-inner {
    padding: 4px 20px;
  }
}

@media (max-width: 799px) {

  .nav-inner {
    padding: 16px 20px;
  }

  #topLogo {
    transition: height 0.5s ease;
    width: 160px;
  }

  .navbar.shrunk .nav-inner {
    padding: 4px 20px;
  }

  .navbar.shrunk #topLogo {
    width: 160px;
  }

  .footer .top-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer .logo {
    margin-bottom: 24px;
  }

  .footer .contact-info {
    flex-direction: row;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
  }

  .footer .bottom-content {
    text-align: center;
    padding: 20px;
  }

  .footer .bottom-content a {
    display: inline-block;
    margin: 8px 5px;
  }

  .main-container {
    padding: 60px 60px;
  }

}

@media (max-width: 599px) {
  .footer .contact-info {
    flex-direction: column;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
  }

  .main-container {
    padding: 20px 20px;
  }

  h1 {
    font-weight: var(--font-size-h3);
    font-family: var(--font-family-secondary);
    margin-bottom: 12px;
    line-height: 125%;
  }

  h2 {
    font-weight: var(--font-size-h3);
    font-family: var(--font-family-secondary);
    margin-bottom: 12px;
    line-height: 125%;
  }

  h3 {
    font-weight: var(--font-size-h4);
    font-family: var(--font-family-secondary);
    line-height: 125%;
    margin-bottom: 12px;
  }

  .title {
    font-family: var(--font-family-base);
    font-size: var(--font-size-paragraph-small);
    text-transform: uppercase;
  }

  p {
    font-size: var(--font-size-paragraph-small);
    font-family: var(--font-family-base);
    line-height: 160%;
    color: var(--color-black);
    margin-top: 0;
    margin-bottom: 40px;
    transition: font-size 0.4s;
  }


}