/* ============================================
   MOBILE RESPONSIVE STYLES
   World's Collide - Mobile-First Design
   Include this AFTER your main stylesheet
   ============================================ */

/* ============================================
   BASE MOBILE FIXES (320px+)
   ============================================ */
@media screen and (max-width: 768px) {
    /* Force readable text sizes */
    body, p, span, div {
        font-size: 16px !important;
    }
    
    h1 { font-size: 28px !important; }
    h2 { font-size: 24px !important; }
    h3 { font-size: 20px !important; }
    h4 { font-size: 18px !important; }
    
    /* Prevent tiny text */
    .lead, p.lead {
        font-size: 17px !important;
        line-height: 1.6 !important;
    }
}

/* ============================================
   NAVBAR - Mobile Optimized
   ============================================ */
@media screen and (max-width: 992px) {
    .navbar {
        padding: 0.75rem 0 !important;
    }
    
    .navbar-brand {
        font-size: 1.2rem !important;
    }
    
    .navbar-collapse {
        background: rgba(10, 10, 15, 0.98) !important;
        border-radius: 12px !important;
        padding: 1rem !important;
        margin-top: 0.75rem !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
    }
    
    .nav-link {
        font-size: 16px !important;
        padding: 0.75rem 1rem !important;
    }
}

/* ============================================
   HERO BRAND IMAGE
   ============================================ */
@media screen and (max-width: 768px) {
    .hero-brand {
        padding: 2rem 0 1rem !important;
    }
    
    .hero-brand img {
        max-width: 200px !important;
        height: auto !important;
    }
}

@media screen and (max-width: 480px) {
    .hero-brand img {
        max-width: 160px !important;
    }
}

/* ============================================
   QUICK LINKS - Horizontal Scroll on Mobile
   ============================================ */
@media screen and (max-width: 768px) {
    .quick-links {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        padding: 0.75rem 1rem !important;
        margin: 1.5rem -1rem !important;
        justify-content: flex-start !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
    }
    
    .quick-links::-webkit-scrollbar {
        display: none !important;
    }
    
    .quick-link {
        flex-shrink: 0 !important;
        padding: 0.6rem 1.2rem !important;
        font-size: 15px !important;
        white-space: nowrap !important;
    }
}

@media screen and (max-width: 480px) {
    .quick-links {
        padding: 0.5rem 0.75rem !important;
        margin: 1rem -0.75rem !important;
    }
    
    .quick-link {
        padding: 0.5rem 1rem !important;
        font-size: 14px !important;
    }
}

/* ============================================
   CAROUSEL - Mobile Optimized Heights
   ============================================ */
@media screen and (max-width: 992px) {
    #myCarousel {
        margin-top: 60px !important;
    }
    
    .carousel-item img,
    .carousel-bg {
        height: 450px !important;
    }
}

@media screen and (max-width: 768px) {
    #myCarousel {
        margin-top: 52px !important;
    }
    
    .carousel-item img,
    .carousel-bg {
        height: 380px !important;
        filter: brightness(0.35) saturate(1.2) !important;
    }
    
    .slide-content {
        width: 92% !important;
        max-width: 95% !important;
        padding: 1.75rem 2rem !important;
        border-radius: 14px !important;
    }
    
    .slide-content h1 {
        font-size: 24px !important;
    }
    
    .slide-content h2 {
        font-size: 16px !important;
    }
    
    .slide-content p.lead {
        font-size: 15px !important;
    }
    
    .slide-content img {
        max-height: 160px !important;
    }
    
    .slide-content .btn {
        padding: 0.6rem 1.4rem !important;
        font-size: 14px !important;
    }
}

@media screen and (max-width: 480px) {
    #myCarousel {
        margin-top: 48px !important;
    }
    
    .carousel-item img,
    .carousel-bg {
        height: 320px !important;
    }
    
    .slide-content {
        padding: 1.5rem 1.5rem !important;
    }
    
    .slide-content h1 {
        font-size: 22px !important;
    }
    
    .slide-content img {
        max-height: 130px !important;
    }
}

