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

body {
  font-family: 'Open Sans', sans-serif;
  line-height: 1.6;
  color: #374151;
  background-color: #F9FAFB;
}

h1, h2, h3, h4 {
  font-family: 'Montserrat', sans-serif;
  color: #1E3A8A;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Navigation */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.85);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.logo {
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 1px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: #F97316;
}

/* Hero Section */
.hero {
  /* Use our generated hero image as the background */
  background-image: url('images/hero.png');
  background-size: cover;
  background-position: center;
  min-height: 80vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  padding: 0 1rem;
}

.hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #fff;
}

.hero p {
  font-size: 1.125rem;
  margin-bottom: 2rem;
  color: #F3F4F6;
}

.btn-primary, .btn-secondary {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.btn-primary {
  background-color: #F97316;
  color: #fff;
}

.btn-primary:hover {
  background-color: #C2410C;
}

.btn-secondary {
  background-color: #1E3A8A;
  color: #fff;
}

.btn-secondary:hover {
  background-color: #102D64;
}

/* Sections */
section {
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

section h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
}

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

.service-item {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

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

.service-item h3 {
  margin: 1rem;
  font-size: 1.25rem;
}

.service-item p {
  margin: 0 1rem 1.5rem;
  flex-grow: 1;
  font-size: 0.95rem;
}

/* Portfolio */
.portfolio .intro {
  text-align: center;
  margin-bottom: 1rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

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

/* Portfolio items now support before/after hover effect */
.portfolio-item {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Wrapper maintains aspect ratio */
.image-wrapper {
  position: relative;
  width: 100%;
  padding-top: 75%; /* 4:3 ratio */
  overflow: hidden;
}

.image-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.6s ease;
}

.image-wrapper img.after {
  opacity: 0;
}

.portfolio-item:hover .image-wrapper img.after {
  opacity: 1;
}

.portfolio-item:hover .image-wrapper img.before {
  opacity: 0;
}

/* Caption styling */
.caption {
  padding: 1rem;
  border-top: 1px solid #E5E7EB;
}

.caption h4 {
  margin-bottom: 0.25rem;
  font-size: 1.1rem;
  color: #1E3A8A;
}

.caption p {
  font-size: 0.9rem;
  color: #6B7280;
}

/* About */
.about-content {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
}

.about-text {
  flex: 1 1 300px;
  line-height: 1.6;
}

.about-text p {
  margin-bottom: 1rem;
}

.about-image {
  flex: 1 1 350px;
}

.about-image img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Testimonials */
.testimonials {
  background-color: #F3F4F6;
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.testimonial-item {
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  position: relative;
}

.testimonial-item p {
  font-style: italic;
  margin-bottom: 1rem;
}

.testimonial-item span {
  font-weight: 600;
  color: #1E3A8A;
}

/* CTA */
.cta {
  background-color: #1E3A8A;
  color: #fff;
  text-align: center;
  padding: 3rem 1rem;
}

.cta h2 {
  color: #fff;
  margin-bottom: 1rem;
  font-size: 2rem;
}

.cta p {
  margin-bottom: 2rem;
  font-size: 1.125rem;
  color: #E5E7EB;
}

/* Contact */
.contact .contact-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.contact-info, .contact-form {
  flex: 1 1 300px;
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.contact-info h3, .contact-form h3 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.contact-info p {
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.contact-info a {
  color: #1E3A8A;
  text-decoration: underline;
}

.contact-info .social-links {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
}

.contact-info .social-links img {
  width: 24px;
  height: 24px;
  fill: #1E3A8A;
}

.contact-form form {
  display: flex;
  flex-direction: column;
}

.contact-form label {
  margin: 0.5rem 0 0.25rem;
  font-weight: 600;
}

.contact-form input,
.contact-form textarea {
  padding: 0.75rem;
  border: 1px solid #D1D5DB;
  border-radius: 4px;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.contact-form button {
  padding: 0.75rem;
  border: none;
  background-color: #F97316;
  color: #fff;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.contact-form button:hover {
  background-color: #C2410C;
}

/* Footer */
.footer {
  text-align: center;
  padding: 1rem;
  background-color: #F3F4F6;
  font-size: 0.875rem;
  color: #6B7280;
}

/* Blog Pages */
.blog-hero {
  padding-top: 6rem;
  padding-bottom: 2rem;
  background-color: #F3F4F6;
  text-align: center;
}

.blog-hero h1 {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
  color: #1E3A8A;
}

.blog-hero p {
  font-size: 1rem;
  color: #6B7280;
}

.blog-list {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 0 2rem;
}

.blog-summary {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #E5E7EB;
}

.blog-summary h2 {
  color: #1E3A8A;
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.blog-summary p {
  color: #374151;
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.read-more {
  color: #F97316;
  font-weight: 600;
  transition: color 0.3s ease;
}

.read-more:hover {
  text-decoration: underline;
}

/* Blog Content */
.blog-content {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 2rem;
  line-height: 1.6;
}

.blog-content h2 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
  color: #1E3A8A;
}

.blog-content h3 {
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
  color: #1E3A8A;
}

.blog-content ul {
  margin: 1rem 0 1.5rem 1.5rem;
  list-style: disc;
  color: #374151;
}

.blog-content li {
  margin-bottom: 0.5rem;
}

/* Subscribe section */
.subscribe {
  background-color: #F3F4F6;
  padding: 3rem 2rem;
  text-align: center;
}

.subscribe h2 {
  color: #1E3A8A;
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}

.subscribe p {
  color: #374151;
  margin-bottom: 1.5rem;
}

.subscribe form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  max-width: 600px;
  margin: 0 auto;
}

.subscribe input {
  flex: 1 1 200px;
  padding: 0.75rem;
  border: 1px solid #D1D5DB;
  border-radius: 4px;
  font-size: 1rem;
}

.subscribe button {
  padding: 0.75rem 1.5rem;
  background-color: #F97316;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.subscribe button:hover {
  background-color: #C2410C;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }
  .hero p {
    font-size: 1rem;
  }
  .navbar {
    padding: 0.5rem 1rem;
  }
  .nav-links {
    gap: 1rem;
    font-size: 0.9rem;
  }
}