@media (max-width: 320px) {
  .section-header h2 {
    font-size: 1.9em !important;
    margin-top: 70px !important;
  }

  .scroll-navigation {
    width: 30px !important;
    height: 30px !important;
    font-size: 1em !important;
  }

  .scroll-prev {
    left: 15px !important;
  }

  .scroll-next {
    right: 15px !important;
  }

  .lesson-counter {
    font-size: 0.8em !important;
    padding: 5px 10px !important;
  }

  .horizontal-scrolling .content .col-inner h3 {
    font-size: 1.6rem !important;
  }

  .horizontal-scrolling .content .col-inner p {
    font-size: 15px !important;
  }
}

@media (max-width: 400px) {
    .knowlege-item p {
        color: #000000;
        font-weight: 800; 
        font-size: 1.3em; 
        line-height: 1.6;
        letter-spacing: 0.5px;
    }

    .knowlege-item {
        padding: 1.2rem 0.8rem;
        margin-bottom: 1.8rem;
        border: 3px solid #1a1a1a;
    }

    .knowlege-item .knowlege-item-progress {
        height: 32px;
        line-height: 32px;
        font-size: 16px;
        font-weight: 800;
    }

  .section-header {
    padding: 15px 0 0 0;
    margin-bottom: 0.5rem;
  }
  
  .section-header h2 {
    font-size: 2.2em !important;
    margin-top: 80px !important;
    margin-bottom: 15px !important;
  }

  .lesson-controls {
    position: relative;
    width: 100%;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .scroll-navigation {
    width: 35px !important;
    height: 35px !important;
    font-size: 1.1em !important;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
  }

  .scroll-prev {
    left: 20px !important;
  }

  .scroll-next {
    right: 20px !important;
  }

  .lesson-counter {
    position: relative !important;
    left: auto !important;
    transform: none !important;
    background: rgba(0, 52, 77, 0.9) !important;
    color: white !important;
    padding: 6px 12px !important;
    border-radius: 15px !important;
    font-size: 0.85em !important;
    font-weight: bold;
    min-width: 50px;
    text-align: center;
  }

  .lessons-container {
    height: calc(100vh - 180px) !important;
    margin-top: 10px;
  }

  /* Content innerhalb der Lektionen */
  .horizontal-scrolling .content .col-inner {
    padding: 2.5vw !important;
  }

  .horizontal-scrolling .content .col-inner h3 {
    font-size: 1.8rem !important;
    margin-bottom: 1.5rem !important;
  }

  .horizontal-scrolling .content .col-inner p {
    font-size: 16px !important;
    line-height: 1.5 !important;
    margin-bottom: 1rem !important;
  }
}

@media (max-width: 480px) {
    .section {
        padding: 10px;
    }
    
    h1 {
        font-size: 3em;
    }
    
   h2 {
        font-size: 2em;
        margin-top: 100px;
    }
    
    .header-top {
        height: 60px;
        padding: 0 10px;
    }
    
    nav {
        top: 60px;
    }
    
    nav li a {
        font-size: 1.56em;
        padding: 12px;
    }
    
    /* Über mich - sehr kompakt */
    .content-wrapper {
        width: 100%;
        padding: 0 !important;
        justify-content: center;
        align-self: center;
        font-size: 16px;
        margin-top: 20px;
    }
    
    .content-col-1 .col-inner {
        padding: 3vw;
    }
    
    .content-col-2 .col-inner {
        min-height: 250px;
    }
    
    /* IT-Kenntnisse */
    .knowlege-item {
        background: #ffffff; 
        padding: 1rem;
        margin-bottom: 1.5rem;
        border: 2px solid #e0e0e0;
        border-radius: 8px;
    }


    #itkenntnisse .content {
        padding: 1.5rem 1rem;
        background: #ffffff;
    }
    
    .knowlege-item p {
        color: #000000;
        font-weight: 700; 
        font-size: 1.2em;
        line-height: 1.5;
        text-shadow: none;
    }
    
    .knowlege-item .knowlege-item-progress {
        height: 28px;
        line-height: 28px;
        font-size: 14px;
        border: 2px solid #1a1a1a;
    }
    
    /* Lektion fürs Leben */
    .content .col-inner {
        padding: 4vw 3vw;
    }
    
    .content .col-inner h2 {
        font-size: 2.4rem;
        margin-top: 80px;
    }
    
    .content .col-inner p {
        font-size: 16px;
        line-height: 1.4;
    }
    
    /* Scroll Navigation für Mobile */
    .scroll-navigation {
        width: 40px;
        height: 40px;
        font-size: 1.2em;
    }
    
    .scroll-prev {
        left: 10px;
    }
    
    .scroll-next {
        right: 10px;
    }
    
    .lesson-counter {
        font-size: 0.8em;
        padding: 6px 12px;
    }
    
    /* Scroll Hint */
    .scroll-hint {
        bottom: 10px;
        right: 15px;
        font-size: 0.9em;
    }
}

