/* =========================================
   N4 Builders - Global Stylesheet
   ========================================= */

/* ---------- Color Palette ---------- */
:root {
  --orange: #ffde21;    
  /*--orange: #f5bd25;*/
  --charcoal: #333333;
  --light-gray: #f4f4f4;
}

/* ---------- Base Reset ---------- */
html, body, h1, h2, h3, h4, h5, h6, p, figure {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  color: var(--light-gray);
  /*background-color: var(--charcoal);*/
  background-color: #FFFFFF;
  line-height: 1.6;
}

/* ---------- Header & Navigation ---------- */
header {
  background-color: #333333;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.5rem;
  padding-left: 2rem;
  padding-right: 2rem;
  position: sticky;
  top: 0;
  z-index: 10;
  /*border-bottom: 2px solid var(--orange);*/
}

/*.logo {*/
/*  font-size: 1.5rem;*/
/*  font-weight: bold;*/
/*  color: var(--orange);*/
/*}*/

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
  /*background-color: #f5bd25;*/
  /*padding: 16px 24px;*/
  /*border-radius: 12px;*/
  /*max-width: 400px;*/
  /*font-size: 1.5rem;*/
  /*font-weight: bold;*/
  /*color: var(--orange);*/
}

.logo-container img {
  height: 100%; /* adjust as needed */
  width: auto;
  object-fit: contain;
}

.logo-text {
  font-size: 1.8rem;
  font-weight: bold;
  color: #1f1f1f; /* Your font color */
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  letter-spacing: 1px;
}





/* Navbar Links */
nav ul {
  display: flex;
  list-style: none;
  gap: 0.2rem;
}

nav ul li a {
  text-decoration: none;
  color: var(--light-gray);
  padding: 1.2rem 0.5rem;
  transition: color 0.3s;
}

nav ul li a:hover{
  color: var(--orange);
  font-weight: bold;
}


nav ul li a.active {
  color: var(--charcoal);
  font-weight: bold;
  background-color: var(--orange);
  border-bottom: 8px solid #333333;
  
}

/* Hamburger toggle (hidden by default) */
.menu-toggle {
  display: none;
  font-size: 1.8rem;
  color: var(--orange);
  cursor: pointer;
  user-select: none;
  margin-left: auto;
}

/* ---------- Hero Section ---------- */
.hero {
  /*background: linear-gradient(to right, rgba(31, 31, 31, 0.0), rgba(31, 31, 31, 0.0)),*/
  /*            url('/images/rendered_home.png') center/cover;*/
  background: url('/images/rendered_home.png') center/cover;
  height: 40vh;
  display: flex;
  /*align-items: center;*/
  justify-content: left;
  text-align: left;
  padding: 1rem;
}

.hero-text h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--charcoal);
}

.hero-text p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

.cta-btn {
  background: var(--orange);
  color: var(--charcoal);
  padding: 0.75rem 2rem;
  text-decoration: none;
  font-weight: bold;
  border-radius: 4px;
  transition: background 0.3s;
}

.cta-btn:hover {
  background: #f5bd25;
  /*background: #e66a00;*/
}

/* ---------- Services Section ---------- */
.services {
  padding: 4rem 2rem;
  text-align: center;
  /*background-color: var(--charcoal);*/
  background-color: #FFFFFF;
}

.services h2 {
  color: var(--charcoal);
  margin-bottom: 2rem;
}

