/* Base Styles */
:root {
	/* Primary Colors */
	--primary-color: #005958;
	--secondary-color-light-blue: #97d7dc;
	--secondary-color-yellow: #deda5c;
	--secondary-color-bright-yellow: #ffcf01;
	--secondary-color-pink: #f27d8a;
	--text-color: #000000;
	--white: #ffffff;
	--light-gray: #efe7f2;
	--very-light-gray: #ffffff;

	/* Typography */
	--heading-font: "Noto Sans", sans-serif;
	--body-font: "Lato", sans-serif;
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

/* html {
        scroll-behavior: auto;
      } */

body {
	font-family: var(--body-font);
	/* font-weight: 300;
    font-size: 16px;
    line-height: 1.5; */
	color: var(--text-color);
	background-color: var(--secondary-color-light-blue);
	/* overflow-x: hidden; */
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--heading-font);
	font-weight: 400;
	margin-bottom: 1rem;
	color: var(--primary-color);
}

h1 {
	font-size: 32px;
	line-height: 44px;
}

h2 {
	font-size: 22px;
	line-height: 30px;
}

p {
	margin-bottom: 1rem;
}

a {
	color: var(--primary-color);
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

ul,
ol {
	margin-left: 2rem;
	margin-bottom: 1rem;
}

/* Layout */
.content-container {
	max-width: 820px;
	padding: 2rem;
}
/* Sections */

#sections {
	margin: 4rem 0 0 2rem;
}

@media (max-width: 1024px) {
	#sections {
		margin: 15px;
	}

	.section-spacing-top {
		margin-top: 0;
	}
}

@media (max-width: 1440px) {
	#sections {
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		margin: 0;
	}
}

@media (max-width: 820px) {
	#section {
		display: block;
	}
}

/* Remove mobile width constraint for sections */
@media (max-width: 900px) {
	#sections {
		margin: 0;
		padding: 15px;
		display: block;
	}
}

.intro-section,
.subsidies-section {
	padding: 0;
}

/* Colors */
.textcolor-green {
	color: rgba(0, 102, 0, 1);
	margin: 0;
}

.textcolor-yellow {
	color: rgba(255, 207, 1, 1);
}

/* Buttons */
.primary-button {
	display: inline-block;
	background-color: var(--secondary-color-pink);
	color: var(--white);
	font-family: var(--body-font);
	font-size: 16px;
	font-weight: 400;
	padding: 10px 20px;
	border-radius: 20px;
	border: none;
	cursor: pointer;
	transition: background-color 0.3s;
}

.primary-button:hover {
	background-color: #e06a77;
	text-decoration: none;
}

.tab-button {
	display: inline-block;
	background-color: var(--secondary-color-yellow);
	color: var(--text-color);
	font-family: var(--body-font);
	font-size: 16px;
	font-weight: 400;
	padding: 10px 20px;
	border-radius: 20px;
	border: none;
	cursor: pointer;
	transition: background-color 0.3s;
}

.tab-button.inactive {
	background-color: var(--primary-color);
	color: var(--white);
}

/* Specific Page Styles */
.benefits-list {
	list-style-type: disc;
	margin-left: 2rem;
}

.benefits-list li {
	margin-bottom: 1rem;
}

/* Case Studies Page */
.case-studies {
	padding: 2rem;
}

.tool-section {
	background-color: var(--primary-color);
	color: var(--white);
	padding: 2rem;
	border-radius: 8px;
	margin-bottom: 2rem;
}

.tool-section h3 {
	color: var(--white);
}

.case-studies-button {
	display: inline-block;
	background-color: var(--secondary-color-bright-yellow);
	color: var(--text-color);
	font-weight: bold;
	padding: 12px 24px;
	border-radius: 30px;
	margin-top: 1rem;
}

.housing-types {
	display: flex;
	justify-content: space-between;
	margin-top: 2rem;
}

.housing-type {
	flex: 1;
	margin: 0 0.5rem;
	text-align: center;
}

.housing-type img {
	max-width: 100%;
	border-radius: 8px;
}

.housing-label {
	background-color: var(--secondary-color-light-blue);
	padding: 0.5rem 1rem;
	border-radius: 4px;
	display: inline-block;
	margin-top: 0.5rem;
}

/* Deficit Info Box */
.deficit-box {
	background-color: var(--secondary-color-bright-yellow);
	padding: 1.5rem;
	border-radius: 8px;
	margin-bottom: 2rem;
}

.deficit-amount {
	font-size: 1.5rem;
	font-weight: bold;
	margin-bottom: 0.5rem;
}

.deficit-details {
	font-size: 0.9rem;
}

/* SPA Page Content */
.page-content {
	width: 100%;
}

/* Loading Indicator */
.loading-indicator {
	display: flex;
	justify-content: center;
	align-items: center;
	height: 300px;
	font-size: 18px;
	color: var(--primary-color);
	position: relative;
	padding-left: 30px;
}

.loading-indicator:before {
	content: "";
	position: absolute;
	left: 0;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	border: 2px solid rgba(0, 89, 88, 0.3);
	border-top-color: var(--primary-color);
	animation: spin 1s infinite linear;
}

.error {
	padding: 2rem;
	color: #d32f2f;
	text-align: center;
	background-color: #ffebee;
	border-radius: 4px;
	margin: 2rem;
}

