/* ============================================
   RESPONSIVE DESIGN STYLES
   Mobile-First Approach with Bootstrap 5
   ============================================ */

/* EXTRA LARGE SCREENS (1920px+) */
@media (min-width: 1920px) {
    .container-fluid {
        max-width: 1800px;
        margin: 0 auto;
    }
    
    .banner h1 {
        font-size: 2.5rem;
    }
    
    .service-card .card-icon {
        font-size: 4rem;
    }
}

/* LARGE SCREENS (1200px - 1399px) */
@media (min-width: 1200px) and (max-width: 1399px) {
    .navbar-nav .nav-link {
        padding: 1rem 1rem;
        font-size: 0.9rem;
    }
}

/* MEDIUM TO LARGE TRANSITION (992px - 1199px) */
@media (max-width: 1199px) {
    .carousel-item {
        height: 350px;
    }
    
    .service-card .card-icon {
        font-size: 2.5rem;
    }
}

/* TABLET LANDSCAPE (768px - 991px) */
@media (max-width: 991px) {
    /* Navigation becomes hamburger menu */
    .navbar-nav {
        background: var(--bs-primary);
        padding: 1rem;
        margin-top: 0.5rem;
        border-radius: 8px;
    }
    
    .navbar-nav .nav-link {
        border-bottom: 1px solid rgba(255,255,255,0.2);
        padding: 0.75rem 1rem;
    }
    
    .navbar .dropdown-menu {
        background: var(--bs-secondary);
        margin-left: 1rem;
    }
    
    /* Adjust banner */
    .banner {
        /* padding: 1.5rem 0; */
    }
    
    .logo-container {
        width: 70px;
        height: 70px;
    }
    
    .logo-img {
        max-width: 55px;
        max-height: 55px;
    }
    
    .banner h1 {
        /* font-size: 1.5rem; */
    }
    
    .banner h2.hindi-title {
        font-size: 0.875rem;
    }
    
    /* Carousel adjustment */
    .carousel-item {
        height: 300px;
    }
    
    /* Sidebars become full width */
    .sidebar-sticky {
        position: relative;
        top: 0;
    }
    
    /* Service cards 2 columns */
    .service-card {
        margin-bottom: 1rem;
    }
}

/* TABLET PORTRAIT (576px - 767px) */
@media (max-width: 767px) {
    /* Top header controls */
    .accessibility-controls {
        justify-content: center;
        font-size: 0.68rem;
        gap: 0.2rem;
    }
    
    .accessibility-controls .btn {
        padding: 0.12rem 0.28rem;
        font-size: 0.66rem;
    }

    .accessibility-controls .form-select {
        font-size: 0.68rem;
        padding: 0.12rem 1.5rem 0.12rem 0.34rem;
    }
    
    /* Banner adjustments */
    .banner {
        /* padding: 1rem 0; */
    }
    
    .banner-main-row {
        text-align: left;
    }

    .banner-brand-wrap {
        justify-content: flex-start;
        align-items: center;
        gap: 0.75rem;
    }
    
    .logo-container {
        margin: 0;
    }
    
    .banner h1 {
        font-size: 1.25rem;
    }
    
    /* Carousel height */
    .carousel-item {
        height: 250px;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        width: 10%;
    }
    
    /* News ticker */
    .ticker-text {
        font-size: 0.875rem;
    }
    
    /* Notifications tabs */
    .nav-tabs {
        flex-wrap: wrap;
    }
    
    .nav-tabs .nav-link {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
        margin-bottom: 0.5rem;
    }
    
    /* Footer adjustments */
    .footer h5 {
        font-size: 1.1rem;
        margin-top: 1.5rem;
    }
    
    .footer .col-lg-3 {
        margin-bottom: 2rem;
    }
}

