/* =========================================
   SERVICE TEMPLATE 
========================================= */

.service-hero {
	position: relative;
	padding: 6rem 0 4.5rem;
	background: linear-gradient(135deg, var(--deep-blue), #0f3a5a);
	color: var(--white);
	text-align: center;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

/* Overlay for faded background image effect */
.service-hero-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(10, 35, 55, 0.75);
	z-index: 1;
}

/* When background image exists, add a darker overlay for text readability */
.service-hero[style*="background-image"] .service-hero-overlay {
	background: rgba(10, 35, 55, 0.82);
}

/* Content sits above overlay */
.service-hero-content {
	position: relative;
	z-index: 2;
	max-width: 900px;
	margin: 0 auto;
	padding: 0 32px;
}

/* Fallback gradient when no image */
.service-hero:not([style*="background-image"]) .service-hero-overlay {
	display: none;
}

.service-hero-icon {
	font-size: 3.5rem;
	margin-bottom: 1rem;
	color: var(--gold);
}

.service-title {
	font-size: clamp(2.2rem, 4.5vw, 3.5rem);
	margin-bottom: 1rem;
	font-family: 'Montserrat', sans-serif;
}

.service-intro {
	font-size: 1.1rem;
	line-height: 1.8;
	color: rgba(255,255,255,0.9);
	max-width: 720px;
	margin: 0 auto 2rem;
}

.service-hero-buttons {
	display: flex;
	gap: 1rem;
	justify-content: center;
	flex-wrap: wrap;
}

/* =========================================
   LAYOUT
========================================= */

.service-content-section {
	padding: 5rem 0;
	background: var(--soft-grey);
}

.service-grid {
	display: grid;
	grid-template-columns: 2fr 1fr;
	gap: 2rem;
}

/* On desktop, maintain normal order */
@media (min-width: 992px) {
	.service-grid {
		grid-template-columns: 2fr 1fr;
	}
}

/* On mobile, content comes first in visual order */
@media (max-width: 991px) {
	.service-grid {
		grid-template-columns: 1fr;
	}
}

/* MAIN + SIDEBAR CARDS */
.service-content-card,
.sidebar-card {
	background: var(--white);
	border-radius: 20px;
	padding: 2rem;
	border: 1px solid var(--light-grey);
	box-shadow: 0 5px 20px rgba(0,0,0,0.05);
	margin-bottom: 2rem;
}

.service-page-content {
	color: var(--charcoal);
	line-height: 1.9;
}

/* =========================================
   PROFESSIONAL LINK STYLES (CONTENT LINKS)
   Using brand colors with proper states
========================================= */

/* Default link style in content */
.service-page-content a {
	color: var(--gold);
	text-decoration: none;
	font-weight: 500;
	border-bottom: 1px solid transparent;
	transition: all 0.25s ease;
	position: relative;
}

/* Hover state */
.service-page-content a:hover {
	color: #d4a837;
	border-bottom-color: var(--gold);
}

/* Active state (when clicking) */
.service-page-content a:active {
	color: #b8922e;
	transform: translateY(1px);
}

/* Visited state */
.service-page-content a:visited {
	color: #c9a03d;
}

/* Focus state for accessibility */
.service-page-content a:focus {
	outline: 2px solid var(--gold);
	outline-offset: 2px;
	border-radius: 4px;
}

/* Alternative blue scheme - uncomment if preferred */
/*
.service-page-content a {
	color: var(--deep-blue);
	border-bottom: 1px solid rgba(15, 58, 90, 0.2);
}

.service-page-content a:hover {
	color: #0f3a5a;
	border-bottom-color: var(--deep-blue);
}

.service-page-content a:active {
	color: #08263a;
}
*/

/* Style for buttons within content */
.service-page-content .btn {
	display: inline-block;
	padding: 0.75rem 1.5rem;
	border-radius: 40px;
	background: var(--gold);
	color: var(--deep-blue);
	font-weight: 600;
	border: none;
}

.service-page-content .btn:hover {
	background: #d4a837;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* =========================================
   PROFESSIONAL BULLET POINTS (BENEFITS LIST)
========================================= */

.benefits-list {
	list-style: none;
	padding: 0;
	margin: 1.5rem 0 0 0;
	display: flex;
	flex-direction: column;
	gap: 0.875rem;
}

.benefit-item {
	display: flex;
	align-items: flex-start;
	gap: 1rem;
	padding: 0.875rem 1rem;
	background: var(--soft-grey);
	border-radius: 14px;
	border: 1px solid var(--light-grey);
	transition: all 0.25s ease;
}

.benefit-item:hover {
	background: #f0f4f8;
	border-color: var(--gold);
	transform: translateX(4px);
}

.benefit-icon {
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	color: var(--gold);
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.benefit-icon svg {
	width: 100%;
	height: 100%;
	stroke-width: 2.5;
}

.benefit-text {
	flex: 1;
	line-height: 1.5;
	color: var(--charcoal);
	font-size: 1rem;
}

/* Professional styling for WordPress content bullet points */
.service-page-content ul,
.service-page-content ol {
	margin: 1.25rem 0;
	padding-left: 1.5rem;
}

.service-page-content li {
	margin-bottom: 0.5rem;
	line-height: 1.7;
}

.service-page-content ul > li {
	list-style-type: none;
	position: relative;
	padding-left: 1.5rem;
}

.service-page-content ul > li::before {
	content: "✓";
	color: var(--gold);
	font-weight: bold;
	position: absolute;
	left: 0;
	top: 0;
}

.service-page-content ul ul {
	margin: 0.5rem 0 0.5rem 1.5rem;
}

.service-page-content ul ul > li::before {
	content: "•";
	color: var(--gold-light, #c9a03d);
}

.service-page-content ol {
	counter-reset: item;
}

.service-page-content ol > li {
	counter-increment: item;
	list-style-type: none;
	position: relative;
	padding-left: 1.75rem;
}

.service-page-content ol > li::before {
	content: counter(item) ".";
	color: var(--gold);
	font-weight: 600;
	position: absolute;
	left: 0;
	top: 0;
}

/* =========================================
   SIDEBAR - CONTACT BUTTON SPACING
========================================= */

.sidebar-card {
	display: flex;
	flex-direction: column;
}

.sidebar-card h3 {
	margin-top: 0;
	margin-bottom: 0.75rem;
	font-size: 1.35rem;
}

.sidebar-card p {
	margin-bottom: 1.5rem;
	line-height: 1.6;
	color: var(--charcoal);
}

.sidebar-btn-wrapper {
	margin-top: 0.25rem;
}

.btn-full {
	display: block;
	width: 100%;
	text-align: center;
	padding: 0.875rem 1.5rem;
}

.sidebar-card .btn-primary {
	background: var(--gold);
	color: var(--deep-blue);
	border: none;
	font-weight: 600;
	transition: all 0.25s ease;
}

.sidebar-card .btn-primary:hover {
	background: #d4a837;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.sidebar-card .btn-primary:active {
	transform: translateY(0);
}

/* =========================================
   SIDEBAR LINKS
========================================= */

.service-sidebar-links {
	list-style: none;
	padding: 0;
	margin: 0;
}

.service-sidebar-links li {
	margin-bottom: 0.8rem;
}

.service-sidebar-links a {
	display: block;
	padding: 0.9rem 1rem;
	border-radius: 12px;
	background: var(--soft-grey);
	border: 1px solid var(--light-grey);
	color: var(--deep-blue);
	text-decoration: none;
	transition: all 0.25s ease;
}

.service-sidebar-links a:hover {
	background: var(--deep-blue);
	color: var(--white);
	transform: translateX(4px);
}

/* =========================================
   STICKY SIDEBAR (DESKTOP ONLY)
========================================= */

@media (min-width: 992px) {
	.service-sidebar {
		position: sticky;
		top: 120px;
		height: fit-content;
	}
}

@media (max-width: 991px) {
	.service-sidebar {
		position: static;
		margin-top: 0;
	}
}

/* =========================================
   ACCORDION - FIXED OVERFLOW ISSUE
========================================= */

.sidebar-accordion {
	margin-top: 1.5rem;
	border-radius: 16px;
	background: var(--white);
	border: 1px solid var(--light-grey);
	overflow: visible; /* Changed from hidden to prevent clipping */
}

.accordion-toggle {
	width: 100%;
	background: var(--white);
	color: var(--deep-blue);
	padding: 1.25rem 1.5rem;
	border: none;
	font-weight: 700;
	font-size: 1.1rem;
	font-family: 'Montserrat', sans-serif;
	display: flex;
	justify-content: space-between;
	align-items: center;
	cursor: pointer;
	transition: all 0.25s ease;
	text-align: left;
}

.accordion-toggle:hover {
	background: var(--soft-grey);
}

.accordion-toggle[aria-expanded="true"] {
	background: var(--deep-blue);
	color: var(--white);
}

.accordion-icon {
	transition: transform 0.3s ease;
	font-size: 1.5rem;
	font-weight: 300;
	display: inline-block;
}

.sidebar-accordion.active .accordion-icon {
	transform: rotate(45deg);
}

.accordion-content {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	background: var(--white);
	border-radius: 0 0 16px 16px;
}

/* Fix: Ensure expanded content shows all items without clipping */
.sidebar-accordion.active .accordion-content {
	max-height: 600px; /* Increased to accommodate all 8 services */
	overflow-y: auto; /* Add scroll if needed on very short screens */
	padding-bottom: 0.5rem;
}

/* Styling for accordion content when expanded */
.sidebar-accordion.active .service-sidebar-links {
	padding: 1.5rem;
	padding-top: 0.5rem;
	padding-bottom: 1rem;
}

/* Ensure the last link is fully visible */
.sidebar-accordion.active .service-sidebar-links li:last-child {
	margin-bottom: 0;
}

/* Optional: Add a subtle gradient fade on scroll for better UX */
.accordion-content::-webkit-scrollbar {
	width: 6px;
}

.accordion-content::-webkit-scrollbar-track {
	background: var(--soft-grey);
	border-radius: 3px;
}

.accordion-content::-webkit-scrollbar-thumb {
	background: var(--gold);
	border-radius: 3px;
}

/* Alternative: Remove scroll and ensure all content shows on mobile */
@media (max-width: 768px) {
	.sidebar-accordion.active .accordion-content {
		max-height: 480px;
		overflow-y: auto;
	}
	
	.sidebar-accordion.active .service-sidebar-links {
		padding: 1rem;
		padding-top: 0.5rem;
	}
	
	.service-sidebar-links a {
		padding: 0.75rem;
		font-size: 0.95rem;
	}
}

/* For very small screens, ensure all services are reachable */
@media (max-width: 480px) {
	.sidebar-accordion.active .accordion-content {
		max-height: 400px;
	}
}

/* =========================================
   CTA
========================================= */

.service-contact-cta {
	padding: 5rem 0;
	background: var(--deep-blue);
	color: var(--white);
	text-align: center;
}

.cta-box {
	max-width: 850px;
	margin: 0 auto;
	padding: 0 32px;
}

.cta-box p {
	color: rgba(255,255,255,0.85);
	margin-bottom: 2rem;
}

.cta-box .btn-primary {
	background: var(--gold);
	color: var(--deep-blue);
}

.cta-box .btn-primary:hover {
	background: #d4a837;
	transform: translateY(-2px);
}

/* =========================================
   RESPONSIVE - MOBILE FIRST
========================================= */

@media (max-width: 991px) {
	.service-grid {
		grid-template-columns: 1fr;
	}
	
	.service-content-section {
		padding: 3rem 0;
	}
	
	.service-content-card,
	.sidebar-card {
		padding: 1.5rem;
		margin-bottom: 1.5rem;
	}
	
	.service-sidebar {
		margin-top: 0;
	}
	
	.service-hero {
		padding: 3rem 0 2.5rem;
	}
	
	.benefit-item {
		padding: 0.75rem 1rem;
	}
	
	.accordion-toggle {
		padding: 1rem 1.25rem;
		font-size: 1rem;
	}
	
	.sidebar-accordion.active .service-sidebar-links {
		padding: 1rem;
		padding-top: 0.25rem;
	}
	
	/* Fix for accordion on tablet */
	.sidebar-accordion.active .accordion-content {
		max-height: 500px;
	}
}

@media (max-width: 768px) {
	.service-content-card,
	.sidebar-card {
		padding: 1.25rem;
	}

	.service-hero-buttons {
		flex-direction: column;
		align-items: center;
	}

	.service-hero-buttons .btn {
		width: 100%;
		max-width: 320px;
	}
	
	.benefits-list {
		gap: 0.75rem;
	}
	
	.benefit-item:hover {
		transform: translateX(2px);
	}
	
	.service-page-content ul,
	.service-page-content ol {
		padding-left: 1rem;
	}
	
	.service-page-content ul > li {
		padding-left: 1.25rem;
	}
	
	.sidebar-card p {
		margin-bottom: 1.25rem;
	}
	
	.btn-full {
		padding: 0.75rem 1rem;
	}
	
	/* Content links mobile styles */
	.service-page-content a {
		font-weight: 500;
	}
}

@media (max-width: 480px) {
	.service-hero-content {
		padding: 0 20px;
	}
	
	.service-title {
		font-size: 1.75rem;
	}
	
	.service-intro {
		font-size: 1rem;
	}
	
	.cta-box {
		padding: 0 20px;
	}
	
	.benefit-icon {
		width: 20px;
		height: 20px;
	}
	
	.benefit-text {
		font-size: 0.9375rem;
	}
	
	.accordion-toggle {
		padding: 0.875rem 1rem;
	}
	
	/* Ensure last service link is visible */
	.sidebar-accordion.active .accordion-content {
		max-height: 360px;
	}
}