/*background pictures: color overlay lhr blue 30% opacity plus 15 grain*/

/* Global Styles */
:root {
  --blue: #3178a7;
  --white: #ffffff;
  --contrast: #e77e20;
  --radius: 12px;
  --spacing: 1rem;
  --max-width: 1200px;
  --text-shadow-white: 0 0 10px rgba(255,255,255,0.7);
  --text-shadow-white-small: 0 0 5px rgba(255,255,255,0.7);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Fira Sans', sans-serif;
  line-height: 1.6;
  color: var(--white);
  background-color: var(--blue);
}

.hero .arrow {
    display: none; /* Hide by default */
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--white);
  text-decoration: none;
}

/* Header */
.header {
  min-height: 10vh;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing);
  background-color: var(--blue);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;  
  z-index: 10;        
}

.header img {
  width: 50px;
}

.hamburger {
  font-size: 2rem;
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  transition: transform 0.3s ease;
  z-index: 10;
}

.hamburger.active {
  transform: rotate(90deg);
}

.nav-links {
  display: none;
  flex-direction: column;
  gap: var(--spacing);
  background-color: var(--blue);
  position: absolute;
  top: 60px;
  right: 0;
  padding: var(--spacing);
  z-index: 10;
}

a .link-text {
  display: inline-block;
  transition: color 0.3s ease;
}

.nav-links a:hover .link-text {
  color: rgba(255, 255, 255, 0.6);
}

.nav-icon {
  display: none;
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease, filter 0.3s ease; /* Add transition */
}

.nav-links a:hover .nav-icon {
  transform: translateY(-2px) scale(1.1);
  filter: drop-shadow(0 2px 4px rgba(255, 255, 255, 0.3));
}

.nav-links a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.nav-links a {
  font-weight: 600;
}

.nav-links.active {
  display: flex;
}

/* Hero */
.hero {
  position: relative;  
  z-index: 1;         
  background: url('images/hero.jpg') center/cover no-repeat;
  background-blend-mode: multiply;
  text-align: center;
  padding: 6rem 4rem;
}

.hero-content h1 {
  font-size: 2.2rem;
  text-shadow: var(--text-shadow-white);
}

.hero-content p {
  text-shadow: var(--text-shadow-white-small);
}

.about.grid2 {
  padding: 6rem 4rem;
}

