/**
 * Acts & Regulations page.
 *
 * @package jpd-theme
 */


.jpd-page--acts-and-regulations {
	color: #333333;
	background: var(--jpd-white);
	padding: 0px 0 72px;
}


.jpd-acts-regulations {
	display: flex;
	flex-direction: column;
	gap: 2.5rem;
}

.jpd-acts-regulations__heading {
    margin: 0;  
	color: #0b3a74;
	font-family: var(--jpd-font-heading);
	font-size: clamp(1.5rem, 2.2vw, 1.85rem);
	font-weight: 700;
	line-height: 1.2;
    text-transform: uppercase;
}

.jpd-acts-content {
	padding-top: clamp(2rem, 4vw, 2rem);
}

/* Add margin bottom to additional section */
.jpd-acts-regulations__additional {
    padding: 1.5rem 1.65rem;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    background: #f7f8fa;
    margin-bottom: 2rem;   /* ← gap before footer ✅ */
}

.jpd-acts-regulations__items {
	display: flex;
	flex-direction: column;
	gap: 2.5rem;
}


.jpd-acts-regulations__item {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}


/* Act title */
.jpd-acts-regulations__title {
    margin: 0 0 1.5rem; 
	color: #0b3a74;
	font-family: var(--jpd-font-heading);
	font-size: clamp(1.25rem, 2vw, 1.6rem);
	font-weight: 700;
	line-height: 1.3;
    text-align: center;
}



/* Accordion */

.jpd-accordion {
	display: flex;
	flex-direction: column;
	border: 1px solid #e8d48a;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(3,47,60,0.06);
}


.jpd-accordion-item {
	border-bottom: 1px solid #e8ba28;
}

.jpd-accordion-item:last-child {
	border-bottom: 0;
}

.jpd-accordion-item__heading {
	margin: 0;
	font-size: inherit;
	font-weight: inherit;
}

/* Accordion trigger (the yellow bar) */
.jpd-accordion-item__trigger {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	width: 100%;
	margin: 0;
	padding: 1rem 1.5rem;
	border: 1px solid transparent;
	border-radius: 0;

	background: linear-gradient(
		90deg,
		#fde08d 0%,
		#f5c842 100%
	);
	color: #1a1a1a;
	font-family: inherit;
	font-size: clamp(0.95rem, 0.3vw + 0.85rem, 1.05rem);
	font-weight: 700;
	text-align: left;
	text-transform: none;
	cursor: pointer;
	transition:
		background 0.2s ease,
		border-color 0.2s ease,
		box-shadow 0.2s ease;
        
}

.jpd-accordion-item__trigger:hover,
.jpd-accordion-item__trigger:focus-visible {
	background: linear-gradient(
		90deg,
		#f5c842 0%,
		#e8ba28 100%
	);

	border-color: #df9f0c;
	box-shadow:0 0 0 3px rgba(232, 160, 32, 0.2);
	outline: 0;
}

.jpd-accordion-item__trigger[aria-expanded="true"] {
	background: linear-gradient(
		90deg,
		#f5c842 0%,
		#e8ba28 100%
	);
	border-color: #df9f0c;
}

.jpd-accordion-item__title {
	flex: 1;
}


/* Plus and minus icon */
.jpd-accordion-item__icon {
	position: relative;
	flex-shrink: 0;
	width: 1rem;
	height: 1rem;
}

.jpd-accordion-item__icon::before,
.jpd-accordion-item__icon::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	background: #1a1a1a;
	transform: translate(-50%, -50%);
}

.jpd-accordion-item__icon::before {
	width: 100%;
	height: 2px;
}

