/* =====================================================================
   Global Responsive Design Overrides
   ---------------------------------------------------------------------
   Imported by every page (frontend + admin). Ensures consistent
   mobile / tablet / laptop / desktop behavior without touching the
   existing visual identity.
   ===================================================================== */

/* ---------------------------------------------------------------------
   Global safety: prevent horizontal scroll caused by long words
   --------------------------------------------------------------------- */
html, body {
	overflow-x: hidden;
}

body {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	word-wrap: break-word;
	overflow-wrap: break-word;
}

p, h1, h2, h3, h4, h5, h6, li, span, div {
	overflow-wrap: break-word;
	word-break: break-word;
}

/* ---------------------------------------------------------------------
   Fluid typography helpers
   --------------------------------------------------------------------- */
.fs-fluid-1 { font-size: clamp(0.95rem, 1.5vw + 0.6rem, 1.1rem); }
.fs-fluid-2 { font-size: clamp(1rem, 1.7vw + 0.7rem, 1.25rem); }
.fs-fluid-3 { font-size: clamp(1.1rem, 2vw + 0.8rem, 1.5rem); }
.fs-fluid-4 { font-size: clamp(1.25rem, 2.5vw + 0.9rem, 1.85rem); }
.fs-fluid-5 { font-size: clamp(1.4rem, 3vw + 1rem, 2.2rem); }

/* ---------------------------------------------------------------------
   Touch-friendly buttons / links (≥ 44px tap target)
   --------------------------------------------------------------------- */
.btn,
.btn-action,
.btn-outline-action,
.btn-action-sm,
button[type="submit"],
button[type="button"] {
	min-height: 44px;
	padding: 10px 18px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	white-space: normal;
	word-break: break-word;
	text-align: center;
}

.btn-sm,
.btn-mini {
	min-height: 36px;
	padding: 6px 12px;
}

.strip-contact,
.strip-contact-phone,
.strip-contact-whatsapp {
	min-height: 36px;
}

a {
	-webkit-tap-highlight-color: rgba(200, 164, 74, 0.2);
}

/* ---------------------------------------------------------------------
   Images: responsive by default
   --------------------------------------------------------------------- */
img {
	max-width: 100%;
	height: auto;
}

.project-thumb img,
.news-thumb img,
.hero-slide img,
.single-media img,
.gallery-thumb img,
.about-stat strong,
.about-cta h4,
.about-cta p,
.about-cta .btn {
	max-width: 100%;
}

.hero-slide,
.project-thumb,
.news-thumb,
.single-media,
.gallery-thumb,
.project-preview,
.feature-icon,
.value-icon,
.about-stat,
.features-highlight,
.highlight-card {
	overflow: hidden;
}

/* ---------------------------------------------------------------------
   Section / layout helpers
   --------------------------------------------------------------------- */
.section-pad {
	padding: 36px 0 28px;
}

.section-head {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: flex-end;
	justify-content: space-between;
	margin-bottom: 24px;
}

.section-head > div {
	min-width: 0;
	flex: 1 1 220px;
}

.section-head .btn,
.section-head > .btn {
	flex-shrink: 0;
}

.card-shell {
	overflow: hidden;
}

/* ---------------------------------------------------------------------
   Container width on small screens
   --------------------------------------------------------------------- */
.container {
	padding-left: 16px;
	padding-right: 16px;
}

@media (max-width: 575.98px) {
	.container {
		padding-left: 12px;
		padding-right: 12px;
	}
}

/* ---------------------------------------------------------------------
   Eyebrow / kicker scaling
   --------------------------------------------------------------------- */
.eyebrow,
.section-kicker {
	font-size: 0.78rem;
	padding: 4px 12px;
}

/* ---------------------------------------------------------------------
   Generic cards
   --------------------------------------------------------------------- */
.project-card,
.news-card,
.about-card,
.about-stat,
.value-card,
.feature-card,
.contact-card,
.service-standards,
.single-aside,
.single-body,
.single-hero,
.single-meta,
.gallery-section,
.feature-callout,
.about-cta,
.contact-cta,
.features-cta,
.seo-card,
.seo-location,
.seo-cta,
.card-shell,
.highlight-card {
	height: auto;
	min-width: 0;
}

/* ---------------------------------------------------------------------
   Hero / slider
   --------------------------------------------------------------------- */
.hero-title {
	font-size: clamp(1.7rem, 4vw + 0.5rem, 3rem);
	line-height: 1.25;
}

.hero-lead {
	font-size: 1rem;
	line-height: 1.7;
}

.hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.hero-actions .btn {
	flex: 1 1 auto;
	min-width: 0;
}

