/* ==========================================================================
   TOM BARTLETT COASTAL & CIVIL ENGINEERING - PREMIUM BEACHY STYLE
   ========================================================================== */

/* Design Tokens & CSS Variables (Beachy & Premium) */
:root {
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  
  /* Color Palette - Sand, Sea, and Sunset */
  --stone-950: #1c1917; /* Deep warm charcoal */
  --stone-900: #292524;
  --stone-800: #44403c;
  --stone-700: #57534e;
  --stone-600: #78716c;
  --stone-400: #a8a29e;
  --stone-200: #e7e5e4;
  --stone-100: #f5f5f4;
  --stone-50:  #fafaf9; /* Fine white sand */
  
  /* Primary Accent: Ocean Teal/Sea glass */
  --primary: #0f766e; /* Deep ocean teal */
  --primary-hover: #115e59;
  --primary-light: #f0fdfa; /* Wave foam white */
  
  /* Secondary Accent: St. Augustine Sunset Gold */
  --accent: #d97706; /* Sunset amber */
  --accent-hover: #b45309;
  --accent-light: #fef3c7; /* Sunlit sand gold */
  
  /* Context Colors */
  --bg-main: var(--stone-50);
  --bg-card: #ffffff;
  --text-main: var(--stone-800);
  --text-muted: var(--stone-500);
  --text-light: var(--stone-200);
  --border-color: var(--stone-200);
  
  /* Utility Specs */
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;
  --shadow-sm: 0 1px 3px rgba(68, 64, 60, 0.05);
  --shadow-md: 0 10px 25px -5px rgba(15, 118, 110, 0.05), 0 8px 10px -6px rgba(15, 118, 110, 0.03);
  --shadow-lg: 0 20px 40px -10px rgba(15, 118, 110, 0.1), 0 10px 20px -8px rgba(217, 119, 6, 0.05);
  --transition-smooth: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --container-width: 1200px;
  --container-narrow: 800px;
}

/* Dark Mode Prefers - Deep Sea Theme */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-main: #0c1a1a; /* Deep lagoon dark */
    --bg-card: #112626; /* Seaweed green-black */
    --text-main: #f5f5f4;
    --text-muted: #a8a29e;
    --border-color: #1a3c3c;
    --primary-light: rgba(15, 118, 110, 0.15);
    --accent-light: rgba(217, 119, 6, 0.15);
    --stone-900: #0c1a1a;
  }
}

/* Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition-smooth);
}

a:hover {
  color: var(--primary-hover);
}

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

/* Coastal Grid/Wave Overlay Background */
.blueprint-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(15, 118, 110, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 118, 110, 0.12) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 1;
}

/* Layout Utilities */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Header & Glassmorphic Navigation */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(250, 250, 249, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition-smooth);
}

@media (prefers-color-scheme: dark) {
  .header {
    background-color: rgba(12, 26, 26, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  }
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  color: var(--text-main) !important;
  padding: 18px 0;
  text-decoration: none;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
  gap: 3px;
}

.logo-name {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 2px;
}

.logo-sub {
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--primary);
  text-transform: uppercase;
}

.logo-icon {
  color: var(--primary);
  font-size: 22px;
  animation: gentle-bob 4s ease-in-out infinite;
}

@keyframes gentle-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* Nav Menu */
.nav-list {
  display: flex;
  list-style: none;
  gap: 32px;
  align-items: center;
}

.nav-link {
  color: var(--text-main);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  position: relative;
  padding: 24px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  transition: var(--transition-smooth);
}

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

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  z-index: 101;
}

.mobile-nav-toggle .bar {
  width: 22px;
  height: 2px;
  background-color: var(--text-main);
  transition: var(--transition-smooth);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 600;
  padding: 14px 32px;
  border-radius: var(--border-radius-sm);
  font-size: 14px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: var(--transition-smooth);
  cursor: pointer;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(15, 118, 110, 0.25);
  border: none;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(15, 118, 110, 0.35);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-main) !important;
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background-color: var(--primary-light);
  color: var(--primary) !important;
  transform: translateY(-2px);
}

