/* CivilFalu 26 responsive system. Desktop styles live in style.css. */

@media screen and (max-width: 1200px) {
  :root {
    --container-gutter: clamp(24px, 4vw, 48px);
  }

  .organization-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #main-menu ul.menu {
    gap: 2px;
  }

  #main-menu ul.menu li a {
    padding-inline: 8px;
    font-size: 14px;
  }
}

@media screen and (max-width: 959px) {
  :root {
    --font-size-base: 16px;
    --line-height-base: 1.5;
    --header-height: 78px;
    --section-space: clamp(64px, 11vw, 104px);
  }

  .site-header__menu-toggle,
  #mobile-menu-open {
    display: grid;
    flex: 0 0 48px;
    place-items: center;
  }

  .site-header .region-primary-menu {
    display: none;
  }

  .site-header__logo,
  #menu-logo {
    margin-inline-start: auto;
    margin-inline-end: 0;
    padding-inline-end: 0;
  }

  .site-header__logo a img,
  #menu-logo a img {
    width: clamp(128px, 24vw, 180px);
    max-height: 52px;
  }

  .site-header__region {
    display: none;
  }

  .front-section__grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .front-section--ivy .front-section__grid--has-image {
    grid-template-columns: 1fr;
  }

  .front-section__title {
    max-width: 12ch;
  }

  .front-section__content,
  .front-section__content--large {
    max-width: 760px;
  }

  .page-sidebars {
    grid-template-columns: 1fr;
  }

  #pre-footer > .container {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  }

  .svg-mask {
    top: -5vh;
    left: 5%;
    width: 160%;
    max-height: 100vh;
  }

  .webform-submission-form .form-item.form-type-textfield label,
  .webform-submission-form .form-item.form-type-email label,
  .webform-submission-form .form-item.form-type-number label,
  .webform-submission-form .form-item.form-type-tel label,
  .webform-submission-form .form-item.form-type-url label,
  .webform-submission-form .form-item label,
  .webform-submission-form .fieldset-legend,
  .webform-submission-form .form-item.webform-checkboxes .fieldset-legend,
  .webform-submission-form .form-item.webform-checkboxes-other .fieldset-legend {
    position: relative;
    top: auto;
    left: auto;
    padding: 0;
    background: transparent;
  }

  .webform-submission-form .webform-element-description {
    margin-left: 0;
  }

  .webform-submission-form .fieldset-wrapper .form-type-textarea label {
    top: auto;
    margin-top: 0;
    padding: 0;
  }
}

@media screen and (max-width: 850px) {
  .webform-progress {
    display: none;
  }

  .eu-cookie-compliance-content {
    max-width: calc(100% - (2 * var(--container-gutter)));
    flex-direction: column;
    gap: 20px;
  }

  .eu-cookie-compliance-message,
  .eu-cookie-compliance-buttons {
    width: 100%;
    max-width: none;
  }
}

