/* theme variables: replace values with exact hex from www.islandstarexpress.com if available */
:root{
	--isle-primary: #007c91;   /* example primary (teal-ish) */
	--isle-accent:  #00b3a6;   /* example accent */
	--isle-muted:   #6c757d;
}

/* Make the page a column flex container so footer can be pushed down */
html, body {
	height: 100%;
}
body {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	background: #f8fafc; /* existing background kept */
}

/* login page main should grow to fill available space */
/* login page uses <main class="container"> */
main.container {
	flex: 1 1 auto;
}

/* Page wrap (sidebar + content) must expand to fill remaining space */
/* admin/booking/users/items pages use #page-wrap + #page-content */
#page-wrap {
	flex: 1 1 auto;
	display: flex;
	min-height: 0; /* allow children flex to control overflow */
}

#page-content {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	min-height: 0;
	padding: 1.5rem;
}

/* Footer sticks to bottom of #page-content */
.footer {
	margin-top: auto;
	height: 48px;
	background: #fff;
	border-top: 1px solid rgba(0,0,0,.05);
}

/* Common overrides */
body { background: #f8fafc; }
.btn-primary {
	background-color: var(--isle-primary) !important;
	border-color: var(--isle-primary) !important;
}
.btn-primary:hover, .btn-primary:focus {
	background-color: color-mix(in srgb, var(--isle-primary) 80%, black) !important;
	border-color: color-mix(in srgb, var(--isle-primary) 80%, black) !important;
}
.badge.bg-primary, .bg-primary {
	background-color: var(--isle-primary) !important;
	border-color: var(--isle-primary) !important;
}
.form-check-input:checked {
	background-color: var(--isle-primary);
	border-color: var(--isle-primary);
}
.btn-outline-secondary {
	border-color: rgba(0,0,0,.08);
}

/* login page */
.login-card {
	max-width: 420px;
	width: 100%;
	padding: 1.5rem;
	border-radius: .75rem;
	box-shadow: 0 6px 24px rgba(15,23,42,0.08);
	background: #ffffff;
}
.logo {
	width: 56px;
	height: 56px;
	background: linear-gradient(135deg, var(--isle-primary), var(--isle-accent));
	border-radius: .75rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: white;
	font-weight: 700;
	font-size: 1.25rem;
}

/* logo / brand image styles */
.brand-logo {
	width: 200px;
	height: auto;
	display: inline-block;
	vertical-align: middle;
	object-fit: contain;
	border-radius: 6px;
}
.logo-img {
	width: 170px;
	height: auto;
	object-fit: contain;
	border-radius: 8px;
	display: inline-block;
}

/* slightly reduce size on small screens */
@media (max-width: 576px) {
	.brand-logo { width: 100px; }
}

/* admin layout */
.navbar { z-index: 1030; } /* keep above sidebar */
.sidebar-brand { font-weight: 700; color: var(--isle-primary); display: none; }

#sidebar {
	width: 250px;
	min-height: calc(100vh - 85px - 48px); /* account for header and footer */
	background: #ffffff;
	border-right: 1px solid rgba(0,0,0,.05);
}

/* Desktop: reserve space for sidebar */
@media (min-width: 768px) {
	#page-wrap { display: flex; }
	#page-content { margin-left: 250px; }
	#sidebar { position: fixed; top: 85px; left: 0; }
}

/* Mobile: hide sidebar off-canvas, show when .show applied */
@media (max-width: 767.98px) {
	#sidebar {
		position: fixed;
		top: 56px;
		left: -260px;
		height: calc(100vh - 56px);
		transition: left .25s ease-in-out;
		z-index: 1040;
	}
	#sidebar.show { left: 0; box-shadow: 0 4px 20px rgba(2,6,23,.08); }
	/* backdrop */
	#sidebar-backdrop {
		display: none;
		position: fixed;
		inset: 0;
		background: rgba(0,0,0,.35);
		z-index: 1035;
	}
	#sidebar-backdrop.show { display: block; }
}

/* --- Landing / hero styles --- */
.hero {
	padding-top: 3.5rem;
	padding-bottom: 3.5rem;
	background: linear-gradient(180deg, rgba(0,0,0,0.02), transparent);
}
.hero .display-5 {
	color: #052b2f; /* darker heading */
}
.hero-illustration {
	max-width: 100%;
	height: auto;
	border-radius: .75rem;
}

/* feature cards */
.feature-card {
	border: 0;
	transition: transform .18s ease, box-shadow .18s ease;
}
.feature-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 10px 30px rgba(2,6,23,.06);
}