.jpd-accordion-item__icon::after {
	width: 2px;
	height: 100%;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.jpd-accordion-item__trigger[aria-expanded="true"] .jpd-accordion-item__icon::after {
	transform: translate(-50%, -50%) rotate(90deg);
	opacity: 0;
}


/* Accordion panel (collapsible content) */

.jpd-accordion-item__panel {
	background: #fffaf0;
    border-top: 1px solid #e8d48a;
}

.jpd-accordion-item__panel[hidden] {
	display: none;
}

.jpd-accordion-item__panel-inner {
	display: grid;
	grid-template-columns: 1fr 1fr;
}

.jpd-accordion-item__col {
	padding: 1.25rem 1.5rem;
	text-align: center;
	background: #fffaf0;
}

.jpd-accordion-item__col:first-child {
	display: flex;
	flex-direction: column;
	border-right: 1px solid #f1dfaa;
}

.jpd-accordion-item__col-label {
	display: block;
	margin-bottom: 0.75rem;
	color: #1a1a1a;
	font-size: clamp(0.85rem, 0.3vw + 0.75rem, 0.95rem);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
}

.jpd-accordion-item__col-content {
	color: #333;
	font-size: clamp(0.9rem, 0.3vw + 0.8rem, 1rem);
	line-height: 1.6;
	text-align: left;
}

/* Section content is vertically + horizontally centered within its
   column, so short section text sits in the middle of the row rather
   than pinned to the top. Penalties stays left-aligned/top so bullet
   lists read naturally.
   Compound selector (not just .jpd-accordion-item__section-content)
   so this always beats .jpd-accordion-item__col-content on shared
   properties like text-align, regardless of source order. */
.jpd-accordion-item__col-content.jpd-accordion-item__section-content {
	display: flex;
	flex: 1;
	align-items: center;
	justify-content: center;
	text-align: center;
}

.jpd-accordion-item__col-content p {
	margin: 0 0 0.75rem;
}

.jpd-accordion-item__col-content p:last-child {
	margin-bottom: 0;
}

.jpd-accordion-item__col-content ul {
	margin: 0;
	padding-left: 1.15rem;
	text-align: left;
}

.jpd-accordion-item__col-content li {
	margin-bottom: 0.5rem;
}

.jpd-accordion-item__col-content li:last-child {
	margin-bottom: 0;
}

/* ── Acts & Regulations Search Filter ── */
.jpd-acts-regulations-filters {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 22px 26px;
    border: 1px solid #d3d3d3;
    border-radius: 12px;
    background: #f3f3f3;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
}

.jpd-acts-regulations-filters__row {
    display: grid;
    grid-template-columns: 7.5rem minmax(0, 1fr);
    gap: 16px 20px;
    align-items: center;
}

.jpd-acts-regulations-filters__row-label {
    color: #2b2b2b;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
}

.jpd-acts-regulations-filters__row-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 14px;
    min-width: 0;
}

.jpd-acts-regulations-filters__keyword-wrap {
    flex: 1 1 320px;
    min-width: 220px;
}

.jpd-acts-regulations-filters__keyword {
    width: 100%;
    height: 44px;
    border: 1px solid #cfcfcf;
    border-radius: 999px;
    padding: 0 18px;
    background: #ffffff;
    color: #2b2b2b;
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1;
    outline: none;
    box-sizing: border-box;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.jpd-acts-regulations-filters__keyword::placeholder {
    color: #9a9a9a;
}

.jpd-acts-regulations-filters__keyword:focus {
    border-color: #103d74;
    box-shadow: 0 0 0 3px rgba(16, 61, 116, 0.14);
}

.jpd-acts-regulations-filters__button {
    height: 44px;
    padding: 0 22px;
    border: none;
    border-radius: 999px;
    background: #103d74;
    color: #ffffff;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        transform 0.2s ease;
}

.jpd-acts-regulations-filters__button:hover {
    background: #0c315d;
}

.jpd-acts-regulations-filters__button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(16, 61, 116, 0.18);
}

.jpd-search-highlight {
    background-color: #fff7d6;
    border-left: 4px solid #103d74;
    border-radius: 6px;
    padding: 8px 12px;
    transition: background-color 0.3s ease;
}


/* Additional regulations */

