/**
 * Gåsø Næringsutvikling — Custom Styles
 */

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

/* ── Header ── */

header.wp-block-group {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--wp--preset--color--light-grey);
  background-color: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

/* ── Brand / Logo ── */

.gasoe-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--wp--preset--color--dark-text);
  transition: opacity 0.15s ease;
}

.gasoe-brand:hover {
  opacity: 0.7;
  color: var(--wp--preset--color--dark-text);
}

.gasoe-brand-mark {
  flex-shrink: 0;
  display: block;
}

.gasoe-brand-name {
  font-family: var(--wp--preset--font-family--body);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

/* ── Hero ── */

.gasoe-hero {
  overflow: hidden;
}

/* Subtle gradient instead of flat dark */
.gasoe-hero .wp-block-cover__background {
  background: linear-gradient(160deg, #222 0%, #1a1a1a 40%, #111 100%) !important;
}

/* Decorative concentric circles — top-right */
.gasoe-hero::after {
  content: '';
  position: absolute;
  width: 650px;
  height: 650px;
  right: -140px;
  top: -120px;
  pointer-events: none;
  z-index: 1;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 650 650' fill='none'%3E%3Ccircle cx='325' cy='325' r='280' stroke='white' stroke-opacity='0.04' stroke-width='1'/%3E%3Ccircle cx='325' cy='325' r='200' stroke='white' stroke-opacity='0.03' stroke-width='1'/%3E%3Ccircle cx='325' cy='325' r='120' stroke='white' stroke-opacity='0.025' stroke-width='1'/%3E%3C/svg%3E") no-repeat center center;
  background-size: contain;
}

/* Keep content above decoration */
.gasoe-hero .wp-block-cover__inner-container {
  z-index: 2;
  position: relative;
}

/* Accent divider line between heading and area columns */
.gasoe-hero-divider {
  display: flex;
  justify-content: flex-start;
  margin: 0 0 2.5rem;
  max-width: 680px;
}

.gasoe-hero-divider span {
  display: block;
  width: 40px;
  height: 2px;
  background-color: var(--wp--preset--color--accent);
  border-radius: 1px;
}

/* ── Hero area columns — desktop ── */

.gasoe-hero-areas {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 2rem;
}

.gasoe-hero-areas > .wp-block-column:first-child {
  padding-right: 2rem;
}

.gasoe-hero-areas > .wp-block-column:nth-child(2) {
  padding-left: 2rem;
  padding-right: 2rem;
}

.gasoe-hero-areas > .wp-block-column:last-child {
  padding-left: 2rem;
}

.gasoe-hero-areas > .wp-block-column + .wp-block-column {
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

/* Lift description contrast on dark hero background */
.gasoe-hero-areas p.has-mid-grey-color {
  color: #b0b0b0 !important;
}

/* ── Portfolio list ── */

.gasoe-area-heading {
  font-family: var(--wp--preset--font-family--body);
  color: var(--wp--preset--color--mid-grey);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 3.5rem 0 0.5rem 0;
}

.gasoe-area-heading:first-child {
  margin-top: 0;
}

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

.gasoe-subsidiary-item {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--wp--preset--color--light-grey);
}

.gasoe-subsidiary-item:first-child {
  border-top: 1px solid var(--wp--preset--color--light-grey);
}

.gasoe-subsidiary-primary {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.gasoe-subsidiary-name {
  font-family: var(--wp--preset--font-family--body);
  color: var(--wp--preset--color--dark-text);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  line-height: 1.4;
}

a.gasoe-subsidiary-name {
  transition: color 0.15s ease;
}

a.gasoe-subsidiary-name:hover {
  color: var(--wp--preset--color--accent);
}

.gasoe-arrow {
  color: var(--wp--preset--color--accent);
  font-size: 0.85em;
  transition: transform 0.15s ease;
  display: inline-block;
}

a.gasoe-subsidiary-name:hover .gasoe-arrow {
  transform: translate(2px, -2px);
}

.gasoe-ownership {
  font-family: var(--wp--preset--font-family--body);
  font-size: 0.8rem;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  color: var(--wp--preset--color--mid-grey);
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 3rem;
  text-align: right;
}

.gasoe-ownership--empty {
  opacity: 0.4;
}

.gasoe-subsidiary-desc {
  color: var(--wp--preset--color--mid-grey);
  font-size: 0.85rem;
  margin: 0.25rem 0 0 0;
  line-height: 1.5;
}

.gasoe-org-nr {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.gasoe-portfolio-footnote {
  color: var(--wp--preset--color--mid-grey);
  font-size: 0.8rem;
  margin-top: 3rem;
  line-height: 1.6;
}

/* ── Navigation ── */

.wp-block-navigation .wp-block-navigation-item a {
  padding: 0.5rem 0.75rem;
  color: var(--wp--preset--color--body-text);
  transition: color 0.15s ease;
  text-decoration: none;
}

.wp-block-navigation .wp-block-navigation-item a:hover {
  color: var(--wp--preset--color--accent) !important;
}

/* When mobile menu is open, remove backdrop-filter so the fixed
   overlay can escape the header and cover the full viewport. */
header.wp-block-group:has(.wp-block-navigation__responsive-container.is-menu-open) {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  background-color: var(--wp--preset--color--white);
}

/* Mobile nav overlay — full-screen */
.wp-block-navigation__responsive-container.is-menu-open {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 100000 !important;
  overflow-y: auto !important;
  background-color: var(--wp--preset--color--white) !important;
  padding: 2rem 1.5rem;
  box-sizing: border-box;
}

/* Override right-alignment from desktop nav layout */
.wp-block-navigation__responsive-container.is-menu-open
  .wp-block-navigation__responsive-container-content {
  align-items: flex-start !important;
  justify-content: flex-start !important;
}

.wp-block-navigation__responsive-container.is-menu-open
  .wp-block-navigation__responsive-container-content
  .wp-block-navigation-item a {
  color: var(--wp--preset--color--dark-text) !important;
  font-size: 1.25rem;
  padding: 0.85rem 0;
}

.wp-block-navigation__responsive-container.is-menu-open
  .wp-block-navigation__responsive-container-content
  .wp-block-navigation-item a:hover {
  color: var(--wp--preset--color--accent) !important;
}

.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close {
  color: var(--wp--preset--color--dark-text) !important;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Footer ── */

footer a {
  color: var(--wp--preset--color--mid-grey);
  text-decoration: none;
  transition: color 0.15s ease;
}

footer a:hover {
  color: var(--wp--preset--color--white);
}

.gasoe-copyright {
  font-size: 0.8rem;
  color: var(--wp--preset--color--mid-grey);
  margin: 0;
}


/* ── Cookie consent banner ── */

#cookie-notice {
  background: #1a1a1a !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.25rem 1.5rem;
  font-family: var(--wp--preset--font-family--body);
  font-size: 0.9rem;
  line-height: 1.6;
  color: #fff;
}

#cookie-notice .cookie-notice-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

#cookie-notice .cn-text-container {
  flex: 1;
}

#cookie-notice .cn-text-container a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

#cookie-notice .cn-text-container a:hover {
  opacity: 0.8;
}

#cookie-notice .cn-buttons-container {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

#cookie-notice .cn-buttons-container a,
#cookie-notice .cn-buttons-container button {
  display: inline-block;
  padding: 0.55rem 1.25rem;
  border-radius: 4px;
  font-family: var(--wp--preset--font-family--body);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.4;
  transition: opacity 0.15s ease;
  border: none;
}

#cookie-notice #cn-accept-cookie {
  background-color: #c15328;
  color: #fff;
}

