/* ============================================
   ForDJOnly - Responsive Layout
   Nur Anpassungen für Mobile, Tablet & verschiedene Displaygrößen.
   Wird zuletzt geladen – überschreibt nur wo nötig, ohne bestehende Styles zu brechen.
   ============================================ */

/* ---------- Basis: Alle Viewports ---------- */
img:not([width]):not([height]) {
    max-width: 100%;
    height: auto;
}

/* Lounge-Header-Logo: feste Größe wie in lounge-melo.css (400×60), damit die globale img-Regel es nicht überschreibt */
.lounge-header-logo {
    width: 400px !important;
    max-width: 400px !important;
    height: 60px !important;
    object-fit: contain !important;
}

/* ---------- Ab 992px (Tablet quer / kleiner Desktop) ---------- */
@media (max-width: 991px) {
    /* Navbar-Collapse: Auf Mobile standardmäßig zugeklappt; nur bei Klick auf Toggler (.show) sichtbar */
    .navbar-collapse {
        display: none !important;
    }
    .navbar-collapse.show {
        display: flex !important;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        background: rgba(15, 15, 15, 0.98);
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }
    .navbar-collapse.show .navbar-nav-center,
    .navbar-collapse.show .navbar-nav-right {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }
    .navbar-collapse.show .navbar-nav-center {
        margin-top: 0;
    }
    .navbar-collapse.show .nav-link {
        padding: 0.75rem 1rem !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }
    .navbar-collapse.show .navbar-nav-right {
        margin-top: 0.5rem;
        padding-top: 0.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }
    .navbar-collapse.show #nav-login-btn {
        margin-top: 0.5rem;
    }
    .navbar-collapse.show #nav-login-btn .btn {
        width: 100%;
        justify-content: center;
    }

    /* Container etwas weniger Padding auf Tablet */
    .container {
        padding-left: var(--spacing-md, 16px);
        padding-right: var(--spacing-md, 16px);
    }

    /* Navbar-Logo: auf Tablet kleiner, damit Platz für Toggler bleibt */
    .navbar-brand img,
    .logo-image-nav {
        max-width: 220px !important;
        width: 220px !important;
        height: auto !important;
        min-height: 36px !important;
    }

    /* Lounge-Header-Logo: auf Tablet kleiner */
    .lounge-header-logo {
        max-width: 220px !important;
        width: 220px !important;
        height: auto !important;
        min-height: 36px !important;
    }

    /* Page Hero: weniger Top-Padding (Navbar + Inhalt) */
    .page-hero {
        padding: 100px 0 60px !important;
    }

    .landing-hero-section {
        min-height: 75vh;
        padding: 100px 0 60px;
    }

    .hero-cta-buttons {
        gap: 0.75rem;
    }

    .section-title {
        font-size: clamp(1.5rem, 4vw, 2.25rem);
    }

    .section-subtitle {
        font-size: 1rem;
    }
}

