/* ============================================
   MAIN STYLESHEET - High Court J&K Website
   ============================================ */

/* CSS VARIABLES */
:root {
    /* --govt-orange: #ff9933; */
    /* --dark-orange: #ff6600; */
    --govt-orange: #0063b2;
    --dark-orange: #2d90d7;
    --govt-green: #138808;
    --govt-white: #ffffff;
    --light-grey: #f8f9fa;
    --border-grey: #dee2e6;
    --text-dark: #212529;
    --text-muted: #6c757d;
    --primary-blue: #0d6efd;
    --success-green: #198754;
    --info-cyan: #0dcaf0;
    --warning-yellow: #ffc107;
    --danger-red: #dc3545;
}

/* GLOBAL STYLES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--light-grey);
}

/* SKIP LINK */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--govt-orange);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 9999;
    border-radius: 0 0 4px 0;
    font-weight: 600;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid #000;
}

/* TOP HEADER */
.top-header {
    background: #f8f9fa;
    border-bottom: 1px solid var(--border-grey);
    padding: 0.5rem 0;
}

.accessibility-controls {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.accessibility-controls .btn {
    font-size: 0.72rem;
    line-height: 1.1;
    padding: 0.14rem 0.32rem;
    border-radius: 4px;
}

.accessibility-controls .form-select {
    font-size: 0.72rem;
    font-weight: 600;
    min-height: auto;
    padding: 0.14rem 1.7rem 0.14rem 0.38rem;
}

.banner-controls-col .accessibility-controls {
    justify-content: flex-end;
}

.banner-controls-col,
.color-theme-dropdown {
    position: relative;
    z-index: 1102;
}

/* BANNER SECTION */
.banner {
    /* background: linear-gradient(to right, var(--govt-orange) 0%, var(--govt-white) 50%, var(--govt-green) 100%); */
    background: var(--bs-primary);
    padding: 0.5rem 0;
    position: relative;
    overflow: visible;
    z-index: 1000;
}

.banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    z-index: 1;
}

.banner-content {
    position: relative;
    z-index: 1101;
    overflow: visible;
}

