/* =============================================================
   A S Builders (Honiton) Ltd — Modern Stylesheet
   ============================================================= */

:root {
  --primary:      #1e293b;
  --primary-light:#2d3f56;
  --accent:       #c00000;
  --accent-dark:  #990000;
  --light-bg:     #f8fafc;
  --text:         #334155;
  --muted:        #64748b;
  --border:       #e2e8f0;
  --white:        #ffffff;
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  margin: 0;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--primary);
  line-height: 1.25;
}

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

/* ---- Navbar ---- */
.site-nav {
  background-color: var(--white) !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.site-nav .navbar-brand img {
  height: 38px;
}

.site-nav .nav-link {
  color: var(--text) !important;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0.9rem !important;
  transition: color 0.2s;
}

.site-nav .nav-link:hover,
.site-nav .nav-link.active {
  color: var(--accent) !important;
}

.site-nav .navbar-toggler {
  border-color: var(--border);
}

.site-nav .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23334155' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.nav-phone {
  color: var(--accent) !important;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.nav-phone i { margin-right: 0.3rem; }

/* ---- Page header banner ---- */
.page-banner {
  background: linear-gradient(120deg, var(--primary) 0%, #1a3a5c 100%);
  color: var(--white);
  padding: 3rem 0 2.5rem;
  border-top: 3px solid var(--accent);
}

.page-banner h1 {
  color: var(--white);
  font-size: 2rem;
  margin: 0;
}

.page-banner .breadcrumb {
  background: none;
  padding: 0;
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
}

.page-banner .breadcrumb-item,
.page-banner .breadcrumb-item a,
.page-banner .breadcrumb-item + .breadcrumb-item::before {
  color: rgba(255,255,255,0.6);
}

.page-banner .breadcrumb-item.active {
  color: rgba(255,255,255,0.9);
}

/* ---- Hero carousel ---- */
#heroCarousel {
  background: var(--primary);
  border-top: 3px solid var(--accent);
}

.hero-slide {
  padding: 3.5rem 0 3rem;
  color: var(--white);
}

.hero-slide .lead {
  color: rgba(255,255,255,0.85);
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
}

.hero-features {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
}

.hero-features li {
  padding: 0.4rem 0 0.4rem 1.75rem;
  position: relative;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--white);
}

.hero-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
}

.hero-img {
  border-radius: 10px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
  max-width: 100%;
  height: auto;
}

.carousel-control-prev,
.carousel-control-next {
  width: 3rem;
  opacity: 0.6;
}

.carousel-control-prev:hover,
.carousel-control-next:hover { opacity: 1; }

.carousel-indicators [data-bs-target] {
  background-color: rgba(255,255,255,0.5);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
}

.carousel-indicators .active { background-color: var(--accent); }

/* ---- Buttons ---- */
.btn-accent {
  background-color: var(--accent);
  border-color: var(--accent);
  color: var(--white);
  font-weight: 600;
  padding: 0.65rem 1.6rem;
  border-radius: 6px;
  transition: background-color 0.2s, border-color 0.2s, transform 0.1s;
}

.btn-accent:hover {
  background-color: var(--accent-dark);
  border-color: var(--accent-dark);
  color: var(--white);
  transform: translateY(-1px);
}

.btn-outline-primary-custom {
  border: 2px solid var(--primary);
  color: var(--primary);
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  transition: background-color 0.2s, color 0.2s;
  text-decoration: none;
  display: inline-block;
}

.btn-outline-primary-custom:hover {
  background-color: var(--primary);
  color: var(--white);
  text-decoration: none;
}

/* ---- Section spacing ---- */
.section { padding: 4rem 0; }
.section-sm { padding: 2.5rem 0; }
.bg-light-custom { background-color: var(--light-bg); }

/* ---- Section label ---- */
.section-label {
  display: inline-block;
  background: rgba(192,0,0,0.08);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.85rem;
  border-radius: 100px;
  margin-bottom: 0.75rem;
}