@media screen and (max-width: 360px) {
    .carousel-item img,
    .carousel-bg {
        height: 280px !important;
    }
    
    .slide-content {
        padding: 1.25rem 1.25rem !important;
    }
    
    .slide-content h1 {
        font-size: 20px !important;
    }
}

/* ============================================
   FEATURETTE CARDS - Mobile Stacking
   ============================================ */
@media screen and (max-width: 992px) {
    .featurette-heading {
        font-size: 26px !important;
    }
    
    .featurette-card p.lead {
        font-size: 16px !important;
    }
}

@media screen and (max-width: 768px) {
    .featurette-heading {
        font-size: 24px !important;
    }
    
    .featurette-card {
        padding: 1.5rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    .featurette-card p.lead {
        font-size: 16px !important;
        line-height: 1.7 !important;
    }
    
    .feature-image-wrapper img {
        height: 280px !important;
    }
    
    /* Stack images above text on mobile */
    .row.featurette > .col-md-5 {
        order: -1 !important;
    }
}

@media screen and (max-width: 480px) {
    .featurette-heading {
        font-size: 22px !important;
    }
    
    .featurette-card {
        padding: 1.25rem !important;
    }
    
    .featurette-card p.lead {
        font-size: 15px !important;
    }
    
    .feature-image-wrapper img {
        height: 240px !important;
    }
}

/* ============================================
   BUTTONS - Touch-Friendly Sizes
   ============================================ */
@media screen and (max-width: 768px) {
    .btn-gradient,
    .btn-outline-cyan,
    .btn-outline-green,
    .btn-outline-orange {
        padding: 0.7rem 1.6rem !important;
        font-size: 15px !important;
        border-radius: 12px !important;
        min-height: 44px !important; /* Apple HIG touch target */
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
}

@media screen and (max-width: 480px) {
    .btn-gradient,
    .btn-outline-cyan,
    .btn-outline-green,
    .btn-outline-orange {
        padding: 0.65rem 1.4rem !important;
        font-size: 14px !important;
        width: 100% !important;
        max-width: 300px !important;
    }
}

/* ============================================
   MEMBERS SECTION - Mobile Grid
   ============================================ */
@media screen and (max-width: 992px) {
    .members-section {
        padding: 3rem 0 !important;
    }
}

@media screen and (max-width: 768px) {
    .section-header h2 {
        font-size: 26px !important;
    }
    
    .section-header .subtitle {
        font-size: 15px !important;
    }
    
    /* 2 columns on mobile */
    .col-6.col-md-4.col-lg-3 {
        width: 50% !important;
        flex: 0 0 50% !important;
    }
    
    .member-card {
        padding: 1.5rem 1rem !important;
    }
    
    .member-avatar {
        width: 75px !important;
        height: 75px !important;
    }
    
    .member-name {
        font-size: 16px !important;
    }
    
    .member-role {
        font-size: 12px !important;
    }
    
    .member-quote {
        font-size: 14px !important;
    }
    
    .member-actions .btn {
        padding: 0.5rem 1rem !important;
        font-size: 13px !important;
    }
}

@media screen and (max-width: 480px) {
    .members-section {
        padding: 2.5rem 0 !important;
    }
    
    .section-header h2 {
        font-size: 24px !important;
    }
    
    .member-card {
        padding: 1.25rem 0.75rem !important;
    }
    
    .member-avatar {
        width: 65px !important;
        height: 65px !important;
    }
    
    .member-name {
        font-size: 15px !important;
    }
    
    .member-quote {
        font-size: 13px !important;
    }
}

/* ============================================
   DISCORD SECTION - Mobile Widget
   ============================================ */
@media screen and (max-width: 768px) {
    .discord-section {
        padding: 2rem 1.5rem !important;
        margin-bottom: 2rem !important;
    }
    
    .discord-section h2 {
        font-size: 24px !important;
    }
    
    .discord-section p {
        font-size: 16px !important;
    }
    
    .discord-widget-frame iframe {
        height: 450px !important;
    }
}

@media screen and (max-width: 480px) {
    .discord-section {
        padding: 1.5rem 1rem !important;
    }
    
    .discord-section h2 {
        font-size: 22px !important;
    }
    
    .discord-widget-frame iframe {
        height: 380px !important;
    }
}

/* ============================================
   MODALS - Mobile Friendly
   ============================================ */
@media screen and (max-width: 768px) {
    .modal-dialog {
        margin: 1rem !important;
        max-height: calc(100vh - 2rem) !important;
    }
    
    .modal-body {
        padding: 1.5rem !important;
        overflow-y: auto !important;
    }
    
    .modal-avatar {
        width: 80px !important;
        height: 80px !important;
    }
    
    .modal-social i {
        font-size: 26px !important;
    }
}

@media screen and (max-width: 480px) {
    .modal-dialog {
        margin: 0.5rem !important;
    }
    
    .modal-body {
        padding: 1.25rem !important;
    }
    
    .modal-avatar {
        width: 70px !important;
        height: 70px !important;
    }
    
    .modal-social i {
        font-size: 24px !important;
    }
}

/* ============================================
   VISITOR COUNTER - Mobile Badge
   ============================================ */
@media screen and (max-width: 768px) {
    .counter-badge {
        padding: 0.6rem 1.5rem !important;
        font-size: 15px !important;
    }
    
    .counter-badge .count {
        font-size: 18px !important;
    }
}

/* ============================================
   FOOTER - Mobile Spacing
   ============================================ */
@media screen and (max-width: 768px) {
    footer {
        padding: 1.5rem 0 !important;
        margin-top: 2rem !important;
    }
    
    footer p {
        font-size: 14px !important;
    }
}

/* ============================================
   MAIN CONTAINER - Mobile Padding
   ============================================ */
@media screen and (max-width: 768px) {
    main.container-fluid {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

/* ============================================
   SECTION DIVIDERS - Mobile Spacing
   ============================================ */
@media screen and (max-width: 768px) {
    .section-divider {
        margin: 2rem 0 !important;
    }
}

/* ============================================
   PERFORMANCE - Disable animations on mobile
   ============================================ */
@media screen and (max-width: 768px) {
    body::before {
        display: none !important;
    }
    
    .featurette-card,
    .member-card,
    .discord-section {
        animation: none !important;
    }
    
    .feature-image-wrapper img,
    .featurette-card:hover,
    .member-card:hover {
        transform: none !important;
    }
}

/* ============================================
   LANDSCAPE ORIENTATION FIXES
   ============================================ */
@media screen and (max-height: 500px) and (orientation: landscape) {
    #myCarousel {
        margin-top: 40px !important;
    }
    
    .carousel-item img,
    .carousel-bg {
        height: 250px !important;
    }
    
    .slide-content {
        padding: 1rem 1.5rem !important;
    }
    
    .hero-brand {
        padding: 1rem 0 0.5rem !important;
    }
    
    .hero-brand img {
        max-width: 140px !important;
    }
}

/* ============================================
   LARGE MOBILE / PHABLET (600-768px)
   ============================================ */
@media screen and (min-width: 600px) and (max-width: 768px) {
    .carousel-item img,
    .carousel-bg {
        height: 400px !important;
    }
    
    .slide-content {
        width: 85% !important;
        padding: 1.5rem 2rem !important;
    }
}

/* ============================================
   UTILITY CLASSES - Mobile Optimized
   ============================================ */
@media screen and (max-width: 768px) {
    /* Ensure all text is readable on mobile */
    .utility-text {
        font-size: 16px !important;
    }
    
    /* Touch-friendly buttons */
    .touch-btn {
        min-height: 44px !important;
        padding: 0.75rem 1.5rem !important;
    }
    
    /* Full-width buttons on small screens */
    .full-width-btn {
        width: 100% !important;
        max-width: 320px !important;
        display: block !important;
        margin: 0.5rem auto !important;
    }
    
    /* Responsive images */
    .responsive-img {
        max-width: 100% !important;
        height: auto !important;
    }
}

@media screen and (max-width: 480px) {
    .touch-btn-sm {
        min-height: 44px !important;
        padding: 0.65rem 1.2rem !important;
        font-size: 14px !important;
        width: 100% !important;
        max-width: 280px !important;
    }
}

/* ============================================
   PRINT STYLES (Bonus)
   ============================================ */
@media print {
    .navbar,
    .quick-links,
    .carousel,
    .discord-section,
    .modal {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}
