/* ============================================
   MOBILE RESPONSIVE STYLES FOR ALL PAGES
   ============================================ */

/* Hide mobile menu toggle by default (desktop) */
.mobile-menu-toggle {
    display: none;
}

/* Mobile Navigation */
@media (max-width: 768px) {

    /* Container Padding */
    .container {
        padding: 0 1rem !important;
    }

    /* Fix hero navigation background on mobile */
    .hero-nav {
        background: rgba(121, 64, 254, 0.98) !important;
        backdrop-filter: blur(10px);
        position: sticky;
        top: 0;
        z-index: 1000;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    }

    /* Navigation content positioning */
    .nav-content {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 1rem 0;
    }

    /* Navigation Menu - Hamburger Menu */
    .nav-menu {
        display: none;
        position: fixed;
        top: 68px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: linear-gradient(180deg, #ffb3b8 0%, #ff7780 70%, #e65960 100%);
        padding: 1rem;
        gap: 0.25rem !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
        z-index: 999;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
    }

    .nav-menu.active {
        display: flex;
        max-height: 400px;
        padding: 1rem;
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
        margin: 0;
    }

    .nav-link {
        display: block;
        padding: 0.875rem 1rem;
        font-size: 1rem;
        border-radius: 6px;
        transition: background 0.2s ease;
    }

    .nav-link:hover {
        background: rgba(255, 255, 255, 0.15);
    }

    /* Mobile Menu Toggle Button */
    .mobile-menu-toggle {
        display: block !important;
        position: relative;
        background: none;
        border: none;
        color: white;
        font-size: 1.75rem;
        cursor: pointer;
        padding: 0.5rem;
        line-height: 1;
        z-index: 1001;
        transition: transform 0.2s ease;
    }

    .mobile-menu-toggle:hover {
        transform: scale(1.1);
    }

    .mobile-menu-toggle:active {
        transform: scale(0.95);
    }

    /* Hero Section */
    .hero-section {
        min-height: auto !important;
    }

    .hero-title {
        font-size: 1.75rem !important;
        padding: 0 0.5rem;
    }

    .hero-input-wrapper {
        padding: 0 0.5rem;
    }

    .hero-input-group {
        flex-direction: column;
    }

    .hero-input {
        border-radius: 8px 8px 0 0 !important;
        font-size: 0.95rem;
    }

    .hero-btn {
        border-radius: 0 0 8px 8px !important;
        padding: 0.875rem 1rem;
    }

    /* Video Editor Layout */
    .video-editor {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    .main-container {
        padding: 1rem !important;
    }

    /* Format and Quality Row */
    .format-quality-row {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }

    /* Tabs */
    .tabs {
        flex-direction: row;
    }

    .tab {
        font-size: 0.85rem;
        padding: 0.6rem 0.75rem;
    }

    /* Time Inputs */
    .time-row {
        gap: 0.5rem !important;
    }

    .time-input-small {
        font-size: 0.85rem;
    }

    /* Action Buttons */
    .action-row {
        flex-direction: column;
    }

    .action-row button {
        width: 100%;
    }

    /* Range Slider Labels */
    .range-slider-label {
        font-size: 0.7rem;
        padding: 0.1rem 0.3rem;
    }

    /* Features Grid */
    .features-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }

    .feature-card {
        padding: 1.5rem 1rem;
    }

    .feature-title {
        font-size: 1rem;
    }

    .feature-description {
        font-size: 0.85rem;
    }

    /* FAQ Section */
    .faq-container {
        padding: 1rem;
    }

    .faq-question {
        font-size: 0.9rem;
        padding: 1rem 0;
    }

    .faq-answer p {
        font-size: 0.85rem;
    }

    /* Footer Grid */
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
        text-align: center;
    }

    .footer-logo {
        margin: 0 auto 1rem;
    }

    .footer-nav {
        align-items: center;
    }

    /* CTA Section */
    .cta-title {
        font-size: 1.5rem !important;
        padding: 2.5rem 1.5rem !important;
    }

    /* Section Titles */
    .section-title {
        font-size: 1.75rem !important;
        padding: 0 1rem;
    }

    /* Cards and Content Sections */
    .card {
        padding: 1rem !important;
    }

    /* About Page - Grid Layouts */
    div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }

    /* Contact Page - Contact Grid */
    section div[style*="grid-template-columns: repeat(auto-fit, minmax(280px, 1fr))"] {
        grid-template-columns: 1fr !important;
    }

    /* How To Use - Steps Grid */
    div[style*="grid-template-columns: repeat(auto-fit, minmax(280px, 1fr))"] {
        grid-template-columns: 1fr !important;
    }

    /* Video Player Section */
    .video-player-section {
        margin-bottom: 1rem;
    }

    .video-placeholder {
        min-height: 200px;
    }

    /* Format Dropdown */
    .format-dropdown {
        max-height: 200px;
    }

    /* Progress Section */
    .progress-info {
        flex-direction: column;
        gap: 0.25rem;
        text-align: center;
    }

    /* Download Link */
    #downloadLink {
        width: 100%;
        text-align: center;
    }

    /* Reset Button */
    #resetBtn {
        width: 100%;
    }
}

/* Tablet Responsiveness (768px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }

    .video-editor {
        grid-template-columns: 1fr !important;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .hero-title {
        font-size: 2rem;
    }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem !important;
    }

    .section-title {
        font-size: 1.5rem !important;
    }

    .nav-link {
        font-size: 0.9rem;
    }

    .feature-icon {
        width: 48px;
        height: 48px;
    }

    .btn {
        font-size: 0.9rem;
        padding: 0.75rem 1.25rem;
    }

    .cta-title {
        font-size: 1.25rem !important;
    }

    /* Reduce padding on small screens */
    section[style*="padding: 4rem 0"] {
        padding: 2rem 0 !important;
    }

    .time-section {
        padding: 0.75rem;
    }

    .clip-item {
        padding: 0.5rem;
    }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        min-height: auto !important;
    }

    .hero-content {
        padding: 1.5rem 1rem !important;
    }

    .video-player-section {
        max-height: 300px;
    }
}

/* Print Styles */
@media print {

    .hero-nav,
    .footer-enhanced,
    .cta-section,
    .video-editor {
        display: none;
    }
}

/* Fix for inline styles on mobile - these override inline styles when needed */
@media (max-width: 768px) {

    /* About page grids */
    section>div>div[style*="display: grid"] {
        grid-template-columns: 1fr !important;
    }

    /* Padding overrides */
    section[style*="padding: 4rem 0"] {
        padding: 2.5rem 0 !important;
    }

    /* Contact page cards */
    div[style*="background: #f5f3ff; padding: 2rem"] {
        padding: 1.5rem !important;
    }

    /* How to use numbered circles */
    div[style*="width: 48px; height: 48px"] {
        width: 40px !important;
        height: 40px !important;
        font-size: 1.25rem !important;
    }

    /* Max width containers */
    div[style*="max-width: 900px"],
    div[style*="max-width: 800px"] {
        padding: 0 1rem;
    }

    /* Text sizes */
    h2[style*="font-size: 2rem"] {
        font-size: 1.5rem !important;
    }

    h3[style*="font-size: 1.25rem"] {
        font-size: 1.1rem !important;
    }
}

/* Accessibility - Larger touch targets on mobile */
@media (max-width: 768px) {

    button,
    a,
    .btn,
    .tab,
    .format-option {
        min-height: 44px;
        min-width: 44px;
    }

    /* Increase spacing for better touch interaction */
    .nav-menu li {
        margin: 0.25rem 0;
    }
}