/* =============================================================
   MOBILE-FIXES.CSS  –  Eduro/Bildungskiez
   Geladen als LETZTES Stylesheet → hat maximale Priorität.
   Hebt Konflikte zwischen responsive.css / responsive2.css /
   header-footer-modern.css auf und liefert ein sauberes
   mobiles Layout für alle öffentlichen Seiten.
   ============================================================= */

/* ----------------------------------------------------------
   0.  GLOBALE BASISREGELN
   ---------------------------------------------------------- */
html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
}

img, video, iframe, embed, object {
    max-width: 100%;
}

/* ----------------------------------------------------------
   1.  HEADER  –  Kernfix  (mobile-first, nuclear approach)
   ----------------------------------------------------------
   Strategie: Basis-Regeln (kein media query) setzen den
   Standard. Media-Queries überschreiben gezielt für jeden
   Bereich. Da mobile-fixes.css ZULETZT geladen wird, gewinnt
   es über alle anderen !important-Konflikte.
   ---------------------------------------------------------- */

/* ── BASIS (gilt für ALLE Breiten) ─────────────────────────
   Hamburger: standardmäßig versteckt (Desktop-Default)
   header__right: standardmäßig sichtbar (Desktop-Default)   */
#header .full-canva {
    display: none !important;
}
#header .header__right {
    display: flex !important;
    align-items: center;
}

/* ── TABLET & MOBIL ≤ 1200px: Hamburger an, Nav aus ────── */
@media (max-width: 1200px) {
    /* Hamburger einblenden */
    #header .full-canva {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
    }

    /* Alle Navigations-Elemente ausblenden */
    #header .header__right,
    #header .header__nav,
    #header .header__select__menu,
    #header .header__reg__btn,
    #header .header-que-mob,
    #header .header-que {
        display: none !important;
    }

    /* Container: sauberes flex-row Layout (kein row-reverse) */
    #header .header__area .container {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 0 20px !important;
    }

    /* Logo-Bereich: nimmt verbleibenden Platz ein */
    #header .header__main {
        display: flex !important;
        flex: 1 !important;
        justify-content: flex-start !important;
        align-items: center !important;
        gap: 0 !important;
    }

    /* Kein unnötiger Header-Padding */
    #header {
        padding: 0 !important;
    }
    #header .header__area {
        padding: 0 !important;
    }
}

/* ── GROSSE TABLETS & SMALL LAPTOPS ≤ 991px ────────────── */
@media (max-width: 991px) {
    #header .header__area .container {
        padding: 0 16px !important;
    }
    #header .header__main {
        padding: 10px 0 !important;
    }
    #header .header__logo img {
        height: 32px !important;
        width: auto !important;
        max-width: 130px !important;
        object-fit: contain !important;
    }
}

/* ── MOBILE ≤ 576px ─────────────────────────────────────── */
@media (max-width: 576px) {
    #header .header__area .container {
        padding: 0 12px !important;
    }
    #header .header__logo img {
        height: 28px !important;
        max-width: 110px !important;
    }
}

/* ----------------------------------------------------------
   2.  OFFCANVAS  –  Mobile-Drawer
   ---------------------------------------------------------- */
.offcanvas-logo {
    padding: 8px 0 16px;
}
.offcanvas-logo img {
    height: 30px;
    width: auto;
}
#offcanvasExample .offcanvas-body ul {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}
#offcanvasExample .offcanvas-body ul li {
    border-bottom: 1px solid #f0f0f0;
}
#offcanvasExample .offcanvas-body ul li a {
    display: block;
    padding: 12px 0;
    color: #1a1a2e;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
}
#offcanvasExample .offcanvas-body ul li a:hover,
#offcanvasExample .offcanvas-body ul li a.active {
    color: #DE6B3B;
}
#offcanvasExample .header__reg__btn {
    display: flex !important;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}
#offcanvasExample .header__reg__btn a {
    display: block;
    text-align: center;
    padding: 11px 0;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    border: 1.5px solid #DE6B3B;
    color: #DE6B3B;
    text-decoration: none;
}
#offcanvasExample .header__reg__btn a:last-child {
    background: linear-gradient(135deg, #DE6B3B 0%, #F2943C 100%);
    color: #fff;
    border-color: transparent;
}
.offcanvas-lang {
    margin-top: 20px;
}

/* ----------------------------------------------------------
   3.  BLOG INDEX  –  Listenansicht
   ---------------------------------------------------------- */
