/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.7;
  color: #333;
  background-color: #f9f9f9;
}
a { color: #c00000; text-decoration: none; transition: color 0.3s ease; }
a:hover { color: #e30613; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.3; margin-bottom: 1rem; color: #1a1a1a; }
h2 { font-size: 2.5rem; text-align: center; margin-bottom: 3rem; position: relative; }
h2:after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: #c00000;
  margin: 1rem auto 0;
}
h3 { color: #c00000; font-size: 1.5rem; }

/* Layout */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
section { padding: 5rem 1.5rem; }
/* Reset the alternating background colors */
section:nth-of-type(even) { background-color: inherit; }

/* Set specific backgrounds for each section */
#what-we-do {
  background-color: #f9f9f9;
}

#services {
  background-color: #fff;
}

/* Header */
header {
  background: #fff;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
header img { width: 180px; }
nav {
  display: flex;
  gap: 2rem;
}
nav a {
  font-weight: 600;
  color: #333;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}
nav a:hover { color: #fff; border-bottom-color: #c00000; background-color: #c00000; padding: 0.5rem; border-radius: 5px; }

/* Hero */
/* Simple CSS-only Parallax */
.hero {
  position: relative;
  height: 100vh; /* Changed from 80vh to 100vh for full viewport height */
  color: white;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url('img/hero.jpg');
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5); /* Darkens the image */
  z-index: 1;
}

.hero .container, .parallax-section .container {
  padding: 30px 0; /* Reduce padding to fit in smaller space */
  position: relative;
  z-index: 2;
}
.hero h1 { 
  font-size: 3.5rem; 
  margin-bottom: 1.5rem; 
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.hero p { 
  font-size: 1.3rem; 
  margin-bottom: 2.5rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}
.cta-button {
  background: #e30613;
  color: #fff;
  padding: 0.9rem 2.5rem;
  border: none;
  border-radius: 5px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-block;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.cta-button:hover { 
  background-color: #c00000; 
  color: #fff; /* Ensure text stays white on hover */
  transform: translateY(-3px);
  box-shadow: 0 6px 8px rgba(0,0,0,0.15);
}

/* About Section */
#about .container { 
  max-width: 800px; 
  text-align: center; 
}
#about p {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

/* Services */
.services { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
  gap: 2.5rem; 
}
.service {
  background: #fff;
  padding: 2.5rem;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-top: 4px solid #c00000;
}
.service:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}
.service-icon {
  font-size: 3rem;
  color: #c00000;
  margin-bottom: 1.5rem;
}
.service h3 { margin-bottom: 1rem; }

/* Contact */
#contact { background-color: #fff; }
#contact .contact-container { 
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  gap: 3rem; 
  align-items: start; 
}
#contact form { display: grid; gap: 1.2rem; }
#contact input, #contact textarea {
  width: 100%;
  padding: 1rem 1.2rem;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
#contact input:focus, #contact textarea:focus {
  outline: none;
  border-color: #c00000;
  box-shadow: 0 0 0 3px rgba(192,0,0,0.2);
}
#contact textarea { resize: vertical; min-height: 150px; }
#contact button {
  width: auto;
  justify-self: start;
  background: #e30613;
  color: #fff;
  padding: 0.9rem 2rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
#contact button:hover { 
  background-color: #c00000;
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0,0,0,0.15);
}
#contact .contact-info p { margin-bottom: 1.2rem; font-size: 1.1rem; }
#contact .contact-info a { font-weight: bold; color: #c00000; }
#contact .contact-info a:hover { color: #e30613; text-decoration: underline; }

/* Footer - Updated Design with Original Colors */
#footer {
  background-color: #1a1a1a; /* Changed from #0c2657 to original #1a1a1a */
  color: #ccc;
  padding: 3rem 0 1rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  padding: 0 1.5rem;
}

/* Mer spesifikk regel for kontaktinformasjon */
.footer-column h3, 
#footer .contact-info h3 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 1.2rem;
  font-weight: 600;
  color: #fff; /* Endret til hvit for bedre kontrast på mørk bakgrunn */
}

