/**
 * Homepage and Navigation Redesign for Prosjektmarkedet
 * 
 * This file contains custom styles for the redesigned homepage and navigation menu
 * using the brand colors: Green (#004225), Blue (#2b4257), and Gold (#d6ad60)
 */

/* ======================================
   NAVIGATION MENU REDESIGN
====================================== */

/* Main navigation container */
.site-header {
  background-color: #fff;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

/* Logo area */
.site-header .logo {
  padding: 15px 0;
}

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

/* Logo variants visibility */
.logo .desktop-logo {
  display: inline-block;
  height: 72px;
  width: auto;
}

.logo .mobile-logo {
  display: none;
  height: 58px;
  width: auto;
}

@media (max-width: 767px) {
  .logo .desktop-logo {
    display: none;
  }
  .logo .mobile-logo {
    display: inline-block;
  }
}

/* Main navigation */
.main-menu {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.navbar-nav {
  display: flex;
  flex-direction: row; /* keep horizontal on desktop */
  margin: 0;
  padding: 0;
  list-style: none;
}

.navbar-nav > li {
  position: relative;
  margin: 0 10px;
  list-style: none;
  display: inline-block;
}

.navbar-nav > li > a {
  color: #2b4257;
  font-weight: 600;
  font-size: 16px;
  padding: 25px 15px;
  display: block;
  position: relative;
  transition: all 0.3s ease;
  text-transform: none;
  letter-spacing: 0;
}

.navbar-nav > li > a:hover,
.navbar-nav > li.active > a,
.navbar-nav > li.current-menu-item > a {
  color: #004225;
}

.navbar-nav > li > a:after {
  content: '';
  position: absolute;
  bottom: 20px;
  left: 15px;
  right: 15px;
  height: 2px;
  background-color: #d6ad60;
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.navbar-nav > li > a:hover:after,
.navbar-nav > li.active > a:after,
.navbar-nav > li.current-menu-item > a:after {
  transform: scaleX(1);
}

/* CTA button in navigation */
.navbar-nav .nav-button a {
  background-color: #004225;
  color: #fff;
  padding: 10px 20px;
  border-radius: 6px;
  margin-left: 15px;
  transition: all 0.3s ease;
}

.navbar-nav .nav-button a:hover {
  background-color: #d6ad60;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.navbar-nav .nav-button a:after {
  display: none;
}

/* Mobile navigation */
.navbar-toggler {
  display: none;
  background: none;
  border: none;
  padding: 10px;
  cursor: pointer;
}

.navbar-toggler-icon {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #2b4257;
  position: relative;
  transition: all 0.3s ease;
}

.navbar-toggler-icon:before,
.navbar-toggler-icon:after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background-color: #2b4257;
  transition: all 0.3s ease;
}

.navbar-toggler-icon:before {
  top: -8px;
}

.navbar-toggler-icon:after {
  bottom: -8px;
}

/* ========== Layout tweaks for new custom header ========== */
.custom-header .container {
  max-width: 1200px;
  width: 100%;
  padding-left: 15px;
  padding-right: 15px;
}

.navbar-collapse {
  display: flex;
  align-items: center;
}

@media (max-width: 991px) {
  .navbar-collapse {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100%;
    width: 280px;
    background: #fff;
    flex-direction: column;
    padding: 80px 20px;
    transition: right 0.3s ease;
    overflow-y: auto;
  }
  .navbar-collapse.show {
    right: 0;
  }
  body.mobile-menu-open {
    overflow: hidden;
  }
  /* stack nav items vertically on mobile */
  .navbar-nav {
    flex-direction: column;
  }
  .navbar-nav > li {
    margin: 10px 0;
  }
}

/* ======================================
   HOMEPAGE HERO SECTION REDESIGN
====================================== */

.hero-section {
  background-color: #f5f7fa;
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.hero-section:before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 40%;
  height: 100%;
  background-color: #004225;
  clip-path: polygon(100% 0, 0 0, 100% 100%);
  opacity: 0.05;
}

.hero-content {
  max-width: 600px;
  margin-right: auto;
}

.hero-title {
  font-size: 48px;
  font-weight: 700;
  color: #004225;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 20px;
  color: #2b4257;
  margin-bottom: 30px;
  line-height: 1.5;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
}

.hero-primary-button {
  background-color: #004225;
  color: #fff;
  padding: 15px 30px;
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-block;
}

.hero-primary-button:hover {
  background-color: #d6ad60;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.hero-secondary-button {
  background-color: #fff;
  color: #004225;
  padding: 15px 30px;
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-block;
  border: 1px solid #004225;
}

.hero-secondary-button:hover {
  background-color: #f5f7fa;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.hero-image {
  position: relative;
  z-index: 1;
}

.hero-image img {
  border-radius: 10px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* ======================================
   FEATURED PROJECTS SECTION
====================================== */

.featured-projects {
  padding: 80px 0;
  background-color: #fff;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h2 {
  font-size: 36px;
  color: #004225;
  margin-bottom: 15px;
  position: relative;
  display: inline-block;
}

.section-title h2:after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background-color: #d6ad60;
}

.section-title p {
  font-size: 18px;
  color: #2b4257;
  max-width: 700px;
  margin: 0 auto;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 40px;
}

.project-card {
  background-color: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.project-image {
  height: 200px;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.5s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.1);
}

.project-content {
  padding: 25px;
}

.project-category {
  color: #d6ad60;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  display: block;
}

.project-title {
  font-size: 20px;
  font-weight: 700;
  color: #2b4257;
  margin-bottom: 15px;
  line-height: 1.4;
}

.project-description {
  color: #666;
  margin-bottom: 20px;
  line-height: 1.6;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 15px;
  border-top: 1px solid #f0f0f0;
}

.project-location {
  display: flex;
  align-items: center;
  color: #666;
  font-size: 14px;
}

.project-location i {
  color: #004225;
  margin-right: 5px;
}

.project-budget {
  font-weight: 700;
  color: #004225;
}

/* ======================================
   HOW IT WORKS SECTION
====================================== */

.how-it-works {
  padding: 80px 0;
  background-color: #f5f7fa;
  position: relative;
}

.how-it-works::after {
  content: "";
  position: absolute;
  bottom: -60px;
  left: 0;
  width: 100%;
  height: 60px;
  background: #ffffff;
  transform: skewY(-3deg);
  transform-origin: 0 100%;
}

.steps-container {
  display: flex;
  justify-content: space-between;
  margin-top: 50px;
  position: relative;
}

.steps-container:before {
  content: '';
  position: absolute;
  top: 70px;
  left: 15%;
  right: 15%;
  height: 2px;
  background-color: #d6ad60;
  z-index: 1;
}

.step-item {
  text-align: center;
  position: relative;
  z-index: 2;
  flex: 1;
  padding: 0 20px;
}

.step-number {
  width: 80px;
  height: 80px;
  background-color: #004225;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 700;
  margin: 0 auto 30px;
  position: relative;
  z-index: 2;
  box-shadow: 0 5px 15px rgba(0, 66, 37, 0.2);
}

.step-title {
  font-size: 20px;
  font-weight: 700;
  color: #2b4257;
  margin-bottom: 15px;
}

.step-description {
  color: #666;
  line-height: 1.6;
}

/* ======================================
   TESTIMONIALS SECTION
====================================== */

.testimonials-section {
  padding: 80px 0;
  background-color: #fff;
}

.testimonials-container {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
}

.testimonial-item {
  background-color: #fff;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  margin: 20px;
  position: relative;
}

.testimonial-content {
  font-size: 18px;
  line-height: 1.7;
  color: #2b4257;
  margin-bottom: 20px;
  position: relative;
  padding-left: 30px;
}

.testimonial-content:before {
  content: '"';
  position: absolute;
  left: 0;
  top: -10px;
  font-size: 60px;
  color: #d6ad60;
  font-family: Georgia, serif;
  line-height: 1;
  opacity: 0.5;
}

.testimonial-author {
  display: flex;
  align-items: center;
}

.author-image {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  margin-right: 15px;
}

.author-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-info h4 {
  font-size: 18px;
  color: #004225;
  margin-bottom: 5px;
}

.author-info p {
  font-size: 14px;
  color: #666;
  margin: 0;
}

/* ======================================
   CTA SECTION
====================================== */

.cta-section {
  padding: 80px 0;
  background-color: #f5f7fa;
  color: #2b4257;
}

.cta-section::before, .cta-section::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 60px;
  background: #f5f7fa;
  z-index: 0;
}

.cta-section::before {
  top: -60px;
  transform: skewY(3deg);
  transform-origin: 100% 0;
}

.cta-section::after {
  bottom: -60px;
  background: #ffffff;
  transform: skewY(-3deg);
  transform-origin: 0 100%;
}

.cta-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.cta-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 15px;
}

