/**
 * GreekIRC Responsive Design
 * Mobile-first responsive styles
 */

/* Extra Small Devices (phones, less than 576px) */
@media (max-width: 575.98px) {
    :root {
        --font-size-base: 14px;
        --font-size-lg: 16px;
        --font-size-xl: 20px;
        --font-size-2xl: 26px;
        --font-size-3xl: 36px;
    }

    .container {
        padding: 0 var(--spacing-sm);
    }

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

    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--bg-primary);
        box-shadow: var(--shadow-md);
        padding: var(--spacing-md);
        gap: var(--spacing-sm);
    }

    .nav-menu.active {
        display: flex;
    }

    /* Hero */
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn {
        width: 100%;
    }

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

    /* Connection Methods */
    .connection-methods {
        grid-template-columns: 1fr;
    }

    /* Channels */
    .channels-grid {
        grid-template-columns: 1fr;
    }

    /* Stats */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }

    .stat-number {
        font-size: var(--font-size-2xl);
    }

    /* News */
    .news-grid {
        grid-template-columns: 1fr;
    }

    /* CTA */
    .cta-buttons {
        flex-direction: column;
    }

    .cta-buttons .btn {
        width: 100%;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .social-links {
        flex-direction: column;
        gap: var(--spacing-xs);
    }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    /* Navigation */
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--bg-primary);
        box-shadow: var(--shadow-md);
        padding: var(--spacing-md);
        gap: var(--spacing-sm);
    }

    .nav-menu.active {
        display: flex;
    }

    /* Hero */
    .hero .container {
        grid-template-columns: 1fr;
    }

    /* Features */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Channels */
    .channels-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Stats */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* News */
    .news-grid {
        grid-template-columns: 1fr;
    }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Features */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Connection Methods */
    .connection-methods {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Channels */
    .channels-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Stats */
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* News */
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Footer */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) {
    /* All default styles apply */
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
    }

    .hero-content h1 {
        font-size: 56px;
    }

    .features-grid,
    .channels-grid,
    .news-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .hero-buttons,
    .cta-buttons {
        display: none;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    a {
        text-decoration: underline;
    }

    a[href]:after {
        content: " (" attr(href) ")";
    }

    .alert,
    .feature-card,
    .channel-card,
    .news-card {
        break-inside: avoid;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
        --text-color: #000000;
    }

    .btn {
        border: 2px solid currentColor;
    }

    input,
    textarea,
    select {
        border: 2px solid var(--text-color);
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    /* Uncomment to enable dark mode
    :root {
        --bg-primary: #1a1a1a;
        --bg-secondary: #2d2d2d;
        --text-color: #e0e0e0;
        --text-light: #b0b0b0;
        --border-color: #404040;
    }

    .navbar,
    .footer {
        background-color: #0d0d0d;
    }

    .feature-card,
    .channel-card,
    .news-card {
        background-color: #2d2d2d;
        border-color: #404040;
    }

    code {
        background-color: #404040;
        color: #4db8ff;
    }

    input,
    textarea,
    select {
        background-color: #2d2d2d;
        border-color: #404040;
        color: var(--text-color);
    }

    input:focus,
    textarea:focus,
    select:focus {
        border-color: var(--primary-light);
        background-color: #3d3d3d;
    }
    */
}
