/* Cave Inspection Ltd. — Brand Styles
   Palette: Black #0a0a0a, Red #c41212 / #e31c23, White #ffffff, Dark Gray #1a1a1a, Light Gray #f5f5f5
*/

:root {
  --black: #0a0a0a;
  --dark: #1a1a1a;
  --red: #c41212;
  --red-bright: #e31c23;
  --white: #ffffff;
  --gray: #f5f5f5;
  --gray-mid: #666666;
  --gray-dark: #333333;
  --max-width: 1200px;
  --radius: 6px;
  --shadow: 0 4px 20px rgba(0,0,0,0.12);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  color: var(--gray-dark);
  line-height: 1.6;
  background: var(--white);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--red);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--red-bright);
}

/* Header */
.site-header {
  background: var(--black);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-link img {
  height: 64px;
  width: auto;
  max-width: 280px;
  background: #ffffff;
  padding: 8px 14px;
  border-radius: 6px;
  display: block;
  object-fit: contain;
}

.footer-brand img {
  height: 56px;
  width: auto;
  max-width: 240px;
  background: #ffffff;
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 0.75rem;
  object-fit: contain;
}

.logo-text {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--white);
  line-height: 1.2;
}

.logo-text span {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  color: #ccc;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav a {
  color: var(--white);
  padding: 0.5rem 0.9rem;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}

.nav a:hover,
.nav a.active {
  background: var(--red);
  color: var(--white);
}

.nav-cta {
  background: var(--red) !important;
  margin-left: 0.5rem;
}


/* Client Portal nav highlight */
.nav-portal {
  background: transparent !important;
  border: 2px solid var(--red) !important;
  color: var(--white) !important;
  margin-left: 0.35rem;
}
.nav-portal:hover {
  background: var(--red) !important;
  color: var(--white) !important;
}

.nav-cta:hover {
  background: var(--red-bright) !important;
}

.menu-toggle {
  display: none;
  background: none;
  border: 2px solid var(--white);
  color: var(--white);
  padding: 0.4rem 0.7rem;
  font-size: 1.2rem;
  cursor: pointer;
  border-radius: 4px;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--black) 0%, #1f1f1f 60%, #2a0a0a 100%);
  color: var(--white);
  padding: 4.5rem 1.5rem 5rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 50%;
  height: 140%;
  background: radial-gradient(ellipse, rgba(196,18,18,0.18) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
  max-width: 720px;
}

.hero h1 .accent {
  color: var(--red-bright);
}

.hero p {
  font-size: 1.15rem;
  color: #ddd;
  max-width: 600px;
  margin-bottom: 1.75rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.btn-primary {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}

.btn-primary:hover {
  background: var(--red-bright);
  border-color: var(--red-bright);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}

.btn-outline:hover {
  background: var(--white);
  color: var(--black);
}

.btn-dark {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

.btn-dark:hover {
  background: var(--dark);
  color: var(--white);
}

/* Sections */
.section {
  padding: 4rem 1.5rem;
}

.section-alt {
  background: var(--gray);
}

.section-dark {
  background: var(--black);
  color: var(--white);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--black);
}

.section-dark .section-title {
  color: var(--white);
}

.section-subtitle {
  color: var(--gray-mid);
  margin-bottom: 2.5rem;
  max-width: 640px;
}

.section-dark .section-subtitle {
  color: #bbb;
}

/* Cards grid */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  border-top: 4px solid var(--red);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.15);
}

.card-body {
  padding: 1.5rem;
}

.card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
  color: var(--black);
}

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

.card a.more {
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.card a.more::after {
  content: '→';
}

/* Service category blocks */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
}

.category {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  border-left: 5px solid var(--red);
}

.category h3 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  color: var(--black);
}

.category ul {
  list-style: none;
}

.category ul li {
  padding: 0.35rem 0;
  border-bottom: 1px solid #eee;
}

.category ul li:last-child {
  border-bottom: none;
}

.category ul li a {
  color: var(--gray-dark);
  font-weight: 500;
}

.category ul li a:hover {
  color: var(--red);
}

/* Content pages */
.page-hero {
  background: var(--black);
  color: var(--white);
  padding: 3rem 1.5rem 2.5rem;
}

.page-hero .container {
  max-width: var(--max-width);
}

.page-hero h1 {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  margin-bottom: 0.5rem;
}

.page-hero p {
  color: #ccc;
  max-width: 640px;
}

.breadcrumb {
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  color: #999;
}