.cta-description {
  font-size: 18px;
  color: #555;
  margin-bottom: 35px;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.cta-primary-button {
  background-color: #004225;
  color: #fff;
  padding: 15px 40px;
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-block;
}

.cta-primary-button:hover {
  background-color: #00663a;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.cta-secondary-button {
  background-color: transparent;
  color: #004225;
  padding: 15px 30px;
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-block;
  border: 1px solid #004225;
}

.cta-secondary-button:hover {
  background-color: #004225;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* ======================================
   FOOTER RESTYLE
====================================== */

.site-footer {
  background-color: #004225;
  color: #ffffff;
  padding: 60px 0 30px 0;
  font-size: 15px;
}

.site-footer a {
  color: #ffffff;
  transition: opacity 0.3s ease;
}

.site-footer a:hover {
  color: #d6ad60;
}

.site-footer h4 {
  color: #d6ad60;
  font-weight: 600;
  margin-bottom: 15px;
}

.footer-menu li {
  list-style: none;
  margin-bottom: 6px;
}

.site-footer .footer-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.site-footer .footer-logo img {
  max-height: 108px;
  width: auto;
  margin-bottom: 20px;
  filter: brightness(0) invert(1); /* turns dark logo light for dark footer */
}

.site-footer .footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  text-align: center;
  font-size: 14px;
}

/* ======================================
   RESPONSIVE STYLES
====================================== */

@media (max-width: 1200px) {
  .hero-title {
    font-size: 40px;
  }
  
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 991px) {
  .hero-section {
    padding: 60px 0;
  }
  
  .hero-title {
    font-size: 36px;
  }
  
  .hero-subtitle {
    font-size: 18px;
  }
  
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .steps-container:before {
    display: none;
  }
  
  .steps-container {
    flex-direction: column;
    gap: 40px;
  }
  
  .step-item {
    max-width: 400px;
    margin: 0 auto;
  }
}

@media (max-width: 767px) {
  .navbar-nav {
    display: none;
  }
  
  .navbar-toggler {
    display: block;
  }
  
  .hero-section {
    padding: 40px 0;
    text-align: center;
  }
  
  .hero-content {
    margin: 0 auto 40px;
  }
  
  .hero-title {
    font-size: 32px;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .section-title h2 {
    font-size: 28px;
  }
  
  .section-title p {
    font-size: 16px;
  }
  
  .cta-title {
    font-size: 28px;
  }
  
  .cta-description {
    font-size: 16px;
  }
  
  .cta-buttons {
    flex-direction: column;
    gap: 15px;
  }
}