.btn {
  display: inline-block;
  margin-top: var(--spacing);
  padding: 0.75rem 1.5rem;
  background-color: var(--white);
  color: var(--blue);
  border-radius: var(--radius);
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn:hover {
  background-color: rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Style regular links */
a:not(.btn):not(.logo) {
  color: var(--white);
  text-decoration: none;
  position: relative;
  transition: all 0.3s ease;
}

a:not(.btn):not(.logo):hover {
  color: rgba(255, 255, 255, 0.9);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Grid2 Section */
.grid2 {
  position: relative;
  display: grid;
  min-height: 50vh;
  gap: var(--spacing);
  padding: 4rem var(--spacing);
  background: url('images/about.jpg') center 90% no-repeat;
  background-blend-mode: normal;
  background-size: cover;
}

.grid2 h2 {
  text-shadow: var(--text-shadow-white);
}

.grid2 .btn {
  display: none;
}

/* Latest Action */
.latest-action {
  padding: 2rem var(--spacing);  
  text-align: center;
  background-color: var(--white);
  color: var(--blue);
}

.latest-action h2 {
  padding-bottom: calc(var(--spacing) * 0.5);
  font-size: 2rem;
}

.latest-action .btn {
  color: var(--white);
  background-color: var(--blue);
}

/* Latest Action Images */
.latest-action-images {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing);
  margin: 2rem 0;
}

.image-wrapper {
  aspect-ratio: 3/2;
  position: relative;
  width: 100%;
}

.image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}

/* Prevent stacking on orientation change */
@media screen and (orientation: landscape) {
  .latest-action-images {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (orientation: portrait) and (max-width: 767px) {
  .latest-action-images {
    display: none; /* Hide grid in mobile portrait */
  }
}

.latest-action-images a {
    display: block;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
}

.latest-action-images a:hover {
    transform: scale(1.02);
}

.latest-action-images .image-wrapper {
    overflow: hidden;
    border-radius: var(--radius);
}

/* Add orientation-specific styles */
@media screen and (orientation: portrait) {
    .latest-action-images {
        grid-template-columns: 1fr; /* Single column in portrait */
    }
}

@media screen and (orientation: landscape) and (max-width: 767px) {
    .latest-action-images {
        grid-template-columns: repeat(2, 1fr); /* Two columns in landscape */
    }
}

/* Ensure images maintain aspect ratio */
#latest-action-image,
.latest-action-images img {
    aspect-ratio: 3/2;
    object-fit: cover;
    width: 100%;
    height: 100%;
    border-radius: var(--radius);
    transition: all 0.3s ease;
}

.saeulen {
  display: grid;
  gap: var(--spacing);
  padding: 4rem var(--spacing);
  background: url('images/alternative_saeulen.jpg') center/cover no-repeat;
  background-blend-mode: multiply;
}

.saeule {
  border: 2px solid var(--white);
  border-radius: var(--radius);
  padding: var(--spacing);
  background: rgba(0,0,0,0.2);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.saeule img {
  width: 25%;
  height: auto;
  margin: var(--spacing) 0;
}

.saeule h3 .arrow {
  color: var(--contrast);
  cursor: pointer;
  font-size: 1.5em;
  vertical-align: middle;
  transition: transform 0.3s;
  display: inline-block;
  width: 1em;
  text-align: center;
  margin-left: 0.5em;
}

.saeule h3 .arrow.active {
  transform: rotate(180deg);
}

.saeule-toggle {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.5s cubic-bezier(0.4,0,0.2,1);
}

.saeule-toggle.open {
  max-height: 300px; /* Adjust based on your content */
}

.saeule-text {
  margin: 0;
  padding: 0.5em 0;
}

/* Kontakt */
.kontakt {
  margin: var(--spacing);
  padding: 2rem var(--spacing);
  background-color: var(--blue);
  text-align: center;
  position: relative;
}

.kontakt h2 {
  margin-bottom: 2rem;
  text-shadow: var(--text-shadow-white);
}

form {
  color: black;
  background-color: #F0F0F0;
  border-radius: 1rem;
  display: flex;
  flex-direction: column;
  gap: var(--spacing);
  max-width: 500px;
  margin: 0 auto;
  padding: var(--spacing);
}

form label {
  display: flex;
  flex-direction: column;
  text-align: left;
  gap: 0.5rem;
}

input, textarea {
  padding: 0.75rem;
  border-radius: var(--radius);
  border: none;
  width: 100%;
  background-color: var(--white);
  transition: all 0.1s ease;
}

textarea:hover, textarea:focus, input:hover, input:focus {
  outline: none;
  background-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.spenden {
  padding: var(--spacing);
  background-color: var(--contrast);
  margin-top: 3rem;
  text-align: center;
  margin-bottom: 3rem;
}

.spenden {
  display: none;
}

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

.footer {
  background-color: var(--blue);
  padding: 2rem var(--spacing);
  display: flex;
  flex-direction: column;
  gap: var(--spacing);
  align-items: center;
  text-align: center;
}

.footer .social .nav-icon {
  display: block;
  width: 24px;
  height: 24px;
  margin: 0 0.5rem;
}

.footer .social a {
  display: flex;
  align-items: center;
}

.footer .social a:hover .nav-icon,
.footer a:not(.btn):hover {
  transform: translateY(-2px);
  transition: transform 0.3s ease;
}

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

.social a {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.social a:hover {
  transform: translateY(-2px);
  opacity: 0.8;
}

/* Media Queries */
@media (min-width: 768px) {

  .hero {
    min-height: 30vh;
  }

  .about {
    min-height: 30vh;
    display: flex;
  }

  .hamburger {
    display: none;
  }

  .nav-icon {
    display: block;
  }
  
  a .link-text {
    display: none;
  }

  .nav-links {
    display: flex !important;
    flex-direction: row;
    position: static;
  }

  .grid2 {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
  .saeulen {
    grid-template-columns: repeat(2, 1fr);  /* Zunächst 2 Spalten */
    gap: 1.5rem;
  }

  .footer {
    display: grid;
    grid-template-columns: repeat(3, auto);
    justify-content: center;
    gap: 6rem;
  }

  .footer .social {
    display: flex;
    gap: 1rem;
  }
}

@media (min-width: 992px) {

  .saeulen {
    grid-template-columns: repeat(4, 1fr);  /* 4 Spalten ab 992px */
    max-width: var(--max-width);
    margin: 0 auto;
  }

}

@media (min-width: 1024px) {

  /* Remove existing rules */
  .grid2::before, 
  .grid2::after,
  .kontakt::before, 
  .kontakt::after {
    display: none;
  }

  .hero, .grid2 {
    min-height: 30vh;
  }

  .grid2 {
    background: url('images/about.jpg') center 70% no-repeat;
    background-size: cover;
  }

  /* Update säulen section */
  .saeulen {
    width: 100%;
    padding: 6rem var(--spacing);
    margin: 0;
    max-width: none; /* Remove max-width constraint */
  }

  /* Keep contact form centered with max-width */
  .kontakt {
    padding: 4rem var(--spacing);
  }

  .kontakt form {
    max-width: 500px;
    margin: 0 auto;
  }

  /* Keep footer centered with max-width for content */
  .footer {
    width: 100%;
    padding: 3rem var(--spacing);
  }

  .footer > * {
    max-width: var(--max-width);
    margin: 0 auto;
  }
}

@media (max-width: 767px) {
  
  #latest-action-image {
    width: 100%;
    aspect-ratio: 3/2;
    object-fit: cover;
    border-radius: var(--radius);
  }

  /* Add divider lines in hamburger menu */
  .nav-links a {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
  }

  .nav-links a:last-child {
    border-bottom: none;
  }

  /* Adjust the nav-links container */
  .nav-links {
    min-width: 200px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 var(--radius) var(--radius);
  }

  /* Touch effect for mobile devices */
  a:not(.btn):not(.logo):active {
    opacity: 0.5;
    transition: opacity 0.1s ease;
  }

  .btn:active {
    opacity: 0.7;
    transform: scale(0.98);
    transition: all 0.1s ease;
  }

  .nav-links a:active {
    opacity: 0.5;
    transform: scale(0.98);
  }

  /* Enable snap scrolling on main container */
  html {
    scroll-snap-type: y proximity; /* 'proximity' instead of 'mandatory' for smoother experience */
    height: 100%;
  }

  /* Hero section takes full viewport height */
  .hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px var(--spacing);
  }

  .hero p {
    font-size: 1.1rem;
  }

  .hero .arrow {
    display: flex;
    position: absolute;
    bottom: 6rem;
    justify-self: center;
    color: var(--white);
    font-size: 3rem;
    cursor: pointer;
    text-shadow: 0 0 10px rgba(255,255,255,0.7);
    opacity: 1;
    transition: opacity 0.3s ease;
  }

  .hero .arrow.hide {
    opacity: 0;
  }

  .about.grid2 {
    padding: 4rem 2rem;
  }

  .bounce {
    -webkit-animation: bounce 2s infinite;
    animation: bounce 2s infinite;
  }
  @-webkit-keyframes bounce {
    0%,
    20%,
    50%,
    80%,
    100% {
      transform: translateY(0);
    }
    40% {
      transform: translateY(-30px);
    }
    60% {
      transform: translateY(-15px);
    }
  }

  @keyframes bounce {
    0%,
    20%,
    50%,
    80%,
    100% {
      transform: translateY(0);
    }
    40% {
      transform: translateY(-30px);
    }
    60% {
      transform: translateY(-15px);
    }
  }

  /* Footer special handling */
  .footer {
    scroll-snap-align: end;
    padding: 2rem var(--spacing);
  }

  .header {
    scroll-snap-align: start;
  }

  .grid2 {
    align-items: center;
    background: url('images/about.jpg') center 90% no-repeat; /* Changed from 90% to 20% */
    background-size: cover;
    background-blend-mode: multiply;
  }

  .grid2 h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
  }
  
  .grid2 p {
    font-size: 1.1rem;
    font-weight: 700;
    margin-right: 40%;
  }

}

/* reCAPTCHA */
.g-recaptcha {
  margin: 1rem 0;
  display: flex;
  justify-content: center;
}

/* Footer hover effects */
.footer a,
.footer .social a {
  display: flex;
  align-items: center;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.footer a:hover,
.footer .social a:hover,
.footer .nav-icon:hover {
  transform: translateY(-2px);
  opacity: 0.8;
}
