/* --------------------------
   General
--------------------------- */
* {
    box-sizing: border-box;
    transition: all 0.3s ease; /* Smooth transitions for hover effects */
}

body {
    margin: 0;
    font-family: Calibri, sans-serif;
    background-color: #f2f2f2;
    color: #333;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --------------------------
   Navigation Bar
--------------------------- */
nav {
    width: 100%;
    background-color: #ffffff;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

nav .logo img {
    height: 60px;
    transition: transform 0.3s ease;
}

nav .logo img:hover {
    transform: scale(1.05);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

nav ul li a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

nav ul li a:hover {
    text-decoration: none;
    background-color: #f0f0f0;
    color: #0000ff;
}

/* --------------------------
   Hero Images
--------------------------- */
.hero {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.hero img {
    width: 100%;
    height: auto;
    object-fit: cover;
    max-height: 65vh;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.hero img:hover {
    transform: scale(1.02);
}

/* General hero text for About / Cop161 pages */
.hero:not(.hero-home) .hero-text {
  position: absolute;
  top: 13%;
  bottom: 33%;
  left: 20%;
  right: 20%;
  transform: translate(-50%, -50%);
  color: #ffffff; /* White text */
  text-align: center;
  overflow-y: scroll;
  padding: 1rem 2rem;
  background: rgba(0,0,0,0.5); /* semi-transparent background */
  border-radius: 8px;
  max-width: none;
  max-height: none;
  opacity: 0; /* initial for animation */

}

/* Homepage hero text */
.hero-home .hero-text {
    position: absolute;
    color: #ffffff;
    text-align: left;
    padding: 0;
    max-width: 40%;
    opacity: 0;
}

.hero-home .hero-text.top-left {
    top: 1rem;
    left: 1rem;
    text-align: left;
}

.hero-home .hero-text.bottom-right {
    bottom: 1rem;
    right: 1rem;
    text-align: right;
}

/* --------------------------
   Fade-up Animation
--------------------------- */
@keyframes fadeUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-up {
    animation: fadeUp 1s ease-out forwards;
}



/* --------------------------
   Content Boxes
--------------------------- */
.content {
    max-width: 800px;
    margin: 1rem auto;
    padding: 1.5rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease;
}

.content:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

.content h1, .content h2, .content h3 {
    margin-top: 0;
}

.content p, .content li {
    line-height: 1.6;
    margin-bottom: 1rem;
}

.scroll-container{
  height: 300px;
  overflow-y: scroll;
  width: 800px;
  border: 8px
  padding: 1.5rem;
}

/* --------------------------
   Forms & Buttons
--------------------------- */
form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

input, textarea {
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus, textarea:focus {
    border-color: #0000ff;
    box-shadow: 0 0 6px rgba(0,0,255,0.2);
    outline: none;
}

button {
    background: #0000ff;
    color: #fff;
    padding: 0.75rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

button:hover {
    background-color: #3333cc;
    transform: translateY(-2px);
}

/* --------------------------
   Footer
--------------------------- */
footer {
    background: #f9f9f9;
    border-top: 1px solid #ddd;
    padding: 1rem;
    text-align: center;
    font-size: 0.9rem;
    color: #555;
}

footer a {
    color: #0000ff;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #3333cc;
}

/* --------------------------
   Mobile Adjustments
--------------------------- */
@media (max-width: 768px) {
    .hero img {
        max-height: 50vh;
        object-fit: contain;
    }

    .hero-text {
        padding: 1rem;
        font-size: 0.9rem;
    }

    .hero-home .hero-text {
        max-width: 80%;
    }

    .hero-home .hero-text.top-left {
        top: 0.5rem;
        left: 0.5rem;
    }

    .hero-home .hero-text.bottom-right {
        bottom: 0.5rem;
        right: 0.5rem;
    }
}

@media (max-width: 600px) {
    .content {
        margin: 1rem;
        padding: 1rem;
    }

    nav ul {
        gap: 1rem;
        flex-wrap: wrap;
    }
}

@media screen and (max-width: 768px) {
  body {
    font-size: 14px; /* Kleinere Schrift auf Mobile */
  }

  .flex-container {
    display: flex;
    flex-direction: column; /* Elemente untereinander statt nebeneinander */
  }

  .flex-item {
    margin-bottom: 10px; /* Abstand zwischen Elementen */
  }
}