#cookie-notice #cn-accept-cookie:hover {
  opacity: 0.85;
}

#cookie-notice #cn-refuse-cookie {
  background-color: transparent;
  color: #999;
  border: 1px solid #555;
}

#cookie-notice #cn-refuse-cookie:hover {
  color: #ccc;
  border-color: #888;
}


/* =============================================
   RESPONSIVE — Tablet (≤ 781px)
   WordPress columns stack at this breakpoint
   ============================================= */

@media (max-width: 781px) {

  /* -- Reduce section padding -- */
  section.wp-block-group {
    padding-top: 3.5rem !important;
    padding-bottom: 3.5rem !important;
  }

  /* -- Hero -- */
  .gasoe-hero {
    min-height: auto !important;
    padding-top: 4rem !important;
    padding-bottom: 3rem !important;
  }

  .gasoe-hero h1 {
    font-size: 2.25rem !important;
  }

  /* Columns stack: reset side padding, use vertical spacing */
  .gasoe-hero-areas > .wp-block-column {
    padding: 0 !important;
  }

  .gasoe-hero-areas > .wp-block-column + .wp-block-column {
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    margin-top: 1.25rem;
    padding-top: 1.25rem !important;
  }

  /* Decorative circles — scale down */
  .gasoe-hero::after {
    width: 400px;
    height: 400px;
    right: -120px;
    top: -80px;
  }

  /* -- Contact — reduce column gap when stacked -- */
  #kontakt .wp-block-columns {
    gap: 2.5rem !important;
  }

  /* -- Footer — reduce column gap -- */
  footer .wp-block-columns {
    gap: 2rem !important;
  }
}