/* Hero Section */
.hero {
  position: relative;
  padding: 140px 24px 100px;
  background: radial-gradient(circle at top right, var(--primary-light), transparent 60%),
              radial-gradient(circle at bottom left, var(--accent-light), transparent 60%);
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 75vh;
  border-bottom: 1px solid var(--border-color);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 820px;
}

.hero-tag {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--primary);
  margin-bottom: 20px;
  background-color: var(--primary-light);
  padding: 8px 20px;
  border-radius: 50px;
  border: 1px solid rgba(15, 118, 110, 0.15);
}

.hero-title {
  font-size: clamp(38px, 6.5vw, 68px);
  font-weight: 800;
  margin-bottom: 24px;
  letter-spacing: -1px;
  color: var(--stone-950);
}

@media (prefers-color-scheme: dark) {
  .hero-title {
    color: #ffffff;
  }
}

.hero-lead {
  font-size: clamp(16px, 2.5vw, 19px);
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
}

/* Stats Section */
.stats-section {
  padding: 60px 0;
  position: relative;
  z-index: 10;
  margin-top: -50px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.stat-card {
  background-color: var(--bg-card);
  padding: 36px 24px;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  text-align: center;
  transition: var(--transition-smooth);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.stat-number {
  font-size: 36px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 8px;
}

.stat-label {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Section Header Styles */
.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-subtitle {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--primary);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 2px;
  display: block;
  margin-bottom: 10px;
}

.section-title {
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--stone-950);
}

@media (prefers-color-scheme: dark) {
  .section-title {
    color: #ffffff;
  }
}

.accent-line {
  width: 70px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  margin: 0 auto;
  border-radius: 4px;
}

/* Services / Expertise */
.services-section {
  padding: 90px 0;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
}

@media (prefers-color-scheme: dark) {
  .services-section {
    background-color: rgba(17, 38, 38, 0.4);
  }
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
}

.service-card {
  padding: 44px 36px;
  border-radius: var(--border-radius-md);
  background-color: var(--bg-main);
  border: 1px solid var(--border-color);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 0;
  background-color: var(--accent);
  transition: var(--transition-smooth);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(15, 118, 110, 0.15);
}

.service-card:hover::before {
  height: 100%;
}

.service-icon {
  font-size: 34px;
  color: var(--primary);
  margin-bottom: 24px;
}

.service-card h3 {
  font-size: 20px;
  margin-bottom: 14px;
  font-weight: 700;
}

.service-card p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
}

/* Blog Feed on Homepage */
.home-blog-section {
  padding: 90px 0;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
  margin-bottom: 48px;
}

.post-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 36px;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-sm);
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.post-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.post-meta i {
  color: var(--primary);
  margin-right: 4px;
}

.post-title {
  font-size: 20px;
  margin-bottom: 14px;
  font-weight: 700;
}

.post-title a {
  color: var(--text-main);
}

.post-title a:hover {
  color: var(--primary);
}

.post-excerpt {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 28px;
  flex-grow: 1;
  line-height: 1.6;
}