/* MOBILE LANDSCAPE (481px - 575px) */
@media (max-width: 575px) {
    /* Global font size */
    body {
        font-size: 14px;
    }
    
    /* Banner */
    .logo-container {
        width: 60px;
        height: 60px;
    }
    
    .logo-img {
        max-width: 45px;
        max-height: 45px;
    }
    
    .banner h1 {
        font-size: 1.1rem;
    }
    
    .banner h2.hindi-title {
        font-size: 0.75rem;
    }
    
    .court-subtitle {
        font-size: 0.75rem;
    }
    
    /* Carousel */
    .carousel-item {
        height: 200px;
    }
    
    /* Service cards - single column */
    .service-card .card-title {
        font-size: 1rem;
    }
    
    .service-card .card-text {
        font-size: 0.875rem;
    }
    
    .service-card .card-icon {
        font-size: 2rem;
    }
    
    /* Notifications */
    .notifications-section {
        padding: 1.5rem !important;
    }
    
    .notifications-section h2 {
        font-size: 1.25rem;
    }
    
    .notification-item {
        padding: 0.75rem !important;
        font-size: 0.875rem;
    }
    
    /* Chief Justice card */
    .chief-justice-photo {
        max-width: 150px;
    }
    
    /* Footer */
    .district-link {
        font-size: 0.875rem;
        padding: 0.4rem;
    }
}

/* MOBILE PORTRAIT (320px - 480px) */
@media (max-width: 480px) {
    /* Even smaller adjustments */
    body {
        font-size: 13px;
    }
    
    /* Accessibility controls */
    .accessibility-controls {
        gap: 0.15rem;
    }
    
    .accessibility-controls .btn {
        padding: 0.1rem 0.24rem;
        font-size: 0.62rem;
    }
    
    .accessibility-controls .form-select {
        font-size: 0.64rem;
        padding: 0.1rem 1.35rem 0.1rem 0.3rem;
    }

    .banner-brand-wrap {
        gap: 0.6rem;
    }
    
    /* Banner */
    .banner {
        /* padding: 0.75rem 0; */
    }
    
    .logo-container {
        width: 50px;
        height: 50px;
    }
    
    .logo-img {
        max-width: 40px;
        max-height: 40px;
    }
    
    .banner h1 {
        font-size: 1rem;
    }
    
    .banner h2.hindi-title {
        font-size: 0.7rem;
    }
    
    /* Carousel */
    .carousel-item {
        height: 180px;
    }
    
    /* Cards */
    .card {
        font-size: 0.875rem;
    }
    
    .card-header {
        background: var(--bs-primary, #0d6efd);
        color: var(--color-primary-contrast, #ffffff);
        border-bottom: 1px solid var(--bs-border-color, rgba(0, 0, 0, 0.12));
    
    }
    .card-header h5,
    .card-header h6 {
        font-size: 0.95rem;
    }
    
    /* Buttons */
    .btn-sm {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
    
    /* News ticker */
    .ticker-text {
        font-size: 0.75rem;
    }
    
    /* Service cards */
    .service-card {
        padding: 1rem;
    }
    
    .service-card .card-icon {
        font-size: 1.75rem;
    }
    
    /* Tabs */
    .nav-tabs .nav-link {
        font-size: 0.75rem;
        padding: 0.4rem 0.6rem;
    }
}

/* LANDSCAPE ORIENTATION */
@media (max-height: 500px) and (orientation: landscape) {
    .carousel-item {
        height: 250px;
    }
    
    .banner {
        /* padding: 0.5rem 0; */
    }
    
    .sidebar-sticky {
        position: relative;
    }
}

/* REDUCE MOTION FOR ACCESSIBILITY */
@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;
    }
    
    .ticker-text {
        animation: none;
    }
}

/* HIGH CONTRAST MODE SUPPORT */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid #000;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
    
    a {
        text-decoration: underline;
    }
}

/* DARK MODE SUPPORT (Optional) */
@media (prefers-color-scheme: dark) {
    /* Uncomment to enable dark mode
    body {
        background: #1a1a1a;
        color: #e0e0e0;
    }
    
    .card {
        background: #2a2a2a;
        color: #e0e0e0;
    }
    
    .banner::before {
        background: rgba(0, 0, 0, 0.8);
    }
    */
}