.footer-column p {
  margin-bottom: 0.5rem;
  color: #ccc;
  font-size: 0.95rem;
}

.footer-column a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-column a:hover {
  color: #e30613; /* Keeping your red accent color */
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  font-size: 1.5rem;
}

.footer-bottom {
  max-width: 1200px;
  margin: 2rem auto 0;
  padding: 1.5rem 1.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.footer-bottom p {
  color: #ccc;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: #fff; /* Changed to white for better visibility */
  font-weight: bold; /* Added bold to match original style */
  text-decoration: none;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: #e30613;
}

/* Responsive Footer */
@media (max-width: 900px) {
  .footer-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .footer-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .footer-links {
    justify-content: center;
  }
}

/* Adjust hero height to take up most of the initial viewport */
.hero, .parallax-section {
  height: 100vh; /* Changed from 100vh to 100vh for full viewport height */
  min-height: 400px; /* Increased from 300px for better appearance on smaller screens */
}

/* Make the "Hva vi gjør" section take up the remaining viewport space */
#what-we-do {
  min-height: 40vh; /* This plus the hero should fill the viewport */
  padding-top: 2rem;
  padding-bottom: 2rem;
  display: flex;
  align-items: center;
}

/* Combined What We Do & Services Section */
#what-we-do-services {
  background-color: #f9f9f9;
  padding: 5rem 1.5rem;
}

.intro-content {
  max-width: 800px;
  margin: 0 auto 3rem auto;
  text-align: center;
  font-size: 1.1rem;
  line-height: 1.6;
}

.services { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
  gap: 2.5rem; 
  margin-top: 2rem;
}

.service {
  background: #fff;
  padding: 2.5rem;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-top: 4px solid #c00000;
}

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

.service-icon {
  font-size: 3rem;
  color: #c00000;
  margin-bottom: 1.5rem;
}

.service h3 { margin-bottom: 1rem; }

/* Contact */
#contact { background-color: #fff; }
#contact .contact-container { 
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  gap: 3rem; 
  align-items: start; 
}
#contact form { display: grid; gap: 1.2rem; }
#contact input, #contact textarea {
  width: 100%;
  padding: 1rem 1.2rem;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
#contact input:focus, #contact textarea:focus {
  outline: none;
  border-color: #c00000;
  box-shadow: 0 0 0 3px rgba(192,0,0,0.2);
}
#contact textarea { resize: vertical; min-height: 150px; }
#contact button {
  width: auto;
  justify-self: start;
  background: #e30613;
  color: #fff;
  padding: 0.9rem 2rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
#contact button:hover { 
  background-color: #c00000;
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0,0,0,0.15);
}
#contact .contact-info p { margin-bottom: 1.2rem; font-size: 1.1rem; }
#contact .contact-info a { font-weight: bold; color: #c00000; }
#contact .contact-info a:hover { color: #e30613; text-decoration: underline; }

/* Footer */
footer {
  background: #1a1a1a;
  color: #ccc;
  text-align: center;
  padding: 3rem 1rem;
  font-size: 0.9rem;
}
footer p { margin-bottom: 0.8rem; }
footer a { color: #fff; font-weight: bold; }
footer a:hover { color: #e30613; }

/* Responsive Adjustments */
@media (max-width: 768px) {
  h1 { font-size: 2.8rem; }
  h2 { font-size: 2rem; }
  .hero { padding: 6rem 1rem; }
  .hero h1 { font-size: 2.5rem; }
  .hero p { font-size: 1.1rem; }
  section { padding: 4rem 1rem; }
  .contact-container { grid-template-columns: 1fr; gap: 2rem; }
  .contact-info { text-align: center; }
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.5rem;
  }
  
  footer .contact-info,
  .footer-info {
    text-align: center;
  }
}

@media (max-width: 576px) {
  header .container { 
    flex-direction: column; 
    gap: 1rem;
  }
  nav { 
    width: 100%;
    justify-content: center;
  }
  .hero h1 { font-size: 2rem; }
  .contact button { width: 100%; }
}