/* Responsive Design for Sarkari Job Portal */

/* Extra Large Devices (1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
    }
    
    .hero h1 {
        font-size: 3.5rem;
    }
    
    .job-detail-title {
        font-size: 3rem;
    }
}

/* Large Devices (992px to 1199px) */
@media (max-width: 1199px) {
    .container {
        padding: 0 15px;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .job-detail-title {
        font-size: 2rem;
    }
    
    .job-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }
    
    .filters-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

/* Medium Devices (768px to 991px) */
@media (max-width: 991px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    nav ul {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .hero {
        padding: 3rem 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .search-box {
        flex-direction: column;
        max-width: 400px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .job-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    
    .job-card {
        padding: 1.25rem;
    }
    
    .job-title {
        font-size: 1.125rem;
    }
    
    .job-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .apply-btn {
        align-self: flex-end;
    }
    
    .filters-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .filter-buttons {
        justify-content: center;
    }
    
    .job-detail {
        padding: 1.5rem;
    }
    
    .job-detail-title {
        font-size: 1.75rem;
    }
    
    .job-detail-meta {
        gap: 1rem;
    }
    
    .job-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .apply-section {
        padding: 2rem;
    }
    
    .apply-title {
        font-size: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.5rem;
    }
}

/* Small Devices (576px to 767px) */
@media (max-width: 767px) {
    .container {
        padding: 0 10px;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        padding: 1rem;
    }
    
    nav.active {
        display: block;
    }
    
    nav ul {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .hero p {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
    
    .search-box {
        flex-direction: column;
        max-width: 100%;
        padding: 0.25rem;
    }
    
    .search-box input {
        padding: 0.6rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .search-box button {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.25rem;
    }
    
    .job-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .job-card {
        padding: 1rem;
    }
    
    .job-title {
        font-size: 1rem;
        line-height: 1.3;
    }
    
    .job-meta {
        gap: 0.75rem;
        font-size: 0.8rem;
    }
    
    .job-description {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }
    
    .job-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .last-date {
        text-align: center;
    }
    
    .apply-btn {
        text-align: center;
        padding: 0.75rem;
    }
    
    .filters-section {
        padding: 1.5rem;
    }
    
    .filters-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .filter-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .filter-buttons .btn {
        width: 100%;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .pagination button {
        padding: 0.4rem 0.8rem;
        font-size: 0.875rem;
    }
    
    .job-detail {
        padding: 1rem;
    }
    
    .job-detail-title {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    .job-detail-meta {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .important-dates,
    .eligibility-section,
    .quick-info {
        padding: 1rem;
    }
    
    .date-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .apply-section {
        padding: 1.5rem;
    }
    
    .apply-title {
        font-size: 1.25rem;
    }
    
    .apply-description {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .apply-button {
        display: block;
        width: 100%;
        text-align: center;
        padding: 0.75rem 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-section h3 {
        font-size: 1.125rem;
    }
    
    .toast {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* Extra Small Devices (575px and down) */
@media (max-width: 575px) {
    .hero {
        padding: 1.5rem 0;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .hero p {
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.125rem;
    }
    
    .job-card {
        padding: 0.75rem;
    }
    
    .job-title {
        font-size: 0.95rem;
    }
    
    .job-meta {
        flex-direction: column;
        gap: 0.5rem;
        font-size: 0.75rem;
    }
    
    .job-description {
        font-size: 0.8rem;
        margin-bottom: 0.75rem;
    }
    
    .filters-section {
        padding: 1rem;
    }
    
    .job-detail {
        padding: 0.75rem;
    }
    
    .job-detail-title {
        font-size: 1.25rem;
    }
    
    .important-dates,
    .eligibility-section,
    .quick-info {
        padding: 0.75rem;
    }
    
    .date-item {
        padding: 0.5rem 0;
    }
    
    .apply-section {
        padding: 1rem;
    }
    
    .apply-title {
        font-size: 1.125rem;
    }
    
    .apply-description {
        font-size: 0.9rem;
    }
    
    .footer {
        padding: 2rem 0 1rem;
        margin-top: 2rem;
    }
    
    .footer-content {
        gap: 1.5rem;
    }
    
    .footer-section h3 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .footer-section li {
        margin-bottom: 0.25rem;
    }
    
    .footer-bottom {
        padding-top: 1.5rem;
        font-size: 0.8rem;
    }
}

/* Landscape Orientation */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding: 1rem 0;
    }
    
    .hero h1 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .hero p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .search-box {
        margin-bottom: 1rem;
    }
    
    .job-detail-title {
        font-size: 1.75rem;
        margin-bottom: 0.5rem;
    }
    
    .apply-section {
        padding: 1.5rem;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo {
        background-image: url('/assets/images/logo@2x.png');
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
        text-indent: -9999px;
    }
}

/* Print Styles */
@media print {
    .container {
        max-width: none;
        padding: 0;
    }
    
    header,
    .hero,
    .filters-section,
    .pagination,
    .footer,
    .no-print {
        display: none !important;
    }
    
    .job-detail {
        box-shadow: none;
        border: 1px solid #ccc;
        margin: 0;
        padding: 1rem;
    }
    
    .job-detail-title {
        font-size: 1.5rem;
        color: black;
    }
    
    .apply-section {
        background: none;
        color: black;
        border: 1px solid #ccc;
    }
    
    .apply-button {
        display: none;
    }
    
    body {
        background: white !important;
        color: black !important;
        font-size: 12pt;
        line-height: 1.4;
    }
    
    a {
        color: black !important;
        text-decoration: underline;
    }
    
    .job-card {
        break-inside: avoid;
        page-break-inside: avoid;
        margin-bottom: 1rem;
        border: 1px solid #ccc;
    }
}

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

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .dark-mode {
        background-color: #1f2937;
        color: #f9fafb;
    }
    
    .dark-mode .job-card {
        background: #374151;
        border-color: #4b5563;
    }
    
    .dark-mode .job-title {
        color: #f9fafb;
    }
    
    .dark-mode .job-description {
        color: #d1d5db;
    }
    
    .dark-mode .filters-section {
        background: #374151;
        border-color: #4b5563;
    }
    
    .dark-mode .form-input,
    .dark-mode .form-select {
        background: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }
}

/* Focus Visible for Accessibility */
@media (hover: hover) and (focus: focus-visible) {
    a:focus-visible,
    button:focus-visible,
    input:focus-visible,
    select:focus-visible,
    textarea:focus-visible {
        outline: 2px solid #2563eb;
        outline-offset: 2px;
    }
}
