/* ========================================
   RESPONSIVE DESIGN
   Media queries for mobile and tablet
   ======================================== */

/* Tablet & Below (max-width: 1200px) */
@media (max-width: 1200px) {
    .toc-sidebar {
        display: none;
    }
    
    .toc-toggle {
        display: none;
    }
    
    .main-content {
        max-width: calc(100% - 280px);
    }
    
    .main-content.sidebar-hidden {
        max-width: 100%;
    }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
    /* Header */
    .mobile-menu-toggle {
        display: block;
    }
    
    .sidebar-toggle,
    .toc-toggle {
        display: none;
    }
    
    .header-container {
        padding: 0 1rem;
    }
    
    /* Sidebar */
    .sidebar {
        transform: translateX(-100%);
        z-index: 999;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .sidebar.hidden {
        transform: translateX(-100%);
        left: 0;
        display: block !important;
    }

    /* Ensure .active always overrides .hidden on mobile */
    .sidebar.hidden.active {
        transform: translateX(0);
        left: 0;
    }
    
    /* Main Content */
    .main-content {
        margin-left: 0;
        max-width: 100%;
        padding: 1.5rem 1rem;
    }
    
    .main-content.sidebar-hidden,
    .main-content.toc-hidden {
        margin-left: 0;
        max-width: 100%;
    }
    
    .markdown-body {
        font-size: 1.05rem;
        line-height: 1.65;
    }

    /* Markdown Typography */
    .markdown-body h1 {
        font-size: 1.75rem;
    }
    
    .markdown-body h2 {
        font-size: 1.5rem;
    }
    
    .markdown-body h3 {
        font-size: 1.2rem;
    }

    /* Table overflow handling */
    .markdown-body table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Hero Responsive */
    .hero-section {
        min-height: 500px;
    }
    
    .hero-container,
    .home-hero .hero-container {
        padding: 3rem 1.5rem;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-tagline {
        font-size: 1.2rem;
    }
    
    .hero-description {
        font-size: 1.05rem;
        margin-bottom: 2rem;
    }
    
    .hero-badge {
        margin-bottom: 1.5rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .hero-button {
        justify-content: center;
        padding: 0.875rem 1.5rem;
    }
    
    .hero-features {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        margin-top: 3rem;
    }
    
    .feature-item {
        padding: 1.25rem 0.75rem;
    }
    
    .feature-item span {
        font-size: 0.85rem;
    }
    
    .hero-cards {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .hero-cards-section {
        margin-top: 3rem;
    }
    
    .cards-title {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }
    
    .info-card {
        padding: 1.5rem;
    }
    
    .card-title {
        font-size: 1.25rem;
    }
    
    .hero-glow {
        width: 400px;
        height: 400px;
        top: -100px;
        right: -100px;
    }
    
    .scroll-indicator {
        display: none;
    }
    
    /* Navigation Buttons */
    .nav-buttons {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .nav-button {
        max-width: none;
        min-width: 35%;
        padding: 1rem;
    }

    /* Footer */
    .footer-links {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .footer-link-group {
        min-width: unset;
    }

    .site-footer {
        padding: 2rem 1rem 1.5rem;
    }
}

@media (max-width: 360px) {
    .nav-buttons {
        gap: 0.5rem;
    }
}