@keyframes spin {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}

/* Responsive Design */
@media (max-width: 900px) {
	section {
		flex-direction: column;
	}

	.housing-types {
		flex-direction: column;
	}

	.housing-type {
		margin: 1rem 0;
	}
}

.section-block {
	background: var(--white);
	border-radius: 10px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	padding: 30px;
	margin-bottom: 20px;
	width: 820px;
	max-width: 100%;
	box-sizing: border-box;
}

.section-spacing-top {
	margin-top: 40px;
}

/* Remove the mobile max-width constraint */
@media (max-width: 900px) {
	.section-block {
		max-width: none;
		width: 100%;
		padding: 20px;
		margin: 0 0 20px 0;
	}
	.section-spacing-top {
		margin-top: 0;
	}
}

/* FOR MOBILE - Remove the old constraint */
@media (max-width: 430px) {
	.section-block {
		max-width: none;
		width: 100%;
		padding: 15px;
		margin: 0 0 20px 0;
	}
}

.section-block > h1 {
	font-family: var(--heading-font);
	color: var(--primary-color);
	margin: 0;
	margin-bottom: 40px;
	font-weight: 500;
}

.section-block > h2 {
	font-family: var(--heading-font);
	color: var(--primary-color);
	margin: 0;
	margin-bottom: 20px;
	font-weight: 500;
}

.section-block > p {
	font-size: 16px;
	font-style: normal;
	color: var(--text-color);
	line-height: 1.3;
	margin: 0;
	font-weight: 300;
}

.community-units__content {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.img-source {
	font-weight: 300;
	font-size: 14px;
	line-height: 130%;
	letter-spacing: 0%;
}

.ol-wrapper,
.ul-wrapper {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
}

.ol-wrapper > li,
.ul-wrapper > li {
	margin-left: 1.5rem;
}

.standart-li {
	font-size: 16px;
	font-style: normal;
	color: var(--text-color);
	line-height: 1.3;
	margin: 0;
	font-weight: 300;
}

.ol-wrapper > p,
.ul-wrapper > p {
	font-size: 16px;
	font-style: normal;
	color: var(--text-color);
	line-height: 1.3;
	margin: 0;
	font-weight: 300;
}

.homefunds-link {
	text-decoration: underline;
	color: inherit;
	text-underline-offset: 4px;
}

.section-block--with-overlay {
	padding: 30px;
	overflow: hidden;
	background-color: #aad2d0;
}

.case-studies-header {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	padding: 6px 6px 30px;
}

.case-studies-brand {
	font-family: var(--body-font);
	font-size: 20px;
	font-weight: 900;
	color: #1d2c3d;
	letter-spacing: 0.5px;
}

.case-studies-hero {
	text-align: center;
	padding: 30px 20px 40px;
}

.case-studies-title {
	font-family: var(--body-font);
	font-size: 26px;
	font-weight: 900;
	color: #1d2c3d;
	margin: 0 0 14px;
	line-height: 1.25;
}

.case-studies-subtitle {
	display: inline-block;
	background-color: #86bdb8;
	color: #1d2c3d;
	padding: 4px 12px;
	border-radius: 6px;
	font-family: var(--body-font);
	font-size: 13px;
	line-height: 1.4;
}

.case-studies-icons {
	display: flex;
	justify-content: center;
	align-items: flex-start;
	gap: 30px;
	flex-wrap: wrap;
}

.case-study-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
}

.case-study-icon-link {
	display: block;
	transition:
		transform 0.3s ease,
		opacity 0.3s ease;
	cursor: pointer;
}

.case-study-icon-link:hover {
	transform: translateY(-5px);
	opacity: 0.8;
}

.case-study-icon-img {
	width: 150px;
	height: auto;
	display: block;
	border-radius: 10px;
}

.case-study-pdf-link {
	font-family: var(--body-font);
	font-size: 14px;
	font-weight: 600;
	color: #1d2c3d;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
	transition: opacity 0.2s ease;
}

.case-study-pdf-link:hover,
.case-study-pdf-link:focus {
	opacity: 0.7;
	outline: none;
}

@media (max-width: 900px) {
	.section-block--with-overlay {
		padding: 20px;
	}

	.case-studies-icons {
		gap: 25px;
	}

	.case-study-icon-img {
		width: 130px;
	}

	.case-studies-header {
		padding: 4px 0 24px;
	}

	.case-studies-title {
		font-size: 22px;
	}

	.case-studies-hero {
		padding: 20px 12px 32px;
	}
}

@media (max-width: 430px) {
	.section-block--with-overlay {
		padding: 15px;
	}

	.case-studies-icons {
		gap: 20px;
		flex-direction: column;
		align-items: center;
	}

	.case-study-icon-img {
		width: 120px;
	}

	.case-studies-header {
		padding: 4px 0 20px;
	}

	.case-studies-title {
		font-size: 19px;
	}

	.case-studies-title br {
		display: none;
	}

	.case-studies-subtitle {
		font-size: 12px;
		padding: 4px 10px;
	}
}

.ol-wrapper-replaced,
.ul-wrapper-replaced {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
}

.ol-wrapper-replaced > p,
.ul-wrapper-replaced > p {
	font-size: 16px;
	font-style: normal;
	color: var(--text-color);
	line-height: 1.3;
	margin: 0;
	font-weight: 300;
}
