/**
 * Colleran's Locksmiths - Custom styles
 * Overrides and extensions for Bootstrap
 */

:root {
  --brand-primary: #1a365d;
  --brand-secondary: #c9a227;
  --text-dark: #2d3748;
  --text-muted: #718096;
}

body {
  color: var(--text-dark);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* Full-site background */
  background-image: url('../images/background/shop01.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  min-height: 100vh;
  position: relative;
}

/* Overlay so content stays readable over the background image */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.82);
  z-index: -1;
  pointer-events: none;
}

/* Header & navigation */
.navbar-brand {
  font-weight: 700;
  color: var(--brand-primary) !important;
}

.navbar-logo {
  height: 3rem;
  width: auto;
  max-height: 52px;
  display: block;
  object-fit: contain;
}

.navbar-dark .navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.9);
}

.navbar-dark .navbar-nav .nav-link:hover {
  color: var(--brand-secondary);
}

/* Hero / lead section */
.hero-section {
  background: linear-gradient(135deg, var(--brand-primary) 0%, #2c5282 100%);
  color: #fff;
  padding: 3rem 0;
}

.hero-section .btn-primary {
  background-color: var(--brand-secondary);
  border-color: var(--brand-secondary);
  color: #1a365d;
}

.hero-section .btn-primary:hover {
  background-color: #b8921f;
  border-color: #b8921f;
  color: #1a365d;
}

.hero-logo {
  max-width: 280px;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.15));
}

/* Google Map – full width, responsive */
.map-section {
  width: 100%;
  margin-top: 2rem;
  margin-bottom: 0;
}

.map-responsive {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
}

.map-responsive iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Footer */
.site-footer {
  background-color: var(--brand-primary);
  color: rgba(255, 255, 255, 0.85);
  padding: 2rem 0 1rem;
  margin-top: 0;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.9);
}

.site-footer a:hover {
  color: var(--brand-secondary);
}

.site-footer .footer-heading {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: rgba(255, 255, 255, 0.95);
}

.site-footer .footer-address {
  white-space: pre-line;
}

/* Team cards */
.team-card .team-avatar-wrapper {
  width: 120px;
  height: 120px;
  margin: 1.25rem auto 0;
  border-radius: 50%;
  overflow: hidden;
  background: #e8eef4;
}

.team-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-email {
  font-size: 0.875rem;
  word-break: break-all;
}

/* Cookie notice - EU compliant banner */
.cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #2d3748;
  color: #fff;
  padding: 1rem 1.5rem;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  display: none;
}

.cookie-consent-banner.is-visible {
  display: block;
}

.cookie-consent-banner a {
  color: var(--brand-secondary);
  text-decoration: underline;
}

.cookie-consent-banner .btn-accept {
  background: var(--brand-secondary);
  color: var(--brand-primary);
  border: none;
}

.cookie-consent-banner .btn-accept:hover {
  background: #b8921f;
  color: var(--brand-primary);
}

/* Floating emergency contact widgets */
.floating-contact-widgets {
  position: fixed;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9980;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.floating-contact-widgets .floating-widget {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 2.5rem;
  text-decoration: none;
  color: #fff;
  font-weight: 600;
  font-size: 1.35rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.floating-contact-widgets .floating-widget:hover {
  color: #fff;
  transform: translateX(-4px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.floating-contact-widgets .floating-widget:focus {
  color: #fff;
  outline: 2px solid var(--brand-secondary);
  outline-offset: 2px;
}

.floating-widget-icon {
  flex-shrink: 0;
  width: 4rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
}

.floating-widget-icon svg {
  width: 60%;
  height: 60%;
}

.floating-widget-label {
  white-space: nowrap;
  font-size: 1.35rem;
}

.floating-widget-detail {
  display: block;
  font-size: 1.05rem;
  font-weight: 500;
  opacity: 0.9;
}

/* Phone widget – brand primary */
.floating-widget-phone {
  background: linear-gradient(135deg, var(--brand-primary) 0%, #2c5282 100%);
}

.floating-widget-phone .floating-widget-detail {
  display: none;
}

/* WhatsApp widget – WhatsApp green */
.floating-widget-whatsapp {
  background: linear-gradient(135deg, #128c7e 0%, #25d366 100%);
}

.floating-widget-whatsapp .floating-widget-detail {
  display: none;
}

/* Show number / detail on larger screens or on hover for accessibility */
@media (min-width: 768px) {
  .floating-contact-widgets .floating-widget {
    padding: 1rem 1.25rem 1rem 1rem;
  }

  .floating-widget-phone .floating-widget-detail,
  .floating-widget-whatsapp .floating-widget-detail {
    display: block;
  }

  .floating-contact-widgets .floating-widget {
    flex-wrap: wrap;
    max-width: 20rem;
  }

  .floating-widget-label {
    width: 100%;
    margin-left: 0.25rem;
  }

  .floating-widget-detail {
    margin-left: 5rem;
    font-size: 1.05rem;
  }
}

@media (max-width: 575px) {
  .floating-contact-widgets {
    right: 0.75rem;
    bottom: 1rem;
    top: auto;
    transform: none;
  }
}

/* Utility */
.section-heading {
  color: var(--brand-primary);
  font-weight: 600;
  margin-bottom: 1rem;
}

.img-placeholder {
  background: #e2e8f0;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border-radius: 0.25rem;
}

.service-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.service-card-link:hover {
  color: inherit;
}

.service-card-link .card {
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.service-card-link:hover .card {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
  transform: translateY(-2px);
}

.service-card-img {
  height: 180px;
  object-fit: contain;
  background: #e8eef4;
  padding: 1rem;
  border-radius: 0.25rem 0.25rem 0 0;
}

/* Archive slideshow */
.archive-slideshow .carousel-inner {
  max-height: 70vh;
  background: #1a365d;
}

.archive-slide-img {
  object-fit: contain;
  max-height: 70vh;
  width: auto;
  margin-left: auto;
  margin-right: auto;
  display: block;
}
