/* ============================================
   RESPONSIVE DESIGN - Media Queries
   ============================================ */

/* Tablet and below (768px) */
@media (max-width: 768px) {
    /* Hero */
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    /* Navigation */
    .nav-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 73px;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        flex-direction: column;
        gap: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, box-shadow 0.3s ease;
        box-shadow: none;
    }

    .nav-menu.active {
        max-height: 400px;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    }

    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .nav-menu a {
        display: block;
        width: 100%;
        padding: 1rem 1.5rem;
        border-radius: 0;
        text-align: left;
    }

    /* Features */
    .features-grid {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-info {
        text-align: center;
    }

    /* Carousel */
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    /* Supported Section */
    .supported-section h2 {
        font-size: 2rem;
    }

    .supported-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .supported-category {
        padding: 1.5rem;
    }

    .supported-category h3 {
        font-size: 1.3rem;
    }

    /* Mobile tooltip positioning */
    .install-tooltip {
        left: 0;
        top: 100%;
        transform: translateY(0);
        margin-left: 0;
        margin-top: 1rem;
        max-width: 100%;
        width: calc(100vw - 4rem);
    }

    .os-item:hover .install-tooltip {
        transform: translateY(10px) translateX(0);
    }

    .install-tab::before {
        right: auto;
        top: auto;
        bottom: 100%;
        left: 2rem;
        transform: none;
        border: 10px solid transparent;
        border-bottom-color: var(--primary-color);
        border-right-color: transparent;
    }

    .install-tab::after {
        right: auto;
        top: auto;
        bottom: 100%;
        left: calc(2rem + 2px);
        transform: none;
        border: 8px solid transparent;
        border-bottom-color: #2a2a2a;
        border-right-color: transparent;
        margin-bottom: 2px;
    }

    .install-tab {
        padding: 1rem;
    }

    .install-tab h4 {
        font-size: 1rem;
    }

    .install-tab code {
        font-size: 0.8rem;
        padding: 0.5rem;
    }

    /* Privacy Section */
    .privacy-content {
        grid-template-columns: 1fr;
    }
    
    .privacy-switch-text {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .json-display {
        font-size: 0.85rem;
    }
    
    /* Checks Section */
    .checks-flow {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .check-step-connector {
        transform: rotate(90deg);
    }
    
    .wiki-mockup {
        max-width: 100%;
    }

    /* Community Map */
    .community-map-header h2 {
        font-size: 2rem;
    }
    
    .community-tagline {
        font-size: 1.1rem;
    }
    
    .community-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .stat-item {
        flex-direction: row;
        justify-content: center;
    }
    
    .stat-icon {
        font-size: 1.5rem;
    }
    
    .community-cta {
        flex-direction: column;
        align-items: stretch;
        padding: 0 1rem;
    }
    
    .cta-button {
        text-align: center;
    }

    /* Compare */
    .compare-select {
        min-width: 140px;
        font-size: 0.8rem;
    }

    .compare-btn-add {
        width: 100%;
    }

    .compare-filter-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .compare-diff-count {
        margin-left: 0;
    }

    /* Blog */
    .blog-page .page-header h1,
    .post-title {
        font-size: 2rem;
    }
    
    .blog-card-content {
        padding: 1.5rem;
    }
    
    .blog-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .post-navigation {
        flex-direction: column;
    }
    
    .nav-link {
        max-width: 100%;
    }
    
    .post-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    /* Devices */
    .devices-grid {
        grid-template-columns: 1fr;
    }
    
    .devices-page .page-header h1 {
        font-size: 2rem;
    }
    
    .filter-top-row {
        flex-direction: column;
    }
    
    .view-switcher {
        width: 100%;
        justify-content: center;
    }
    
    .devices-table {
        font-size: 0.8rem;
    }
    
    .devices-table th,
    .devices-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .table-legend {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .device-hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .device-image {
        order: -1;
    }

    .device-info h1.device-title {
        font-size: 2rem;
    }
    
    .device-codename {
        font-size: 1rem;
    }
    
    .device-meta {
        gap: 0.75rem;
    }
    
    .device-meta span {
        font-size: 0.85rem;
        padding: 0.4rem 0.75rem;
    }
    
    .device-section {
        padding: 1.5rem;
    }
    
    .device-section h2 {
        font-size: 1.5rem;
    }
    
    .specs-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .resource-links {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .popular-devices {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    
    .quick-compare-link {
        text-align: center;
        padding: 0.5rem;
        font-size: 0.8rem;
    }

    /* Flavors and OS Picker */
    .flavors-grid,
    .os-picker-grid {
        grid-template-columns: 1fr;
    }
    
    .os-logo-box {
        height: 80px;
    }
    
    .os-card {
        padding: 1.5rem;
    }
}

/* Tablet and Desktop (1024px and below) */
@media (max-width: 1024px) {
    .device-content .container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .device-sidebar {
        order: -1;
    }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
    .nav-brand .brand-name {
        font-size: 1.2rem;
    }

    .nav-brand .logo {
        height: 32px;
    }

    .nav-menu {
        gap: 0.5rem;
        font-size: 0.85rem;
    }

    .nav-menu a {
        padding: 0.4rem 0.6rem;
    }

    .slide {
        padding: 1rem;
    }

    .phone-mockup {
        padding: 12px;
        border-radius: 36px;
    }

    .phone-mockup::before {
        width: 100px;
        height: 22px;
        top: 10px;
    }

    .phone-mockup::after {
        width: 8px;
        height: 8px;
        top: 17px;
    }

    .phone-screen {
        border-radius: 28px;
        min-height: 520px;
        padding: 35px 15px;
    }

    .community-map-section {
        padding: 3rem 0;
    }
    
    .world-map-container {
        padding: 1rem;
    }
    
    .community-stats {
        padding: 1rem;
    }
    
    .continent-dialog {
        left: 10px !important;
        right: 10px !important;
        top: 50% !important;
        transform: translateY(-50%);
        max-width: calc(100vw - 20px);
    }

    .section-heading {
        font-size: 2rem;
    }
    
    .section-subheading {
        font-size: 1rem;
    }
    
    .privacy-card,
    .privacy-demo {
        padding: 1.5rem;
    }
    
    .ironseal-logo {
        width: 80px;
    }
    
    .ironseal-fallback {
        font-size: 2rem;
    }
    
    .privacy-card-title {
        font-size: 1.25rem;
    }
    
    .privacy-card-desc {
        font-size: 0.95rem;
    }
    
    .privacy-json-viewer {
        padding: 0.75rem;
        border-radius: 8px;
    }
    
    .json-display {
        font-size: 0.7rem;
        line-height: 1.4;
    }
    
    .privacy-switch-input {
        width: 50px;
        height: 26px;
    }
    
    .privacy-switch-input::before {
        width: 20px;
        height: 20px;
    }
    
    .privacy-switch-input:checked::before {
        transform: translateX(24px);
    }
    
    .privacy-switch-text {
        font-size: 0.9rem;
    }
    
    .privacy-demo {
        padding: 1rem;
        gap: 1rem;
    }
    
    .faq-question {
        font-size: 1rem;
        padding: 1rem;
    }
    
    .faq-answer {
        padding: 0 1rem 1rem;
        font-size: 0.95rem;
    }

    .blog-page .page-header h1,
    .post-title {
        font-size: 1.75rem;
    }
    
    .blog-card-content {
        padding: 1.25rem;
    }
    
    .post-content {
        font-size: 0.95rem;
    }
    
    .post-content h2 {
        font-size: 1.5rem;
    }
    
    .post-content h3 {
        font-size: 1.25rem;
    }
    
    .post-content h4 {
        font-size: 1.1rem;
    }

    .device-hero {
        padding: 2rem 0;
    }
    
    .device-info h1.device-title {
        font-size: 1.5rem;
    }
    
    .device-section {
        padding: 1rem;
    }
    
    .spec-item {
        padding: 1rem;
    }
    
    .os-section {
        padding: 1rem;
    }
    
    .comparison-widget,
    .related-links {
        padding: 1rem;
    }

    .os-logo-box {
        height: 60px;
    }
    
    .os-card {
        padding: 1.25rem;
    }
    
    .os-name {
        font-size: 1.25rem;
    }
    
    .os-desc {
        font-size: 0.9rem;
    }
}