.service-cards {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.card {
  background: #2a2a2a;
  padding: 2rem;
  border-radius: 6px;
  width: 250px;
  transition: transform 0.3s;
}

.card:hover {
  transform: translateY(-10px);
}

.card h3 {
  color: var(--orange);
  /*margin-bottom: 1rem;*/
}

/* ---------- Projects Section ---------- */
.projects {
  padding: 4rem 2rem;
  text-align: center;
  background-color: #2a2a2a;
  
}

.projects h2 {
  color: var(--orange);
  margin-bottom: 2rem;
}

.projects2 {
  padding: 4rem 2rem;
  text-align: center;
  background-color: #FFFFFF;
  
}

.projects2 h2 {
  color: var(--charcoal);
  margin-bottom: 2rem;
}

.project-container {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.project-gallery {
  /*display: flex;*/
  justify-content: center;
  gap: 2rem;
}

.project-gallery h3 {
    color: var(--orange);
    
}

.macduff {
  background-image: url(/images/thumbnails/macduff/macduff_web_1_btn.jpg);
  background-repeat: no-repeat;
  padding: 3rem;
  width: 250px;
  /*border: 2px solid var(--orange);*/
  border-radius: 2px;
  transition: transform 0.3s;
}

.macduff:hover {
  transform: translateY(-10px);
}

.georgian {
  background-image: url(/images/thumbnails/georgian/georgian_web_1_btn.jpg);
  background-repeat: no-repeat;
  padding: 3rem;
  width: 250px;
  /*border: 2px solid var(--orange);*/
  border-radius: 2px;
  transition: transform 0.3s;
}

.georgian:hover {
  transform: translateY(-10px);
}

.crescent {
  background-image: url(/images/thumbnails/crescent/crescent_web_1_btn.jpg);
  background-repeat: no-repeat;
  padding: 3rem;
  width: 250px;
  /*border: 2px solid var(--orange);*/
  border-radius: 2px;
  transition: transform 0.3s;
}

.crescent:hover {
  transform: translateY(-10px);
}


/*.project-gallery:hover {*/
/*  transform: scale(1.05);*/
/*}*/

/* ---------- Contact Section ---------- */
.contact {
  padding: 4rem 2rem;
  text-align: center;
}

.contact h2 {
  color: var(--charcoal);
  margin-bottom: 2rem;
}



/* ---------- About Section ---------- */
.about {
  padding: 4rem 2rem;
  text-align: center;
  background-color: var(--charcoal);
}

.about h2 {
  color: var(--charcoal);
  margin-bottom: 2rem;
}

.about2 {
  padding: 4rem 2rem;
  text-align: left;
  /*background-color: var(--charcoal);*/
  background-color: #FFFFFF;
}

.about2 h2 {
  color: var(--charcoal);
  text-align: center;
  margin-bottom: 2rem;
}

.about2 p {
  color: var(--charcoal);
}

@media (max-width: 768px) {
  .logo-container {
    flex-direction: column;
    text-align: center;
  }
  .logo-container img {
    height: 50px;
  }
  
  .about ul {
      padding-left: 1rem;
  }
}

form {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

input, textarea {
  padding: 0.75rem;
  border: none;
  border-radius: 4px;
  outline: none;
  background: var(--light-gray);
  color: var(--charcoal);
}

button {
  background: var(--orange);
  color: var(--charcoal);
  padding: 0.75rem;
  font-weight: bold;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s;
}

button:hover {
  background: #f5bd25;
}

/* ---------- About Section ---------- */
.about {
  padding: 4rem 2rem;
  background-color: #2a2a2a;
  text-align: center;
}

.about h2 {
  color: var(--orange);
  margin-bottom: 2rem;
}

.about p {
    text-align: left;
}


/* ---------- Footer ---------- */
footer {
  background: var(--charcoal);
  position: fixed;
  bottom: 0;
  width: 100%;
  text-align: center;
  padding: 1rem;
  border-top: 2px solid var(--orange);
  font-size: 0.9rem;
}




  /* General Body Styles for projects*/

.container-portfolio {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Hero Image Section */
.hero-section {
    position: relative;
    width: 100%;
    height: 500px; /* Adjust height as needed */
    overflow: hidden;
    margin-bottom: 40px;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Covers the area, crops if necessary */
    object-position: center; /* Centers the image */
}

.hero-text-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 20px 40px;
    border-radius: 8px;
}

.hero-text-overlay h1 {
    margin: 0 0 10px;
    font-size: 3em;
}

.hero-text-overlay p {
    font-size: 1.2em;
}

/* Grid Layout for Projects */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsive grid */
    gap: 20px;
}

.project-item {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer; /* Indicates it's clickable */
}

.project-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.project-item img {
    width: 100%;
    height: 200px; /* Fixed height for thumbnails */
    object-fit: cover;
    display: block; /* Removes extra space below image */
}

.project-info {
    padding: 15px;
}

.project-info h3 {
    margin: 0 0 10px;
    color: #0056b3; /* Brand color for headings */
}

.project-info p {
    font-size: 0.9em;
    color: #666;
    line-height: 1.5;
}

/* Basic Lightbox Styles */
.lightbox-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8); /* Dark semi-transparent background */
    z-index: 1000; /* Ensure it's on top */
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    position: relative;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.lightbox-content img {
    max-width: 100%;
    max-height: 70vh; /* Viewport height for image */
    display: block;
    margin: auto;
    border-radius: 2px;
}

.lightbox-close {
    position: absolute;
    top: 10px;
    right: 20px;
    color: #fff;
    font-size: 2em;
    cursor: pointer;
    z-index: 1001; /* Above the content */
    text-shadow: 0 0 5px rgba(0,0,0,0.5);
}
.lightbox-close:hover {
    color: #ffde21;
}

.lightbox-caption {
    font-size: 1.1em;
    color: #333;
    /*margin-bottom: 0px;*/
}


/* Gallery Page */

    /* General Body Styling */
.main-container {
    font-family: 'Arial', sans-serif;
    margin: 0;
    background-color: #2a2a2a;
    /*color: #333;*/
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}


/* Gallery Container */
.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* Responsive grid */
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    width: 90%;
    margin-bottom: 50px;
}

