/* Mobile Responsive Styles */

/* Small screens (max-width: 640px) */
@media (max-width: 640px) {
    .container {
        padding: 0 0.75rem;
    }
    
    h1 {
        font-size: 1.75rem !important;
    }
    
    h2 {
        font-size: 1.5rem !important;
    }
    
    /* Header */
    header .container {
        padding: 0 0.75rem;
    }
    
    header h1 {
        font-size: 1rem !important;
    }
    
    header .w-12 {
        width: 2.5rem;
        height: 2.5rem;
    }
    
    /* Hero Section */
    .hero-section {
        padding: 3rem 0;
    }
    
    .hero-section h1 {
        font-size: 2rem !important;
    }
    
    .hero-section p {
        font-size: 1rem !important;
    }
    
    /* Cards */
    .grid {
        gap: 1rem !important;
    }
    
    /* Articles */
    .article-card .md\:flex {
        flex-direction: column !important;
    }
    
    .article-card .md\:w-1\/3,
    .article-card .md\:w-2\/3 {
        width: 100% !important;
    }
    
    .article-card img {
        height: 12rem !important;
    }
    
    /* Goats */
    .goat-card {
        max-width: 100% !important;
    }
    
    /* Sidebar */
    .sidebar {
        margin-top: 2rem;
    }
    
    /* Footer */
    footer .grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }
    
    /* Forms */
    input, textarea, select {
        font-size: 0.875rem !important;
    }
    
    /* Buttons */
    .btn {
        padding: 0.5rem 1rem !important;
        font-size: 0.875rem !important;
    }
    
    /* Breadcrumbs */
    .breadcrumbs {
        font-size: 0.75rem !important;
    }
    
    /* Pagination */
    .pagination {
        flex-wrap: wrap !important;
        gap: 0.25rem !important;
    }
    
    .pagination a {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.75rem !important;
    }
    
    /* Admin */
    .admin-sidebar {
        display: none !important;
    }
    
    .admin-main {
        margin-left: 0 !important;
    }
    
    .admin-header h1 {
        font-size: 1.25rem !important;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 0.75rem !important;
    }
    
    .stat-card {
        padding: 1rem !important;
    }
    
    .stat-number {
        font-size: 1.25rem !important;
    }
}

/* Medium screens (641px - 1024px) */
@media (min-width: 641px) and (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .grid {
        gap: 1.5rem !important;
    }
    
    /* Hero */
    .hero-section h1 {
        font-size: 2.5rem !important;
    }
    
    /* Footer */
    footer .grid {
        grid-template-columns: 1fr 1fr !important;
    }
}

/* Tablet specific */
@media (min-width: 768px) and (max-width: 1024px) {
    /* Goats grid */
    .goats-grid {
        grid-template-columns: 1fr 1fr !important;
    }
    
    /* Articles grid */
    .articles-grid {
        grid-template-columns: 1fr 1fr !important;
    }
}

/* Landscape phones */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        padding: 2rem 0 !important;
    }
    
    .hero-section h1 {
        font-size: 1.75rem !important;
    }
}

/* Print styles */
@media print {
    header, footer, .sidebar, .share-buttons, 
    .related-posts, .author-box, .newsletter {
        display: none !important;
    }
    
    .container {
        max-width: 100% !important;
        padding: 0 !important;
    }
    
    .article-content {
        font-size: 12pt !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body.dark-mode {
        background: #1a202c;
        color: #e2e8f0;
    }
    
    body.dark-mode .card {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    body.dark-mode .card h3 {
        color: #e2e8f0 !important;
    }
    
    body.dark-mode input,
    body.dark-mode textarea,
    body.dark-mode select {
        background: #2d3748;
        color: #e2e8f0;
        border-color: #4a5568;
    }
    
    body.dark-mode .bg-gray-50 {
        background: #2d3748 !important;
    }
    
    body.dark-mode .bg-white {
        background: #2d3748 !important;
    }
    
    body.dark-mode .text-gray-600,
    body.dark-mode .text-gray-700,
    body.dark-mode .text-gray-800,
    body.dark-mode .text-gray-900 {
        color: #e2e8f0 !important;
    }
    
    body.dark-mode .border-gray-200,
    body.dark-mode .border-gray-300 {
        border-color: #4a5568 !important;
    }
}

/* Accessibility: High contrast */
@media (prefers-contrast: high) {
    .text-gray-600 { color: #1a202c !important; }
    .text-gray-500 { color: #1a202c !important; }
    .border-gray-200 { border-color: #1a202c !important; }
    .bg-gray-50 { background: #e2e8f0 !important; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}