/*
Theme Name: idemidem
Theme URI: https://idemidem.com
Author: idemidem
Description: Lightweight custom block theme for idemidem — complex care coordination and discharge transition support.
Version: 1.1.20
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: idemidem
*/

/* Force contact-info columns to stack when nested inside the CTA banner */
.cta-contact-stack .wp-block-columns {
	flex-direction: column;
}

.cta-contact-stack .wp-block-column {
	flex-basis: 100% !important;
	width: 100% !important;
	margin-bottom: 4px;
}

/* Fluid vertical section padding for all major content groups */
.wp-block-group[style*="padding-top:90px"],
.wp-block-group[style*="padding-top:70px"],
.wp-block-group[style*="padding-top:60px"],
.wp-block-group[style*="padding-top:50px"] {
	padding-top: clamp(40px, 8vw, 90px) !important;
}

.wp-block-group[style*="padding-bottom:90px"],
.wp-block-group[style*="padding-bottom:70px"],
.wp-block-group[style*="padding-bottom:60px"],
.wp-block-group[style*="padding-bottom:50px"] {
	padding-bottom: clamp(40px, 8vw, 90px) !important;
}

.wp-block-navigation__container {
  gap: 1.25rem !important;
}

/* === Header layout ===
   Three modes, one set of rules:
   1100px and wider : logo | full menu | Submit a Referral button, one row
   641px to 1099px  : logo | hamburger + button, one row
   640px and below  : logo + hamburger on top, full-width button below
   The button is always visible. Only the header is affected (the footer menu is separate). */

@media (max-width: 1099.98px) {
	header .wp-block-navigation__responsive-container:not(.is-menu-open) {
		display: none !important;
	}
	header .wp-block-navigation__responsive-container-open {
		display: flex !important;
	}
	/* Keeps the hamburger next to the button, on the right */
	header .wp-block-navigation {
		margin-left: auto;
	}
}

@media (min-width: 1100px) {
	header .wp-block-navigation__responsive-container:not(.is-menu-open) {
		display: flex !important;
	}
	header .wp-block-navigation__responsive-container-open {
		display: none !important;
	}
}

@media (max-width: 640px) {
	header .wp-block-buttons {
		flex-basis: 100%;
	}
	header .wp-block-buttons .wp-block-button {
		width: 100%;
	}
	header .wp-block-button__link {
		width: 100%;
		justify-content: center;
	}
}

/* Slightly smaller logo on phones so the logo and hamburger share one row */
@media (max-width: 420px) {
	.idemidem-logo {
		height: 44px !important;
	}
}

.wp-block-navigation__responsive-container-open svg path {
	fill: #2AA08F;
}

.wp-block-navigation__responsive-container-close svg path {
	fill: #2AA08F;
}

/* Prevent header logo + nav from ever forcing horizontal scroll */
header.wp-block-group {
	overflow-x: hidden;
	background: linear-gradient(135deg, #0F2A24 0%, #05100D 100%);
}

.wp-block-button__link {
	min-height: 44px;
	display: inline-flex;
	align-items: center;
}

.wp-block-navigation-item__content {
	color: #FFFFFF !important;
}

.wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--green) !important;
}

/* Footer: dark background to match header, complementary teal-charcoal tone */
footer.wp-block-group {
	background: var(--idemidem-dark-gradient);
}

/* Mobile menu (hamburger) panel uses the same dark gradient as the footer.
   The color is stored once in --idemidem-dark-gradient so the two always match. */
:root {
	--idemidem-dark-gradient: linear-gradient(135deg, #12232B 0%, #050B0D 100%);
}

header .wp-block-navigation__responsive-container.is-menu-open {
	background-color: #12232B !important;
	background-image: var(--idemidem-dark-gradient) !important;
}

/* Footer Instagram icon: white, turns the same green as the other links on hover/keyboard focus */
.footer-social-link {
	display: inline-block;
	color: #FFFFFF;
	transition: color 0.2s ease;
}

.footer-social-link:hover,
.footer-social-link:focus-visible {
	color: var(--wp--preset--color--green);
}

/* Footer Privacy Policy link: same green as the copyright line, turns white on hover/keyboard focus */
.footer-policy-link {
	color: inherit;
	transition: color 0.2s ease;
}

.footer-policy-link:hover,
.footer-policy-link:focus-visible {
	color: #FFFFFF;
}

/* === Sticky header ===
   Targets the outer template-part wrapper (not the inner <header> block),
   because "sticky" only works relative to a parent that is taller than the element. */
header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 100;
}

/* When logged in, keep the header just below the WordPress admin bar */
.admin-bar header.wp-block-template-part {
	top: 32px;
}

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

/* On very small screens the admin bar scrolls away, so no offset is needed */
@media (max-width: 600px) {
	.admin-bar header.wp-block-template-part {
		top: 0;
	}
}

/* Green buttons: the logo's green with dark text; the logo's mint on hover / keyboard focus.
   !important on the background is needed because WordPress's color classes use it. */
.wp-block-button__link.has-green-background-color {
	color: var(--wp--preset--color--ink);
	transition: background-color 0.25s ease;
}

.wp-block-button__link.has-green-background-color:hover,
.wp-block-button__link.has-green-background-color:focus-visible {
	background-color: var(--wp--preset--color--mint) !important;
	color: var(--wp--preset--color--ink);
}
