/**
 * Rasa June mobile site footer.
 * The live site uses Astra Header Footer Builder (#colophon).
 */

@media (max-width: 767px) {
	/* Astra's row borders caused the white divider. */
	#colophon.site-footer .site-primary-footer-wrap,
	#colophon.site-footer .site-below-footer-wrap {
		margin: 0 !important;
		border: 0 !important;
		outline: 0 !important;
		box-shadow: none !important;
	}

	/* Compact mobile rhythm: the original Astra rows reserve substantially
	 * more vertical space than this amount of content needs. */
	#colophon.site-footer .site-primary-footer-wrap {
		padding: 32px 24px 24px !important;
	}

	#colophon.site-footer .site-below-footer-wrap {
		padding: 20px 24px 28px !important;
	}

	/* Place both footer rows on one centered column. */
	#colophon.site-footer .site-primary-footer-inner-wrap,
	#colophon.site-footer .site-below-footer-inner-wrap {
		display: grid !important;
		grid-template-columns: minmax(0, 1fr) !important;
		justify-items: center !important;
		align-items: center !important;
		width: 100% !important;
		text-align: center !important;
	}

	#colophon.site-footer .site-footer-section,
	#colophon.site-footer .footer-widget-area,
	#colophon.site-footer .ast-builder-layout-element,
	#colophon.site-footer .ast-footer-copyright {
		align-items: center !important;
		justify-content: center !important;
		width: 100% !important;
		text-align: center !important;
	}

	/* Center the logo instead of retaining WordPress alignleft. */
	#colophon.site-footer figure,
	#colophon.site-footer figure.alignleft,
	#colophon.site-footer .wp-block-image,
	#colophon.site-footer .wp-block-image img {
		float: none !important;
		margin-left: auto !important;
		margin-right: auto !important;
		text-align: center !important;
	}

	#colophon.site-footer .footer-bar-navigation,
	#colophon.site-footer .footer-navigation,
	#colophon.site-footer .footer-nav-wrap {
		width: 100% !important;
		text-align: center !important;
	}

	/* Give the navigation clear breathing room below the Rasa June logo. */
	#colophon.site-footer .site-footer-primary-section-2 {
		margin-top: 24px !important;
	}

	#colophon.site-footer #astra-footer-menu {
		display: grid !important;
		grid-template-columns: repeat(2, max-content) !important;
		column-gap: 36px !important;
		row-gap: 12px !important;
		align-items: stretch !important;
		justify-content: center !important;
		width: max-content !important;
		max-width: 100% !important;
		margin: 0 auto !important;
		padding: 0 !important;
	}

	#colophon.site-footer #astra-footer-menu > li,
	#colophon.site-footer #astra-footer-menu > li > a {
		width: 100% !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
		text-align: left !important;
		justify-content: flex-start !important;
	}

	#colophon.site-footer #astra-footer-menu > li > a {
		padding: 0 !important;
		line-height: 1.45 !important;
	}

	/* Seven links form three full pairs; keep the final email action visually
	 * balanced by centering it across the compact two-column menu. */
	#colophon.site-footer #astra-footer-menu > li:last-child {
		grid-column: 1 / -1 !important;
		justify-self: center !important;
		width: auto !important;
	}

	#colophon.site-footer .site-footer-primary-section-3 {
		margin-top: 24px !important;
	}

	#colophon.site-footer .ast-footer-social-wrap,
	#colophon.site-footer .footer-social-inner-wrap {
		width: 100% !important;
		margin-left: auto !important;
		margin-right: auto !important;
		text-align: center !important;
	}

	/* The Astra customizer stored the legal/contact line at about 8px on
	 * phones, while the footer navigation is about 13px. Keep the navigation
	 * unchanged and bring the contact details back to a readable proportion. */
	#colophon.site-footer .site-below-footer-wrap .ast-footer-copyright,
	#colophon.site-footer .site-below-footer-wrap .ast-footer-copyright p,
	#colophon.site-footer .site-below-footer-wrap .ast-footer-contact,
	#colophon.site-footer .site-below-footer-wrap .ast-footer-contact-item,
	#colophon.site-footer .site-below-footer-wrap .ast-footer-contact a {
		font-size: 13px !important;
		line-height: 1.55 !important;
	}

	#colophon.site-footer .site-below-footer-wrap .ast-footer-copyright p {
		display: flex !important;
		flex-direction: column !important;
		align-items: center !important;
		margin: 0 !important;
	}

	#colophon.site-footer .site-below-footer-wrap .ast-footer-copyright p > br {
		display: none !important;
	}

	#colophon.site-footer .site-below-footer-wrap .ast-footer-contact {
		display: flex !important;
		flex-direction: column !important;
		align-items: center !important;
		order: -1 !important;
		gap: 2px !important;
		margin-top: 0 !important;
		margin-bottom: 10px !important;
	}

	#colophon.site-footer .site-below-footer-wrap .ast-footer-contact-sep {
		display: none !important;
	}

	/* Editorial mobile footer inspired by the supplied reference: one strong
	 * left edge, a large wordmark, compact link grid and a clearly separated
	 * information row. Existing WordPress content remains untouched. */
	#colophon.site-footer .ast-builder-grid-row-container-inner,
	#colophon.site-footer .site-primary-footer-inner-wrap,
	#colophon.site-footer .site-below-footer-inner-wrap {
		width: 100% !important;
		max-width: none !important;
		justify-items: stretch !important;
		text-align: left !important;
	}

	#colophon.site-footer .site-footer-section,
	#colophon.site-footer .footer-widget-area,
	#colophon.site-footer .ast-builder-layout-element,
	#colophon.site-footer .ast-footer-copyright {
		align-items: flex-start !important;
		justify-content: flex-start !important;
		text-align: left !important;
	}

	#colophon.site-footer .site-footer-primary-section-1 figure,
	#colophon.site-footer .site-footer-primary-section-1 figure.alignleft,
	#colophon.site-footer .site-footer-primary-section-1 .wp-block-image {
		display: flex !important;
		justify-content: flex-start !important;
		width: 100% !important;
		margin: 0 !important;
		text-align: left !important;
	}

	#colophon.site-footer .site-footer-primary-section-1 .wp-block-image img {
		display: block !important;
		width: 126px !important;
		max-width: 100% !important;
		margin: 0 !important;
		transform: none !important;
	}

	#colophon.site-footer .site-footer-primary-section-2 {
		padding-top: 0 !important;
		border-top: 0 !important;
	}

	#colophon.site-footer .footer-bar-navigation,
	#colophon.site-footer .footer-navigation,
	#colophon.site-footer .footer-nav-wrap {
		text-align: left !important;
	}

	#colophon.site-footer #astra-footer-menu {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		column-gap: 24px !important;
		width: 100% !important;
		margin: 0 !important;
		justify-content: stretch !important;
	}

	#colophon.site-footer #astra-footer-menu > li:last-child {
		grid-column: auto !important;
		justify-self: stretch !important;
		width: 100% !important;
	}

	/* Andstudio-inspired mobile hierarchy: remove the repeated site navigation
	 * and retain only the two useful contact actions. Items stay editable in
	 * WordPress and remain visible on tablet/desktop. */
	#colophon.site-footer #astra-footer-menu > li:nth-child(-n + 5) {
		display: none !important;
	}

	#colophon.site-footer #astra-footer-menu {
		grid-template-columns: repeat(2, max-content) !important;
		justify-content: start !important;
		column-gap: 42px !important;
		row-gap: 0 !important;
	}

	#colophon.site-footer #astra-footer-menu > li:nth-child(6),
	#colophon.site-footer #astra-footer-menu > li:nth-child(7) {
		display: block !important;
		width: auto !important;
		grid-column: auto !important;
		justify-self: start !important;
	}

	#colophon.site-footer #astra-footer-menu > li:nth-child(6) {
		position: relative !important;
	}

	#colophon.site-footer #astra-footer-menu > li:nth-child(6)::after {
		content: "";
		position: absolute;
		top: 50%;
		left: calc(100% + 12px);
		width: 18px;
		height: 1px;
		background: currentColor;
		transform: translateY(-50%);
	}

	#colophon.site-footer .ast-footer-social-wrap,
	#colophon.site-footer .footer-social-inner-wrap {
		margin-right: 0 !important;
		margin-left: 0 !important;
		text-align: left !important;
		justify-content: flex-start !important;
	}

	#colophon.site-footer .site-below-footer-wrap {
		border-top: 1px solid rgba(32, 38, 42, 0.28) !important;
	}

	#colophon.site-footer .site-below-footer-wrap .ast-footer-copyright p,
	#colophon.site-footer .site-below-footer-wrap .ast-footer-contact {
		align-items: flex-start !important;
		text-align: left !important;
	}

	/* Safeguard if an Elementor footer is used later. */
	.elementor-location-footer .elementor-divider,
	.elementor-location-footer .elementor-divider-separator {
		display: none !important;
		border: 0 !important;
	}
}

/* Typography only: safe across desktop, iPad and mobile. */
#colophon.site-footer,
#colophon.site-footer a,
#colophon.site-footer p,
#colophon.site-footer span,
#colophon.site-footer li {
	font-family: "Inter", sans-serif;
	font-weight: 400;
}
/* Keep translated footer links identical to the Norwegian reference. */
html:lang(en) #colophon.site-footer a,
html:lang(en) #colophon.site-footer a:visited,
html:lang(en) #colophon.site-footer a:hover,
html:lang(en) #colophon.site-footer a:focus,
html:lang(lt) #colophon.site-footer a,
html:lang(lt) #colophon.site-footer a:visited,
html:lang(lt) #colophon.site-footer a:hover,
html:lang(lt) #colophon.site-footer a:focus {
	color: #1d262b !important;
}