/* ---- Feature cards (homepage) ---- */
.feature-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2rem;
  transition: box-shadow 0.25s, transform 0.25s;
  height: 100%;
  text-decoration: none;
  display: block;
  color: inherit;
}

.feature-card:hover {
  box-shadow: 0 10px 30px rgba(0,0,0,0.09);
  transform: translateY(-3px);
  text-decoration: none;
  color: inherit;
}

.feature-card-icon {
  width: 52px;
  height: 52px;
  background: rgba(192,0,0,0.08);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.feature-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
}

.feature-card p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.feature-card .card-link {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
}

/* ---- Trust strip ---- */
.trust-strip {
  background: var(--primary);
  color: rgba(255,255,255,0.85);
  padding: 1.5rem 0;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  font-weight: 500;
}

.trust-item i {
  font-size: 1.3rem;
  color: var(--accent);
  flex-shrink: 0;
}

/* ---- Services grid ---- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1rem;
}

.service-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.1rem 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.service-item:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(0,0,0,0.07);
}

.service-item-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: rgba(192,0,0,0.08);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--accent);
  margin-top: 0.1rem;
}

.service-item h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
  color: var(--primary);
}

.service-item p {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.4;
}

/* ---- Gallery grid ---- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 7px;
  cursor: pointer;
  aspect-ratio: 4/3;
  background: var(--border);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  display: block;
}

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

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: transparent;
  transition: background 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-item:hover .gallery-overlay {
  background: rgba(30, 41, 59, 0.45);
}

.gallery-overlay i {
  color: var(--white);
  font-size: 1.75rem;
  opacity: 0;
  transition: opacity 0.3s;
}

.gallery-item:hover .gallery-overlay i {
  opacity: 1;
}

/* ---- Lightbox modal ---- */
#lightboxModal .modal-dialog {
  max-width: min(92vw, 1000px);
}

#lightboxModal .modal-content {
  background: #000;
  border: none;
  border-radius: 10px;
  overflow: hidden;
}

#lightboxModal .modal-header {
  background: rgba(0,0,0,0.9);
  border: none;
  padding: 0.5rem 1rem;
}

#lightboxModal .btn-close {
  filter: invert(1) grayscale(1);
}

#lightboxModal .modal-body {
  padding: 0;
  line-height: 0;
  text-align: center;
  background: #000;
}

#lightboxModal img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
}

/* ---- Contact section ---- */
.contact-block {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.contact-block-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: rgba(192,0,0,0.08);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--accent);
}

.contact-block h4 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.contact-block p, .contact-block a {
  font-size: 1rem;
  color: var(--primary);
  margin: 0;
  font-weight: 500;
  text-decoration: none;
}

.contact-block a:hover { color: var(--accent); }

/* ---- About page ---- */
.stat-box {
  text-align: center;
  padding: 1.5rem 1rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.stat-box .stat-number {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-box .stat-label {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
}

/* ---- Footer ---- */
#site-footer {
  background: var(--primary);
  color: rgba(255,255,255,0.75);
  padding: 3.5rem 0 0;
}

#site-footer h5 {
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 1.1rem;
}

#site-footer p, #site-footer address {
  font-size: 0.9rem;
  line-height: 1.8;
  margin: 0;
}

#site-footer a {
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  transition: color 0.2s;
}

#site-footer a:hover { color: var(--accent); }

.footer-divider {
  border-color: rgba(255,255,255,0.1);
  margin: 2.5rem 0 0;
}

.footer-bottom {
  padding: 1.25rem 0;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
}

.footer-qual-badge {
  max-height: 70px;
  opacity: 0.85;
}

/* ---- Alert ---- */
.alert-success-custom {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  font-size: 1rem;
}

/* ---- 404 ---- */
.error-code {
  font-size: 7rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .work-preview-grid { grid-template-columns: repeat(2,1fr) !important; }
  .hero-slide { padding: 2.5rem 0 2rem; }
  .hero-img { margin-top: 2rem; }
  .section { padding: 2.75rem 0; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 7px; }
  .services-grid { grid-template-columns: 1fr; }
  .error-code { font-size: 5rem; }
}
