/* ==========================================================================
   Custom styles for the cgn_bootstrap5 theme
   ========================================================================== */


/* ==========================================================================
   Fonts
   ========================================================================== */

/* Regular */
@font-face {
  font-family: 'ApproachKoeln';
  src: url('/themes/contrib/cgn_bootstrap5/font/ApKo20-Rg/wf/ApKo20-Rg.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Regular Italic */
@font-face {
  font-family: 'ApproachKoeln';
  src: url('/themes/contrib/cgn_bootstrap5/font/ApKo20-RgIt/wf/ApKo20-RgIt.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* SemiBold */
@font-face {
  font-family: 'ApproachKoeln';
  src: url('/themes/contrib/cgn_bootstrap5/font/ApKo20-SmBd/wf/ApKo20-SmBd.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* SemiBold Italic */
@font-face {
  font-family: 'ApproachKoeln';
  src: url('/themes/contrib/cgn_bootstrap5/font/ApKo20-SmBdIt/wf/ApKo20-SmBdIt.woff2') format('woff2');
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}

/* Bold */
@font-face {
  font-family: 'ApproachKoeln';
  src: url('/themes/contrib/cgn_bootstrap5/font/ApKo20-Bd/wf/ApKo20-Bd.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Bold Italic */
@font-face {
  font-family: 'ApproachKoeln';
  src: url('/themes/contrib/cgn_bootstrap5/font/ApKo20-BdIt/wf/ApKo20-BdIt.woff2') format('woff2');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* ==========================================================================
   Global typography
   ========================================================================== */

body {
  font-family: 'ApproachKoelnRegular', Arial, sans-serif !important;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
}


/* ==========================================================================
   Header & Scrolling
   ========================================================================== */

html {
  scroll-padding-top: 60px; /* height of sticky header */
}

@media (min-width: 992px) {
  html {
    scroll-padding-top: 80px;
  }
}

#body header a {
  border-bottom: 0;
}

#body header #headeroben {
  max-width: 100%;
  height: 60px;
  margin: 0;
  padding: 10px 0;
  transition: box-shadow .3s ease, background-color .3s ease, min-height .3s ease, transform .3s ease;
}

@media (min-width: 992px) {
  #body header #headeroben {
    height: 100px;
    padding: 25px 0;
    margin: 0;
  }
}

#body.floatingheader #headeroben {
  box-shadow: 0 0 1rem #0003;
}

/* Sticky header fixes */
header.sticky-top {
  background: #fff;
}

@media print {
  header.sticky-top {
    position: relative;
  }
  #body.floatingheader #headeroben {
    box-shadow: none;
  }
}

.scrolled-down {
  top: -100px;
  transition: all .5s ease-in-out;
}

.scrolled-up {
  top: 0;
  transition: all 0.3s ease-in-out;
}


/* ==========================================================================
   Logo
   ========================================================================== */

#logo, #logo-menu {
  height: 35px;
  padding-top: 5px;
}

@media (min-width: 320px) {
  #logo, #logo-menu {
    height: 40px;
    padding-top: 0;
  }
}

@media (min-width: 992px) {
  #logo, #logo-menu {
    height: 50px;
  }
}

@media (max-width: 768px) {
  body.searchform-opened #logo,
  body.searchform-opened #logo-menu {
    display: none;
  }
}

/* IE11 Hack */
@media all and (-ms-high-contrast: none) {
  #logo, #logo-menu {
    width: 231px;
    height: 50px;
  }
}


/* ==========================================================================
   Navbar
   ========================================================================== */

#body header .navbar {
  padding: 0;
}

#body header .navbar-brand {
  padding: 0;
  margin: 0;
}

header nav.container .container-fluid {
  padding: 0;
}

.nav-wrapper {
  margin-top: 0;
}

@media (min-width: 992px) {
  .nav-wrapper {
    margin-top: 4px;
  }
}


/* ==========================================================================
   Footer
   ========================================================================== */

footer {
  background-color: rgba(250, 247, 245, 1) !important;
  color: rgba(100, 100, 100, 1) !important;
}

/* ==========================================================================
   Main Menu Icon
   ========================================================================== */

.main-menu-icon {
  font-size: 1.375rem;
  text-decoration: none;
  color: rgb(45, 45, 45);
  height: 38px;
  width: 38px;
}

.main-menu-icon img {
  width: 38px;
  height: 38px;
}

.eyeable-icon {
  display: none;
  margin-right: 22px;
}

.eyeable-icon img {
  height: 32px;
}


/* ==========================================================================
   Translation
   ========================================================================== */

.cnw_langauge_select_header small {
  color: var(--muted);
}

.cnw_translationbox {
  display: none;
}


/* ==========================================================================
   Search
   ========================================================================== */

.searchform {
  width: 380px;
  max-width: 380px;
  overflow: hidden;
}