.banner-brand-wrap {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-container {
    /* width: 90px;
    height: 90px; */
    /* background: white; */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    /* box-shadow: 0 4px 12px rgba(0,0,0,0.15); */
    /* border: 3px solid rgba(0,0,128,0.2); */
    transition: transform 0.3s ease;
}

.logo-container:hover {
    transform: translateY(-3px);
}

.logo-img {
    max-width: fit-content;
    max-height: 70px;
    border-radius: 50%;
    object-fit: contain;
}

.banner h1 {
    /* color: #1e3a8a; */
    color: var(--bs-primary);
    /* font-size: clamp(1.5rem, 4vw, 2rem); */
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.banner h2.hindi-title {
    color: #64748b;
    font-size: clamp(0.875rem, 2vw, 1rem);
    margin-bottom: 0.25rem;
}

.court-subtitle {
    color: #1e40af;
    font-style: italic;
    font-size: 0.875rem;
    font-weight: 500;
}

@media (max-width: 991.98px) {
    .banner {
        padding: 0.5rem 0;
    }

    .banner-main-row {
        align-items: flex-start !important;
    }

    .banner-controls-col {
        order: 1;
        width: 100%;
    }

    .banner-controls-col .accessibility-controls {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 0.25rem;
    }

    .banner-controls-col .color-theme-band {
        flex-wrap: nowrap;
        max-width: none;
    }

    .banner-brand-col {
        order: 2;
        width: 100%;
    }

    .banner-brand-wrap {
        align-items: center;
    }

    .logo-img {
        max-height: 58px;
    }
}

/* NAVIGATION */
.navbar {
    /* background: linear-gradient(135deg, var(--govt-orange) 0%, var(--dark-orange) 100%); */
    background: var(--bs-primary);
    padding: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-mobile-settings-toggle {
    display: none;
    border: 0;
    font-size: 1.1rem;
    line-height: 1;
}

.nav-mobile-settings-toggle:hover,
.nav-mobile-settings-toggle:focus {
    color: #fff;
    text-decoration: none;
    background: rgba(255,255,255,0.12);
    border-radius: 0.5rem;
}

.mobile-settings-menu {
    min-width: 280px;
    padding: 0.5rem 0;
}

.mobile-settings-section {
    padding: 0.1rem 0.85rem;
}

.mobile-settings-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(255,255,255,0.82);
    margin-bottom: 0.45rem;
}

.mobile-settings-actions {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.mobile-settings-actions-stack {
    flex-direction: column;
}

.mobile-settings-menu .btn,
.mobile-settings-menu .form-select {
    font-size: 0.78rem;
}

.mobile-settings-menu .btn.btn-outline-secondary {
    color: #fff;
    border-color: rgba(255,255,255,0.75);
}

.mobile-settings-menu .btn.btn-outline-secondary:hover,
.mobile-settings-menu .btn.btn-outline-secondary:focus,
.mobile-settings-menu .btn.btn-outline-secondary:active {
    color: #fff;
    border-color: #fff;
    background: rgba(255,255,255,0.12);
}

.mobile-settings-menu .form-select {
    background-color: #fff;
    color: #212529;
}

.mobile-color-theme-band {
    gap: 0.2rem;
    flex-wrap: wrap;
    max-width: none;
}

.mobile-color-theme-band .color-theme-item {
    width: 24px;
    height: 24px;
}

.navbar-nav .nav-link {
    color: white !important;
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: 0.95rem;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus,
.navbar-nav .nav-link.active {
    background: rgba(0,0,0,0.15);
    border-bottom-color: white;
}

.dropdown-menu {
    background: var(--bs-secondary);
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 0;
}

.dropdown-item {
    color: white;
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background:rgb(2,3,129);
    color: white;
    padding-left: 2rem;
}

@media (min-width: 992px) {
    .navbar .dropdown:hover .dropdown-menu {
        display: block;
        margin-top: 0;
    }

    .navbar .dropdown:hover > .dropdown-menu.dropdown-menu-end {
        right: 0;
        left: auto;
    }
}

@media (max-width: 991.98px) {
    .banner-controls-col {
        display: none;
    }

    .desktop-accessibility-controls {
        display: none;
    }

    .nav-mobile-settings-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

/* NEWS TICKER */
.news-ticker {
    background: var(--govt-orange);
    color: white;
    padding: 0.75rem 0;
    overflow: hidden;
}

.ticker-text {
    animation: scroll-left 30s linear infinite;
    white-space: nowrap;
    display: inline-block;
}

@keyframes scroll-left {
    from { transform: translateX(100%); }
    to { transform: translateX(-100%); }
}

/* CAROUSEL */
.carousel-item {
    height: 400px;
}

.carousel-item img {
    height: 100%;
    width: 100%;
    object-fit: cover;
}

/* SERVICE CARDS */
.service-card {
    transition: all 0.3s ease;
    border: none;
    border-top: 4px solid;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-top-color: var(--bs-secondary);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.service-card .card-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.service-card .card-icon i {
    font-size: 3rem;
}

/* .card-orange { border-top-color: #ff9933; }
.card-blue { border-top-color: #0066cc; }
.card-green { border-top-color: #009900; }
.card-purple { border-top-color: #6f42c1; }
.card-teal { border-top-color: #17a2b8; } */


/* NOTIFICATIONS SECTION */
.notifications-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.nav-tabs .nav-link {
    color: #666;
    border: none;
    background: #f5f5f5;
    margin-right: 0.5rem;
    border-radius: 6px;
    font-weight: 500;
}

.nav-tabs .nav-link:hover {
    background: #e8e8e8;
}

.nav-tabs .nav-link.active {
    background: var(--bs-primary);
    color: white;
}

.notification-item {
    background: #fafafa;
    border-left: 4px solid var(--govt-orange);
    transition: all 0.3s ease;
}

.notification-item:hover {
    background: #f0f0f0;
    transform: translateX(5px);
}

.badge-new {
    background: var(--danger-red);
    color: white;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* SIDEBARS */
.sidebar-sticky {
    position: sticky;
    top: 20px;
}

.list-group-item {
    border: none;
    border-bottom: 1px solid #eee;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    background: var(--bs-primary);
    color: #fff;
}

.list-group-item:hover {
    background: #f8f9fa;
    color: var(--govt-orange);
    /* padding-left: 1.5rem; */
}

.list-group-item i {
    transition: transform 0.3s ease;
}

.list-group-item:hover i {
    transform: translateX(3px);
}

/* CAUSE LIST */
.cl-list-group-item {
    border: none;
    border-bottom: 1px solid #eee;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    /* background: var(--bs-primary);
    color: #fff; */
}

.cl-list-group-item:hover {
    background: #f8f9fa;
    color: var(--govt-orange);
    /* padding-left: 1.5rem; */
}

.cl-list-group-item i {
    transition: transform 0.3s ease;
}

.cl-list-group-item:hover i {
    transform: translateX(3px);
}

/* CHIEF JUSTICE CARD */
.chief-justice-card {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.chief-justice-photo {
    max-width: 200px;
    border: 3px solid var(--govt-orange);
}

.cj-card {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.18);
    position: relative;
}

.cj-image-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    overflow: hidden;
}

.cj-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: transform 0.4s ease;
}

.cj-card:hover .cj-photo {
    transform: scale(1.03);
}

.cj-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(10,25,60,0.97) 0%, rgba(10,25,60,0.75) 55%, transparent 100%);
    padding: 48px 18px 18px;
}

.cj-overlay-inner {
    border-left: 3px solid #c8102e;
    padding-left: 12px;
}

.cj-role {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #ffd966;
    margin-bottom: 4px;
}

.cj-name {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 3px;
    line-height: 1.3;
}

.cj-court {
    font-size: 0.72rem;
    color: rgba(220,230,255,0.8);
    margin-bottom: 0;
}

/* JUDGEMENT ITEMS */
.judgement-item {
    transition: all 0.3s ease;
}

.judgement-item:hover {
    background: #f8f9fa;
    padding: 0.5rem;
    border-radius: 4px;
}

/* STATISTICS */
.stat-box {
    transition: all 0.3s ease;
}

.stat-box:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* FOOTER */
.footer {
    background: #2a2a2a;
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 3rem;
}

.footer h5 {
    color: var(--govt-orange);
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer a {
    color: #f5f5f5;
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
    padding: 0.25rem 0;
}

.footer a:hover {
    color: var(--govt-orange);
    padding-left: 8px;
}

.footer .list-unstyled li {
    margin-bottom: 0.5rem;
}

.district-link {
    display: block;
    text-align: center;
    padding: 0.5rem;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.district-link:hover {
    background: rgba(255,153,51,0.2);
    transform: translateY(-2px);
}

.social-links .btn {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.social-links .btn:hover {
    background: var(--govt-orange);
    border-color: var(--govt-orange);
}

/* UTILITY CLASSES */
.text-govt-orange { color: var(--govt-orange); }
.bg-govt-orange { background-color: var(--govt-orange); }
.border-govt-orange { border-color: var(--govt-orange); }
.bs-primary {
    background-color: var(--bs-primary, var(--govt-orange)) !important;
    border-color: var(--bs-primary, var(--govt-orange)) !important;
}

/* FOCUS STYLES FOR ACCESSIBILITY */
*:focus {
    outline: 3px solid var(--govt-orange);
    outline-offset: 2px;
}

/* PRINT STYLES */
@media print {
    .top-header,
    .navbar,
    .sidebar-sticky,
    .news-ticker,
    .footer,
    .skip-link,
    .service-card .btn {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .card {
        border: 1px solid #000;
        page-break-inside: avoid;
    }
}

/* Color Theme Dropdown */
.color-theme-dropdown .dropdown-toggle {
    min-width: 110px;
}

.color-theme-dropdown .theme-name {
    display: inline-block;
}

/* Dropdown Menu Styling */
.color-theme-menu {
    min-width: 220px;
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1105;
}

.navbar.sticky-top {
    z-index: 1020;
}

.color-theme-menu .dropdown-header {
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    color: #6c757d;
}

/* Color Theme Item */
.color-theme-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.color-theme-item:hover {
    background-color: #f8f9fa;
}

.color-theme-item.active {
    background-color: #e7f3ff;
}

/* Color Preview Circle */
.color-preview {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: inline-block;
    margin-right: 12px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

/* Theme Label */
.theme-label {
    flex-grow: 1;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Active Icon */
.active-icon {
    color: #0d6efd;
    font-size: 1rem;
    opacity: 0;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}

.color-theme-item.active .active-icon {
    opacity: 1;
}

/* Scrollbar Styling */
.color-theme-menu::-webkit-scrollbar {
    width: 6px;
}

.color-theme-menu::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.color-theme-menu::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.color-theme-menu::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* ============================================
   THEME-SPECIFIC GLOBAL STYLES
   ============================================ */

/* Dark Theme */
html[data-theme="dark"] body,
body[data-theme="dark"] {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

html[data-theme="dark"] .card,
body[data-theme="dark"] .card {
    background-color: #2d2d2d;
    color: #e0e0e0;
    border-color: #444;
}

html[data-theme="dark"] .navbar,
html[data-theme="dark"] .top-header,
body[data-theme="dark"] .navbar,
body[data-theme="dark"] .top-header {
    background-color: #222 !important;
}

html[data-theme="dark"] .notification-item,
body[data-theme="dark"] .notification-item {
    background-color: #2d2d2d;
    border-color: #444;
}

html[data-theme="dark"] .dropdown-menu,
body[data-theme="dark"] .dropdown-menu {
    background-color: #2d2d2d;
    border-color: #444;
}

html[data-theme="dark"] .dropdown-item,
body[data-theme="dark"] .dropdown-item {
    color: #e0e0e0;
}

html[data-theme="dark"] .dropdown-item:hover,
body[data-theme="dark"] .dropdown-item:hover {
    background-color: #3d3d3d;
}

html[data-theme="dark"] .color-theme-item.active,
body[data-theme="dark"] .color-theme-item.active {
    background-color: #375a7f;
}

html[data-theme="dark"] .service-card,
body[data-theme="dark"] .service-card {
    background-color: #2d2d2d;
    border-color: #444;
}

html[data-theme="dark"] .btn-outline-secondary,
body[data-theme="dark"] .btn-outline-secondary {
    color: #e0e0e0;
    border-color: #444;
}

html[data-theme="dark"] .btn-outline-secondary:hover,
body[data-theme="dark"] .btn-outline-secondary:hover {
    background-color: #3d3d3d;
    border-color: #555;
}

/* Smooth transitions for theme changes */
body,
.card,
.navbar,
.top-header,
.btn,
.service-card,
.notification-item,
.dropdown-menu {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.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));
}