@media (max-width: 568px) and (orientation: landscape) and (max-height: 320px) {
  .section-header h2 {
    font-size: 1.6em !important;
    margin-top: 25px !important;
    margin-bottom: 5px !important;
  }

  .lesson-controls {
    height: 35px !important;
  }

  .scroll-navigation {
    width: 28px !important;
    height: 28px !important;
    font-size: 0.9em !important;
  }

  .scroll-prev {
    left: 25px !important;
  }

  .scroll-next {
    right: 25px !important;
  }

  .lesson-counter {
    font-size: 0.7em !important;
    padding: 3px 6px !important;
  }

  .lessons-container {
    height: calc(100vh - 85px) !important;
  }

  .horizontal-scrolling .content .col-inner {
    padding: 1vw 2.5vw !important;
  }

  .horizontal-scrolling .content .col-inner h3 {
    font-size: 1.2rem !important;
    margin-bottom: 0.6rem !important;
  }

  .horizontal-scrolling .content .col-inner p {
    font-size: 12px !important;
    line-height: 1.25 !important;
  }

  .blog-card {
    flex: 1 1 calc(50% - 2rem) !important;
    max-width: calc(50% - 2rem) !important;
    margin: 0 auto;
  }
}

@media (min-width: 481px) and (max-width: 768px) {   
    h1 {
        font-size: 24px;
    }
    
    h2 {
        font-size: 2.6em;
    }
    
    /* Navigation */
    .header-top {
        height: 70px;
    }
    
    nav {
        top: 70px;
    }
    
    nav li a {
        font-size: 1.4em;
        padding: 15px;
    }
    
    /* Über mich */
    .content-wrapper {
        width: 100%;
        padding: 0 !important;
        justify-content: center;
        align-self: center;
        font-size: 16px;
        margin-top: 20px;
    }
    
    .content-col-2 .col-inner {
        min-height: 300px;
    }
    
    /* IT-Kenntnisse */
    #itkenntnisse .content {
        padding: 1.5rem 2rem;
    }
    
    .knowlege-item p {
        color: #1a1a1a ;
        font-weight: 600;
        font-size: 1.1em;
        line-height: 1.4;
    }

    .knowlege-item {
        background: #ffffff;
        padding: 1.2rem;
        margin-bottom: 1.5rem;
        border: 1px solid #e0e0e0;
        border-radius: 6px;
    }
    
    .knowlege-item .knowlege-item-progress {
        height: 30px;
        line-height: 30px;
        font-size: 15px;
        border: 2px solid #1a1a1a;
    }
    
    /* Lektion fürs Leben */
    .content .col-inner p {
        font-size: 18px;
    }
    
    /* Scroll Navigation für Mobile */
    .scroll-navigation {
        width: 45px;
        height: 45px;
        font-size: 1.3em;
    }
    
    .scroll-prev {
        left: 15px;
    }
    
    .scroll-next {
        right: 15px;
    }
    
    .lesson-counter {
        font-size: 0.85em;
    }
}