/* Gallery Item Styling */
.gallery-item {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(255,255,255,0.1);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(255,255,255,0.15);
}

.gallery-item img {
    width: 100%;
    height: 200px; /* Fixed height for thumbnails */
    object-fit: cover; /* Ensures images cover the area without distortion */
    display: block; /* Removes extra space below image */
}

/* Lightbox Styling */
.lightbox {
    display: none; /* Hidden by default */
    position: fixed; /* Stays on top of other content */
    z-index: 1000; /* High z-index to be on top */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.85); /* Black w/ opacity */
    justify-content: center; /* Center content horizontally */
    align-items: center; /* Center content vertically */
}

.lightbox-content {
    position: relative;
    margin: auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#lightbox-img {
    max-width: 100%;
    max-height: 70vh; /* Adjust based on caption size */
    display: block;
    border-radius: 4px;
    object-fit: contain; /* Ensures the entire image is visible */
}

.lightbox-caption {
    color: #666;
    font-size: 1.1em;
    text-align: center;
    padding-top: 15px;
    max-width: 100%;
}

/* Close Button */
.close-btn {
    position: absolute;
    top: 10px;
    right: 20px;
    color: #aaa;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 1001; /* Ensure close button is clickable */
}

.close-btn:hover,
.close-btn:focus {
    color: #ffde21;
    text-decoration: none;
    cursor: pointer;
}

/* Navigation Buttons (Prev/Next) */
.prev-btn, .next-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 25px;
    user-select: none; /* Prevent text selection */
    transition: background-color 0.3s ease;
    border-radius: 4px;
    text-decoration: none; /* For Font Awesome links */
    display: flex;
    align-items: center;
    justify-content: center;
}

.prev-btn {
    left: 15px;
}

.next-btn {
    right: 15px;
}

.prev-btn:hover, .next-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}


/* ---------- Mobile Menu & Responsiveness ---------- */
@media (max-width: 768px) {
  header {
    flex-direction: row;
    justify-content: space-between;
    padding: 1rem 1.5rem;
  }

  .menu-toggle {
    display: block;
  }

  nav ul {
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--charcoal);
    flex-direction: column;
    text-align: center;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease;
  }

  nav.open ul {
    max-height: 300px;
    border-top: 2px solid var(--orange);
  }

  nav ul li {
    padding: 1rem 0;
    border-bottom: 1px solid #333;
  }

  .menu-toggle.active {
    transform: rotate(90deg);
    transition: transform 0.3s ease;
  }

  /* Stack cards and projects vertically */
  .service-cards,
  .project-gallery {
    flex-direction: column;
    align-items: center;
  }
  
  .hero {
    align-items: top;
  }
  
  .hero-text-overlay h1 {
        font-size: 2.2em;
    }
  .hero-text-overlay p {
        font-size: 1em;
    }
  .project-grid {
        grid-template-columns: 1fr; /* Single column on smaller screens */
    }
  .hero-section {
        height: 300px;
    }

  .hero-text h1 {
    font-size: 1rem;
  }
  
  .cta-btn {
    background: var(--orange);
    color: var(--charcoal);
    padding: 0.25rem 1rem;
    text-decoration: none;
    font-weight: bold;
    border-radius: 1px;
    transition: background 0.3s;
}

 .cta-btn:hover {
    background: #f5bd25;
  /*background: #e66a00;*/
}

 .projects {
   padding: 4rem 2rem;
   text-align: center;
   background-color: #2a2a2a;
}

 .projects h2 {
   color: var(--orange);
   margin-bottom: 2rem;
}

 .gallery-container {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
        padding: 15px;
    }

 .close-btn {
        font-size: 30px;
        top: 5px;
        right: 15px;
    }

  .prev-btn, .next-btn {
        font-size: 20px;
        padding: 8px 12px;
    }
  .prev-btn { left: 5px; }
  .next-btn { right: 5px; }

  .lightbox-content {
        padding: 10px;
    }

  #lightbox-img {
        max-height: 65vh; /* More room for caption/buttons on small screens */
    }


  html {
    scroll-behavior: smooth;
  }
}

