/*
Theme Name: Blocksy Child
Theme URI: https://creativethemes.com/blocksy/
Description: Child theme for Blocksy customizations.
Author: Site Admin
Template: blocksy
Version: 1.0.0
Text Domain: blocksy-child
*/

.main-footer .footer-logo figure {
	margin: 0;
	width: 220px;
	height: 72px;
	display: flex;
	align-items: center;
}

.main-footer .footer-logo .custom-logo-link {
	display: inline-flex;
	align-items: center;
	max-width: 100%;
	max-height: 100%;
}

.main-footer .footer-logo img,
.main-footer .footer-logo .custom-logo {
	width: 220px;
	height: 72px;
	max-width: 220px;
	max-height: 72px;
	object-fit: contain;
	object-position: left center;
}

@media (max-width: 575.98px) {
	.main-footer .footer-logo figure,
	.main-footer .footer-logo img,
	.main-footer .footer-logo .custom-logo {
		width: 180px;
		height: 60px;
		max-width: 180px;
		max-height: 60px;
	}
}

/* ========================================
   Mobile Responsiveness Fixes
   ======================================== */

/* Prevent horizontal overflow on mobile */
html, body {
	max-width: 100%;
	overflow-x: hidden;
}

/* Mobile navbar container fixes */
@media (max-width: 991.98px) {
	/* Fix navbar collapse positioning */
	#mainNav .navbar-collapse {
		position: relative;
		width: 100%;
		left: 0 !important;
		right: 0 !important;
		margin: 0;
		padding: 0;
		background: #fff;
		z-index: 1000;
	}
	
	/* Fix mobile menu to stay within viewport */
	#mainNav .navbar-nav {
		width: 100%;
		margin: 0 !important;
		padding: 10px 0;
		background: #fff;
	}
	
	/* Ensure nav items are full width on mobile */
	#mainNav .nav-item {
		width: 100%;
		text-align: left;
		border-bottom: 1px solid #f0f0f0;
	}
	
	#mainNav .nav-link {
		padding: 12px 20px !important;
		display: block;
		width: 100%;
	}
	
	/* Fix mobile logo and toggler positioning */
	.only-on-mobile {
		display: inline-block !important;
		float: left !important;
		width: auto !important;
		margin: 0;
		text-align: left !important;
		padding: 10px 0;
	}
	
	#mainNav .navbar-toggler {
		float: right !important;
		display: block;
		margin: 10px 0 !important;
		width: auto;
		position: relative;
		background: rgba(62, 73, 155, 0.1);
		border: 1px solid rgba(62, 73, 155, 0.3);
	}
	
	#mainNav .navbar-toggler:focus {
		box-shadow: 0 0 0 0.2rem rgba(62, 73, 155, 0.25);
	}
	
	/* Flexbox layout for mobile header - logo left, toggler right */
	#mainNav .dis-inlin {
		display: flex;
		flex-wrap: wrap;
		justify-content: space-between;
		align-items: center;
		width: 100%;
		overflow: hidden;
	}
	
	/* Make the collapse appear on its own row */
	#mainNav .navbar-collapse {
		flex-basis: 100%;
	}
	
	/* Fix container fluid on mobile */
	#mainNav .container-fluid {
		padding-left: 15px;
		padding-right: 15px;
		max-width: 100%;
	}
	
	#mainNav .container {
		max-width: 100%;
		padding: 0;
	}
	
	/* Hide desktop logo on mobile */
	.mobile-2 {
		display: none !important;
	}
}

/* Extra small devices (phones, less than 576px) */
@media (max-width: 575.98px) {
	/* Extra compact sections on small phones */
	section {
		padding: 30px 0 !important;
	}
	
	/* Extra compact headings */
	h1 {
		font-size: 24px !important;
	}
	
	h2 {
		font-size: 20px !important;
	}
	
	h3 {
		font-size: 18px !important;
	}
	
	/* Extra compact text */
	p, .text {
		font-size: 13px !important;
	}
	
	/* Extra compact spacing */
	[class*="col-"] {
		padding-left: 10px !important;
		padding-right: 10px !important;
		margin-bottom: 15px;
	}
	
	.container {
		padding-left: 12px;
		padding-right: 12px;
	}
	
	/* Mobile logo compact */
	.only-on-mobile .navbar-brand img {
		max-width: 160px;
		height: auto;
	}
	
	/* Compact footer sections on mobile */
	.main-footer .widgets-section .row > div {
		margin-bottom: 20px;
	}
	
	.main-footer .footer-widget {
		padding: 0 10px;
	}
	
	/* Make footer text more compact */
	.main-footer .widget-content .text {
		font-size: 12px;
		line-height: 1.5;
	}
	
	/* Reduce footer padding on mobile */
	.main-footer {
		padding-top: 25px;
	}
	
	.main-footer .widgets-section {
		padding-bottom: 15px;
	}
	
	/* Compact buttons extra small */
	.btn, .theme-btn, button[type="submit"] {
		padding: 8px 16px !important;
		font-size: 13px !important;
	}
	
	/* Extra compact blog elements */
	.blog-post, .post-item {
		padding: 12px !important;
	}
	
	.post-title {
		font-size: 16px !important;
	}
	
	/* Compact breadcrumbs */
	.breadcrumbs__section {
		padding: 20px 0 !important;
	}
	
	.breadcrumbs__section h1,
	.breadcrumbs__section .page-title {
		font-size: 22px !important;
	}
	
	/* Compact tables on mobile */
	table {
		font-size: 12px !important;
	}
	
	table td, table th {
		padding: 6px !important;
	}
	
	/* Compact figures and images */
	figure {
		margin: 10px 0 !important;
	}
	
	figcaption {
		font-size: 12px !important;
		padding: 5px 0;
	}
}