@media (max-width: 600px) {
    .section {
        padding: 20px 10px;
        min-height: 60vh;
    }
    h1 {
        font-size: 1.5em;
    }
    #itkenntnisse .knowlege-item p {
        color: #000000;
        font-weight: 700;
        font-size: 1.15em;
        line-height: 1.5;
    }

    .knowlege-item {
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    .knowlege-item p {
        color: #000000; 
        font-weight: 700;
        font-size: 1.15em;
        line-height: 1.5;
        margin-bottom: 1rem;
    }

    .knowlege-item .knowlege-item-progress {
        font-size: 0.95em;
        height: 26px;
        line-height: 26px;
        font-weight: 700;
    }

    #itkenntnisse .knowlege-item .knowlege-item-progress {
        font-size: 0.95em;
        height: 26px;
        line-height: 26px;
        font-weight: 700;
        border: 2px solid #1a1a1a;
    }

    #itkenntnisse .knowlege-item .knowlege-item-progress span {
        color: #ffffff;
        text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
        font-weight: 700;
    }

    .section-header {
       gap: 0.5rem;
    }

   .lesson-controls {
     flex-direction: column;
     gap: 0.3rem;
   }

  .scroll-navigation {
     font-size: 1.2rem;
     padding: 0.3rem 0.6rem;
   }

  .lesson-counter {
    font-size: 1.2rem;
  }
}

@media (max-width: 667px) and (orientation: landscape) and (max-height: 375px) {
  /* Kompakter Header für Landscape */
  .section-header {
    padding: 5px 0 0 0 !important;
    margin-bottom: 0.3rem !important;
  }
  
  .section-header h2 {
    font-size: 1.8em !important;
    margin-top: 30px !important;
    margin-bottom: 8px !important;
  }

  /* Lesson Controls kompakter im Landscape */
  .lesson-controls {
    height: 40px !important;
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Navigation Buttons noch kleiner im Landscape */
  .scroll-navigation {
    width: 30px !important;
    height: 30px !important;
    font-size: 1em !important;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
  }

  .scroll-prev {
    left: 30px !important;
  }

  .scroll-next {
    right: 30px !important;
  }

  /* Lesson Counter sehr kompakt */
  .lesson-counter {
    position: relative !important;
    left: auto !important;
    transform: none !important;
    background: rgba(0, 52, 77, 0.95) !important;
    color: white !important;
    padding: 4px 8px !important;
    border-radius: 12px !important;
    font-size: 0.75em !important;
    font-weight: bold;
    min-width: 40px;
    text-align: center;
  }

  /* Maximaler verfügbarer Platz für Content */
  .lessons-container {
    height: calc(100vh - 100px) !important;
    margin-top: 5px;
  }

  /* Content sehr kompakt für Landscape */
  .horizontal-scrolling .content .col-inner {
    padding: 1.5vw 3vw !important;
    justify-content: flex-start !important;
    padding-top: 1vh !important;
  }

  .horizontal-scrolling .content .col-inner h3 {
    font-size: 1.4rem !important;
    margin-bottom: 0.8rem !important;
  }

  .horizontal-scrolling .content .col-inner p {
    font-size: 13px !important;
    line-height: 1.3 !important;
    margin-bottom: 0.5rem !important;
  }

  .blog-card {
    flex: 1 1 calc(50% - 2rem) !important;;
    max-width: calc(50% - 2rem) !important;;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
     .content-wrapper.container-fluid {
       padding-left: 0;
       padding-right: 0;
    }

    /* Größere Touch-Targets */
    .toggle-menu {
        width: 55px;
        height: 55px;
    }
    
    nav li a {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .row {
        flex-direction: column;
    }
    
    .content-col-1,
    .content-col-2 {
        flex: 1;
        width: 100%;
        padding: 0;
    }
    
    .content-col-1 .col-inner {
        margin-bottom: 1.5rem;
    }

    .knowlege-item {
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .knowlege-item:hover,
    .knowlege-item:focus-within {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.15);
        outline: 3px solid #0d47a1;
        outline-offset: 2px;
    }

  
    .knowlege-item:focus-within {
        background: #f8f9fa;
    }
    
    /* Footer für Mobile */
    .main-footer {
        font-size: 1em;
        padding: 1em 0;
        line-height: 1.6;
    }
    
    .main-footer a {
        display: inline-block;
        margin: 0.3em 0.8em;
    }
    
    .fade-in-right, .fade-in-left {
    opacity: 0;
    transform: translateY(30px); /* Von unten statt rechts/links */
  }

  .fade-in-right.show, .fade-in-left.show {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 1s ease, transform 1s ease;
  }

}

/* Smartphone Hochformat */
@media screen and (max-width: 767px) and (orientation: portrait) {
  .blog-card {
    flex-direction: column;
    max-width: calc(80% - 2rem) !important;
    margin: 0 auto;
  }
}