.post-link {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.post-link i {
  transition: var(--transition-smooth);
}

.post-link:hover i {
  transform: translateX(4px);
  color: var(--accent);
}

.view-all-container {
  text-align: center;
}

.no-posts {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}

/* Page Headers */
.page-header {
  position: relative;
  padding: 90px 24px;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  text-align: center;
}

@media (prefers-color-scheme: dark) {
  .page-header {
    background-color: rgba(17, 38, 38, 0.4);
  }
}

.page-title {
  font-size: clamp(34px, 5.5vw, 48px);
  font-weight: 800;
  margin-bottom: 14px;
  color: var(--stone-950);
}

@media (prefers-color-scheme: dark) {
  .page-title {
    color: #ffffff;
  }
}

.page-subtitle {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto 24px;
  line-height: 1.6;
}

.page-header .accent-line {
  margin-top: 24px;
}

.page-content-section {
  padding: 90px 0;
}

/* Rich Text / Markdown Styling */
.rich-text {
  font-size: 16.5px;
  color: var(--text-main);
  line-height: 1.75;
}

.rich-text p {
  margin-bottom: 24px;
}

.rich-text h2 {
  font-size: 26px;
  margin: 44px 0 22px;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 10px;
  color: var(--stone-950);
}

@media (prefers-color-scheme: dark) {
  .rich-text h2 {
    color: #ffffff;
  }
}

.rich-text h3 {
  font-size: 20px;
  margin: 36px 0 18px;
  color: var(--stone-900);
}

.rich-text ul, .rich-text ol {
  margin-bottom: 28px;
  padding-left: 28px;
}

.rich-text li {
  margin-bottom: 10px;
}

.rich-text blockquote {
  border-left: 4px solid var(--accent);
  background-color: var(--primary-light);
  padding: 20px 28px;
  margin: 36px 0;
  border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
  font-style: italic;
  color: var(--primary);
  font-weight: 500;
}

/* Blog List Page */
.blog-list-section {
  padding: 90px 0;
}

.blog-list-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  max-width: var(--container-narrow);
  margin: 0 auto;
}

.blog-list-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 44px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.blog-list-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.post-card-title {
  font-size: 24px;
  margin-bottom: 18px;
  font-weight: 800;
}

.post-card-title a {
  color: var(--text-main);
}

.post-card-title a:hover {
  color: var(--primary);
}

.post-card-excerpt {
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.6;
}

.post-card-link {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.post-card-link i {
  transition: var(--transition-smooth);
}

.post-card-link:hover i {
  transform: translateX(4px);
  color: var(--accent);
}

.no-posts-found {
  text-align: center;
  padding: 60px 0;
  color: var(--text-muted);
}

.no-posts-found i {
  font-size: 48px;
  margin-bottom: 16px;
  color: var(--stone-400);
}

/* Blog Post Detail View */
.blog-post-wrapper {
  padding-bottom: 90px;
}

.post-header {
  position: relative;
  padding: 90px 0 60px;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
}

@media (prefers-color-scheme: dark) {
  .post-header {
    background-color: rgba(17, 38, 38, 0.4);
  }
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 24px;
}

.back-link:hover {
  color: var(--primary);
}

.post-meta-detailed {
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
  margin: 28px 0;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-label {
  font-family: var(--font-heading);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 600;
}

.meta-value {
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--stone-900);
}

@media (prefers-color-scheme: dark) {
  .meta-value {
    color: #ffffff;
  }
}

.meta-value i {
  color: var(--primary);
}

.post-content-section {
  padding: 60px 0;
}

.blog-content {
  font-size: 17px;
  line-height: 1.8;
}

.post-footer {
  margin-top: 60px;
  padding-top: 32px;
  border-top: 1px solid var(--border-color);
}

/* Footer Section */
.footer {
  background-color: #0c1a1a; /* Dark Teal-Black */
  color: var(--stone-400);
  padding: 80px 0 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  margin-top: auto;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 48px;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.footer .logo {
  margin-bottom: 20px;
}

.footer-desc {
  font-size: 14px;
  line-height: 1.6;
}

.footer h3 {
  color: #ffffff;
  font-size: 15px;
  margin-bottom: 24px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

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

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--stone-400);
  font-size: 14px;
}

.footer-links a:hover {
  color: #ffffff;
  padding-left: 4px;
}

.footer-contact p {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.5;
}

.footer-contact i {
  color: var(--accent);
  margin-top: 3px;
}

.footer-bottom {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 40px 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

/* ==========================================================================
   DROPDOWN MENU STYLES
   ========================================================================== */
.has-dropdown {
  position: relative;
}

.dropdown-arrow {
  font-size: 11px;
  margin-left: 4px;
  transition: var(--transition-smooth);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  left: auto;
  transform: translateY(8px);
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-lg);
  list-style: none;
  padding: 16px 0;
  min-width: 260px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
  z-index: 1000;
}

@media (prefers-color-scheme: dark) {
  .dropdown-menu {
    background-color: #112626;
    border-color: #1a3c3c;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  }
}

/* Dropdown show on hover (desktop only) */
@media (min-width: 769px) {
  .has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  
  .has-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
  }
}

.dropdown-menu li {
  width: 100%;
}

.dropdown-menu a {
  display: block;
  padding: 10px 24px;
  color: var(--text-main);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14px;
  transition: var(--transition-smooth);
}

.dropdown-menu a:hover {
  background-color: var(--primary-light);
  color: var(--primary);
  padding-left: 28px;
}

/* ==========================================================================
   SERVICES DETAIL TEMPLATE STYLES
   ========================================================================== */
.services-content-layout {
  padding: 80px 0;
  background-color: var(--bg-main);
}

.services-layout-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 60px;
  align-items: start;
}