/* feature badge styling used in services */
.feature-badge {
	font-size: 1.6rem;
	width: 56px;
	height: 56px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: linear-gradient(135deg, rgba(0,0,0,0.03), transparent);
	margin: 0 auto 0.5rem;
}

/* transfers cards: small spacing tweaks */
#transfers .card {
	border: 0;
}

/* slightly stronger CTA on landing */
.hero .btn-primary {
	box-shadow: 0 6px 20px rgba(2,6,23,.12);
}

/* ensure service/transfer lists look good on small screens */
@media (max-width: 767.98px) {
	.hero { padding-top: 2rem; padding-bottom: 2rem; }
	.hero .display-5 { font-size: 1.6rem; }
	.feature-card { text-align: center; padding: 1.25rem; }
	#transfers .card-body { gap: .5rem; flex-wrap: wrap; }
}

/* Hover image overlay utility - used for product thumbnails and any clickable images */
.img-overlay {
    position: relative;
    overflow: hidden;
    display: block;
}
.img-overlay img {
    display: block;
    width: 100%;
    object-fit: cover;
    transition: transform .28s ease;
}

/* Slight zoom on hover for a subtle effect */
.img-overlay:hover img {
    transform: scale(1.04);
}

/* the overlay layer (LIGHT by default) - changed from dark to pale white tint */
.img-overlay__overlay {
    position: absolute;
    inset: 0; /* top:0; right:0; bottom:0; left:0; */
    /* lighter overlay: pale white with slight opacity */
    background: rgba(255,255,255,0.16);
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .18s ease, background .18s ease;
    gap: .5rem;
}

/* show overlay on hover (increase visibility) */
.img-overlay:hover .img-overlay__overlay {
    opacity: 1;
    background: rgba(255,255,255,0.24);
}

/* overlay content: make buttons / icons visible on top of pale overlay */
.img-overlay__overlay .btn,
.img-overlay__overlay .overlay-icon {
    backdrop-filter: blur(4px);
    background: rgba(255,255,255,0.96);
    color: var(--isle-primary);
    border: 1px solid rgba(0,0,0,0.06);
}

/* Ensure primary buttons inside the overlay keep the primary color for prominence */
.img-overlay__overlay .btn.btn-primary {
    background-color: var(--isle-primary) !important;
    border-color: var(--isle-primary) !important;
    color: #fff !important;
    box-shadow: 0 6px 14px rgba(0,124,145,0.18);
}

/* provide a darker variant if you want dark overlay for specific images */
.img-overlay--dark .img-overlay__overlay {
    background: rgba(0,0,0,0.32);
}

.img-overlay--dark:hover .img-overlay__overlay {
    background: rgba(0,0,0,0.42);
}

/* Light overlay modifier: use when a pale / bright overlay is desired */
.img-overlay--light .img-overlay__overlay {
    background: rgba(255,255,255,0.62);
}

.img-overlay--light .img-overlay__overlay .btn,
.img-overlay--light .img-overlay__overlay .overlay-icon {
    backdrop-filter: none;
    background: rgba(255,255,255,0.92);
    color: var(--isle-primary);
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 1px 4px rgba(2,6,23,0.04);
}

/* When using light overlay on very light images, slightly increase the overlay opacity on hover */
.img-overlay--light:hover .img-overlay__overlay {
    background: rgba(255,255,255,0.54);
}

/* Floating Scroll-to-top button */
.scroll-top-btn {
    position: fixed;
    right: 1rem;
    bottom: 1.25rem;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--isle-primary);
    color: #fff;
    border: 0;
    box-shadow: 0 8px 26px rgba(2,6,23,0.18);
    cursor: pointer;
    z-index: 2000;

    /* hidden state */
    opacity: 0;
    transform: translateY(10px) scale(.98);
    transition: opacity .22s ease, transform .22s ease;
    pointer-events: none;
}

.scroll-top-btn.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.scroll-top-btn:focus {
    outline: 3px solid rgba(0,124,145,0.18);
    outline-offset: 3px;
}

.scroll-top-btn svg {
    width: 18px;
    height: 18px;
    display: block;
    fill: currentColor;
}

/* Slightly larger on small screens for easier tapping */
@media (max-width: 576px) {
    .scroll-top-btn { right: .9rem; bottom: 1rem; width: 52px; height: 52px; }
}

/* Highlight pulse animation for validation alerts */
@keyframes highlight-pulse {
    0% {
        background-color: transparent;
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7);
    }
    50% {
        background-color: rgba(255, 193, 7, 0.1);
        box-shadow: 0 0 0 15px rgba(255, 193, 7, 0);
    }
    100% {
        background-color: transparent;
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
    }
}

.highlight-pulse {
    animation: highlight-pulse 0.8s ease-out 3;
    border-radius: 0.375rem;
}