.jpd-acts-regulations__additional {
    margin-top: var(--jpd-spacing-lg);
    padding: 1.5rem 1.65rem;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    background: #f7f8fa;
}

.jpd-acts-regulations__additional-content h2,
.jpd-acts-regulations__additional-content h3,
.jpd-acts-regulations__additional-content h4 {
	display: inline-flex;
	align-items: center;
	margin: 0 0 1.25rem;
	padding: 0.45rem 1.5rem;
	border-radius: 999px;
	background: linear-gradient(
		90deg,
		#fde08d 0%,
		#f5c842 100%
	);

	color: #1a1a1a;
	font-size: clamp(0.9rem, 0.3vw + 0.8rem, 1rem);
	font-weight: 600;
	line-height: 1;
	text-transform: uppercase;
	text-transform: uppercase;
	letter-spacing: .06em;
}


.jpd-acts-regulations__additional-content p {
	margin: 0 0 1rem;
	color: #333;
	font-size: clamp(
		0.95rem,
		0.35vw + 0.85rem,
		1.05rem
	);
	line-height: 1.7;
}

.jpd-acts-regulations__additional-content {
	color: #333333;
	font-size: clamp(0.95rem, 0.35vw + 0.85rem, 1.05rem);
	line-height: 1.75;
}

/* Paragraph spacing */
.jpd-acts-regulations__additional-content p {
	margin: 0 0 1rem;
}


/* Lists inside additional regulations */
.jpd-acts-regulations__additional-content ul {
	margin: 0 0 1rem;
	padding-left: 1.25rem;
}


.jpd-acts-regulations__additional-content li {
	margin-bottom: 0.75rem;
	line-height: 1.7;
}


.jpd-acts-regulations__additional-content li:last-child {
	margin-bottom: 0;
}


.jpd-acts-regulations__additional-content strong {
	font-weight: 700;
}

@media (max-width: 920px) {

	.jpd-acts-hero__inner {
		grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
		min-height: 340px;
	}

	.jpd-acts-hero__copy {
		padding: 40px 24px 40px clamp(24px, 5vw, 52px);
	}
}

@media (max-width: 768px) {

    .jpd-acts-regulations-filters {
        padding: 18px;
    }


    .jpd-acts-regulations-filters__row {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }


    .jpd-acts-regulations-filters__row-label {
        font-size: 0.9rem;
    }


    .jpd-acts-regulations-filters__row-controls {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }


    .jpd-acts-regulations-filters__keyword-wrap {
        width: 100%;
        min-width: 0;
        flex: none;
    }


    .jpd-acts-regulations-filters__keyword {
        height: 44px;
        width: 100%;
    }


    .jpd-acts-regulations-filters__button {
        width: 100%;
        height: 44px;
    }


	.jpd-page--acts-and-regulations {
		padding: 0px 0 48px;
	}

	.jpd-acts-regulations {
		gap: 2rem;
	}

	.jpd-acts-regulations__heading {
		font-size: 1.35rem;
	}

	.jpd-acts-regulations__title {
		font-size: 1.15rem;
		margin-bottom: 1rem;
	}

	.jpd-accordion {
		border-radius: 8px;
		box-shadow: none;
	}

	.jpd-accordion-item__trigger {
		padding: 0.85rem 1rem;
	}

	.jpd-accordion-item__panel-inner {
		grid-template-columns: 1fr;
	}

	.jpd-accordion-item__col:first-child {
		border-right: 0;
		border-bottom: 1px solid #e8d48a;
	}

	.jpd-accordion-item__col {
		padding: 1rem;
	}

	.jpd-acts-regulations__additional {
        margin-top: var(--jpd-spacing-lg);
		padding: 1.25rem;
	}

	.jpd-acts-regulations__additional-title {
		font-size: 1rem;
	}

	.jpd-acts-regulations__list {
		padding-left: 1rem;
	}

	.jpd-acts-regulations__list li {
		margin-bottom: 0.65rem;
		line-height: 1.6;
	}

}