/*
 * CPPED Custom – main.css
 * Custom styles on top of Bootstrap 5
 */

/* =============================================
   1. CSS Custom Properties
   ============================================= */
:root {
	--cpped-primary:        #EE591F;
	--cpped-secondary:        #3D3D3D;
	--cpped-primary-rgb:    238, 89, 31;
	--cpped-primary-dark:   #cc4a18;
	--cpped-primary-light:  #f7a07c;
	--cpped-body-font:      'Raleway', 'Segoe UI', system-ui, -apple-system, sans-serif;
	--cpped-heading-font:   'Raleway', 'Segoe UI', system-ui, -apple-system, sans-serif;
	--cpped-transition:     0.25s ease-in-out;
}

/* =============================================
   2. Base / Typography
   ============================================= */
body {
	font-family: var(--cpped-body-font);
	color: #333;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--cpped-heading-font);
	font-weight: 700;
}

a {
	color: var(--cpped-primary);
	transition: color var(--cpped-transition);
}

a:hover {
	color: var(--cpped-primary-dark);
}

img {
	max-width: 100%;
	height: auto;
}

/* =============================================
   3. Skip Link (accessibility)
   ============================================= */
.skip-link:focus {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 9999;
	padding: .5rem 1rem;
	background: var(--cpped-primary);
	color: #fff;
	font-weight: 700;
	text-decoration: none;
	border-radius: 0 0 .25rem 0;
}

/* =============================================
   4. Header
   ============================================= */
.site-header {
	position: sticky;
	top: 0;
	z-index: 1030;
}

.logo-section img {
	max-height: 80px;
	width: auto;
}

/* WordPress wraps the custom logo in <a class="custom-logo-link"> */
.logo-section .custom-logo-link {
	display: inline-block;
}

/* Navbar */
#site-navigation .nav-link {
	font-weight: 600;
	font-size: 13px;
	color: #333;
	padding-right: .875rem;
	padding-left: .875rem;
	transition: color var(--cpped-transition);
}

#site-navigation .nav-link:hover,
#site-navigation .nav-link.active,
#site-navigation .nav-link[aria-current="page"] {
	color: var(--cpped-primary);
}

#site-navigation .dropdown-item {
	font-weight: 600;
	font-size: 13px;
	color: #333;
}

#site-navigation .dropdown-item:hover,
#site-navigation .dropdown-item:focus {
	background-color: rgba(var(--cpped-primary-rgb), .1);
	color: var(--cpped-primary);
}

/* =============================================
   5. Bootstrap primary colour overrides
   ============================================= */
.btn-primary {
	--bs-btn-bg:           var(--cpped-primary);
	--bs-btn-border-color: var(--cpped-primary);
	--bs-btn-hover-bg:           var(--cpped-primary-dark);
	--bs-btn-hover-border-color: var(--cpped-primary-dark);
	--bs-btn-active-bg:           var(--cpped-primary-dark);
	--bs-btn-active-border-color: var(--cpped-primary-dark);
}

.btn-outline-primary {
	--bs-btn-color:        var(--cpped-primary);
	--bs-btn-border-color: var(--cpped-primary);
	--bs-btn-hover-bg:     var(--cpped-primary);
	--bs-btn-hover-border-color: var(--cpped-primary);
}

.btn-white {
	--bs-btn-bg:                #fff;
	--bs-btn-color:             #333;
	--bs-btn-border-color:      #fff;
	--bs-btn-hover-bg:          #f0f0f0;
	--bs-btn-hover-color:       #333;
	--bs-btn-hover-border-color:#f0f0f0;
	--bs-btn-active-bg:         #e0e0e0;
	--bs-btn-active-border-color:#e0e0e0;
}

.text-primary { color: var(--cpped-primary) !important; }
.bg-primary   { background-color: var(--cpped-primary) !important; }
.bg-secondary   { background-color: var(--cpped-secondary) !important; }

/* =============================================
   6. Homepage sections
   ============================================= */
.section-padding {
	padding-top: 5rem;
	padding-bottom: 5rem;
}

/* Slider */
.section-slider {
	overflow: hidden;
}

/* Info Icons */
.section-info-icons .widget {
	text-align: center;
	padding: 2rem 1rem;
}

/* Services */
.section-services .widget {
	text-align: center;
	padding: 1.5rem 1rem;
}

/* =============================================
   7. Cards
   ============================================= */
.card {
	transition: transform var(--cpped-transition), box-shadow var(--cpped-transition);
}

.card:hover {
	transform: translateY(-4px);
	box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .1) !important;
}

.card-img-top {
	overflow: hidden;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.card-img-top img,
.card-img-top a img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .4s ease;
}

.card:hover .card-img-top img,
.card:hover .card-img-top a img {
	transform: scale(1.04);
}

/* =============================================
   8. Single post / page
   ============================================= */
.entry-content {
	line-height: 1.8;
}

.entry-content img {
	border-radius: .375rem;
	margin-bottom: 1rem;
}

.entry-content blockquote {
	border-left: 4px solid var(--cpped-primary);
	padding: 1rem 1.5rem;
	margin: 1.5rem 0;
	background: rgba(var(--cpped-primary-rgb), .05);
	border-radius: 0 .375rem .375rem 0;
	font-style: italic;
}

