/**
 * Green Cyber CVE Tracker - Responsive Styles
 * Mobile & Tablet Optimizations + Floating Hamburger Menu
 */

/* ============================================
   TABLET (1024px and below)
   ============================================ */

@media (max-width: 1024px) {
    .container {
        margin-left: 280px;
        padding: 30px 15px;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 20px;
    }

    .cve-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 20px;
    }

    .cyber-title {
        font-size: 40px;
    }
}

/* ============================================
   MOBILE (768px and below)
   ============================================ */

@media (max-width: 768px) {
    /* Remove sidebar margin */
    .container {
        margin-left: 0;
        padding: 20px 15px;
    }

    /* Hide desktop sidebar */
    .cyber-sidebar {
        position: fixed;
        right: -280px;
        left: auto;
        transition: right 0.3s ease;
        z-index: 1000;
    }

    .cyber-sidebar.active {
        right: 0;
        box-shadow: -5px 0 30px rgba(0, 255, 65, 0.3);
    }

    /* Show floating hamburger */
    .floating-hamburger {
        display: flex;
    }

    /* Header adjustments */
    .cyber-header {
        margin-bottom: 40px;
    }

    .logo-container {
        width: 60px;
        height: 60px;
    }

    .cyber-title {
        font-size: 32px;
        letter-spacing: 2px;
    }

    .terminal-cursor {
        height: 30px;
    }

    .header-subtitle {
        font-size: 14px;
    }

    .header-actions {
        flex-direction: column;
        gap: 15px;
    }

    .cyber-btn, .live-status {
        width: 100%;
        justify-content: center;
    }

    /* Stats grid */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .stat-card {
        padding: 20px;
    }

    .stat-value {
        font-size: 36px;
    }

    /* Social section */
    .social-cyber {
        padding: 25px 15px;
    }

    .social-cyber h3 {
        font-size: 18px;
    }

    .social-icons {
        gap: 15px;
    }

    .social-icons a {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }

    /* Controls */
    .controls {
        flex-direction: column;
        gap: 12px;
    }

    .search-box {
        min-width: 100%;
    }

    .controls select {
        width: 100%;
    }

    /* CVE Grid */
    .cve-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .cve-card {
        padding: 18px;
    }

    .cve-id {
        font-size: 16px;
    }

    .cve-description {
        font-size: 13px;
    }

    .cve-meta {
        gap: 15px;
    }

    .cve-link {
        width: 100%;
        justify-content: center;
    }

    /* Load more */
    .btn-load-more {
        width: 100%;
        justify-content: center;
    }

    /* FAQ */
    .faq-section .cyber-title {
        font-size: 28px;
    }

    .faq-question {
        font-size: 14px;
        padding: 15px 20px;
    }

    .faq-question h3 {
        font-size: 14px;
    }

    .faq-item.active .faq-answer {
        padding: 0 20px 15px;
    }

    .faq-answer p {
        font-size: 13px;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-social {
        justify-content: flex-start;
    }

    .footer-copyright {
        font-size: 12px;
        line-height: 1.8;
    }

    /* Ads */
    .ad-container {
        padding: 15px;
        margin: 20px 0;
    }
}

/* ============================================
   SMALL MOBILE (480px and below)
   ============================================ */

@media (max-width: 480px) {
    .container {
        padding: 15px 10px;
    }

    /* Hamburger adjustments */
    .floating-hamburger {
        width: 55px;
        height: 55px;
        bottom: 20px;
        right: 20px;
    }

    .floating-hamburger span {
        width: 22px;
    }

    /* Header */
    .logo-container {
        width: 50px;
        height: 50px;
    }

    .cyber-title {
        font-size: 24px;
        letter-spacing: 1px;
    }

    .terminal-cursor {
        width: 8px;
        height: 24px;
    }

    .header-subtitle {
        font-size: 12px;
    }

    /* Stats */
    .stat-card {
        padding: 18px;
    }

    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

    .stat-value {
        font-size: 32px;
    }

    .stat-label {
        font-size: 12px;
    }

    .stat-trend {
        font-size: 11px;
    }

    /* Social */
    .social-cyber h3 {
        font-size: 16px;
    }

    .social-icons a {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    /* Controls */
    .search-box input {
        font-size: 13px;
        padding: 10px 15px 10px 40px;
    }

    .controls select {
        font-size: 13px;
        padding: 10px 15px;
    }

    /* CVE Cards */
    .cve-card {
        padding: 15px;
    }

    .cve-id {
        font-size: 15px;
    }

    .severity-badge {
        font-size: 10px;
        padding: 4px 10px;
    }

    .cve-description {
        font-size: 12px;
    }

    .cve-meta-label {
        font-size: 10px;
    }

    .cve-meta-value {
        font-size: 13px;
    }

    .cve-link {
        font-size: 12px;
        padding: 8px 18px;
    }

    /* Load More */
    .btn-load-more {
        font-size: 13px;
        padding: 12px 30px;
    }

    /* FAQ */
    .faq-section .cyber-title {
        font-size: 24px;
    }

    .faq-question {
        font-size: 13px;
        padding: 12px 15px;
    }

    .faq-question h3 {
        font-size: 13px;
    }

    .faq-answer p {
        font-size: 12px;
    }

    /* Footer */
    .footer-brand, .footer-links, .footer-resources, .footer-social-section {
        font-size: 12px;
    }

    .footer-title, .footer-links h4, .footer-resources h4, .footer-social-section h4 {
        font-size: 14px;
    }

    .footer-social a {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    .footer-copyright {
        font-size: 11px;
    }
}

/* ============================================
   EXTRA SMALL (360px and below)
   ============================================ */

@media (max-width: 360px) {
    .cyber-title {
        font-size: 20px;
    }

    .stat-value {
        font-size: 28px;
    }

    .cyber-btn, .live-status {
        font-size: 12px;
        padding: 10px 20px;
    }

    .floating-hamburger {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
    }

    .floating-hamburger span {
        width: 20px;
        height: 2px;
    }
}

/* ============================================
   LANDSCAPE MOBILE
   ============================================ */

@media (max-width: 900px) and (orientation: landscape) {
    .cyber-title {
        font-size: 28px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .header-actions {
        flex-direction: row;
    }
}

/* ============================================
   SIDEBAR ANIMATIONS (Mobile)
   ============================================ */

@media (max-width: 768px) {
    @keyframes slideInRight {
        from {
            right: -280px;
        }
        to {
            right: 0;
        }
    }

    @keyframes slideOutRight {
        from {
            right: 0;
        }
        to {
            right: -280px;
        }
    }

    .cyber-sidebar.active {
        animation: slideInRight 0.3s ease;
    }

    .cyber-sidebar:not(.active) {
        animation: slideOutRight 0.3s ease;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    body {
        background: white;
        color: black;
    }

    .matrix-bg,
    .cyber-grid,
    .glow-orb,
    .cyber-sidebar,
    .floating-hamburger,
    .menu-overlay,
    .header-actions,
    .social-cyber,
    .controls,
    .load-more-container,
    .ad-container,
    .footer-social {
        display: none !important;
    }

    .container {
        margin-left: 0;
    }

    .cyber-title,
    .cve-id,
    .stat-value,
    .footer-title {
        color: black;
    }

    .cve-card,
    .stat-card,
    .faq-item {
        border: 1px solid #333;
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* ============================================
   HIGH CONTRAST MODE
   ============================================ */

@media (prefers-contrast: high) {
    :root {
        --cyber-green: #00ff00;
        --cyber-green-dark: #00dd00;
    }

    .cve-card,
    .stat-card,
    .cyber-sidebar {
        border-width: 3px;
    }
}

/* ============================================
   REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .logo-scan-line,
    .btn-glow,
    .pulse-ring,
    .terminal-cursor {
        animation: none !important;
    }
}