/* Sidebar navigation */
.services-side-nav {
  display: flex;
  flex-direction: column;
  gap: 32px;
  position: sticky;
  top: 100px;
}

.side-nav-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 32px 24px;
  box-shadow: var(--shadow-sm);
}

.side-nav-card h3 {
  font-size: 18px;
  margin-bottom: 20px;
  color: var(--stone-950);
  border-left: 4px solid var(--primary);
  padding-left: 10px;
}

@media (prefers-color-scheme: dark) {
  .side-nav-card h3 {
    color: #ffffff;
  }
}

.side-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.side-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--border-radius-sm);
  color: var(--text-main);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14.5px;
  transition: var(--transition-smooth);
  background-color: var(--stone-100);
  border: 1px solid transparent;
}

@media (prefers-color-scheme: dark) {
  .side-nav-link {
    background-color: rgba(255, 255, 255, 0.02);
  }
}

.side-nav-link i {
  color: var(--primary);
  font-size: 16px;
  transition: var(--transition-smooth);
  width: 20px;
  text-align: center;
}

@media (hover: hover) {
  .side-nav-link:hover {
    background-color: var(--primary-light);
    color: var(--primary);
    border-color: rgba(15, 118, 110, 0.15);
  }
}

.side-nav-link.active {
  background-color: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.side-nav-link.active i {
  color: #ffffff;
}

/* Sidebar Contact Card */
.side-contact-card {
  background: linear-gradient(135deg, var(--primary), #115e59);
  color: #ffffff;
  padding: 36px 28px;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-md);
}

.side-contact-card h4 {
  font-size: 18px;
  margin-bottom: 12px;
  font-family: var(--font-heading);
}

.side-contact-card p {
  font-size: 13.5px;
  line-height: 1.6;
  margin-bottom: 24px;
  color: rgba(255, 255, 255, 0.85);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 13px;
}

.side-contact-card .btn-primary {
  background-color: #ffffff;
  color: var(--primary) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: none;
}

.side-contact-card .btn-primary:hover {
  background-color: var(--primary-light);
  transform: translateY(-2px);
}

/* Service Main Content */
.services-main-content {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 60px 48px;
  box-shadow: var(--shadow-sm);
}

/* Consultation CTA Banner */
.consultation-cta {
  margin-top: 60px;
  padding: 44px;
  border-radius: var(--border-radius-md);
  background-color: var(--bg-main);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

@media (prefers-color-scheme: dark) {
  .consultation-cta {
    background-color: rgba(255, 255, 255, 0.02);
  }
}

.cta-content h3 {
  font-size: 24px;
  margin-bottom: 8px;
  color: var(--stone-950);
}

@media (prefers-color-scheme: dark) {
  .cta-content h3 {
    color: #ffffff;
  }
}

.cta-content p {
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.6;
  max-width: 500px;
}

.cta-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-end;
  flex-shrink: 0;
}

.cta-phone {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
}

.cta-phone:hover {
  color: var(--accent-hover);
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 900px) {
  .hero {
    padding-top: 100px;
    padding-bottom: 80px;
  }
  
  /* Services Grid side column collapse */
  .services-layout-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .services-side-nav {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
  
  .services-main-content {
    padding: 40px 24px;
  }
  
  .consultation-cta {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  
  .cta-content p {
    max-width: 100%;
  }
  
  .cta-actions {
    align-items: center;
  }
}

@media (max-width: 768px) {
  /* Header Mobile Layout */
  .mobile-nav-toggle {
    display: flex;
  }
  
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 24px;
    box-shadow: var(--shadow-lg);
  }
  
  .nav.active {
    display: block;
    animation: slideDown 0.3s ease forwards;
  }
  
  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  
  /* Mobile Dropdown styles */
  .has-dropdown .dropdown-menu {
    position: static;
    transform: none;
    display: none;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    border: none;
    padding: 8px 16px 0;
    min-width: auto;
    width: 100%;
    background: transparent;
  }
  
  .has-dropdown.active .dropdown-menu {
    display: block;
  }
  
  .has-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
  }
  
  .dropdown-menu a {
    padding: 8px 0;
    font-size: 14px;
  }
  
  .dropdown-menu a:hover {
    padding-left: 8px;
  }
  
  .mobile-nav-toggle.active .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  
  .mobile-nav-toggle.active .bar:nth-child(2) {
    opacity: 0;
  }
  
  .mobile-nav-toggle.active .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }
  
  .services-side-nav {
    grid-template-columns: 1fr;
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   SERVICES INDEX PAGE
   ========================================================================== */

.services-index-section {
  padding: 80px 0;
  background: var(--bg-main);
}

.services-index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.svc-index-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 40px 32px;
  text-decoration: none;
  color: var(--text-main);
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
}

.svc-index-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s;
}