.entry-content pre {
	background: #f8f9fa;
	border: 1px solid #dee2e6;
	border-radius: .375rem;
	padding: 1.25rem;
	overflow-x: auto;
}

.entry-content table {
	width: 100%;
	margin-bottom: 1rem;
	border-collapse: collapse;
}

.entry-content table th,
.entry-content table td {
	padding: .5rem .75rem;
	border: 1px solid #dee2e6;
}

.entry-content table thead th {
	background: var(--cpped-primary);
	color: #fff;
}

/* Post navigation */
.post-navigation {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
}

.post-navigation a {
	display: inline-block;
	max-width: 48%;
	color: var(--cpped-primary);
	text-decoration: none;
	font-weight: 600;
}

/* =============================================
   9. Sidebar widgets
   ============================================= */
.widget-title {
	font-size: 1rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .05em;
	margin-bottom: 1rem;
}

.widget ul {
	padding-left: 0;
	list-style: none;
}

.widget ul li {
	padding: .25rem 0;
	border-bottom: 1px solid rgba(0,0,0,.06);
}

.widget ul li:last-child {
	border-bottom: none;
}

.widget ul li a {
	text-decoration: none;
	color: inherit;
	transition: color var(--cpped-transition);
}

.widget ul li a:hover {
	color: var(--cpped-primary);
}

/* =============================================
   10. Pre-footer mosaic gallery
   ============================================= */
.prefooter-gallery {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	grid-auto-rows: 70px;
	gap: 4px;
}

.prefooter-gallery a {
	display: block;
	overflow: hidden;
}

.prefooter-gallery a:nth-child(1) { grid-column: span 2; }  /* wide */
.prefooter-gallery a:nth-child(2) { grid-row: span 2; }     /* tall */
.prefooter-gallery a:nth-child(5) { grid-column: span 2; }  /* wide (row 3) */

.prefooter-gallery img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform var(--cpped-transition);
}

.prefooter-gallery a:hover img {
	transform: scale(1.07);
}

/* =============================================
   11. Sidebar – Recent Posts
   ============================================= */
.recent-posts-list li:last-child {
	border-bottom: none !important;
}

.sidebar-post-title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	line-height: 1.4;
	font-size: .9rem;
}

/* =============================================
   11. Comments
   ============================================= */
.comment-list .media {
	display: flex;
}

.comment-content p:last-child {
	margin-bottom: 0;
}

/* =============================================
   11. Footer
   ============================================= */
.site-footer {
	font-size: .9rem;
}

.site-footer a {
	color: rgba(255, 255, 255, .65);
	text-decoration: none;
	transition: color var(--cpped-transition);
}

.site-footer a:hover {
	color: #fff;
}

.site-footer .widget-title {
	color: #fff;
}

.prefooter-widgets {
	background-color: #f8f9fa;
}

/* =============================================
   12. Utilities
   ============================================= */
.section-title {
	position: relative;
	margin-bottom: 2.5rem;
}

.section-title::after {
	content: '';
	display: block;
	width: 3rem;
	height: 3px;
	background: var(--cpped-primary);
	margin-top: .5rem;
}

.section-title.text-center::after {
	margin-left: auto;
	margin-right: auto;
}

/* Pagination */
.pagination .page-link {
	color: var(--cpped-primary);
}

.pagination .page-item.active .page-link {
	background-color: var(--cpped-primary);
	border-color: var(--cpped-primary);
}

/* WordPress alignment classes */
.alignleft  { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter, .alignwide, .alignfull { display: block; margin: 0 auto 1rem; }
.alignwide  { max-width: 110%; margin-left: -5%; }
.alignfull  { max-width: 100vw; width: 100vw; margin-left: calc(50% - 50vw); }

/* WordPress caption */
.wp-caption {
	max-width: 100%;
}

.wp-caption-text {
	font-size: .85rem;
	color: #6c757d;
	text-align: center;
	margin-top: .25rem;
}

/* Gallery */
.gallery { display: flex; flex-wrap: wrap; gap: .5rem; }
.gallery-item { flex: 1 1 200px; overflow: hidden; border-radius: .25rem; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }

/* =============================================
   13. Responsive tweaks
   ============================================= */
@media (max-width: 991.98px) {
	.section-padding {
		padding-top: 3rem;
		padding-bottom: 3rem;
	}

	.logo-section img {
		max-height: 60px;
	}
}

@media (max-width: 575.98px) {
	.section-padding {
		padding-top: 2rem;
		padding-bottom: 2rem;
	}

	.post-navigation {
		flex-direction: column;
	}

	.post-navigation a {
		max-width: 100%;
	}
}

/* =============================================
   14. Print
   ============================================= */
@media print {
	.site-header,
	.site-footer,
	.prefooter-widgets,
	.sidebar-widgets,
	#comments {
		display: none !important;
	}

	.entry-content {
		font-size: 12pt;
	}
}

/* ============================================
   15. Custom styles by Pixelfabrica
   ============================================ */
a.nav-link, a.dropdown-item {
  text-transform: uppercase;
}