/* ========================================
   Medium devices (tablets, 576px to 768px)
   ======================================== */
@media (min-width: 576px) and (max-width: 767.98px) {
	section {
		padding: 45px 0 !important;
	}
	
	h1 {
		font-size: 30px !important;
	}
	
	h2 {
		font-size: 26px !important;
	}
	
	.container {
		padding-left: 15px;
		padding-right: 15px;
	}
	
	.only-on-mobile .navbar-brand img {
		max-width: 180px;
	}
}

/* Small devices (landscape phones, less than 768px) */
@media (max-width: 767.98px) {
	/* Ensure top bar is hidden properly */
	.top-bar {
		display: none !important;
	}
	
	/* Adjust navbar padding */
	#mainNav {
		padding: 0 !important;
	}
	
	/* Make sure dropdown menus work on mobile */
	#mainNav .dropdown-menu {
		position: static !important;
		float: none;
		width: 100%;
		margin: 0;
		border: none;
		box-shadow: none;
		padding-left: 20px;
	}
	
	#mainNav .dropdown-item {
		padding: 8px 15px;
		white-space: normal;
	}
}

/* ========================================
   Content Width & Overflow Fixes
   ======================================== */

/* Ensure all images are responsive */
img {
	max-width: 100%;
	height: auto;
}

/* Fix for rows and containers causing overflow */
.row {
	margin-left: 0 !important;
	margin-right: 0 !important;
}

.container, .container-fluid {
	max-width: 100%;
	overflow-x: hidden;
}

/* Fix sections that might overflow */
section {
	overflow-x: hidden;
}

/* ========================================
   Mobile Compact Appearance - All Sections
   ======================================== */

/* Base mobile styles for all devices < 768px */
@media (max-width: 767.98px) {
	/* Reduce section padding */
	section {
		padding: 40px 0 !important;
	}
	
	section.subscribe-section {
		padding: 30px 0 !important;
	}
	
	/* Compact headings */
	h1 {
		font-size: 28px !important;
		line-height: 1.3 !important;
		margin-bottom: 15px !important;
	}
	
	h2 {
		font-size: 24px !important;
		line-height: 1.3 !important;
		margin-bottom: 12px !important;
	}
	
	h3 {
		font-size: 20px !important;
		line-height: 1.3 !important;
		margin-bottom: 10px !important;
	}
	
	h4, h5, h6 {
		font-size: 18px !important;
		line-height: 1.3 !important;
		margin-bottom: 8px !important;
	}
	
	/* Compact paragraphs and text */
	p, .text {
		font-size: 14px !important;
		line-height: 1.6 !important;
		margin-bottom: 12px !important;
	}
	
	/* Reduce column spacing */
	[class*="col-"] {
		padding-left: 12px !important;
		padding-right: 12px !important;
		margin-bottom: 20px;
	}
	
	/* Compact buttons */
	.btn, .theme-btn, button[type="submit"] {
		padding: 10px 20px !important;
		font-size: 14px !important;
	}
	
	/* Compact forms */
	input[type="text"],
	input[type="email"],
	input[type="tel"],
	textarea,
	.form-control {
		font-size: 14px !important;
		padding: 10px 12px !important;
		margin-bottom: 12px;
	}
	
	/* Compact cards and widgets */
	.card, .widget, .footer-widget {
		margin-bottom: 20px !important;
	}
	
	.card-body, .widget-content {
		padding: 15px !important;
	}
	
	/* Compact lists */
	ul, ol {
		padding-left: 20px;
		margin-bottom: 15px;
	}
	
	li {
		margin-bottom: 8px;
		padding: 5px 0;
	}
	
	/* Compact spacing utilities */
	.mb-5, .my-5 {
		margin-bottom: 20px !important;
	}
	
	.mt-5 {
		margin-top: 20px !important;
	}
	
	.pb-5, .py-5 {
		padding-bottom: 20px !important;
	}
	
	.pt-5 {
		padding-top: 20px !important;
	}
	
	/* Hero/Banner sections compact */
	.hero-section, .banner-section, .breadcrumbs__section {
		padding: 30px 0 !important;
		min-height: auto !important;
	}
	
	.hero-section h1, .banner-section h1 {
		font-size: 26px !important;
	}
	
	/* Blog post compact */
	.blog-post, .post-item, .post {
		margin-bottom: 20px !important;
		padding: 15px !important;
	}
	
	.post-thumb, .post-image {
		margin-bottom: 12px !important;
	}
	
	.post-title {
		font-size: 18px !important;
		margin-bottom: 8px !important;
	}
	
	.post-meta, .post-date, .time {
		font-size: 12px !important;
		margin-bottom: 8px;
	}
	
	/* Sidebar compact */
	.sidebar, .blog-sidebar {
		margin-top: 30px;
		padding: 15px !important;
	}
	
	.sidebar .widget {
		padding: 15px !important;
		margin-bottom: 20px !important;
	}
	
	/* Gallery/Grid compact */
	.gallery-item, .grid-item {
		margin-bottom: 15px !important;
	}
	
	/* Events/Causes compact */
	.event-item, .cause-item {
		margin-bottom: 20px !important;
		padding: 15px !important;
	}
	
	/* Team members compact */
	.team-member, .volunteer-item {
		margin-bottom: 20px !important;
	}
	
	/* Compact social icons */
	.social-icon-three li,
	.social-links li {
		margin: 0 5px !important;
	}
	
	.social-icon-three a,
	.social-links a {
		width: 35px !important;
		height: 35px !important;
		font-size: 14px !important;
		line-height: 35px !important;
	}
}

