/**
 * Responsive Stylesheet
 * czinios.com - Classifieds Portal
 */

/* Tablet */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 36px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .search-category {
        min-width: auto;
        width: 100%;
    }
    
    .hero-stats {
        gap: 40px;
    }
    
    .stat-number {
        font-size: 28px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .listings-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .main-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header-wrapper {
        flex-wrap: wrap;
    }
    
    .header-actions {
        order: 3;
        width: 100%;
        justify-content: space-between;
        margin-top: 15px;
    }
    
    .logo {
        order: 1;
    }
    
    .mobile-menu-toggle {
        order: 2;
    }
    
    .hero {
        padding: 60px 0;
    }
    
    .hero h1 {
        font-size: 28px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .search-bar {
        padding: 0 15px;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .category-card {
        padding: 20px 10px;
    }
    
    .category-icon {
        font-size: 36px;
    }
    
    .category-card h3 {
        font-size: 14px;
    }
    
    .listings-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .listing-card {
        display: flex;
        flex-direction: column;
    }
    
    .listing-image {
        height: 180px;
    }
    
    .cta-section {
        padding: 60px 0;
    }
    
    .cta-content h2 {
        font-size: 24px;
    }
    
    .cta-content p {
        font-size: 16px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .modal-content {
        margin: 20px;
        max-height: calc(100vh - 40px);
    }
    
    .modal-header,
    .modal-body {
        padding: 20px;
    }
    
    .donation-button {
        flex-direction: column;
        text-align: center;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    .btn {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .btn-lg {
        padding: 12px 20px;
        font-size: 16px;
    }
    
    .header-actions .btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .lang-button {
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 24px;
    }
    
    .hero-subtitle {
        font-size: 14px;
        margin-bottom: 30px;
    }
    
    .search-form {
        padding: 8px;
        gap: 8px;
    }
    
    .search-input,
    .search-category {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    .stat-label {
        font-size: 12px;
    }
    
    .categories-section,
    .listings-section {
        padding: 40px 0;
    }
    
    .section-title {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .category-icon {
        font-size: 32px;
        margin-bottom: 10px;
    }
    
    .listing-image {
        height: 160px;
    }
    
    .listing-content {
        padding: 15px;
    }
    
    .listing-title {
        font-size: 16px;
    }
    
    .listing-price {
        font-size: 18px;
    }
    
    .cta-content h2 {
        font-size: 20px;
    }
    
    .cta-content p {
        font-size: 14px;
    }
    
    .site-footer {
        padding: 40px 0 20px;
    }
    
    .footer-column h3,
    .footer-column h4 {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .social-links {
        font-size: 20px;
        gap: 10px;
    }
}

/* Print Styles */
@media print {
    .site-header,
    .hero,
    .cta-section,
    .site-footer,
    .back-to-top,
    .btn,
    .modal {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .listing-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
        margin-bottom: 20px;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0066cc;
        --text-primary: #000000;
        --text-secondary: #333333;
        --border-color: #000000;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
}

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

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    :root {
        --light-bg: #1a1a1a;
        --white: #2d2d2d;
        --text-primary: #ffffff;
        --text-secondary: #b3b3b3;
        --border-color: #404040;
    }
    
    body {
        background-color: #0d0d0d;
    }
    
    .search-input,
    .search-category {
        background: var(--white);
        color: var(--text-primary);
    }
}