@media (hover: hover) {
  .svc-index-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(15,118,110,0.1);
  }
  .svc-index-card:hover::before {
    transform: scaleX(1);
  }
}

.svc-index-icon {
  width: 56px; height: 56px;
  background: var(--primary-light);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  color: var(--primary);
  margin-bottom: 24px;
  transition: background 0.3s, color 0.3s;
}

@media (hover: hover) {
  .svc-index-card:hover .svc-index-icon {
    background: var(--primary);
    color: #fff;
  }
}

.svc-index-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-main);
}

.svc-index-desc {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.65;
  flex-grow: 1;
  margin-bottom: 28px;
}

.svc-index-link {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: gap 0.25s;
}

@media (hover: hover) {
  .svc-index-card:hover .svc-index-link {
    gap: 12px;
  }
}

/* ==========================================================================
   THE CIVIL SEAS WAY
   ========================================================================== */

.csway-section {
  padding: 100px 0;
  background: var(--stone-50);
  border-top: 1px solid var(--border-color);
}

.csway-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 72px;
}

.csway-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-light);
  padding: 6px 18px;
  border-radius: 100px;
  margin-bottom: 20px;
}

.csway-title {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 900;
  letter-spacing: -1px;
  color: var(--text-main);
  margin-bottom: 16px;
  line-height: 1.1;
}

.csway-tagline {
  font-size: 18px;
  color: var(--text-main);
  margin-bottom: 8px;
}

.csway-sub {
  font-size: 16px;
  color: var(--text-muted);
  font-style: italic;
}

.csway-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  max-width: 860px;
  margin: 0 auto;
}

/* Vertical connecting line */
.csway-steps::before {
  content: '';
  position: absolute;
  left: 36px;
  top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--primary), var(--accent));
  opacity: 0.2;
}

.csway-step {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 32px;
  padding: 44px 0;
  border-bottom: 1px solid var(--border-color);
  align-items: start;
  position: relative;
  transition: background 0.2s;
}

.csway-step:last-child {
  border-bottom: none;
}

.csway-step-num {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid rgba(15,118,110,0.15);
  width: 52px; height: 52px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  transition: background 0.3s, color 0.3s;
}

.csway-step:hover .csway-step-num {
  background: var(--primary);
  color: #fff;
}

.csway-step-body h3 {
  font-size: 21px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}

.csway-step-sub {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.csway-step-body p:last-child {
  font-size: 15.5px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* CTA banner spacing */
.services-cta-banner {
  padding: 0 0 80px;
  background: var(--stone-50);
}