/* ---------- Ab 768px (Tablet hochkant / großes Handy) ---------- */
@media (max-width: 767px) {
    .container {
        padding-left: var(--spacing-sm, 12px);
        padding-right: var(--spacing-sm, 12px);
    }

    /* Navbar-Logo: auf Mobile deutlich kleiner */
    .navbar-brand img,
    .logo-image-nav {
        max-width: 160px !important;
        width: 160px !important;
        min-height: 32px !important;
    }

    /* Lounge-Header-Logo: auf Mobile kleiner */
    .lounge-header-logo {
        max-width: 160px !important;
        width: 160px !important;
        height: auto !important;
        min-height: 32px !important;
    }

    .page-hero {
        padding: 90px 0 50px !important;
    }

    .page-hero h1 {
        font-size: clamp(1.75rem, 6vw, 2.5rem) !important;
    }

    .page-hero p {
        font-size: 1rem !important;
    }

    .landing-hero-section {
        min-height: 65vh;
        padding: 90px 0 50px;
    }

    .hero-line {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }

    .hero-subheadline {
        font-size: 1rem;
    }

    .hero-cta-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 280px;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-cta-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    .landing-section {
        padding: 3rem 0;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    .section-title {
        font-size: clamp(1.35rem, 5vw, 1.75rem);
    }

    .section-subtitle {
        font-size: 0.95rem;
    }

    /* Vergleichstabelle: horizontal scrollbar, kein Layout-Bruch */
    .comparison-table-container,
    .comparison-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .comparison-table-wrapper .table-dark th,
    .comparison-table-wrapper .table-dark td {
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
        white-space: nowrap;
    }

    /* Pricing Cards: eine Spalte, volle Breite */
    .custom-pricing-cards-wrapper {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }

    .pricing-highlight-card,
    .final-cta-card {
        padding: 1.5rem 1rem !important;
    }

    .final-cta-card h2 {
        font-size: 1.5rem !important;
    }

    .final-cta-card .lead {
        font-size: 1rem;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .cta-buttons .btn {
        width: 100%;
        max-width: 260px;
    }

    /* FAQ: kleinere Abstände */
    .faq-container .accordion-button {
        padding: 1rem 1rem !important;
        font-size: 0.95rem !important;
    }

    .faq-container .accordion-body {
        padding: 1rem !important;
        font-size: 0.95rem;
    }

    /* Footer: eine Spalte, zentriert */
    .footer-content {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        text-align: center;
    }

    .footer-brand {
        max-width: 100%;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-section ul {
        padding-left: 0;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Modals: Rand zum Bildschirmrand auf Mobile */
    .modal-dialog {
        margin: 0.75rem;
        max-width: calc(100% - 1.5rem);
    }

    .modal-content {
        border-radius: 12px !important;
    }

    .modal-body {
        padding: 1rem !important;
    }

    .modal-header {
        padding: 1rem !important;
    }

    /* Notification/User Dropdown: nicht breiter als Viewport */
    .navbar-notification-dropdown {
        max-width: min(400px, calc(100vw - 1rem)) !important;
    }

    .navbar-user-dropdown-menu {
        max-width: min(280px, calc(100vw - 1rem)) !important;
    }

    /* User-Menü-Button: Label kürzer oder nur Avatar auf sehr schmal */
    .navbar-user-label {
        max-width: 100px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* ---------- Ab 576px (Handy) ---------- */
@media (max-width: 575px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .navbar-brand img,
    .logo-image-nav {
        max-width: 140px !important;
        width: 140px !important;
        min-height: 28px !important;
    }

    /* Lounge-Header-Logo: auf Handy kleiner */
    .lounge-header-logo {
        max-width: 140px !important;
        width: 140px !important;
        height: auto !important;
        min-height: 28px !important;
    }

    .page-hero {
        padding: 80px 0 40px !important;
    }

    .landing-hero-section {
        min-height: 60vh;
        padding: 80px 0 40px;
    }

    .hero-line {
        font-size: clamp(1.25rem, 5vw, 1.5rem);
    }

    .landing-section {
        padding: 2.5rem 0;
    }

    .section-title {
        font-size: 1.25rem;
    }

    /* Features/Updates Grid: eine Karte pro Zeile */
    .features-grid,
    .updates-preview-grid,
    .testimonials-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem;
    }

    .feature-card,
    .update-card,
    .testimonial-card {
        padding: 1.25rem !important;
    }

    /* Login-Button in Navbar: kompakt */
    #login-btn {
        padding: 0.4rem 0.9rem !important;
        font-size: 0.8rem !important;
    }

    .footer-section h4 {
        font-size: 1rem;
    }
}

/* ---------- Audio-Player (falls auf Landing/Updates sichtbar) ---------- */
@media (max-width: 767px) {
    .audio-player-container {
        left: 0;
        right: 0;
        width: 100%;
        padding: 0 0.5rem;
    }

    .audio-player {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.5rem !important;
    }

    .player-info {
        min-width: 0;
        flex: 1 1 100%;
    }

    .player-controls {
        flex-shrink: 0;
    }

    .player-progress {
        flex: 1 1 100%;
        min-width: 0;
    }

    .player-volume {
        flex: 1 1 auto;
        min-width: 80px;
    }

    .close-player-btn {
        flex-shrink: 0;
    }
}

/* ---------- Sehr kleine Displays (< 380px) ---------- */
@media (max-width: 379px) {
    .navbar-brand img,
    .logo-image-nav {
        max-width: 120px !important;
        width: 120px !important;
    }

    /* Lounge-Header-Logo: auf sehr kleinen Displays */
    .lounge-header-logo {
        max-width: 120px !important;
        width: 120px !important;
        height: auto !important;
        min-height: 24px !important;
    }

    .hero-cta-buttons .btn {
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
    }

    .section-title {
        font-size: 1.15rem;
    }
}