@media (max-width: 768px) {
    .blog-hero {
        padding: 48px 16px !important;
    }
    .blog-hero h1 {
        font-size: 28px !important;
        line-height: 1.25 !important;
    }
    .blog-hero p {
        font-size: 16px !important;
    }
    .blog-page .container,
    .blog-detail-page .container {
        padding: 0 16px !important;
    }
    .filters-wrapper {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
    }
    .category-pills {
        flex-wrap: wrap !important;
        justify-content: flex-start !important;
        gap: 8px !important;
    }
    .category-pill {
        font-size: 13px !important;
        padding: 6px 14px !important;
    }
    .search-input-wrapper {
        width: 100% !important;
    }
    .search-input-wrapper input {
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .articles-grid,
    .related-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    .featured-card {
        grid-template-columns: 1fr !important;
    }
    .featured-image {
        min-height: 220px !important;
    }
    .newsletter-card,
    .cta-card {
        flex-direction: column !important;
        text-align: center !important;
        padding: 32px 20px !important;
    }
    .newsletter-content {
        flex-direction: column !important;
    }
    .newsletter-form {
        flex-direction: column !important;
        width: 100% !important;
    }
    .newsletter-form input {
        width: 100% !important;
    }
}

@media (max-width: 480px) {
    .blog-hero h1 {
        font-size: 24px !important;
    }
    .cta-content h2 {
        font-size: 22px !important;
    }
    .cta-buttons {
        flex-direction: column !important;
        width: 100% !important;
    }
    .cta-buttons a,
    .cta-buttons button {
        justify-content: center !important;
        width: 100% !important;
    }
}

/* ----------------------------------------------------------
   4.  BLOG DETAIL  –  Artikelseite
   ---------------------------------------------------------- */

/* Autor-Avatar: immer als Kreis rendern */
.author-avatar {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #DE6B3B 0%, #F2943C 100%) !important;
    color: #fff !important;
    font-weight: 600 !important;
    flex-shrink: 0 !important;
}
.author-avatar.large {
    width: 48px !important;
    height: 48px !important;
    font-size: 18px !important;
}
.author-avatar.small {
    width: 32px !important;
    height: 32px !important;
    font-size: 13px !important;
}
.author-avatar:not(.large):not(.small) {
    width: 40px !important;
    height: 40px !important;
    font-size: 16px !important;
}

/* Artikel-Header */
@media (max-width: 768px) {
    .article-header {
        padding: 0 !important;
    }
    .article-header .container {
        padding: 24px 16px !important;
    }
    .article-header h1,
    .article-header-content h1 {
        font-size: 24px !important;
        line-height: 1.3 !important;
    }
    .article-excerpt {
        font-size: 15px !important;
    }
    .back-link {
        font-size: 14px !important;
        margin-bottom: 16px !important;
        display: inline-flex !important;
    }
    .article-header-meta {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    /* Autor-Zeile: untereinander auf Mobil */
    .article-author-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 16px !important;
    }
    .author-info.large {
        width: 100% !important;
    }

    /* TTS + Share: wrappen */
    .article-header-actions {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
        width: 100% !important;
    }
    .share-buttons {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
    .tts-controls {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
    .tts-btn {
        font-size: 14px !important;
        padding: 8px 16px !important;
    }

    /* Artikel-Inhalt */
    .article-content {
        padding: 20px 16px !important;
    }
    .article-content h2 { font-size: 20px !important; }
    .article-content h3 { font-size: 18px !important; }
    .article-content p, .article-content li { font-size: 15px !important; line-height: 1.7 !important; }

    /* YouTube + Podcast */
    .youtube-wrapper .container,
    .podcast-player-wrapper .container {
        padding: 0 16px !important;
    }
    .youtube-frame-wrapper {
        position: relative !important;
        padding-bottom: 56.25% !important;
        height: 0 !important;
        overflow: hidden !important;
    }
    .youtube-frame-wrapper iframe {
        position: absolute !important;
        top: 0 !important; left: 0 !important;
        width: 100% !important;
        height: 100% !important;
    }
    .podcast-player {
        flex-direction: column !important;
        gap: 12px !important;
        padding: 16px !important;
    }
    .podcast-controls {
        width: 100% !important;
        justify-content: center !important;
    }

    /* Sidebar: unter Content */
    .article-content-wrapper {
        grid-template-columns: 1fr !important;
    }
    .article-sidebar {
        position: static !important;
    }
}

@media (max-width: 480px) {
    .article-header h1,
    .article-header-content h1 {
        font-size: 21px !important;
    }
    .category-tag.large {
        font-size: 12px !important;
        padding: 4px 12px !important;
    }
    .share-btn {
        width: 34px !important;
        height: 34px !important;
        font-size: 14px !important;
    }
}

/* ----------------------------------------------------------
   5.  INFOPAGE / AGB / IMPRESSUM / DATENSCHUTZ
   ---------------------------------------------------------- */
@media (max-width: 768px) {
    .infopage-hero {
        padding: 48px 16px 36px !important;
    }
    .infopage-hero__title {
        font-size: 28px !important;
        line-height: 1.2 !important;
    }
    .infopage-hero__subtitle {
        font-size: 14px !important;
    }
    .infopage-body {
        padding: 24px 0 !important;
    }
    .infopage-container {
        padding: 0 16px !important;
        max-width: 100% !important;
    }
    .infopage-company-card {
        border-radius: 12px !important;
    }
    .infopage-company-card__header {
        padding: 16px !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }
    .infopage-info-row {
        padding: 14px 16px !important;
    }
    .infopage-section__body {
        padding: 16px !important;
    }
    .infopage-content-card {
        padding: 20px 16px !important;
    }
    .infopage-toc {
        padding: 16px !important;
    }
    .infopage-toc ul {
        padding-left: 0 !important;
    }
    .infopage-toc ul li {
        font-size: 14px !important;
        padding: 4px 0 !important;
    }
}

@media (max-width: 480px) {
    .infopage-hero__title {
        font-size: 22px !important;
    }
    .infopage-hero__badge {
        font-size: 12px !important;
        padding: 5px 12px !important;
    }
    .infopage-info-row {
        flex-direction: column !important;
        gap: 8px !important;
    }
    .infopage-info-row__icon {
        width: 32px !important;
        height: 32px !important;
    }
    .infopage-section-title {
        font-size: 18px !important;
    }
}

/* ----------------------------------------------------------
   6.  KONTAKT-SEITE
   ---------------------------------------------------------- */
@media (max-width: 820px) {
    .contact-modern-page {
        padding: 24px 0 40px !important;
    }
    .contact-modern-wrap {
        flex-direction: column !important;
        gap: 24px !important;
        padding: 0 16px !important;
        max-width: 100% !important;
    }
    .cm-left {
        width: 100% !important;
        padding: 24px 20px !important;
        border-radius: 16px !important;
    }
    .cm-right {
        width: 100% !important;
        padding: 24px 20px !important;
    }
    .cm-avatar {
        width: 80px !important;
        height: 80px !important;
    }
    .cm-name {
        font-size: 20px !important;
    }
    .cm-grid-2 {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
}

@media (max-width: 480px) {
    .cm-left,
    .cm-right {
        padding: 20px 16px !important;
    }
    .cm-form-title {
        font-size: 20px !important;
    }
    .cm-form-heading {
        font-size: 14px !important;
    }
    .cm-submit {
        width: 100% !important;
        justify-content: center !important;
    }
}

/* ----------------------------------------------------------
   7.  FAQ-SEITE  (faq-modern)
   ---------------------------------------------------------- */
@media (max-width: 768px) {
    .faq-hero,
    .faq-modern-hero {
        padding: 48px 16px 36px !important;
    }
    .faq-hero h1,
    .faq-modern-hero h1 {
        font-size: 26px !important;
    }
    .faq-section,
    .faq-modern-section {
        padding: 0 16px !important;
        margin-bottom: 24px !important;
    }
    .faq-question,
    .faq-accordion-btn {
        font-size: 15px !important;
        padding: 14px 16px !important;
    }
    .faq-answer,
    .faq-accordion-body {
        padding: 12px 16px !important;
        font-size: 14px !important;
    }
}

/* ----------------------------------------------------------
   8.  JOB-LISTING  (jobs-modern / list-modern)
   ---------------------------------------------------------- */
@media (max-width: 768px) {
    /* Alte Template-Klassen */
    .jobs-hero {
        padding: 48px 16px 36px !important;
    }
    .jobs-hero h1 {
        font-size: 26px !important;
        line-height: 1.25 !important;
    }
    .jobs-hero p {
        font-size: 15px !important;
    }
    .filter-pills-bar {
        flex-wrap: wrap !important;
        gap: 8px !important;
        padding: 12px 16px !important;
    }
    .filter-pill {
        font-size: 13px !important;
        padding: 6px 14px !important;
    }
    .filter-panel {
        padding: 16px !important;
    }
    .filter-panel .row {
        flex-direction: column !important;
    }
    .jobs-grid,
    .job-cards-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    .job-card-modern {
        padding: 16px !important;
    }
    .view-toggle-bar {
        flex-wrap: wrap !important;
        gap: 8px !important;
        padding: 8px 16px !important;
    }
    .map-container {
        height: 300px !important;
    }
    .jobs-container {
        padding: 16px !important;
    }

    /* ── Modernes Template (eduro-jobs__*) ────────────────── */
    /* Suchen-Button: volle Breite auf Mobil */
    .eduro-jobs__search-btn {
        width: 100% !important;
        justify-content: center !important;
    }

    /* Employment-Type Pills: wrappen, nicht overflow */
    .eduro-jobs__filter-pills {
        flex-wrap: wrap !important;
        gap: 8px !important;
        padding: 12px 0 4px !important;
    }
    .eduro-jobs__filter-pill {
        font-size: 13px !important;
        padding: 8px 14px !important;
        /* Kein display/height Override – jobs-modern.css reicht */
    }

    /* Active-Filter Badge auf Mobil */
    .eduro-jobs__active-filters {
        padding: 8px 0 !important;
    }
    .eduro-jobs__active-filters-list {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    /* Expanded Filter Grid: eine Spalte */
    .eduro-jobs__filter-grid {
        grid-template-columns: 1fr !important;
    }

    /* Container: kein seitlicher Überlauf */
    .eduro-jobs__container {
        padding: 0 16px !important;
    }
    .eduro-jobs,
    .eduro-jobs__hero,
    .eduro-jobs__filters,
    .eduro-jobs__results {
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }
}

@media (max-width: 480px) {
    .jobs-hero h1 {
        font-size: 22px !important;
    }
    .job-card-modern .job-tags {
        flex-wrap: wrap !important;
        gap: 6px !important;
    }
    .eduro-jobs__hero-title {
        font-size: 22px !important;
    }
    .eduro-jobs__filter-pills {
        gap: 6px !important;
    }
    .eduro-jobs__filter-pill {
        font-size: 12px !important;
        padding: 7px 12px !important;
    }
}

/* ----------------------------------------------------------
   9.  JOB-DETAIL  (page-modern / job-detail-modern)
   ---------------------------------------------------------- */
@media (max-width: 768px) {
    .job-hero {
        padding: 0 !important;
    }
    .job-hero__wrapper {
        flex-direction: column !important;
        padding: 24px 16px !important;
        gap: 20px !important;
    }
    .job-hero__media {
        width: 100% !important;
        min-height: 220px !important;
        border-radius: 12px !important;
    }
    .job-hero__content {
        width: 100% !important;
    }
    .job-hero__title {
        font-size: 22px !important;
        line-height: 1.3 !important;
    }
    .job-hero__meta {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
    .job-hero__actions {
        flex-direction: column !important;
        gap: 10px !important;
    }
    .job-hero__btn {
        width: 100% !important;
        justify-content: center !important;
    }

    /* Tab-Navigation: horizontal scroll statt umbrechen */
    .job-nav {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    .job-nav__container {
        display: flex !important;
        flex-wrap: nowrap !important;
        padding: 0 16px !important;
        gap: 4px !important;
        min-width: max-content !important;
    }
    .job-nav__tab {
        white-space: nowrap !important;
        padding: 8px 14px !important;
        font-size: 13px !important;
    }

    /* Haupt-Layout: eine Spalte */
    .job-main {
        flex-direction: column !important;
        padding: 20px 16px 100px !important;
        gap: 20px !important;
    }
    .job-content {
        width: 100% !important;
    }
    .job-sidebar {
        width: 100% !important;
        position: static !important;
    }

    /* Abschnitte */
    .job-section {
        border-radius: 12px !important;
    }
    .job-section__header {
        padding: 14px 16px !important;
    }
    .job-section__body {
        padding: 16px !important;
    }
    .job-section__title {
        font-size: 16px !important;
    }

    /* Bewerbungsformular */
    .job-apply__row {
        grid-template-columns: 1fr !important;
    }
    .job-apply__field.full-width {
        grid-column: span 1 !important;
    }
    .job-apply__submit {
        width: 100% !important;
    }

    /* Ähnliche Jobs */
    .job-similar__grid {
        grid-template-columns: 1fr !important;
    }

    /* Floating-Button */
    .job-floating-apply {
        display: block !important;
        position: fixed !important;
        bottom: 16px !important;
        left: 16px !important;
        right: 16px !important;
        z-index: 999 !important;
    }
    .job-floating-apply a,
    .job-floating-apply button {
        width: 100% !important;
        justify-content: center !important;
    }
}

@media (max-width: 480px) {
    .job-hero__title {
        font-size: 19px !important;
    }
    .job-hero__tag {
        font-size: 12px !important;
        padding: 6px 10px !important;
    }
    .job-benefits__grid {
        grid-template-columns: 1fr !important;
    }
    .job-salary__amount {
        font-size: 28px !important;
    }
    .job-section__body {
        padding: 14px 12px !important;
    }
}

/* ----------------------------------------------------------
   10.  FÜR ARBEITGEBER  (foremployers-modern)
   ---------------------------------------------------------- */
@media (max-width: 768px) {
    .employer-hero {
        padding: 48px 16px 36px !important;
    }
    .employer-hero h1 {
        font-size: 26px !important;
    }
    .employer-features {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
        padding: 0 16px !important;
    }
    .employer-section {
        padding: 32px 16px !important;
    }
    .employer-cta {
        flex-direction: column !important;
        gap: 12px !important;
    }
    .employer-cta a {
        width: 100% !important;
        text-align: center !important;
    }
}

/* ----------------------------------------------------------
   11.  FOOTER  –  kompakteres Mobil-Layout
   ---------------------------------------------------------- */
@media (max-width: 767px) {
    .site_footer,
    .footer {
        padding: 40px 0 0 !important;
        margin-top: 48px !important;
    }
    .site_footer .container,
    .footer .container {
        padding: 0 16px !important;
    }
    .site_footer .row,
    .footer .row {
        grid-template-columns: 1fr 1fr !important;
        gap: 24px !important;
    }
    .footer-widget h4,
    .footer-widget__title {
        font-size: 14px !important;
        margin-bottom: 12px !important;
    }
    .footer-widget ul li,
    .footer-widget p {
        font-size: 13px !important;
    }
    .footer-bottom {
        padding: 16px !important;
        flex-direction: column !important;
        gap: 8px !important;
        text-align: center !important;
    }
}

@media (max-width: 380px) {
    .site_footer .row,
    .footer .row {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
}

/* ----------------------------------------------------------
   12.  ALLGEMEINE CONTAINER-ÜBERLAUF-FIXES
   ---------------------------------------------------------- */
@media (max-width: 767px) {
    /* Verhindert, dass fixe Elemente aus dem Viewport ragen */
    .item-search {
        position: static !important;
        right: auto !important;
        top: auto !important;
    }

    /* .container: nie breiter als der Viewport */
    .container {
        max-width: 100% !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
        box-sizing: border-box !important;
    }

    /* Pop-up / Overlay */
    .pop__left-in input {
        height: auto !important;
        min-height: 44px !important;
        padding: 10px 14px !important;
    }
}

/* ----------------------------------------------------------
   13.  HEADER HAMBURGER  –  sauberer Stil auf Mobil
   ---------------------------------------------------------- */
/* Hamburger-Button: kein oranges Bootstrap-Hintergrund */
#header .full-canva .btn,
#header .full-canva button {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #DE6B3B !important;
    padding: 8px !important;
    font-size: 22px !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 40px !important;
    min-height: 40px !important;
}
#header .full-canva .btn:hover,
#header .full-canva .btn:focus,
#header .full-canva button:hover,
#header .full-canva button:focus {
    background: rgba(222,107,59,0.08) !important;
    border-radius: 8px !important;
    outline: none !important;
    box-shadow: none !important;
}

/* ----------------------------------------------------------
   14.  INTERAKTIVE ZUSTÄNDE  –  Touch-freundlich
   ----------------------------------------------------------
   WICHTIG: Keine blanket-Regeln für `button` oder `.btn` –
   das würde Filter-Pills und andere UI-Buttons zerstören.
   Nur spezifische Blog/Job-Elemente bekommen min-height.
   ---------------------------------------------------------- */
@media (max-width: 991px) {
    .job-nav__tab,
    .share-btn,
    .tts-btn,
    .tts-stop-btn,
    .podcast-play-btn {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
}