/* =============================================
   RESPONSIVE — Phone (≤ 600px)
   ============================================= */

@media (max-width: 600px) {

  /* -- Header — thinner, tighter, hamburger stays right -- */
  header.wp-block-group {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  header.wp-block-group > .wp-block-group {
    flex-wrap: nowrap !important;
    align-items: center;
  }

  .gasoe-brand {
    gap: 0.5rem;
  }

  .gasoe-brand-mark {
    width: 24px;
    height: 24px;
  }

  .gasoe-brand-name {
    font-size: 0.9rem;
  }

  /* -- Sections — consistent vertical rhythm -- */
  section.wp-block-group {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }

  /* Standardize heading bottom margin across all sections */
  #om-oss h2,
  #selskaper h2,
  #kontakt h2 {
    margin-bottom: 1.5rem !important;
  }

  /* -- Hero — compact, no excess dark space -- */
  .gasoe-hero {
    min-height: auto !important;
    padding-top: 3.5rem !important;
    padding-bottom: 2rem !important;
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }

  .gasoe-hero .wp-block-cover__inner-container > .wp-block-group:first-child {
    margin-bottom: 1.25rem !important;
  }

  .gasoe-hero h1 {
    font-size: 1.75rem !important;
    line-height: 1.3 !important;
  }

  .gasoe-hero-divider {
    margin-bottom: 1rem;
  }

  .gasoe-hero-areas {
    padding-top: 1.25rem;
  }

  .gasoe-hero-areas h3 {
    font-size: 0.85rem !important;
    margin-bottom: 0.2rem;
  }

  .gasoe-hero-areas p {
    font-size: 0.8rem !important;
  }

  /* Hide decorative circles on small screens */
  .gasoe-hero::after {
    display: none;
  }

  /* -- About -- */
  #om-oss h2 {
    font-size: 1.5rem !important;
  }

  #om-oss p {
    font-size: 0.95rem !important;
  }

  /* -- Portfolio -- */
  #selskaper h2 {
    font-size: 1.5rem !important;
  }

  .gasoe-subsidiary-primary {
    flex-direction: column;
    gap: 0;
  }

  .gasoe-ownership {
    text-align: left;
    min-width: auto;
    font-size: 0.75rem;
  }

  .gasoe-subsidiary-desc {
    font-size: 0.8rem;
  }

  .gasoe-area-heading {
    margin-top: 1.75rem;
  }

  .gasoe-portfolio-footnote {
    margin-top: 2rem;
    font-size: 0.75rem;
  }

  /* -- Contact -- */
  #kontakt h2 {
    font-size: 1.5rem !important;
  }

  #kontakt .wp-block-columns {
    gap: 2rem !important;
  }

  /* -- Footer -- */
  footer.wp-block-group {
    padding: 2rem 1.25rem !important;
  }

  footer .wp-block-columns {
    gap: 1.5rem !important;
    margin-bottom: 1.5rem !important;
  }

  footer p {
    font-size: 0.8rem !important;
  }

  .gasoe-copyright {
    font-size: 0.75rem;
  }

  /* -- Cookie banner -- */
  #cookie-notice .cookie-notice-container {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  #cookie-notice .cn-buttons-container {
    width: 100%;
    flex-direction: column;
  }

  #cookie-notice .cn-buttons-container a,
  #cookie-notice .cn-buttons-container button {
    width: 100%;
    text-align: center;
  }
}


/* =============================================
   RESPONSIVE — Small phone (≤ 400px)
   ============================================= */

@media (max-width: 400px) {

  .gasoe-hero {
    padding-top: 3rem !important;
  }

  .gasoe-hero h1 {
    font-size: 1.5rem !important;
  }

  section.wp-block-group {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  header.wp-block-group {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }

  .gasoe-brand-name {
    font-size: 0.82rem;
  }

  footer.wp-block-group {
    padding: 1.5rem 1rem !important;
  }
}


/* ── Admin bar ── */

.admin-bar header.wp-block-group {
  top: 32px;
}

@media (max-width: 782px) {
  .admin-bar header.wp-block-group {
    top: 46px;
  }
}
