/* CSS for StuckART Replica - Fully Responsive */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;700&display=swap');

:root {
  --primary-blue: #339BB3;
  --text-dark: #474747;
  --text-light-grey: #797979;
  --bg-color: #fcfcfc;
  --max-width: 1200px;
}

body,
html {
  margin: 0;
  padding: 0;
  font-family: 'Montserrat', sans-serif;
  color: var(--text-dark);
  background-color: var(--bg-color);
  font-weight: 300;
  font-size: 20px;
  line-height: 1.8;
}

/* Base resets */
a {
  color: var(--primary-blue);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  font-weight: 400;
  color: var(--text-light-grey);
  margin-top: 0;
}

h1 {
  font-size: 48px;
  line-height: 1.2;
  margin-bottom: 30px;
}

h2 {
  font-size: 30px;
  line-height: 1.3;
  margin-bottom: 25px;
}

/* Page Wrapper (Local) and Container (Joomla) */
.page-wrapper,
.container {
  max-width: var(--max-width) !important;
  margin: 0 auto;
  padding: 0 85px !important;
  position: relative;
  box-sizing: border-box;
}

/* Joomla Layout Overrides */
.header,
.footer {
  width: 100% !important;
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* ---------- DESKTOP HEADER ---------- */
.site-header {
  position: relative;
  width: 100%;
  height: 254px;
  /* Calibrated to fit the line in background */
  background-position: center top;
  background-repeat: no-repeat;
  background-size: 1500px;
  /* Fixed background size so text positions perfectly */
  margin-bottom: 30px;
}

.header-wrapper {
  max-width: 1200px;
  height: 100%;
  margin: 0 auto;
  padding: 0 85px;
  position: relative;
  box-sizing: border-box;
}

.main-nav-desktop {
  position: absolute;
  bottom: 85px;
  /* Align text precisely ABOVE the horizontal line drawn in the image, slightly higher now */
  right: 20px;
  /* Align to the right side of the wrapper */
  z-index: 10;
}

.main-nav-desktop ul {
  list-style: none;
  display: flex;
  gap: 25px;
  margin: 0;
  padding: 0;
}

.main-nav-desktop ul li a {
  font-size: 18px;
  /* Increased size */
  color: var(--text-dark);
  font-weight: 300;
  display: block;
  padding-bottom: 2px;
}

.main-nav-desktop ul li a.active,
.main-nav-desktop ul li a:hover {
  color: var(--primary-blue);
  text-decoration: none;
}


/* ---------- MOBILE HEADER ---------- */
.mobile-header {
  display: none;
  width: 100%;
  background: #ffffff;
  padding: 15px 20px;
  box-sizing: border-box;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.mobile-logo img {
  max-width: 280px;
  height: auto;
}

.hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 10;
  font-size: 30px;
  color: #333;
}

.hamburger i {
  display: inline-block;
}

.mobile-nav-menu {
  display: none;
  flex-direction: column;
  background: #333333;
  width: 100%;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 100;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.mobile-nav-menu.open {
  display: flex;
}

.mobile-nav-menu a {
  color: #fff;
  padding: 15px 20px;
  border-bottom: 1px solid #444;
  text-decoration: none;
  font-size: 16px;
}

.mobile-nav-menu a.active,
.mobile-nav-menu a:hover {
  background: #444444;
}


/* ---------- CONTENT AREA ---------- */
.main-content {
  display: flex;
  justify-content: space-between;
  margin-top: 40px;
  min-height: 400px;
  gap: 40px;
}

/* Start Page Specific */
.start-content-left {
  flex: 0 0 300px;
  background-color: #e6e6e6;
  /* Grey background */
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 20px;
}

.start-content-left::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: 100%;
  width: 9999px;
  background-color: #e6e6e6;
}

.stuckart-vert-img {
  width: 60px;
  height: auto;
  opacity: 0.8;
  margin-right: -10px;
}

.start-content-right {
  flex: 1;
  padding: 20px 0 20px 40px;
  /* Added more left padding */
}

.start-content-right p {
  font-size: 24px;
  /* Larger font size for the intro text based on visual */
  line-height: 1.8;
  color: var(--text-light-grey);
}

/* General Content Pages (About, Services, etc) */
.page-header-title {
  margin-bottom: 20px;
}

.content-row {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}

.content-col-6 {
  flex: 1;
  min-width: 300px;
}

.content-col-8 {
  flex: 2;
  min-width: 300px;
}

.content-col-4 {
  flex: 1;
  min-width: 200px;
}

.responsive-img {
  max-width: 100%;
  height: auto;
  display: block;
}

.leistung-box {
  background-color: #f4f4f4;
  padding: 30px;
}

.contact-box {
  background-color: #EAF5F7;
  padding: 30px;
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.project-placeholder {
  background-color: #ededed;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 14px;
  border: 1px dashed #ccc;
}

/* New Gallery Styles */
.project-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.project-gallery a {
  display: block;
  height: 180px; 
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.project-gallery a:hover {
  transform: scale(1.02);
}

.project-gallery img {
  height: 100%;
  width: auto;
  object-fit: cover;
  display: block;
}

/* Lightbox Styles */
.lightbox {
  display: none; 
  position: fixed; 
  z-index: 1000; 
  padding-top: 50px; 
  left: 0;
  top: 0;
  width: 100%; 
  height: 100%; 
  overflow: auto; 
  background-color: rgba(0,0,0,0.9); 
}

.lightbox-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 80vh;
}

.lightbox-close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

/* ---------- FOOTER ---------- */
.site-footer {
  max-width: var(--max-width) !important;
  margin: 80px auto 0;
  padding: 40px 85px 20px !important;
  box-sizing: border-box;
}

.footer-content {
  margin-bottom: 20px;
}

.footer-col h3 {
  font-size: 28px;
  color: var(--primary-blue);
  margin-bottom: 15px;
}

.footer-contact p {
  margin: 2px 0;
  font-size: 14px;
  color: var(--text-dark);
}

.footer-contact a {
  color: var(--text-dark);
}

.footer-bottom {
  padding-top: 15px;
  display: flex;
  justify-content: flex-end;
}

.footer-bottom-links {
  text-align: right;
  font-size: 11px;
  color: var(--text-dark);
  line-height: 1.6;
}

.footer-bottom-links a {
  color: var(--text-dark);
}

/* ---------- MEDIA QUERIES (RESPONSIVE) ---------- */
@media (max-width: 900px) {
  .site-header {
    display: none;
    /* Hide Desktop Header entirely */
  }

  .mobile-header {
    display: flex;
    /* Show Mobile Header */
  }

  .page-wrapper,
  .container {
    padding: 0 20px !important;
  }

  .main-content,
  .content-row,
  .footer-content {
    flex-direction: column;
    gap: 20px;
  }

  .start-content-left {
    flex: none;
    justify-content: flex-start;
    margin-bottom: 20px;
  }

  h1 {
    font-size: 35px;
    line-height: 1.3;
  }

  h2 {
    font-size: 26px;
  }

  .site-footer {
    padding: 40px 20px 20px !important;
  }

  .footer-bottom {
    justify-content: center;
  }

  .footer-bottom-links {
    text-align: center;
  }
}

/* ---------- ANIMATIONS ---------- */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

body {
  animation: fadeIn 0.8s ease-in-out;
}

.animate-on-scroll {
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-on-scroll.visible {
  opacity: 1;
}

.fade-in {
  /* opacity already handled by .animate-on-scroll */
  visibility: visible;
}

.slide-up {
  transform: translateY(40px);
}

.slide-up.visible {
  transform: translateY(0);
}

.slide-left {
  transform: translateX(-40px);
}

.slide-left.visible {
  transform: translateX(0);
}

.slide-right {
  transform: translateX(40px);
}

.slide-right.visible {
  transform: translateX(0);
}

/* Stagger delays */
.delay-100 {
  transition-delay: 100ms;
}

.delay-200 {
  transition-delay: 200ms;
}

.delay-300 {
  transition-delay: 300ms;
}