:root {
  --primary-color: #2c3e50;
  --secondary-color: #c5a059;
  --accent-color: #d4a059; /* Adjusted to a Gold/Wood tone for construction vibe */
  --header-bg: #ffffff;
  --background-color: #f8f9fa;
  --text-color: #333;
  --text-light: #666;
  --border-radius: 4px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.15);
  --transition: all 0.3s ease;
}

body {
  margin: 0;
  font-family: 'Open Sans', sans-serif;
  background-color: var(--background-color);
}

/* --- Professional Header Layout --- */
.portfolio-header {
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05); /* Softer shadow */
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid #eee;
  padding: 0.8rem 0;
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between; /* Pushes Brand left, Button right */
  align-items: center;
}

/* Brand Group: Logo + Text side-by-side */
.brand-group {
  display: flex;
  align-items: center;
  gap: 15px; /* Space between logo and text */
}

.logo {
  height: 55px; /* Fixed height ensures it doesn't blow up */
  width: auto;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.company-name {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--primary-color);
  margin: 0;
  line-height: 1.1;
}

.company-tagline {
  font-size: 0.75rem;
  color: #888; /* Softer grey for tagline */
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
  margin-top: 2px;
}

/* Back Button Styling */
.back-button {
  text-decoration: none;
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.6rem 1.2rem;
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.back-button:hover {
  background-color: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
  transform: translateY(-1px);
}

/* --- Gallery Tweak --- */
/* Add this to your existing .gallery-item css to make images pop */
.gallery-item {
  /* existing styles... */
  border: 1px solid #eee; /* Defines the edge of white photos */
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
  
  .brand-group {
    flex-direction: column;
    text-align: center;
  }
  
  .back-button {
    width: 100%;
    justify-content: center;
  }
}

/* --- Gallery Container --- */
.gallery-container {
  padding: 4rem 2rem;
  min-height: 100vh;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.section-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 2.2rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.section-subtitle {
  color: var(--text-light);
  font-size: 1.1rem;
  margin: 0;
}

/* --- Masonry Layout (CSS Columns) --- */
.masonry-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  /* This creates the masonry effect */
  column-count: 4; 
  column-gap: 20px;
}

.gallery-item {
  break-inside: avoid; /* Prevents image from being cut in half */
  margin-bottom: 20px;
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: #fff;
  cursor: zoom-in;
  transition: var(--transition);
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.gallery-item:hover img {
  transform: scale(1.03);
}

/* --- Lightbox Modal --- */
.lightbox {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 2000;
  padding-top: 50px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.9);
  backdrop-filter: blur(5px);
}

.lightbox-content {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 1000px;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  animation: zoomIn 0.3s;
}

.close-lightbox {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
}

.close-lightbox:hover,
.close-lightbox:focus {
  color: var(--secondary-color);
}

@keyframes zoomIn {
  from {transform:scale(0.9); opacity: 0;}
  to {transform:scale(1); opacity: 1;}
}

/* --- Responsive --- */
@media (max-width: 1200px) {
  .masonry-wrapper { column-count: 3; }
}

@media (max-width: 768px) {
  .masonry-wrapper { column-count: 2; }
  .header-flex { flex-direction: column; gap: 10px; }
  .logo { height: 40px; }
  .company-name { font-size: 1.2rem; }
  .section-title { font-size: 1.8rem; }
  .btn-text { display: none; } /* Hide text on small mobile, show icon only */
  .back-button i { margin: 0; }
}

@media (max-width: 480px) {
  .masonry-wrapper { column-count: 1; }
  .lightbox-content { width: 95%; }
}