.hero-highlights {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hero-slide {
	min-height: 260px;
}

.hero-slide img {
	min-height: 260px;
}

.carousel-indicators {
	margin-bottom: 0.5rem;
}

.carousel-indicators [data-bs-target] {
	width: 9px;
	height: 9px;
}

/* ---------------------------------------------------------------------
   Project / news cards
   --------------------------------------------------------------------- */
.project-card,
.news-card {
	padding: 14px;
	gap: 10px;
}

.project-thumb,
.news-thumb {
	aspect-ratio: 4 / 3;
	border-radius: 14px;
}

.project-thumb img,
.news-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.project-meta,
.news-meta {
	font-size: 0.88rem;
}

.project-meta,
.location-breadcrumb {
	white-space: normal;
	overflow-wrap: anywhere;
}

/* ---------------------------------------------------------------------
   Section title fluid sizing
   --------------------------------------------------------------------- */
.section-title {
	font-size: clamp(1.4rem, 2.4vw + 0.6rem, 2rem);
	line-height: 1.3;
}

.single-title {
	font-size: clamp(1.6rem, 3vw + 0.6rem, 2.6rem);
	line-height: 1.25;
}

.single-lead,
.about-lead,
.features-lead,
.contact-lead,
.seo-lead {
	font-size: 1rem;
	line-height: 1.75;
}

/* ---------------------------------------------------------------------
   Forms
   --------------------------------------------------------------------- */
input.form-control,
textarea.form-control,
select.form-select,
.form-control,
.form-select {
	width: 100%;
	max-width: 100%;
	font-size: 1rem;
	padding: 12px 14px;
}

textarea.form-control {
	min-height: 140px;
}

.form-control:focus,
.form-select:focus {
	box-shadow: 0 0 0 0.2rem rgba(200, 164, 74, 0.2);
}

.form-label {
	font-weight: 600;
	margin-bottom: 6px;
	display: inline-block;
}

/* ---------------------------------------------------------------------
   Tables (admin)
   --------------------------------------------------------------------- */
.table-responsive {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

table.table {
	min-width: 100%;
	font-size: 0.92rem;
}

table.table th,
table.table td {
	white-space: nowrap;
	vertical-align: middle;
}

table.table th {
	font-weight: 700;
}

/* ---------------------------------------------------------------------
   Info lists (single hero / aside)
   --------------------------------------------------------------------- */
.info-list li {
	flex-wrap: wrap;
}

.info-list li > span {
	min-width: 0;
	flex: 1 1 200px;
}

.single-aside,
.single-body,
.single-hero {
	padding: 22px;
}

.single-meta {
	flex-direction: column;
	align-items: flex-start;
}

.single-meta-item {
	font-size: 0.9rem;
}

.breadcrumb-bar {
	font-size: 0.88rem;
	word-break: break-word;
}

/* ---------------------------------------------------------------------
   Gallery grid
   --------------------------------------------------------------------- */
.gallery-grid {
	grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.gallery-thumb {
	aspect-ratio: 4 / 3;
}

.gallery-item {
	overflow: hidden;
	border-radius: 12px;
}

.gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ---------------------------------------------------------------------
   Top-strip (header contact row) — already responsive via flex-wrap
   but tighten gap on mobile
   --------------------------------------------------------------------- */
@media (max-width: 575.98px) {
	.top-strip .container {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}

	.top-strip .strip-item {
		font-size: 0.85rem;
	}

	.strip-contacts {
		width: 100%;
		justify-content: flex-start;
	}

	.strip-contact {
		font-size: 0.85rem;
		padding: 5px 10px;
	}
}

/* ---------------------------------------------------------------------
   Site header / nav (mobile) — handled in includes/header.php but ensure
   no overflow from sticky positioning
   --------------------------------------------------------------------- */
.site-header {
	max-width: 100vw;
	overflow-x: clip;
}

.site-nav .container {
	max-width: 100%;
}

/* ---------------------------------------------------------------------
   Nav mega menus — make sure they don't exceed viewport
   --------------------------------------------------------------------- */
.nav-classic-sub,
.nav-mega-panel {
	max-width: calc(100vw - 16px);
}

/* ---------------------------------------------------------------------
   Page-specific responsive tweaks
   --------------------------------------------------------------------- */
@media (max-width: 767.98px) {
	.hero-highlights {
		gap: 8px;
	}

	.hero-highlights .highlight-card {
		padding: 10px;
	}

	.hero-highlights .highlight-card strong {
		font-size: 1.05rem;
	}

	.section-pad {
		padding: 32px 0 22px;
	}

	.project-card .btn,
	.news-card .btn {
		width: 100%;
	}

	.contact-info-item {
		flex-wrap: wrap;
	}

	.contact-info-item i {
		flex-shrink: 0;
	}

	.single-aside,
	.single-body,
	.single-hero {
		padding: 18px;
	}

	.gallery-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.about-stat,
	.features-highlight,
	.highlight-card {
		padding: 12px;
	}

	.about-stat strong,
	.features-highlight strong,
	.highlight-card strong {
		font-size: 1.1rem;
	}

	.value-card,
	.feature-card {
		padding: 18px;
	}

	.about-cta,
	.contact-cta,
	.features-cta,
	.seo-cta {
		padding: 22px 18px;
	}

	.about-cta h4,
	.contact-cta h4,
	.features-cta h4,
	.seo-cta h3 {
		font-size: 1.2rem;
	}
}

@media (max-width: 575.98px) {
	.hero-actions {
		flex-direction: column;
		align-items: stretch;
	}

	.hero-actions .btn {
		width: 100%;
	}

	.gallery-grid {
		grid-template-columns: 1fr 1fr;
	}

	.timeline {
		padding-right: 18px;
	}

	.timeline-item {
		padding: 0 0 14px 16px;
	}

	.timeline-item::before {
		right: -20px;
		width: 12px;
		height: 12px;
	}
}

@media (min-width: 768px) and (max-width: 991.98px) {
	.hero-highlights {
		gap: 10px;
	}
}

/* ---------------------------------------------------------------------
   Site footer — column layout that stacks on small screens
   --------------------------------------------------------------------- */
.site-footer {
	background: rgba(30, 27, 22, 0.92);
	color: #fefaf2;
	padding: 32px 0;
	margin-top: 60px;
}

.site-footer .footer-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
	align-items: center;
	justify-items: center;
	text-align: center;
}

@media (min-width: 768px) {
	.site-footer .footer-grid {
		grid-template-columns: 1fr 1fr 1fr;
		justify-items: stretch;
		text-align: start;
	}
}

.site-footer .footer-brand .brand {
	color: #fefaf2;
	display: inline-flex;
	align-items: center;
	gap: 12px;
	font-weight: 800;
	text-decoration: none;
}

.site-footer .footer-brand .brand-logo {
	height: 48px;
	width: auto;
	border-radius: 8px;
	transition: transform 0.25s ease;
}

.site-footer .footer-brand .brand:hover .brand-logo {
	transform: scale(1.04);
}

.site-footer .footer-text {
	color: rgba(254, 250, 242, 0.75);
	font-size: 0.92rem;
}

.site-footer .footer-social {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	justify-content: center;
}

@media (min-width: 768px) {
	.site-footer .footer-social {
		justify-content: flex-end;
	}
}

.site-footer .footer-social a {
	color: rgba(254, 250, 242, 0.85);
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
	font-size: 0.95rem;
}

.site-footer .footer-social a:hover,
.site-footer .footer-social a:focus-visible {
	background: var(--gold);
	color: #1e1b16;
	transform: translateY(-2px);
}

/* ---------------------------------------------------------------------
   Admin-specific responsive tweaks
   --------------------------------------------------------------------- */
.admin-form-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 14px;
}

@media (min-width: 768px) {
	.admin-form-grid {
		grid-template-columns: 1fr 1fr;
	}
}

.admin-form-grid .span-2 {
	grid-column: 1 / -1;
}

.admin-card-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
}