.searchform.opened {
  position: relative;
  max-width: calc(100vw - 74px);
  border-bottom: 2px solid var(--red);
}

.innersearch {
  width: calc(100vw - 5rem);
}

@media (min-width: 576px) {
  .innersearch {
    width: 300px;
  }
}

.searchform input {
  border: 0;
  outline: none !important;
  font-size: 1.25rem;
  width: calc(100% - 3rem);
  line-height: 3rem;
}

.searchform input::placeholder {
  color: #AFAAA5;
}

.searchform button {
  -webkit-appearance: none;
  -moz-appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  float: right;
}

@media (min-width: 576px) {
  .searchform.opened button {
    margin-top: 0.5rem;
  }
}

.search-submit-icon {
  height: 27px;
  width: 33px;
  padding-top: 5px;
}

.opened #search-icon {
  display: none;
}

fron.searchform.collapsed div,
form.searchform.collapsed div {
  display: none;
}

nav.navbar[aria-label="Stadt Köln Navigation"] .searchform.collapsed {
  width: 100px;
  max-width: 100px;
  overflow: hidden;
  display: flex;
  align-items: center;
}


/* ==========================================================================
   Menu Toggle
   ========================================================================== */

.navbar-toggler span {
  display: block;
  background-color: #4f4f4f;
  height: 3px;
  width: 25px;
  margin: 5px 0;
  position: relative;
  opacity: 1;
  transition: all 0.35s ease-out;
  transform-origin: center left;
}

.navbar-toggler span:nth-child(1) {
  margin-top: 0.3em;
}

.navbar-toggler:not(.collapsed) span:nth-child(1) {
  transform: translate(15%, -33%) rotate(45deg);
}

.navbar-toggler:not(.collapsed) span:nth-child(2) {
  opacity: 0;
}

.navbar-toggler:not(.collapsed) span:nth-child(3) {
  transform: translate(15%, 33%) rotate(-45deg);
}


/* ==========================================================================
   Breadcrumb
   ========================================================================== */

#block-cgn-bootstrap5-page-title {
  margin: auto;
  text-align: center;
}

#block-cgn-bootstrap5-page-title h1 {
  text-align: left;
}

.breadcrumb {
  padding: 0.5rem 1rem;
  list-style: none;
}

.breadcrumb-item {
  display: inline;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: '>' !important;
  padding: 0 0.5rem !important;
  color: #6c757d !important;
}

.breadcrumb-item a {
  color: #343a40;
  text-decoration: none;
}

.breadcrumb-item a:hover {
  color: black;
  cursor: pointer;
  text-decoration: none;
}


/* ==========================================================================
   Edit Mode (Hide elements)
   ========================================================================== */

body.EDIT nav.breadcrumb,
body.EDIT nav.breadcrumb-wrapper,
body.EDIT .eilstart,
body.EDIT #headeroben .navbar .container .nav-wrapper {
  display: none !important;
}

body.EDIT .sticky-top {
  position: relative;
  z-index: 1;
}

body.EDIT .sharebox,
body.EDIT footer,
body.EDIT .sticky-top,
body.EDIT #headeroben,
body.EDIT #headeroben .navbar .container,
body.EDIT #headeroben .navbar .container a {
  display: none !important;
}

body.EDIT #headeroben {
  height: 80px;
}


/* ==========================================================================
   Views Exposed Form
   ========================================================================== */

.views-exposed-form {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}

.views-exposed-form .form-item {
  flex: 1 1 auto;
  margin-top: 0 !important;
  min-width: 200px;
}

.views-exposed-form label {
  font-weight: 600;
  margin-bottom: 0.25rem;
  display: block;
}

.views-exposed-form .form-control,
.views-exposed-form .form-select,
.views-exposed-form .btn {
  height: 38px;
  padding: 0.375rem 0.75rem;
  line-height: 1.5;
}

.views-exposed-form[data-drupal-selector="views-exposed-form-volunteer-offer-page-1"] .form-select {
  padding-right: 2rem;
}


/* ==========================================================================
   View Card
   ========================================================================== */

.view-card {
  margin-bottom: 15px;
}

.view-card.views-row .views-field-title a {
  font-weight: bold;
  font-size: 1.2rem;
  color: #000;
  text-decoration: none;
}

.view-card.views-row .views-field-title a:hover {
  color: #333;
  text-decoration: underline;
}

.view-card .views-label {
  font-weight: bold !important;
}


/* ==========================================================================
   Pagination
   ========================================================================== */

.pager {
  margin: 1rem 0;
}

.pagination {
  gap: 0.5rem;
}

.page-item {
  display: inline-flex;
}

.page-link {
  color: #000 !important;
  background-color: #fff !important;
  border: 1px solid #000 !important;
  border-radius: var(--bs-border-radius) !important;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease !important;
}

