/* Base styles */
:root {
  --primary-color: #0056b3;
  --secondary-color: #6c757d;
  --light-color: #f8f9fa;
  --dark-color: #343a40;
  --text-color: #333;
  --link-color: #0056b3;
  --link-hover-color: #003d7a;
  --border-color: #dee2e6;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  margin: 0;
  padding: 0;
}

a {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

/* Header & Navigation */
.site-header {
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 1rem 0;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
}

.site-logo img {
  max-height: 50px;
  width: auto;
}

.site-nav ul.main-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav .main-menu>li {
  margin-left: 1.5rem;
  position: relative;
}

.site-nav a {
  color: var(--dark-color);
  font-weight: 500;
  display: block;
  padding: 0.5rem 0;
}

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

/* Dropdown Menu */
.site-nav .has-dropdown {
  position: relative;
}

.site-nav .dropdown-toggle::after {
  content: '▼';
  font-size: 0.7em;
  margin-left: 0.5rem;
  display: inline-block;
  vertical-align: middle;
}

.site-nav .dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: white;
  min-width: 200px;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 0.5rem 0;
  z-index: 1000;
  display: none;
  list-style: none;
}

.site-nav .dropdown-menu li {
  margin: 0;
}

.site-nav .dropdown-menu a {
  padding: 0.5rem 1rem;
  white-space: nowrap;
}

.site-nav .dropdown-menu a:hover {
  background-color: var(--light-color);
}

.site-nav .has-dropdown:hover .dropdown-menu {
  display: block;
}

/* Main content area */
.site-main {
  min-height: 70vh;
}

/* Hero section */
.hero {
  background-color: var(--primary-color);
  color: white;
  padding: 4rem 1rem;
  text-align: center;
}

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

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
}

/* Services grid */
.services {
  padding: 4rem 1rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Service cards */
.service-card {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.service-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.service-card h2 {
  font-size: 1.5rem;
  margin: 1rem;
}

.service-card p {
  margin: 0 1rem 1.5rem;
  color: var(--secondary-color);
}

.service-card .read-more {
  display: inline-block;
  margin: 0 1rem 1rem;
  padding: 0.5rem 1rem;
  background-color: var(--primary-color);
  color: white;
  border-radius: 4px;
  font-weight: 500;
}

.service-card .read-more:hover {
  background-color: var(--link-hover-color);
}

/* Page Detail (unified template for all pages including services) */
.page-detail {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 1rem;
}

.page-header {
  margin-bottom: 2rem;
  text-align: center;
}

.page-header h1 {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

.page-header img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 2rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.page-content {
  line-height: 1.8;
}

.page-content p {
  margin-bottom: 1.5rem;
}

.page-content ul,
.page-content ol {
  margin-left: 2rem;
  margin-bottom: 1.5rem;
}

.page-content h2 {
  font-size: 1.8rem;
  font-weight: bold;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.page-content h3 {
  font-size: 1.5rem;
  font-weight: bold;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--dark-color);
}

/* Footer */
.site-footer {
  background-color: var(--dark-color);
  color: white;
  padding: 2rem 0;
  text-align: center;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .page-header h1 {
    font-size: 2rem;
  }

  /* Mobile navigation */
  .nav-container {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav .main-menu {
    flex-direction: column;
    width: 100%;
    margin-top: 1rem;
  }

  .site-nav .main-menu>li {
    margin: 0;
    border-bottom: 1px solid var(--border-color);
  }

  .site-nav .dropdown-menu {
    position: static;
    box-shadow: none;
    width: 100%;
    padding-left: 1.5rem;
  }

  .site-nav .has-dropdown:hover .dropdown-menu {
    display: none;
  }

  .site-nav .has-dropdown.active .dropdown-menu {
    display: block;
  }
}

.hero-container {
  width: 100%;
  position: relative;
}

/* Image wrapper to contain the hero image and overlay */
.hero-image-wrapper {
  position: relative;
  width: 100%;
  height: 30vh; /* Reduced from 70vh to 30vh */
  min-height: 200px; /* Reduced from 400px to 200px */
  overflow: hidden;
}

/* Full width hero image */
.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Cover the container while maintaining aspect ratio */
  display: block;
}


/* Dark overlay for better text visibility */
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4); /* Semi-transparent overlay */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Hero content styling */
.hero-overlay .hero-content {
  color: white;
  padding: 2rem;
  max-width: 800px;
  z-index: 2;
}

/* Heading styles */
.hero-overlay h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-overlay p {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* Fallback styles if no hero image is available */
.hero-fallback {
  background-color: var(--primary-color);
  padding: 5rem 1rem;
  text-align: center;
}

.hero-fallback .hero-content {
  max-width: 800px;
  margin: 0 auto;
  color: white;
}

.hero-logo {
  max-width: 200px;
  height: auto;
  margin-bottom: 2rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-image-wrapper {
    height: 50vh;
    min-height: 300px;
  }
  
  .hero-overlay h1 {
    font-size: 2.5rem;
  }
  
  .hero-overlay p {
    font-size: 1.2rem;
  }
}