@media (min-width: 768px) {
	.admin-card-grid {
		grid-template-columns: 1fr 1fr;
	}
}

@media (min-width: 1200px) {
	.admin-card-grid {
		grid-template-columns: 5fr 7fr;
	}
}

/* Admin top-bar: wrap on small screens */
.admin .top-bar {
	background: rgba(255, 255, 255, 0.9);
	border-bottom: 1px solid rgba(200, 164, 74, 0.2);
	padding: 16px 0;
	backdrop-filter: blur(6px);
}

.admin .top-bar .container {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.admin .top-bar .brand {
	font-weight: 800;
	color: var(--olive);
	display: inline-flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
}

.admin .top-bar .brand-logo {
	height: 48px;
	width: auto;
	border-radius: 8px;
	transition: transform 0.25s ease;
}

.admin .top-bar .brand:hover .brand-logo {
	transform: scale(1.04);
}

.admin .top-bar .admin-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.admin .top-bar .admin-actions .btn {
	min-height: 38px;
	padding: 6px 14px;
}

@media (max-width: 575.98px) {
	.admin .top-bar .container {
		justify-content: center;
		text-align: center;
	}

	.admin .top-bar .brand {
		flex-direction: column;
		gap: 6px;
	}

	.admin .top-bar .brand-logo {
		height: 40px;
	}

	.admin .top-bar .admin-actions {
		justify-content: center;
		width: 100%;
	}
}

/* Admin toolbar: stack on small screens */
.admin-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 18px;
}

.admin-toolbar > div,
.admin-toolbar > form,
.admin-toolbar > .btn {
	min-width: 0;
}

/* Status pills / action buttons: scrollable on small screens */
.admin-actions-row {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

@media (max-width: 575.98px) {
	.top-bar .container {
		flex-wrap: wrap;
		gap: 8px;
	}

	.admin-actions-row .btn {
		font-size: 0.78rem;
		padding: 4px 8px;
	}
}

/* ---------------------------------------------------------------------
   Helpers for very small screens
   --------------------------------------------------------------------- */
@media (max-width: 380px) {
	.strip-contact-label {
		font-size: 0.8rem;
	}
}
