/* Mobile Responsive Styles - Sidebar Menu */

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1002;
    position: relative;
}

.mobile-menu-toggle span {
    width: 30px;
    height: 3px;
    background: var(--dark);
    border-radius: 10px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Overlay */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu-overlay.active {
    display: block;
    opacity: 1;
}

/* Prevent body scroll when menu is open */
body.menu-open {
    overflow: hidden;
}

/* Tablets and below (1024px) */
@media (max-width: 1024px) {
    .header-container {
        padding: 0 15px;
    }
    
    .hero h1 {
        font-size: 40px;
    }
    
    .features-grid,
    .marketplaces-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* Mobile Landscape and Tablets (768px) */
@media (max-width: 768px) {
    /* Header Mobile */
    .mobile-menu-toggle {
        display: flex;
    }
    
    .header-container {
        position: relative;
        height: 60px;
        padding: 0 15px;
    }
    
    .logo {
        font-size: 20px;
    }
    
    .logo-icon {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    
    /* Sidebar Menu */
    .main-nav {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100vh;
        background: var(--white);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        z-index: 999;
        transition: left 0.3s ease;
        overflow-y: auto;
    }
    
    .main-nav.active {
        left: 0;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 80px 0 20px 0;
    }
    
    .main-nav ul li {
        border-bottom: 1px solid var(--border);
    }
    
    .main-nav ul li:last-child {
        border-bottom: none;
    }
    
    .main-nav a {
        display: flex;
        align-items: center;
        padding: 18px 25px;
        font-size: 16px;
        color: var(--dark);
        transition: all 0.2s;
    }
    
    .main-nav a:hover,
    .main-nav a:active {
        background: var(--light-gray);
        color: var(--primary);
        padding-left: 30px;
    }
    
    /* Menu Header Inside Sidebar */
    .main-nav::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 60px;
        background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
        z-index: -1;
    }
    
    /* Hero Mobile */
    .hero {
        padding: 50px 15px;
    }
    
    .hero h1 {
        font-size: 28px;
        margin-bottom: 15px;
    }
    
    .hero p {
        font-size: 16px;
        margin-bottom: 30px;
    }
    
    .search-box {
        padding: 6px;
    }
    
    .search-form {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-input {
        padding: 14px 16px;
        font-size: 15px;
    }
    
    .btn-primary {
        width: 100%;
        padding: 14px 24px;
        font-size: 15px;
    }
    
    /* Sections Mobile */
    .features,
    .marketplaces,
    .trust {
        padding: 50px 15px;
    }
    
    .section-title {
        font-size: 26px;
        margin-bottom: 30px;
    }
    
    .features-grid,
    .marketplaces-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .feature-card,
    .marketplace-card {
        padding: 30px 20px;
    }
    
    .feature-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .marketplace-logo {
        font-size: 40px;
    }
    
    /* Trust Stats Mobile */
    .trust-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .trust-stat-number {
        font-size: 36px;
    }
    
    .trust-stat-label {
        font-size: 14px;
    }
    
    /* Footer Mobile */
    .footer-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-section {
        text-align: center;
    }
    
    /* Content Pages Mobile */
    .content-page {
        padding: 50px 15px;
    }
    
    .content-container h1 {
        font-size: 28px;
    }
    
    .content-container h2 {
        font-size: 22px;
        margin-top: 30px;
    }
    
    .content-container h3 {
        font-size: 18px;
        margin-top: 20px;
    }
}

/* Small Mobile (480px) */
@media (max-width: 480px) {
    .logo span {
        font-size: 16px;
    }
    
    .logo-icon {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }
    
    .main-nav {
        width: 260px;
        left: -260px;
    }
    
    .hero h1 {
        font-size: 24px;
    }
    
    .hero p {
        font-size: 14px;
    }
    
    .section-title {
        font-size: 22px;
    }
    
    .feature-card h3,
    .marketplace-card h3 {
        font-size: 18px;
    }
    
    .feature-card p {
        font-size: 14px;
    }
    
    .trust-stats {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .trust-stat-number {
        font-size: 32px;
    }
    
    .content-container h1 {
        font-size: 24px;
    }
    
    .content-container h2 {
        font-size: 20px;
    }
    
    .content-container h3 {
        font-size: 17px;
    }
}

/* Very Small Mobile (360px) */
@media (max-width: 360px) {
    .header-container {
        padding: 0 10px;
    }
    
    .main-nav {
        width: 240px;
        left: -240px;
    }
    
    .hero h1 {
        font-size: 20px;
    }
    
    .hero p {
        font-size: 13px;
    }
    
    .search-input {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    .btn-primary {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .feature-card,
    .marketplace-card {
        padding: 25px 15px;
    }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: 40px 15px;
    }
    
    .hero h1 {
        font-size: 24px;
    }
    
    .hero p {
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    .features,
    .marketplaces,
    .trust {
        padding: 40px 15px;
    }
    
    .trust-stats {
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
    }
    
    .main-nav ul {
        padding-top: 70px;
    }
}

/* Touch Improvements */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .btn-primary,
    .main-nav a {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: flex-start;
    }
    
    /* Remove hover effects on touch devices */
    .feature-card:hover,
    .marketplace-card:hover {
        transform: none;
    }
    
    /* Active state for touch */
    .feature-card:active,
    .marketplace-card:active {
        transform: scale(0.98);
    }
    
    .btn-primary:active {
        transform: scale(0.95);
    }
    
    .main-nav a:active {
        background: var(--light-gray);
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Fix for iOS Safari */
@supports (-webkit-touch-callout: none) {
    .main-nav {
        height: -webkit-fill-available;
    }
}