.page-link:hover {
  color: #000 !important;
  background-color: #f0f0f0 !important;
  border-color: #000 !important;
}

.page-item.disabled .page-link {
  color: var(--bs-gray-600);
  background-color: #fff;
  border-color: var(--bs-gray-600);
  cursor: not-allowed;
}

.page-item.is-active .page-link,
.page-item.active .page-link {
  color: #fff !important;
  background-color: #ee0000 !important;
  border-color: #ee0000 !important;
}


/* ==========================================================================
   Icons & Labels
   ========================================================================== */

#search-icon img,
.main-menu-icon img {
  width: 28px;
  height: 28px;
  display: block;
}

#search-icon img {
  margin-bottom: 8px;
}

#search-icon,
.main-menu-icon {
  display: flex;
  align-items: center;
  text-decoration: none;
}

#search-icon:focus,
#search-icon:hover,
.main-menu-icon:focus,
.main-menu-icon:hover {
  text-decoration: none;
}

.nav-label {
  color: #ef0000;
  font-size: 1.25rem;
  margin-left: 6px;
  white-space: nowrap;
  line-height: 1;
}


/* ==========================================================================
   Buttons
   ========================================================================== */

.btn-primary {
  background-color: #ee0000 !important;
  border-radius: 20px !important;
  font-size: 1.1rem !important;
  padding: 8px 12px !important;
  transition: all 0.3s ease-in-out;
}

.btn-primary:hover {
  background-color: #8F0000 !important;
}

#edit-submit-volunteer-offer {
  background-color: #e60000; /* red */
  color: white;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 25px; /* fully rounded pill style */
  padding: 10px 24px;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2; /* fixes text vertical centering */

  transition: background 0.3s ease, transform 0.2s ease;
}

#edit-submit-volunteer-offer:hover {
  background-color: #cc0000; /* darker red on hover */
  transform: scale(1.05);   /* subtle zoom */
}

#edit-submit-volunteer-offer:active {
  transform: scale(0.98); /* press effect */
}

.btn.btn-primary {
  background-color: #e60000; /* Red */
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 25px; /* pill-shaped */
  padding: 10px 24px;
  cursor: pointer;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;

  transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn.btn-primary:hover {
  background-color: #cc0000; /* darker red */
  transform: scale(1.05);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.btn.btn-primary:active {
  transform: scale(0.98);
}

.btn.btn-primary:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(230, 0, 0, 0.3); /* focus ring */
}


/* ==========================================================================
   Lists
   ========================================================================== */

.list-group-item-action {
  background-image: url("../images/arrow-right-red.svg");
  background-repeat: no-repeat;
  background-position: 0.5rem center;
  background-size: 1.2rem;
  padding-left: 2rem !important;
}

/* Make links inside list-group-item-action look like text */
.list-group-item-action a {
  color: inherit;
  text-decoration: none;
  display: block;
  width: 100%;
}

/* Voluntary work list groups */
article.node--type-voluntary-work .list-group-item {
  padding-left: 0 !important;
  padding-right: var(--bs-list-group-item-padding-x, 1rem);
}


/* ==========================================================================
   Links
   ========================================================================== */

/* Normal links in voluntary_work fields (no buttons) */
.node--type-voluntary-work .field__item a:not(.btn) {
  color: inherit;
  text-decoration: none;
  position: relative;
  padding-left: 1.6rem;  /* space for arrow */
  display: inline-block;
}

/* Arrow only for normal links (no buttons) */
.node--type-voluntary-work .field__item a:not(.btn)::before {
  content: "";
  display: inline-block;
  background-image: url("../images/arrow-right-red.svg");
  background-repeat: no-repeat;
  background-size: 1.2rem;
  width: 1.2rem;
  height: 1.2rem;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

/* Hover effect for normal links */
.node--type-voluntary-work .field__item a:not(.btn):hover {
  color: #b30000;
  text-decoration: none;
}

/* Explicitly reset Bootstrap buttons so they are never touched */
.node--type-voluntary-work .field__item a.btn {
  all: unset;
  all: revert; /* keep Bootstrap defaults */
}


/* ==========================================================================
   Misc
   ========================================================================== */

.region.region--content {
  max-width: 1440px;
}

.region.region-content {
  padding-left: 0px !important;
}

.node__submitted {
  visibility: hidden;
}

#views-exposed-form-volunteer-offer-page-1 .form-text,
#views-exposed-form-volunteer-offer-page-1 .form-select {
  width: 30ch;
  box-sizing: border-box;
  height: 2.4rem;
  padding: 0.3rem 0.5rem;
}

#views-exposed-form-volunteer-offer-page-1 .form--inline .form-item {
  margin-right: 1rem;
}

#views-exposed-form-volunteer-offer-page-1 .form-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

#views-exposed-form-volunteer-offer-page-1 .form-submit {
  padding: 0.4rem 1rem;
}