@media screen and (max-width: 767px) {
  :root {
    --container-gutter: clamp(18px, 5vw, 32px);
  }

  body {
    overflow-wrap: anywhere;
  }

  .front-hero {
    min-height: 0;
    aspect-ratio: 21 / 9;
  }

  .front-section__header--inline {
    align-items: flex-start;
    flex-direction: column;
    gap: 22px;
  }

  .front-section__header--inline .cf-more-link {
    margin-top: 0;
  }

  .front-section__title {
    font-size: clamp(2.35rem, 11vw, 4rem);
  }

  .organization-logo-wall {
    gap: 12px;
  }

  .organization-logo-wall__item {
    min-width: clamp(88px, 20vw, 128px);
  }

  .front-section--organizations .organization-logo-wall__item {
    height: 110px;
  }

  .front-section--organizations .organization-logo-wall__item .views-field-field-logo,
  .front-section--organizations .organization-logo-wall__item .views-field-field-logo .field-content {
    width: 100%;
    height: 90px;
    min-height: 0;
  }

  .front-section--organizations .organization-logo-wall__item img,
  .front-section--organizations .view-szervezet-logofal img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 90px;
    object-fit: contain;
  }

  .front-section--organizations .cf-more-link {
    display: none;
  }

  .organization-logo-wall__item img,
  .view-szervezet-logofal img {
    max-height: 132px;
  }

  .organization-grid {
    grid-template-columns: 1fr;
  }

  .organization-card {
    height: auto;
  }

  .organization-card > .views-field-fieldset-1,
  .organization-card > .views-field-fieldset-1 > .field-content,
  .organization-card .dt-d {
    flex: 0 0 auto;
  }

  .organization-card .dt-d {
    min-height: 0;
    padding-block: 12px;
  }

  .organization-cover {
    min-height: clamp(280px, 72vw, 440px);
    padding-block: 2em;
  }

  .section-separator svg {
    position: absolute;
    bottom: 0;
    left: 0;
  }

  .organization-cover__logo {
    width: min(72vw, 320px);
    padding: clamp(28px, 8vw, 52px);
  }

  .organization-cover__logo img {
    max-height: 100%;
  }

  .page-title-region .page-title {
    font-size: clamp(2.25rem, 10.5vw, 3.75rem);
  }

  table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  iframe,
  video {
    max-width: 100%;
  }

  .webform-submission-form .form-item,
  .webform-submission-form .form-type-checkbox,
  .webform-submission-form .form-item.form-type-select {
    width: 100%;
  }

  .webform-submission-form input.form-text,
  .webform-submission-form input.form-email,
  .webform-submission-form input.form-number,
  .webform-submission-form input.form-tel,
  .webform-submission-form input.form-url,
  .webform-submission-form textarea,
  .webform-submission-form select {
    box-sizing: border-box;
    width: 100%;
  }

  #pre-footer > .container {
    grid-template-columns: 1fr;
  }

  .site-footer__inner {
    grid-template-columns: 1fr;
    gap: 24px;
    text-align: center;
  }

  .site-footer__logo {
    grid-row: 1;
  }

  footer.site-footer #footer-left,
  footer.site-footer #footer-right {
    width: auto;
    text-align: center;
  }
}

@media screen and (max-width: 600px) {
  .front-festival__image {
    box-shadow: 8px 8px 0 var(--cf26-festival-yellow);
  }

  .front-section--festival .front-section__title,
  .festival-section__inner .block > h2,
  .festival-section__inner .block__title {
    text-shadow: 4px 4px 0 var(--cf26-festival-yellow);
  }

  .cf-more-link {
    width: 100%;
    box-sizing: border-box;
  }

  #mobile-menu-wrapper {
    justify-content: flex-start;
    padding-top: 96px;
  }

  #mobile-overlay-branding {
    width: min(250px, 70vw);
  }

  #mobile-menu-wrapper ul.menu {
    width: 100%;
  }

  .scrolltop {
    right: 14px;
    bottom: 14px;
    width: 48px;
    height: 48px;
  }

  #popup-text h2 {
    font-size: 24px;
  }
}

@media screen and (max-width: 480px) {
  :root {
    --container-gutter: 18px;
  }

  .site-header__logo a img,
  #menu-logo a img {
    width: min(150px, 42vw);
  }

  .front-hero {
    min-height: 0;
    aspect-ratio: 21 / 9;
  }

  .front-section__content,
  .front-section__content--large,
  .organization-node__primary,
  .layout-content {
    font-size: 1rem;
  }

  .organization-logo-wall {
    gap: 10px;
  }

  .organization-logo-wall__item {
    min-width: clamp(80px, 26vw, 112px);
  }

  .organization-logo-wall__item img,
  .view-szervezet-logofal img {
    max-height: 108px;
  }

}

@media screen and (max-width: 360px) {
  .site-header__menu-toggle,
  #mobile-menu-open {
    flex-basis: 40px;
    width: 40px;
    height: 44px;
    padding: 8px;
  }
}