.breadcrumb a {
  color: #bbb;
}

.breadcrumb a:hover {
  color: var(--white);
}

.content {
  padding: 3rem 1.5rem 4rem;
}

.content-inner {
  max-width: 800px;
  margin: 0 auto;
}

.content-inner.wide {
  max-width: var(--max-width);
}

.content h2 {
  font-size: 1.45rem;
  margin: 2rem 0 0.75rem;
  color: var(--black);
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--red);
}

.content h2:first-child {
  margin-top: 0;
}

.content h3 {
  font-size: 1.15rem;
  margin: 1.5rem 0 0.5rem;
  color: var(--dark);
}

.content p,
.content li {
  margin-bottom: 0.85rem;
}

.content ul,
.content ol {
  margin: 0.75rem 0 1.25rem 1.4rem;
}

.content li {
  margin-bottom: 0.4rem;
}

.principles {
  display: grid;
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.principle {
  background: var(--gray);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  border-left: 4px solid var(--red);
}

.principle strong {
  display: block;
  color: var(--black);
  margin-bottom: 0.35rem;
  font-size: 1.05rem;
}

/* Stats / trust bar */
.trust-bar {
  background: var(--dark);
  color: var(--white);
  padding: 2rem 1.5rem;
}

.trust-items {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  text-align: center;
}

.trust-item strong {
  display: block;
  font-size: 1.6rem;
  color: var(--red-bright);
  margin-bottom: 0.25rem;
}

.trust-item span {
  font-size: 0.9rem;
  color: #ccc;
}

/* Locations */
.locations {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.location-card {
  background: var(--white);
  padding: 1.25rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-top: 3px solid var(--red);
}

.location-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.location-card p {
  font-size: 0.9rem;
  color: var(--gray-mid);
  margin: 0;
}

/* CTA band */
.cta-band {
  background: linear-gradient(90deg, var(--red) 0%, #9a0e0e 100%);
  color: var(--white);
  padding: 3rem 1.5rem;
  text-align: center;
}

.cta-band h2 {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}

.cta-band p {
  margin-bottom: 1.25rem;
  opacity: 0.95;
}

/* Footer */
.site-footer {
  background: var(--black);
  color: #bbb;
  padding: 3rem 1.5rem 1.5rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.5;
}

.footer-col h4 {
  color: var(--white);
  font-size: 0.95rem;
  margin-bottom: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.4rem;
}

.footer-col a {
  color: #bbb;
  font-size: 0.9rem;
}

.footer-col a:hover {
  color: var(--white);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-top: 1.25rem;
  border-top: 1px solid #333;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.85rem;
}

/* Forms */
.form-group {
  margin-bottom: 1.15rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid #ccc;
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
}

.form-group textarea {
  min-height: 130px;
  resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(196,18,18,0.15);
}

/* Two column layout */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

/* Responsive */
@media (max-width: 900px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
  .two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--black);
    flex-direction: column;
    padding: 1rem;
    gap: 0.25rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
  }
  .nav.open {
    display: flex;
  }
  .nav a {
    width: 100%;
    text-align: left;
  }
  .header-inner {
    position: relative;
  }
  .footer-inner {
    grid-template-columns: 1fr;
  }
}

/* Utility */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
.lead {
  font-size: 1.1rem;
  color: var(--gray-mid);
  margin-bottom: 1.5rem;
}
.badge {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}
.highlight-box {
  background: #fff5f5;
  border: 1px solid #f0c0c0;
  border-left: 4px solid var(--red);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  margin: 1.5rem 0;
}

/* Media enhancements */
.service-hero-img {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: var(--radius);
  margin: 1.25rem 0 1.75rem;
  box-shadow: var(--shadow);
}

.card-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.card {
  padding: 0;
  overflow: hidden;
}

.card .card-body {
  padding: 1.25rem 1.5rem 1.5rem;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.media-grid img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.25;
  pointer-events: none;
}

.category img.cat-thumb {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 0.85rem;
}

.page-hero.with-media {
  position: relative;
  overflow: hidden;
  min-height: 180px;
}

.page-hero.with-media .container {
  position: relative;
  z-index: 1;
}

.img-caption {
  font-size: 0.85rem;
  color: var(--gray-mid);
  margin-top: -1.25rem;
  margin-bottom: 1.5rem;
  font-style: italic;
}

.media-grid figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #111;
}

.media-grid figure img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.media-grid figure:hover img {
  transform: scale(1.04);
}
