@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700;800&display=swap');

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

  :root {
    --soft-orange: hsl(35, 77%, 62%);
    --soft-red: hsl(5, 85%, 63%);
    --off-white: hsl(36, 100%, 99%);
    --grayish-blue: hsl(233, 8%, 79%);
    --dark-grayish-blue: hsl(236, 13%, 42%);
    --very-dark-blue: hsl(240, 100%, 5%);
  }

  body {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    color: var(--dark-grayish-blue);
    background-color: var(--off-white);
    display: flex;
    justify-content: center;
    margin: 0 auto;
  }

  main {
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    width: 100%;
    padding: 50px;
  }

  /* Top line */
  .top {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    width: 100%;
  }

  .top img {
    width: 50px;
    height: auto;
  }

  .desktop-nav {
    display: flex;
    gap: 40px;
  }

  .top div p {
    transition: 0.3s ease-in-out;
  }

  .top div p:hover {
    color: var(--soft-orange);
    cursor: pointer;
  }

.mobile-nav {
    display: none;
  }
  
  .menu-toggle {
    width: 20px;
    height: auto;
    cursor: pointer;
    z-index: 4;
  }
  
  #menu-icon,
  #close-icon {
    display: none;
  }

/* Top Grid Field */
.top-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, auto);
    justify-items: center;
    align-items: flex-start;
    gap: 25px;
    margin-bottom: 50px;
}

.top-grid picture {
    grid-row: 1;
    grid-column: 1/ span 2;
    width: 100%;
    height: 100%;
}

.top-grid picture img {
    width: 100%;
    height: auto;
    display: block;
}

.top-grid h1 {
    font-weight: 800;
    font-size: 55px;
    grid-row: 2;
    grid-column: 1;
    color: var(--very-dark-blue);
    line-height: 0.95em;
}

.web-preview {
    grid-row: 2;
    grid-column: 2;
    height: 100%;
    display: flex;
    justify-content: space-between;
    flex-direction: column;
}

p {
    line-height: 1.5em;
    font-size: 15px;
}

.web-preview span {
    background-color: var(--soft-red);
    color: var(--very-dark-blue);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 5px;
    padding: 10px 20px;
    display: inline-block;
    align-self: start;
    transition: 0.3s ease-in-out;
}

.web-preview span:hover {
    background-color: var(--very-dark-blue);
    color: var(--off-white);
    cursor: pointer;
}

.news-section {
    grid-row: 1/ span 2;
    grid-column: 3;
    display: flex;
    flex-direction: column;
    background-color: var(--very-dark-blue);
    padding: 25px 20px;
    height: 100%;
}

.news-section h2 {
    font-weight: 700;
    color: var(--soft-orange);
    margin-bottom: 20px;
    font-size: 40px;
}

.news-section h4 {
    font-weight: 700;
    color: var(--off-white);
    margin-bottom: 5px;
    font-size: 20px;
    transition: 0.3s ease-in-out;
}

.news-section h4:hover {
    color: var(--soft-orange);
    cursor: pointer;
}

.divider {
    width: 100%;
    height: 1px;
    border: none;
    background-color: var(--dark-grayish-blue);
    margin: 30px 0;
}

/* Bottom Field */
.bottom-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 25px;
    width: 100%;
}

.first {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 15px;
    width: 350px;
    height: 130px;
}

.first img {
    height: 100%;
    width: 100px;    
}

.second {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 20px;
    width: 350px;
    height: 130px;
}

.second img {
    height: 100%;
    width: 100px; 
}

.third {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 20px;
    width: 350px;
    height: 130px;
}

.third img {
    height: 100%;
    width: 100px; 
}

.bottom-texts {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.bottom-texts h3 {
    font-weight: 700;
    color: var(--soft-red);
    font-size: 35px;
}

.bottom-texts h4 {
    font-weight: 700;
    color: var(--very-dark-blue);
    font-size: 20px;
    transition: 0.3s ease-in-out;
}

.bottom-texts h4:hover {
    color: var(--soft-red);
    cursor: pointer;
}


@media (max-width: 850px) {
    main {
        width: 100%;
        padding: 20px 10px;
      }

      .top {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 30px;
        width: 100%;
      }  
      
      .top img {
        width: 50px;
        height: auto;
      }  

      .top-grid {
        display: flex;
        flex-direction: column;
        justify-items: center;
        align-items: center;
        gap: 20px;
        margin-bottom: 0;
        width: 100%;
    }  

    .top-grid picture {
        width: 300px;
        height: auto;
    }

    .top-grid h1 {
        width: 300px;
        font-size: 40px;
    }

    .web-preview {
        height: auto;
        width: 300px;
        gap: 15px;
        margin-bottom: 20px;
    }

    .news-section {
        height: auto;
        width: 300px;
        margin-bottom: 40px;
    }

    .bottom-flex {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 25px;
        width: 100%;
    }

    .first {
        width: 300px;
        height: auto;
    }
    
    .first img {
        height: auto;
        width: 80px;    
    }
    
    .second {
        width: 300px;
        height: auto;
    }
    
    .second img {
        height: auto;
        width: 80px; 
    }
    
    .third {
        width: 300px;
        height: auto;
    }
    
    .third img {
        height: auto;
        width: 80px; 
    }

    .bottom-texts h3 {
        font-weight: 700;
        color: var(--soft-red);
        font-size: 30px;
    }
    
    .bottom-texts h4 {
        font-weight: 700;
        color: var(--very-dark-blue);
        font-size: 15px;
        transition: 0.3s ease-in-out;
    }

    p {
        line-height: 1.5em;
        font-size: 13px;
    }

    #menu-icon {
        display: block;
      }
    
      .desktop-nav {
        display: none;
      }
    
      .mobile-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: white;
        flex-direction: column;
        gap: 25px;
        padding: 100px 20px 20px;
        transition: right 0.3s ease-in-out;
        z-index: 3;
        display: flex;
      }

      .mobile-nav.active {
        display: flex;
        right: 0;
      }

      .overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0,0,0,0.5); /* halbtransparentes Schwarz */
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease-in-out;
        z-index: 2; /* unter dem Menü (999), über Rest der Seite */
      }
      
      .overlay.active {
        opacity: 1;
        visibility: visible;
      }
      
}