/* Ensure subscribe section is responsive */
@media (max-width: 767.98px) {
	.subscribe-section {
		padding: 30px 15px !important;
	}
	
	.subscribe-section .title-column,
	.subscribe-section .subscribe-form {
		text-align: center;
		margin-bottom: 15px;
		padding: 0 10px !important;
	}
	
	.subscribe-section h2 {
		font-size: 22px !important;
		margin-bottom: 10px !important;
	}
	
	.subscribe-section .text {
		font-size: 13px !important;
		margin-bottom: 15px !important;
	}
	
	.subscribe-section .form-group {
		max-width: 100% !important;
	}
	
	.subscribe-section input[type="email"] {
		width: 100% !important;
		padding: 10px 12px !important;
		font-size: 14px !important;
	}
}

/* Compact Footer Sections */
@media (max-width: 767.98px) {
	/* Main footer compact */
	.main-footer {
		padding-top: 30px !important;
		padding-bottom: 0 !important;
	}
	
	.main-footer .widgets-section {
		padding-bottom: 20px !important;
	}
	
	.main-footer .footer-column {
		margin-bottom: 25px !important;
		padding: 0 10px !important;
	}
	
	.main-footer .footer-widget {
		padding: 0 !important;
	}
	
	/* Footer headings compact */
	.main-footer .widget-title {
		font-size: 18px !important;
		margin-bottom: 12px !important;
		padding-bottom: 8px !important;
	}
	
	/* Footer text compact */
	.main-footer .widget-content .text {
		font-size: 13px !important;
		line-height: 1.6 !important;
		margin-bottom: 12px !important;
		text-align: justify;
	}
	
	/* Footer links compact */
	.main-footer .list li,
	.main-footer .contact-info-list li {
		font-size: 13px !important;
		padding: 5px 0 !important;
		margin-bottom: 5px !important;
	}
	
	/* Footer posts compact */
	.main-footer .posts .post {
		margin-bottom: 15px !important;
		padding-bottom: 15px !important;
	}
	
	.main-footer .post-thumb {
		width: 60px !important;
		height: 60px !important;
		margin-right: 10px !important;
	}
	
	.main-footer .post-thumb img {
		width: 60px !important;
		height: 60px !important;
	}
	
	.main-footer .desc-text {
		font-size: 13px !important;
		line-height: 1.4 !important;
		margin-bottom: 5px !important;
	}
	
	.main-footer .time {
		font-size: 11px !important;
	}
	
	/* Footer bottom compact */
	.main-footer .footer-bottom {
		padding: 15px 0 !important;
		text-align: center !important;
	}
	
	.main-footer .footer-bottom .float-md-start,
	.main-footer .footer-bottom .float-md-end {
		float: none !important;
		text-align: center !important;
		margin-bottom: 10px;
	}
	
	.main-footer .footer-bottom ul {
		display: flex;
		justify-content: center;
		flex-wrap: wrap;
		padding: 0;
		margin: 0;
	}
	
	.main-footer .footer-bottom ul li {
		display: inline-block;
		padding: 0 8px !important;
		font-size: 12px !important;
	}
	
	.main-footer .copyright-text p {
		font-size: 12px !important;
		margin-bottom: 10px !important;
	}
}

/* Fix breadcrumbs and hero sections on mobile */
@media (max-width: 767.98px) {
	.breadcrumbs__section,
	.hero-section {
		width: 100%;
		overflow-x: hidden;
	}
	
	.breadcrumbs__section .container {
		padding: 0 15px;
	}
}
