/* Homepage specific styles for Nagpur City Police Website */

/* Global zoom fix - ensure all elements scale properly with browser zoom */
html {
    transform-origin: 0 0;
    -webkit-transform-origin: 0 0;
    -moz-transform-origin: 0 0;
    -ms-transform-origin: 0 0;
    -o-transform-origin: 0 0;
}

body {
    transform-origin: 0 0;
    -webkit-transform-origin: 0 0;
    -moz-transform-origin: 0 0;
    -ms-transform-origin: 0 0;
    -o-transform-origin: 0 0;
    overflow-x: hidden; /* Prevent horizontal scroll during zoom */
}

/* Chatbot Modal Responsive Design - All Devices */

/* Mobile phones (up to 767px) */
@media (max-width: 767px) {
    /* Ensure chatbot modal never interferes with header area */
    .fixed[style*="z-index: 500"] {
        top: 80px !important; /* Start below header */
        bottom: 0 !important;
        padding-bottom: 100px !important; /* Space for translation button */
    }
    
    /* Chatbot modal mobile positioning */
    #chatbotModal {
        max-height: calc(75vh - 60px) !important; 
        margin-top: auto !important;
        margin-bottom: 10px !important;
        width: 100% !important;
        border-radius: 16px 16px 0 0 !important;
    }
    
    /* Mobile input styling */
    #chatbotModal .border-t {
        padding: 12px 16px 20px 16px !important;
    }
    
    #chatbotModal button[onclick="sendFullMessage()"] {
        min-width: 55px !important;
        font-size: 13px !important;
        padding: 8px 12px !important;
    }
    
    #chatbotModal input {
        font-size: 14px !important;
        padding: 8px 12px !important;
    }
}

/* Tablets Portrait (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .fixed[style*="z-index: 500"] {
        padding: 10px !important; /* Reduced padding for more space */
        padding-bottom: 20px !important; /* Minimal bottom padding */
    }
    
    #chatbotModal {
        width: 70vw !important;
        min-width: 600px !important;
        max-width: 800px !important;
        max-height: 85vh !important; /* Increased height for tablets */
        margin: auto !important;
        border-radius: 16px !important;
    }
    
    /* Tablet-specific chat area - maximize space */
    #fullChatMessages {
        max-height: 65vh !important; /* Increased chat area */
        padding: 20px 28px !important; /* Optimized padding */
        min-height: 350px !important; /* Increased minimum height */
    }
    
    /* Tablet input area - optimized for touch */
    #chatbotModal .border-t {
        padding: 20px 28px 16px 28px !important; /* Reduced bottom padding */
        border-top-width: 2px !important;
    }
    
    #chatbotModal button[onclick="sendFullMessage()"] {
        min-width: 100px !important;
        font-size: 18px !important;
        padding: 14px 22px !important; /* Slightly reduced padding */
        font-weight: 600 !important;
    }
    
    #chatbotModal input {
        font-size: 18px !important;
        padding: 14px 22px !important; /* Slightly reduced padding */
        border-width: 2px !important;
        min-height: 52px !important; /* Slightly reduced height */
    }
    
    /* Tablet header sizing - more prominent */
    #chatbotModal h3 {
        font-size: 22px !important;
        padding: 6px 0 !important; /* Reduced padding */
    }
    
    /* Close button for tablets - larger */
    #chatbotModal button[onclick="closeChatbot()"] {
        padding: 6px !important; /* Slightly reduced */
    }
    
    #chatbotModal button[onclick="closeChatbot()"] svg {
        width: 28px !important;
        height: 28px !important;
    }
    
    /* Message bubbles for tablets - optimized */
    #fullChatMessages .bg-gray-200,
    #fullChatMessages .bg-blue-500 {
        max-width: 85% !important;
        font-size: 16px !important;
        padding: 14px 18px !important; /* Optimized padding */
        line-height: 1.4 !important;
        margin-bottom: 12px !important;
    }
    
    /* Tablet keyboard optimization */
    @supports (-webkit-touch-callout: none) {
        /* iOS Safari specific */
        #chatbotModal {
            max-height: 90vh !important;
        }
        
        #fullChatMessages {
            max-height: 70vh !important;
        }
    }
    
    /* Android tablet keyboard handling */
    @media screen and (max-height: 700px) and (min-width: 768px) and (max-width: 1024px) {
        .fixed[style*="z-index: 500"] {
            align-items: flex-start !important; /* Align to top when keyboard is up */
            padding-top: 20px !important;
        }
        
        #chatbotModal {
            max-height: 80vh !important;
            margin-top: 0 !important;
        }
        
        #fullChatMessages {
            max-height: 50vh !important;
        }
    }
}

/* Tablets Landscape & Small Desktops (1025px - 1440px) */
@media (min-width: 1025px) and (max-width: 1440px) {
    .fixed[style*="z-index: 500"] {
        padding-top: 120px !important; /* Ensure space for header */
        padding-bottom: 40px !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
    
    #chatbotModal {
        width: 600px !important;
        max-width: 85vw !important;
        max-height: calc(100vh - 180px) !important; /* Header-safe height */
        margin: 0 auto !important;
        border-radius: 16px !important;
    }
    
    #fullChatMessages {
        max-height: calc(100vh - 320px) !important; /* Account for header, modal header, and input */
        padding: 20px 24px !important;
        overflow-y: auto !important;
    }
    
    #chatbotModal .border-t {
        padding: 20px 24px !important;
    }
    
    #chatbotModal button[onclick="sendFullMessage()"] {
        min-width: 80px !important;
        font-size: 16px !important;
        padding: 12px 20px !important;
    }
    
    #chatbotModal input {
        font-size: 16px !important;
        padding: 12px 20px !important;
    }
    
    #chatbotModal h3 {
        font-size: 18px !important;
    }
    
    /* Message bubbles for large tablets */
    #fullChatMessages .bg-gray-200,
    #fullChatMessages .bg-blue-500 {
        max-width: 80% !important;
        font-size: 15px !important;
        padding: 12px 16px !important;
        line-height: 1.4 !important;
        margin-bottom: 12px !important;
    }
}

/* Large Desktops (1441px+) */
@media (min-width: 1441px) {
    .fixed[style*="z-index: 500"] {
        padding-top: 120px !important; /* Ensure space for header */
        padding-bottom: 40px !important;
        padding-left: 30px !important;
        padding-right: 30px !important;
    }
    
    #chatbotModal {
        width: 650px !important;
        max-width: 80vw !important;
        max-height: calc(100vh - 180px) !important; /* Header-safe height */
        margin: 0 auto !important;
        border-radius: 20px !important;
    }
    
    #fullChatMessages {
        max-height: calc(100vh - 320px) !important; /* Account for header, modal header, and input */
        padding: 24px 28px !important;
        overflow-y: auto !important;
    }
    
    #chatbotModal .border-t {
        padding: 24px 28px !important;
    }
    
    #chatbotModal button[onclick="sendFullMessage()"] {
        min-width: 90px !important;
        font-size: 16px !important;
        padding: 14px 24px !important;
    }
    
    #chatbotModal input {
        font-size: 16px !important;
        padding: 14px 24px !important;
    }
    
    #chatbotModal h3 {
        font-size: 20px !important;
    }
    
    /* Message bubbles for large desktops */
    #fullChatMessages .bg-gray-200,
    #fullChatMessages .bg-blue-500 {
        max-width: 75% !important;
        font-size: 15px !important;
        padding: 12px 16px !important;
        line-height: 1.4 !important;
        margin-bottom: 12px !important;
    }
}

/* General chatbot modal improvements */
#chatbotModal {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
}

/* Desktop Expanded Chatbot - Prevent Overflow */
@media (min-width: 1024px) {
    /* Ensure expanded chatbot never exceeds viewport */
    .fixed[style*="z-index: 500"] {
        max-height: 100vh !important;
        overflow: hidden !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        top: 0 !important;
        padding-top: 120px !important; /* Add top padding to avoid header */
        padding-bottom: 40px !important; /* Add bottom padding for safety */
    }
    
    /* Constrain modal to always fit viewport minus header space */
    #chatbotModal {
        max-height: calc(100vh - 160px) !important; /* Account for header and padding */
        height: auto !important;
        display: flex !important;
        flex-direction: column !important;
        margin: 0 !important; /* Remove auto margin that might cause positioning issues */
    }
    
    /* Chat messages area should scroll, not expand modal */
    #fullChatMessages {
        flex: 1 !important;
        overflow-y: auto !important;
        min-height: 0 !important; /* Allow shrinking */
        max-height: calc(100vh - 300px) !important; /* Strict height limit */
    }
    
    /* Input area should stay fixed at bottom */
    #chatbotModal .border-t {
        flex-shrink: 0 !important; /* Don't shrink input area */
    }
    
    /* Header should stay fixed at top */
    #chatbotModal > div:first-child {
        flex-shrink: 0 !important; /* Don't shrink header */
    }
}

/* Message bubbles responsive sizing */
@media (max-width: 767px) {
    #fullChatMessages .bg-gray-200,
    #fullChatMessages .bg-blue-500 {
        max-width: 85% !important;
        font-size: 13px !important;
        padding: 8px 12px !important;
    }
}

@media (min-width: 768px) {
    #fullChatMessages .bg-gray-200,
    #fullChatMessages .bg-blue-500 {
        max-width: 80% !important;
        font-size: 14px !important;
        padding: 10px 14px !important;
    }
}

@media (min-width: 1025px) {
    #fullChatMessages .bg-gray-200,
    #fullChatMessages .bg-blue-500 {
        max-width: 75% !important;
        font-size: 15px !important;
        padding: 12px 16px !important;
    }
}

/* Ensure translation button stays accessible on all devices */
.floating-language-switcher {
    z-index: 99999 !important;
    position: fixed !important;
    pointer-events: auto !important;
}

/* Card Chatbot (Mini Chat) Desktop Optimization */
@media (min-width: 1024px) {
    /* Increase mini chat messages area for desktop */
    #miniChatMessages {
        max-height: 120px !important; /* Double the height for desktop */
        min-height: 80px !important;
    }
    
    /* Improve card chatbot text sizing for desktop */
    #miniChatMessages .text-xs {
        font-size: 13px !important;
        line-height: 1.4 !important;
        margin-bottom: 4px !important;
    }
    
    /* Better spacing for card chatbot input on desktop */
    .top-card-container input#chatInput {
        font-size: 13px !important;
        padding: 6px 8px !important;
    }
    
    /* Optimize card chatbot container height for desktop */
    .top-card-container {
        min-height: 260px !important;
    }
}

/* Tablet Expanded Chatbot - Remove White Space */
@media (min-width: 768px) and (max-width: 1024px) {
    /* Override any desktop rules that might interfere */
    .fixed[style*="z-index: 500"] {
        padding-top: 10px !important;
        padding-bottom: 10px !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
        align-items: center !important; /* Center vertically */
        justify-content: center !important; /* Center horizontally */
    }
    
    /* Tablet modal positioning */
    #chatbotModal {
        position: relative !important;
        margin: 0 !important; /* Remove any margin */
        transform: none !important; /* Remove any transforms */
    }
    
    /* Remove any conflicting styles */
    #chatbotModal .border-t {
        margin-bottom: 0 !important;
        padding-bottom: 16px !important; /* Minimal bottom padding */
    }
}

@media (min-width: 1200px) {
    /* Further increase for large desktops */
    #miniChatMessages {
        max-height: 140px !important;
        min-height: 100px !important;
    }
    
    #miniChatMessages .text-xs {
        font-size: 14px !important;
        line-height: 1.5 !important;
    }
    
    .top-card-container input#chatInput {
        font-size: 14px !important;
        padding: 8px 10px !important;
    }
    
    .top-card-container {
        min-height: 280px !important;
    }
}

/* Apply Khand font to homepage content only - avoid conflicts with header */
.homepage-content * {
    font-family: 'Khand', system-ui, sans-serif !important;
}

/* Remove focus outline for all card links */
a:focus,
a:focus-visible,
a:active {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

/* Remove focus outline specifically for card containers */
.top-card-container:focus,
.top-card-container:focus-visible,
.top-card-container:active,
a:focus .top-card-container,
a:focus-visible .top-card-container,
a:active .top-card-container {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

/* Remove focus outline for all card divs */
div[class*="rounded-"]:focus,
div[class*="rounded-"]:focus-visible,
div[class*="rounded-"]:active,
a:focus div[class*="rounded-"],
a:focus-visible div[class*="rounded-"],
a:active div[class*="rounded-"] {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

/* Simple Image Slider - Minimal styles, Tailwind handles container */
.simple-slider {
    position: relative;
    width: 100%;
    height: 70vh;
    min-height: 400px;
    overflow: hidden;
    /* All container styles now handled by Tailwind classes in HTML */
}

.slider-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.slides {
    position: relative;
    width: 100%;
    height: 70vh;
    min-height: 400px;
    overflow: hidden;
    border-radius: 15px;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.slide-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Slide Caption Overlay */
.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.4), transparent);
    color: white;
    padding: 30px 40px 25px;
    z-index: 2;
}

.slide-caption h3 {
    font-family: 'Khand', sans-serif;
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0 0 8px 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.slide-caption p {
    font-family: 'Khand', sans-serif;
    font-size: 1rem;
    margin: 0;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    line-height: 1.4;
}

/* Navigation Arrows */
.slider-navigation {
    position: absolute;
    top: 50%;
    left: 2rem;
    right: 2rem;
    width: auto;
    z-index: 3;
    pointer-events: none;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: var(--police-secondary, #0b72c7);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: all;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.slider-btn:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.slider-prev {
    left: 15px;
}

.slider-next {
    right: 15px;
}

/* Indicators */
.slider-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    z-index: 3;
    flex-wrap: nowrap; /* Prevent wrapping */
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.7);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0; /* Prevent shrinking */
    flex-grow: 0; /* Prevent growing */
    box-sizing: border-box; /* Include border in size calculation */
}

.indicator.active,
.indicator:hover {
    background: white;
    border-color: white;
    transform: scale(1.2);
}

/* Comprehensive Responsive Design for Hero Section */

/* Tablet Landscape (1024px - 1366px) */
@media (min-width: 1024px) and (max-width: 1366px) {
    .simple-slider {
        height: 65vh;
        min-height: 380px;
        width: 92%;
        margin: 0 4%;
    }
    
    .slider-btn {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .slider-prev {
        left: 15px;
    }
    
    .slider-next {
        right: 15px;
    }
    
    .headlines-section {
        width: 92%;
        margin: 15px 4% 0 4%;
    }
}

/* Tablet Portrait & Small Tablet (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .simple-slider {
        height: 55vh;
        min-height: 320px;
        width: 96%;
        margin: 0 2%;
        border-radius: 12px;
    }
    
    .slider-btn {
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }
    
    .slider-prev {
        left: 12px;
    }
    
    .slider-next {
        right: 12px;
    }
    
    .slider-indicators {
        bottom: 15px;
        gap: 8px;
    }
    
    .indicator {
        width: 10px;
        height: 10px;
    }
    
    .headlines-section {
        width: 96%;
        margin: 15px 2% 0 2%;
        border-radius: 12px;
    }
    
    .headline-wrapper {
        min-height: 45px;
    }
    
    .headline-label,
    .headline-controls {
        min-height: 45px;
        padding: 0 15px;
    }
    
    .headline-label {
        font-size: 13px;
        border-radius: 12px 0 0 12px;
    }
    
    .headline-controls {
        border-radius: 0 12px 12px 0;
    }
    
    .headline-content {
        min-height: 45px;
        padding: 0 15px;
    }
}

/* Mobile Large (481px - 767px) */
@media (min-width: 481px) and (max-width: 767px) {
    .simple-slider {
        height: 50vh;
        min-height: 280px;
        width: 98%;
        margin: 0 1%;
        border-radius: 10px;
    }
    
    .slider-btn {
        width: 38px;
        height: 38px;
        font-size: 0.95rem;
    }
    
    .slider-prev {
        left: 8px;
    }
    
    .slider-next {
        right: 8px;
    }
    
    .slider-indicators {
        bottom: 12px;
        gap: 6px;
    }
    
    .indicator {
        width: 9px;
        height: 9px;
        border-width: 1.5px;
    }
    
    .headlines-section {
        width: 98%;
        margin: 12px 1% 0 1%;
        border-radius: 10px;
    }
    
    .headline-wrapper {
        min-height: 42px;
    }
    
    .headline-label,
    .headline-controls {
        min-height: 42px;
        padding: 0 12px;
    }
    
    .headline-label {
        font-size: 12px;
        border-radius: 10px 0 0 10px;
    }
    
    .headline-controls {
        border-radius: 0 10px 10px 0;
    }
    
    .headline-content {
        min-height: 42px;
        padding: 0 12px;
    }
}

/* Mobile Standard (376px - 480px) */
@media (min-width: 376px) and (max-width: 480px) {
    .simple-slider {
        height: 45vh;
        min-height: 250px;
        width: 100%;
        margin: 0;
        border-radius: 8px;
        padding-bottom: 25px; /* Increase padding for indicator space */
        overflow: visible !important; /* Allow indicators to show */
    }
    
    .slides {
        overflow: visible !important; /* Remove overflow hidden that clips indicators */
    }
    
    .slider-btn {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .slider-prev {
        left: 6px;
    }
    
    .slider-next {
        right: 6px;
    }
    
    .slider-indicators {
        bottom: -15px !important; /* Position outside the slides container */
        gap: 5px;
        z-index: 10 !important;
    }
    
    .indicator {
        width: 8px;
        height: 8px;
        border-width: 1px;
    }
    
    .headlines-section {
        width: 100%;
        margin: 10px 0 0 0;
        border-radius: 8px;
    }
    
    .headline-wrapper {
        min-height: 40px;
    }
    
    .headline-label,
    .headline-controls {
        min-height: 40px;
        padding: 0 10px;
    }
    
    .headline-label {
        font-size: 11px;
        border-radius: 8px 0 0 8px;
    }
    
    .headline-controls {
        border-radius: 0 8px 8px 0;
    }
    
    .headline-content {
        min-height: 40px;
        padding: 0 10px;
    }
}

/* Mobile Small (≤375px) */
@media (max-width: 375px) {
    .simple-slider {
        height: 40vh;
        min-height: 220px;
        width: 100%;
        margin: 0;
        border-radius: 6px;
        padding-bottom: 25px; /* Increase padding for indicator space */
        overflow: visible !important; /* Allow indicators to show */
    }
    
    .slides {
        overflow: visible !important; /* Remove overflow hidden that clips indicators */
    }
    
    .slider-btn {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    .slider-prev {
        left: 4px;
    }
    
    .slider-next {
        right: 4px;
    }
    
    .slider-indicators {
        bottom: -15px !important; /* Position outside the slides container */
        gap: 4px;
        z-index: 10 !important;
    }
    
    .indicator {
        width: 7px;
        height: 7px;
        border-width: 1px;
    }
    
    .headlines-section {
        width: 100%;
        margin: 8px 0 0 0;
        border-radius: 6px;
    }
    
    .headline-wrapper {
        min-height: 38px;
    }
    
    .headline-label,
    .headline-controls {
        min-height: 38px;
        padding: 0 8px;
    }
    
    .headline-label {
        font-size: 10px;
        border-radius: 6px 0 0 6px;
    }
    
    .headline-controls {
        border-radius: 0 6px 6px 0;
    }
    
    .headline-content {
        min-height: 38px;
        padding: 0 8px;
    }
}

/* Large Desktop (1367px - 1599px) */
@media (min-width: 1367px) and (max-width: 1599px) {
    .simple-slider {
        height: 75vh;
        min-height: 480px;
        width: 88%;
        margin: 0 6%;
    }
    
    .slider-btn {
        width: 55px;
        height: 55px;
        font-size: 1.3rem;
    }
    
    .slider-prev {
        left: 25px;
    }
    
    .slider-next {
        right: 25px;
    }
    
    .headlines-section {
        width: 88%;
        margin: 20px 6% 0 6%;
    }
}

/* Ultra-Wide Desktop (≥1600px) */
@media (min-width: 1600px) {
    .simple-slider {
        height: 80vh;
        min-height: 550px;
        width: 85%;
        margin: 0 7.5%;
    }
    
    .slider-btn {
        width: 60px;
        height: 60px;
        font-size: 1.4rem;
    }
    
    .slider-prev {
        left: 30px;
    }
    
    .slider-next {
        right: 30px;
    }
    
    .indicator {
        width: 14px;
        height: 14px;
    }
    
    .headlines-section {
        width: 85%;
        margin: 25px 7.5% 0 7.5%;
    }
    
    .headline-wrapper {
        min-height: 55px;
    }
    
    .headline-label,
    .headline-controls {
        min-height: 55px;
        padding: 0 25px;
    }
    
    .headline-label {
        font-size: 15px;
    }
    
    .headline-content {
        min-height: 55px;
        padding: 0 25px;
    }
}

/* Section Headings */
.initiatives-heading {
    font-size: 35px !important;
}

/* Logo and Layout Styles */
#logo-mcp1 {
    width: 30%;
}

#logo-mcp2 {
    width: 70%;
}

.slider-logo {
    border: 2px solid rgb(11, 114, 199) !important;
    border-radius: 7px !important;
}

.motto-text {
    margin-bottom: 30px !important;
}

.headline-container {
    font-size: 18px !important;
}

/* Headlines Section - Minimal styles, let Tailwind handle container */
.headlines-section {
    position: relative;
    /* All container-related styles are now handled by Tailwind classes in HTML */
}

/* Add 85% width red borders on top and bottom with fade effect */
.headlines-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 7.5%; /* Center the 85% border (7.5% margin on each side) */
    width: 85%;
    height: 1px; /* Make it thinner */
    background: linear-gradient(to right, 
        rgba(220, 38, 38, 0), /* Transparent start (0% opacity) */
        rgba(220, 38, 38, 0.7) 15%, /* Fade in to 70% opacity */
        rgba(220, 38, 38, 0.7) 85%, /* Maintain 70% opacity in middle */
        rgba(220, 38, 38, 0) /* Fade out to transparent (0% opacity) */
    );
    z-index: 3;
}

.headlines-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 7.5%; /* Center the 85% border (7.5% margin on each side) */
    width: 85%;
    height: 1px; /* Make it thinner */
    background: linear-gradient(to right, 
        rgba(220, 38, 38, 0), /* Transparent start (0% opacity) */
        rgba(220, 38, 38, 0.7) 15%, /* Fade in to 70% opacity */
        rgba(220, 38, 38, 0.7) 85%, /* Maintain 70% opacity in middle */
        rgba(220, 38, 38, 0) /* Fade out to transparent (0% opacity) */
    );
    z-index: 3;
}

/* Override Bootstrap container-fluid inside headlines section */
.headlines-section .container-fluid {
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
    width: 100% !important;
}

.headline-wrapper {
    display: flex;
    align-items: center;
    min-height: 50px;
    width: 100%;
    overflow: hidden;
    position: relative;
}

.headline-label {
    background: #dc2626;
    color: white;
    padding: 0 20px;
    min-height: 50px;
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    position: relative;
    border-radius: 15px 0 0 15px;
    z-index: 2;
}

/* Extend red background to fill the rounded corner perfectly */
.headline-label::before {
    content: '';
    position: absolute;
    left: -15px;
    top: 0;
    bottom: 0;
    width: 15px;
    background: #dc2626;
    border-radius: 15px 0 0 15px;
}

/* Arrow pointer after the red label */
.headline-label::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid #dc2626;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    z-index: 1;
}

.headline-content {
    flex: 1;
    background: white;
    min-height: 50px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    overflow: hidden;
}

.headline-controls {
    background: #dc2626; /* Change to red background to match headline label */
    padding: 0 15px;
    min-height: 50px;
    display: flex;
    align-items: center;
    border-left: none; /* Remove border */
    border-radius: 0 15px 15px 0; /* Round right corners to match container */
    position: relative;
}

/* Add pseudo-element to fill the right corner completely */
.headline-controls::after {
    content: '';
    position: absolute;
    right: -15px;
    top: 0;
    bottom: 0;
    width: 15px;
    background: #dc2626;
    border-radius: 0 15px 15px 0;
}

.headline-pause-btn {
    background: rgba(255, 255, 255, 0.2); /* Semi-transparent white for contrast */
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white; /* White text for visibility on red background */
    font-size: 14px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    position: relative;
    z-index: 2;
}

.headline-pause-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

.headline-pause-btn:active {
    background: rgba(255, 255, 255, 0.1);
}

.headline-scroll {
    color: #374151;
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    animation: scrollText 20s linear infinite;
    line-height: 1.4;
    display: block;
    transform: translateX(10%);
}

.headline-scroll.paused {
    animation-play-state: paused;
}

@keyframes scrollText {
    0% { transform: translateX(10%); }
    100% { transform: translateX(-100%); }
}

/* Responsive Headlines */
@media (max-width: 768px) {
    .headline-label {
        padding: 0 12px;
        font-size: 12px;
        min-width: 80px;
    }
    
    .headline-content {
        padding: 0 12px;
    }
    
    .headline-controls {
        padding: 0 10px;
    }
    
    .headline-pause-btn {
        font-size: 12px;
        width: 28px;
        height: 28px;
    }
    
    .headline-scroll {
        font-size: 14px;
        animation-duration: 15s;
    }
}

@media (max-width: 480px) {
    .headline-wrapper {
        min-height: 45px;
    }
    
    .headline-label {
        min-height: 45px;
        padding: 0 10px;
        font-size: 11px;
    }
    
    .headline-content {
        min-height: 45px;
        padding: 0 10px;
    }
    
    .headline-controls {
        min-height: 45px;
        padding: 0 8px;
    }
    
    .headline-pause-btn {
        font-size: 11px;
        width: 26px;
        height: 26px;
    }
    
    .headline-scroll {
        font-size: 13px;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-slider {
        padding-top: 40px;
    }
    .container-slider {
        padding-top: 0;
    }
}

@media (max-width: 841px) {
    .responsive-iframe {
        width: 280px;
    }
    
    #logo-mcp {
        width: 60%;
        margin-top: 0;
    }
    .option {
        margin-bottom: 20px;
    }
}

@media (min-width: 1200px) {
    .slider-heading {
        font-size: 30px;
    }
}

@media (max-width: 1024px) {
    .cp-text {
        margin-left: 30px;
    }
}

.container-slider {
    padding-top: 50px;
}

/* Owl Carousel Custom Styles */
.owl-carousel .post-slide {
    background: #fff;
    margin: 10px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.owl-carousel .post-img {
    position: relative;
    overflow: hidden;
}

.owl-carousel .post-img img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.owl-carousel .over-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(36, 128, 206, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.owl-carousel .post-slide:hover .over-layer {
    opacity: 1;
}

.owl-carousel .over-layer i {
    color: white;
    font-size: 24px;
}

.owl-carousel .post-content {
    padding: 20px;
}

.owl-carousel .post-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
    line-height: 1.4;
}

.carousel-image {
    width: 100%;
    object-fit: cover;
}

@media (max-width: 576px) {
    .carousel-image {
        height: 500px;
    }
}

@media (min-width: 577px) and (max-width: 768px) {
    .carousel-image {
        height: 700px;
    }
}

@media (min-width: 769px) and (max-width: 992px) {
    .carousel-image {
        height: 400px;
    }
}

@media (min-width: 993px) and (max-width: 1200px) {
    .carousel-image {
        height: 800px;
    }
}

@media (min-width: 1201px) {
    .carousel-image {
        height: 550px;
    }
}

@media (min-width: 1201px) and (max-width: 1440px) {
    .carousel-image {
        height: 550px;
    }
}

@media (min-width: 1441px) {
    .carousel-image {
        height: 600px;
    }
}

@media (min-width: 1681px) and (max-width: 1920px) {
    .carousel-image {
        height: 700px;
    }
}

@media (min-width: 1921px) {
    .carousel-image {
        height: 900px;
    }
}

.head-border {
    border: 2px solid var(--police-secondary, #0b72c7);
    width: 100px;
    margin: 20px auto;
}

/* Responsive Emergency Button */
@media (max-width: 768px) {
    #callButton {
        bottom: 20px !important;
        right: 20px !important;
        width: 50px !important;
        height: 50px !important;
    }

    #callButton i {
        font-size: 18px !important;
    }

    .popup {
        right: 20px !important;
        bottom: 80px !important;
        min-width: 200px;
        padding: 12px;
    }
}

@media (max-width: 480px) {
    #callButton {
        bottom: 20px !important;
        right: 20px !important;
        width: 45px !important;
        height: 45px !important;
    }

    #callButton i {
        font-size: 16px !important;
    }

    .popup {
        right: 20px !important;
        bottom: 75px !important;
        min-width: 180px;
        padding: 10px;
    }
}

/* Header Styling with Boxed Design and Rounded Corners */
.nagpur-police-header {
    /* background-color: #fff; */
    /* box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); */
    margin: 0;
    width: 100vw;
    border-radius: 0;
    overflow: hidden;
}

.nagpur-police-header .top-bar {
    padding: 10px 20px;
    border-bottom: 1px solid #ddd;
}

.nagpur-police-header .main-header {
    padding: 20px;
}

.nagpur-police-header .logo-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nagpur-police-header .logo-img {
    max-height: 50px; /* Reduced from 60px to 50px */
    border: none !important; /* Explicitly remove any border */
    box-shadow: none !important; /* Remove any box shadow */
    outline: none !important; /* Remove any outline */
    border-radius: 0 !important; /* Remove border radius */
}

/* Header adjustments */
.header {
    width: 100vw;
    margin: 0;
    border-radius: 0;
}

@media (max-width: 768px) {
    .header {
        width: 100%;
        margin: 0;
        border-radius: 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nagpur-police-header {
        max-width: 100%;
        border-radius: 10px;
    }

    .nagpur-police-header .top-bar {
        padding: 8px 15px;
    }

    .nagpur-police-header .main-header {
        padding: 15px;
    }
}

/* Utility class for screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Modern Grid Cards Styles */
:root { 
    --card-radius: 14px;
}

.text-token-sm { 
    font-size: .875rem; 
    line-height: 1.25rem;
}

.text-token-base { 
    font-size: 1rem; 
    line-height: 1.5rem;
}

.text-token-md { 
    font-size: 1.0625rem; 
    line-height: 1.5rem;
}

.text-token-lg { 
    font-size: 1.125rem; 
    line-height: 1.6rem;
}

/* Custom color utilities for the grid */
.text-primary-blue-20 {
    color: #0d348c;
}

.text-primary-blue-30 {
    color: #0d348c;
}

.bg-primary-blue-20 {
    background-color: #0d348c;
}

.bg-secondary-lime-yellow {
    background-color: #F6FF70;
}

.text-natural-gray-40 {
    color: #9CA3AF;
}

/* Background image utilities */
.bg-header4 {
    background-image: url('https://images.unsplash.com/photo-1542273917363-3b1817f69a2d?q=80&w=1200&auto=format&fit=crop');
}

.bg-header7 {
    background-image: url('https://images.unsplash.com/photo-1522071820081-009f0129c71c?q=80&w=800&auto=format&fit=crop');
}

.bg-header8 {
    background-image: url('https://images.unsplash.com/photo-1543286386-713bdd548da4?q=80&w=1200&auto=format&fit=crop');
}

/* Grid card hover effects */
.grid-card-link {
    transition: all 0.3s ease;
}

.grid-card-link:hover {
    transform: translateY(-2px);
}

.grid-card {
    transition: all 0.3s ease;
    border-radius: var(--card-radius);
}

.grid-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Enhanced Grid Cards Responsiveness */

/* Force equal heights for top cards - Enhanced for all devices */
.top-card-container {
    min-height: 200px;
    max-height: 260px;
    transition: all 0.3s ease;
}

/* Mobile Small (≤375px) */
@media (max-width: 375px) {
    .top-card-container {
        min-height: 160px !important;
        max-height: 160px !important;
        height: 160px !important;
    }
    
    /* Grid Cards Section */
    .py-8 {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
    
    .px-4 {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .gap-6 {
        gap: 0.75rem;
    }
    
    .gap-4 {
        gap: 0.5rem;
    }
    
    /* Card text adjustments */
    .font-khand {
        font-size: 0.9rem !important;
    }
    
    .text-token-sm {
        font-size: 0.75rem !important;
    }
}

/* Mobile Standard (376px - 480px) */
@media (min-width: 376px) and (max-width: 480px) {
    .top-card-container {
        min-height: 180px !important;
        max-height: 180px !important;
        height: 180px !important;
    }
    
    .py-8 {
        padding-top: 1.25rem;
        padding-bottom: 1.25rem;
    }
    
    .px-4 {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .gap-6 {
        gap: 1rem;
    }
    
    .gap-4 {
        gap: 0.75rem;
    }
}

/* Mobile Large (481px - 640px) */
@media (min-width: 481px) and (max-width: 640px) {
    .top-card-container {
        min-height: 200px !important;
        max-height: 200px !important;
        height: 200px !important;
    }
    
    .py-8 {
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }
    
    .gap-6 {
        gap: 1.25rem;
    }
}

/* Tablet Small (641px - 767px) */
@media (min-width: 641px) and (max-width: 767px) {
    .top-card-container {
        min-height: 210px;
        max-height: 240px;
        height: 220px !important;
        display: flex !important;
        flex-direction: row !important;
    }
    
    /* Center image in tablet cards */
    .top-card-container img:not([alt="arrow"]) {
        width: 30% !important;
        height: 100% !important;
        object-fit: cover;
        object-position: center center !important;
        border-radius: 15px 0 0 15px;
    }
    
    .top-card-container > div:last-child {
        width: 70% !important;
        padding: 1.25rem;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        border-radius: 0 15px 15px 0;
    }
    
    .py-8 {
        padding-top: 1.75rem;
        padding-bottom: 1.75rem;
    }
}

/* Tablet Standard (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .top-card-container {
        min-height: 220px;
        max-height: 250px;
        height: 235px !important;
        display: flex !important;
        flex-direction: row !important;
    }
    
    /* Center image in tablet cards */
    .top-card-container img:not([alt="arrow"]) {
        width: 30% !important;
        height: 100% !important;
        object-fit: cover;
        object-position: center center !important;
        border-radius: 15px 0 0 15px;
    }
    
    .top-card-container > div:last-child {
        width: 70% !important;
        padding: 1.5rem;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        border-radius: 0 15px 15px 0;
    }
    
    .py-8 {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    /* Ensure proper grid behavior on tablets */
    .grid-cols-1 {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
    
    .sm\\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Tablet Large (1024px - 1199px) */
@media (min-width: 1024px) and (max-width: 1199px) {
    .top-card-container {
        min-height: 230px;
        max-height: 230px;
        height: 230px !important;
        display: flex !important;
        flex-direction: row !important;
    }
    
    /* Center image in tablet cards */
    .top-card-container img:not([alt="arrow"]) {
        width: 30% !important;
        height: 100% !important;
        object-fit: cover;
        object-position: center center !important;
        border-radius: 15px 0 0 15px;
    }
    
    .top-card-container > div:last-child {
        width: 70% !important;
        padding: 1.5rem;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        border-radius: 0 15px 15px 0;
    }
    
    .py-8 {
        padding-top: 2.25rem;
        padding-bottom: 2.25rem;
    }
    
    /* Ensure two-column layout works properly */
    .lg\\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Desktop Standard (1200px - 1439px) */
@media (min-width: 1200px) and (max-width: 1439px) {
    .top-card-container {
        min-height: 240px;
        max-height: 240px;
        height: 240px !important;
        display: flex !important;
        flex-direction: row !important;
    }
    
    /* Center image in desktop cards */
    .top-card-container img:not([alt="arrow"]) {
        width: 30% !important;
        height: 100% !important;
        object-fit: cover;
        object-position: center center !important;
        border-radius: 15px 0 0 15px;
    }
    
    .top-card-container > div:last-child {
        width: 70% !important;
        padding: 1.5rem;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        border-radius: 0 15px 15px 0;
    }
    
    .py-8 {
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
    }
}

/* Desktop Large (1440px - 1599px) */
@media (min-width: 1440px) and (max-width: 1599px) {
    .top-card-container {
        min-height: 250px;
        max-height: 250px;
        height: 250px !important;
        display: flex !important;
        flex-direction: row !important;
    }
    
    /* Center image in desktop cards */
    .top-card-container img:not([alt="arrow"]) {
        width: 30% !important;
        height: 100% !important;
        object-fit: cover;
        object-position: center center !important;
        border-radius: 15px 0 0 15px;
    }
    
    .top-card-container > div:last-child {
        width: 70% !important;
        padding: 1.75rem;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        border-radius: 0 15px 15px 0;
    }
    
    .py-8 {
        padding-top: 2.75rem;
        padding-bottom: 2.75rem;
    }
}

/* Ultra-Wide Desktop (≥1600px) */
@media (min-width: 1600px) {
    .top-card-container {
        min-height: 260px;
        max-height: 260px;
        height: 260px !important;
        display: flex !important;
        flex-direction: row !important;
    }
    
    /* Center image in ultra-wide cards */
    .top-card-container img:not([alt="arrow"]) {
        width: 30% !important;
        height: 100% !important;
        object-fit: cover;
        object-position: center center !important;
        border-radius: 15px 0 0 15px;
    }
    
    .top-card-container > div:last-child {
        width: 70% !important;
        padding: 2rem;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        border-radius: 0 15px 15px 0;
    }
    
    .py-8 {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    
    /* Enhance spacing for ultra-wide screens */
    .gap-6 {
        gap: 2rem;
    }
    
    .gap-4 {
        gap: 1.5rem;
    }
    
    /* Limit maximum container width */
    .max-w-7xl {
        max-width: 80rem;
    }
}

/* Enhanced Card Hover Effects for All Devices */
@media (min-width: 1024px) {
    .top-card-container:hover {
        transform: translateY(-2px);
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    }
    
    /* Non-top cards hover effects */
    .rounded-15px:not(.top-card-container):hover {
        transform: translateY(-1px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
        transition: all 0.3s ease;
    }
}

/* Touch devices - reduce hover effects */
@media (hover: none) and (pointer: coarse) {
    .top-card-container:hover,
    .rounded-15px:hover {
        transform: none;
        box-shadow: initial;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .slide-image,
    .bg-cover {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print Styles */
@media print {
    .simple-slider,
    .headlines-section {
        display: none;
    }
    
    .py-8 {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
}

/* Mobile-specific fixes for card visibility while maintaining ratio */
@media (max-width: 640px) {
    /* Maintain horizontal layout like desktop but remove gaps */
    .top-card-container {
        overflow: visible !important;
        border-radius: 15px;
        display: flex !important;
        flex-direction: row !important; /* Keep horizontal layout */
        gap: 0 !important; /* Remove gap completely */
    }
    
    /* Image maintains 30% width like desktop */
    .top-card-container img:not([alt="arrow"]) {
        height: 100% !important;
        min-height: auto !important;
        max-height: none !important;
        object-fit: cover;
        width: 30% !important; /* Maintain desktop ratio */
        flex-shrink: 0;
        border-radius: 15px 0 0 15px;
    }
    
    /* Text container maintains 70% width like desktop */
    .top-card-container > div:last-child {
        flex: 1;
        width: 70% !important; /* Maintain desktop ratio */
        padding: 0.75rem;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        border-radius: 0 15px 15px 0;
    }
    
    /* Responsive text sizing for mobile - more compact */
    .top-card-container .font-khand {
        font-size: 0.8rem !important;
        line-height: 1.2;
        margin-bottom: 0.25rem !important;
        font-weight: 600;
    }
    
    .top-card-container .text-xs {
        font-size: 0.65rem !important;
        line-height: 1.3;
        margin-bottom: 0.25rem !important;
    }
    
    .top-card-container .text-sm {
        font-size: 0.7rem !important;
        line-height: 1.3;
        margin-bottom: 0.25rem !important;
    }
    
    /* Arrow and Read More positioning */
    .top-card-container img[alt="arrow"] {
        width: 18px !important;
        height: 18px !important;
        min-height: auto !important;
        max-height: auto !important;
        border-radius: 0 !important;
    }
    
    /* Read More text styling */
    .top-card-container .flex.items-center span {
        font-size: 0.65rem !important;
        line-height: 1.3;
        opacity: 0.8;
    }
    
    /* Ensure proper card spacing */
    .flex.flex-col.gap-4 {
        gap: 1rem;
    }
    
    /* Grid section padding */
    section.py-8 {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
}

/* Adjust heights for different mobile sizes while keeping ratio */
@media (max-width: 375px) {
    .top-card-container {
        min-height: 160px !important;
        max-height: 160px !important;
        height: 160px !important;
    }
    
    .top-card-container .font-khand {
        font-size: 0.75rem !important;
    }
    
    .top-card-container .text-xs {
        font-size: 0.6rem !important;
    }
    
    .top-card-container > div:last-child {
        padding: 0.5rem;
    }
    
    .top-card-container img[alt="arrow"] {
        width: 16px !important;
        height: 16px !important;
    }
    
    .top-card-container .flex.items-center span {
        font-size: 0.6rem !important;
    }
}

@media (min-width: 376px) and (max-width: 480px) {
    .top-card-container {
        min-height: 180px !important;
        max-height: 180px !important;
        height: 180px !important;
    }
    
    .top-card-container .font-khand {
        font-size: 0.8rem !important;
    }
    
    .top-card-container .text-xs {
        font-size: 0.65rem !important;
    }
    
    .top-card-container .flex.items-center span {
        font-size: 0.65rem !important;
    }
}

@media (min-width: 481px) and (max-width: 640px) {
    .top-card-container {
        min-height: 200px !important;
        max-height: 200px !important;
        height: 200px !important;
    }
    
    .top-card-container .font-khand {
        font-size: 0.85rem !important;
    }
    
    .top-card-container .text-xs {
        font-size: 0.7rem !important;
    }
    
    .top-card-container .flex.items-center span {
        font-size: 0.7rem !important;
    }
}

/* Adjust heights for different mobile sizes while keeping ratio */
@media (max-width: 375px) {
    .top-card-container {
        min-height: 160px !important;
        max-height: none !important;
        height: 160px !important;
    }
    
    .top-card-container .font-khand {
        font-size: 0.8rem !important;
    }
    
    .top-card-container .text-token-sm {
        font-size: 0.7rem !important;
    }
    
    .top-card-container > div:last-child {
        padding: 0.75rem;
    }
    
    .top-card-container img[alt="arrow"] {
        width: 18px !important;
        height: 18px !important;
    }
}

@media (min-width: 376px) and (max-width: 480px) {
    .top-card-container {
        min-height: 180px !important;
        max-height: none !important;
        height: 180px !important;
    }
    
    .top-card-container .font-khand {
        font-size: 0.85rem !important;
    }
    
    .top-card-container .text-token-sm {
        font-size: 0.72rem !important;
    }
}

@media (min-width: 481px) and (max-width: 640px) {
    .top-card-container {
        min-height: 200px !important;
        max-height: none !important;
        height: 200px !important;
    }
    
    .top-card-container .font-khand {
        font-size: 0.9rem !important;
    }
    
    .top-card-container .text-token-sm {
        font-size: 0.75rem !important;
    }
}

/* Chatbot Mobile Responsiveness */
@media (max-width: 480px) {
    /* Mini chatbot interface */
    #miniChatMessages {
        max-height: 50px !important;
        font-size: 10px !important;
        line-height: 1.2 !important;
    }
    
    /* Input field adjustments */
    #chatInput {
        font-size: 10px !important;
        padding: 4px 6px !important;
    }
    
    /* Button size adjustments */
    .top-card-container button {
        min-width: 20px !important;
        min-height: 20px !important;
    }
}

@media (max-width: 375px) {
    /* Extra small screens (iPhone SE, etc.) */
    .top-card-container {
        padding: 0.5rem !important;
    }
    
    /* Further reduce chatbot text size */
    #miniChatMessages {
        max-height: 45px !important;
        font-size: 9px !important;
    }
    
    #chatInput {
        font-size: 9px !important;
        padding: 3px 5px !important;
    }
    
    /* Smaller buttons */
    .top-card-container button {
        min-width: 18px !important;
        min-height: 18px !important;
    }
    
    .top-card-container svg {
        width: 8px !important;
        height: 8px !important;
    }
}

/* Tablet responsiveness for chatbot */
@media (min-width: 768px) and (max-width: 1024px) {
    #miniChatMessages {
        max-height: 70px !important;
    }
    
    .fixed .bg-white {
        max-width: 400px !important;
        height: 500px !important;
    }
}

/* Card-specific layout fixes */
/* CP Desk Card - enforce exactly 50% image / 50% text */
.top-card-container:has(img[alt*="CP"]) img,
.top-card-container:has(img[src*="CpSir"]) img,
.top-card-container:has(img[src*="cpDesk"]) img,
.top-card-container:has(img[alt*="Commissioner"]) img {
    width: 50% !important;
    flex: 0 0 50% !important;
    max-width: 50% !important;
    min-width: 50% !important;
}

.top-card-container:has(img[alt*="CP"]) > div:last-child,
.top-card-container:has(img[src*="CpSir"]) > div:last-child,
.top-card-container:has(img[src*="cpDesk"]) > div:last-child,
.top-card-container:has(img[alt*="Commissioner"]) > div:last-child {
    width: 50% !important;
    flex: 0 0 50% !important;
    max-width: 50% !important;
    min-width: 50% !important;
}

/* Police Dada AI Card - enforce exactly 25% image / 75% text */
.top-card-container:has(img[src="/images/police-dada.png"]) img {
    width: 25% !important;
    flex: 0 0 25% !important;
    max-width: 25% !important;
    min-width: 25% !important;
    transform: scale(1.45) !important;
    margin: auto !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    background: transparent !important;
    object-fit: contain !important;
    overflow: visible !important;
    clip: none !important;
    clip-path: none !important;
}

.top-card-container:has(img[src="/images/police-dada.png"]) {
    overflow: visible !important;
}

.top-card-container:has(img[src="/images/police-dada.png"]) > div:last-child {
    width: 75% !important;
    flex: 0 0 75% !important;
    max-width: 75% !important;
    min-width: 75% !important;
}

/* Initiatives Section Styles */
.shadow-soft {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.text-Natural-Gray-20 {
    color: #1f2937;
}

.text-Natural-Gray-40 {
    color: #6b7280;
}

.text-Natural-Gray-100 {
    color: #ffffff;
}

.bg-Primary-Blue-30 {
    background-color: #0d348c;
}

.text-p3ExtraLightInter {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
}

.text-h6RegularKhand {
    font-family: 'Khand', sans-serif;
    font-weight: 400;
}

.text-white\/85 {
    color: rgba(255, 255, 255, 0.85);
}

.text-white\/80 {
    color: rgba(255, 255, 255, 0.8);
}

/* Initiatives Section Styles */
.font-inter {
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
}

.font-khand {
    font-family: 'Khand', ui-sans-serif, system-ui, sans-serif;
}

.text-Natural-Gray-20 {
    color: #1f2937;
}

.text-Natural-Gray-40 {
    color: #6b7280;
}

.text-Natural-Gray-100 {
    color: #ffffff;
}

.bg-Primary-Blue-30 {
    background-color: #0d348c;
}

.shadow-soft {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.xl\:w-\[1280px\] {
    width: 1280px;
}

.xl\:p-\[100px\] {
    padding: 100px;
}

.md\:w-\[768px\] {
    width: 768px;
}

.py-\[50px\] {
    padding-top: 50px;
    padding-bottom: 50px;
}

.px-\[28px\] {
    padding-left: 28px;
    padding-right: 28px;
}

.pb-\[12px\] {
    padding-bottom: 12px;
}

.pt-\[14px\] {
    padding-top: 14px;
}

.rounded-\[10px\] {
    border-radius: 10px;
}

.text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
}

.text-6xl {
    font-size: 3.75rem;
    line-height: 1;
}

.xl\:text-7xl {
    font-size: 4.5rem;
    line-height: 1;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.xl\:text-h6RegularKhand {
    font-size: 1.25rem;
    line-height: 1.6;
}

.text-p3ExtraLightInter {
    font-size: 0.875rem;
    line-height: 1.5;
}

@media (max-width: 1279px) {
    .xl\:w-\[1280px\] {
        width: 100%;
    }
    
    .xl\:p-\[100px\] {
        padding: 50px 1rem;
    }
    
    .xl\:text-7xl {
        font-size: 3rem;
        line-height: 1.1;
    }
}

@media (max-width: 767px) {
    .md\:w-\[768px\] {
        width: 100%;
    }
    
    .md\:text-6xl {
        font-size: 2.5rem;
        line-height: 1.1;
    }
    
    .md\:text-xl {
        font-size: 1.125rem;
        line-height: 1.75rem;
    }
}

/* Custom gallery styles */
.text-p3ExtraLightInter { 
    font-family: Inter, ui-sans-serif, system-ui, sans-serif; 
    font-size: 14px; 
    font-weight: 300; 
}

.leading-p3ExtraLightInter { 
    line-height: 1.5; 
}

.text-Natural-Gray-100 {
    color: #64748b;
}

/* Gallery masonry layout adjustments */
.gallery-masonry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

@media (min-width: 768px) {
    .gallery-masonry-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1280px) {
    .gallery-masonry-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Gallery card hover effects */
.gallery-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.gallery-image {
    transition: transform 0.3s ease;
}

.gallery-card:hover .gallery-image {
    transform: scale(1.02);
}

/* CP Desk Popup Z-Index Fix - Absolute maximum z-index with all overrides */
#cpMessagePopup {
    z-index: 2147483647 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
}

#cpMessagePopup * {
    z-index: inherit !important;
}

#cpMessagePopup > div {
    z-index: 2147483647 !important;
    position: relative !important;
}

#closeCpPopup {
    z-index: 2147483647 !important;
    position: absolute !important;
}

/* Ensure popup backdrop is also properly layered */
.fixed.inset-0.bg-black.bg-opacity-50 {
    z-index: 2147483647 !important;
}

/* Override any parent z-index that might interfere */
body #cpMessagePopup {
    z-index: 2147483647 !important;
}

html #cpMessagePopup {
    z-index: 2147483647 !important;
}

/* Force all other elements to lower z-index */
section, .relative {
    z-index: 1 !important;
}

/* Ensure no other element can override popup */
* {
    position: relative;
}

#cpMessagePopup {
    position: fixed !important;
    z-index: 2147483647 !important;
}

/* Simple Card Layout Rules - Mobile First Approach */

/* Default: Most cards remain horizontal on mobile except CP Desk */
.top-card-container {
    display: flex !important;
    flex-direction: row !important;
    height: auto !important;
    min-height: 200px !important;
}

.top-card-container img {
    height: 200px !important;
    object-fit: cover !important;
}

.top-card-container > div:last-child {
    padding: 1rem !important;
    min-height: 200px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
}

/* Police Dada Card - Always maintain 25% image / 75% text ratio on ALL screen sizes */
.top-card-container img[src*="police-dada"] {
    width: 25% !important;
    min-height: 200px !important;
}

.top-card-container:has(img[src*="police-dada"]) > div:last-child {
    width: 75% !important;
}

/* Ensure both CP Desk and Police Dada cards have consistent height even when images fail to load */
.top-card-container {
    min-height: 220px !important;
}

@media (min-width: 640px) {
    .top-card-container {
        min-height: 220px !important;
    }
}

@media (min-width: 768px) {
    .top-card-container {
        min-height: 240px !important;
    }
}

@media (min-width: 1024px) {
    .top-card-container {
        min-height: 250px !important;
    }
}

@media (min-width: 1280px) {
    .top-card-container {
        min-height: 260px !important;
    }
}

/* Handle missing or failed to load images for CP Desk */
.top-card-container:not(:has(img[src*="police-dada"])) img {
    min-height: 220px !important;
}

@media (min-width: 640px) {
    .top-card-container:not(:has(img[src*="police-dada"])) img {
        min-height: 220px !important;
    }
}

@media (min-width: 768px) {
    .top-card-container:not(:has(img[src*="police-dada"])) img {
        min-height: 240px !important;
    }
}

@media (min-width: 1024px) {
    .top-card-container:not(:has(img[src*="police-dada"])) img {
        min-height: 250px !important;
    }
}

@media (min-width: 1280px) {
    .top-card-container:not(:has(img[src*="police-dada"])) img {
        min-height: 260px !important;
    }
}

/* Fallback placeholder styling for CP Desk when image fails to load */
.top-card-container:not(:has(img[src*="police-dada"])) > div:first-child {
    min-height: 220px !important;
}

@media (min-width: 640px) {
    .top-card-container:not(:has(img[src*="police-dada"])) > div:first-child {
        min-height: 220px !important;
    }
}

@media (min-width: 768px) {
    .top-card-container:not(:has(img[src*="police-dada"])) > div:first-child {
        min-height: 240px !important;
    }
}

@media (min-width: 1024px) {
    .top-card-container:not(:has(img[src*="police-dada"])) > div:first-child {
        min-height: 250px !important;
    }
}

@media (min-width: 1280px) {
    .top-card-container:not(:has(img[src*="police-dada"])) > div:first-child {
        min-height: 260px !important;
    }
}

/* CP Desk Card - Stack vertically on mobile ONLY (target by content, not background color) */
@media (max-width: 639px) {
    /* Target CP Desk specifically by image src */
    .top-card-container:not(:has(img[src*="police-dada"])) {
        flex-direction: column !important;
    }
    
    .top-card-container:not(:has(img[src*="police-dada"])) img {
        width: 100% !important;
        height: 200px !important;
    }
    
    .top-card-container:not(:has(img[src*="police-dada"])) > div:last-child {
        width: 100% !important;
    }
}

/* Desktop Layout: Cards optimization */
@media (min-width: 640px) {
    .top-card-container {
        min-height: 220px !important;
    }
    
    .top-card-container img {
        height: auto !important;
        min-height: 220px !important;
    }
    
    .top-card-container > div:last-child {
        min-height: 220px !important;
        padding: 1.5rem !important;
    }
    
    /* CP Desk Card - 50% image, 50% text (exclude Police Dada) */
    .top-card-container:not(:has(img[src*="police-dada"])) img {
        width: 50% !important;
    }
    
    .top-card-container:not(:has(img[src*="police-dada"])) > div:last-child {
        width: 50% !important;
    }
}

/* Mobile specific fixes for CP Desk text visibility ONLY - exclude Police Dada */
@media (max-width: 639px) {
    /* Ensure ONLY CP Desk text is visible on mobile - target specifically NOT Police Dada */
    .top-card-container:not(:has(img[src*="police-dada"])) {
        flex-direction: column !important;
        min-height: auto !important;
        border-radius: 15px !important;
        overflow: hidden !important;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
    }
    
    .top-card-container:not(:has(img[src*="police-dada"])) img {
        width: 100% !important;
        height: 200px !important;
        flex-shrink: 0 !important;
        object-fit: cover !important;
        border-radius: 0 !important;
    }
    
    .top-card-container:not(:has(img[src*="police-dada"])) > div:last-child {
        width: 100% !important;
        padding: 20px !important;
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        min-height: 160px !important;
        /* Remove gradient - keep original background color */
        background-color: var(--police-secondary, #0b72c7) !important;
        border-radius: 0 !important;
    }
    
    /* Ensure all text is visible in mobile with better styling - CP Desk ONLY (not Police Dada) */
    .top-card-container:not(:has(img[src*="police-dada"])) h5 {
        color: white !important;
        visibility: visible !important;
        opacity: 1 !important;
        font-size: 18px !important;
        font-weight: 600 !important;
        line-height: 1.4 !important;
        margin-bottom: 12px !important;
    }
    
    .top-card-container:not(:has(img[src*="police-dada"])) p {
        color: rgba(255, 255, 255, 0.95) !important;
        visibility: visible !important;
        opacity: 1 !important;
        font-size: 14px !important;
        line-height: 1.5 !important;
        margin-bottom: 15px !important;
        flex-grow: 1 !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 4 !important;
        line-clamp: 4 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }
    
    .top-card-container:not(:has(img[src*="police-dada"])) span {
        color: white !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* Override any conflicting z-index and ensure proper layering */
.chatbot-modal,
.mini-chatbot,
.translation-popup {
    z-index: 500 !important;
}

/* Ensure cards don't interfere with popup */
.top-card-container {
    position: relative !important;
    z-index: 1 !important;
}

/* CP Desk Read More Button - Ensure it's clickable */
#cpMessageArrow {
    cursor: pointer !important;
    pointer-events: auto !important;
    position: relative !important;
    z-index: 10 !important;
}

#cpMessageArrow:hover {
    transform: scale(1.1) !important;
}

/* Scrolling Ticker Animation - JavaScript Controlled */
.ticker-wrapper {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    width: 100%;
    height: auto;
    display: block;
    opacity: 1;
    visibility: visible;
}

.ticker-content {
    display: inline-flex;
    will-change: transform;
    /* Immediate visibility with no animation delay */
    transform: translateX(0);
    white-space: nowrap;
    width: auto;
    opacity: 1;
    visibility: visible;
}

.ticker-item {
    flex-shrink: 0;
    margin-right: 24px;
    display: inline-block;
    vertical-align: top;
    opacity: 1;
    visibility: visible;
}

/* Responsive spacing */
@media (max-width: 768px) {
    .ticker-item {
        margin-right: 16px;
    }
}

@media (max-width: 480px) {
    
    .ticker-item {
        margin-right: 12px;
    }
}

/* Hero Slider Mobile Responsiveness */
@media (max-width: 768px) {
    .slider-section {
        padding-top: 90px !important; /* Increase top padding to clear mobile header */
    }
    
    .simple-slider {
        padding-bottom: 20px !important; /* Ensure space for indicators */
        overflow: visible !important; /* Allow indicators to show */
    }
    
    .slides {
        height: 50vh !important;
        min-height: 300px !important;
        border-radius: 10px !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: visible !important; /* Allow indicators to show outside slides container */
    }
    
    .slider-section .px-4 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    .slider-navigation .nav-btn {
        width: 40px !important;
        height: 40px !important;
        font-size: 16px !important;
    }
    
    .slider-navigation .nav-btn.prev {
        left: 10px !important;
    }
    
    .slider-navigation .nav-btn.next {
        right: 10px !important;
    }
    
    .slider-indicators {
        bottom: -10px !important; /* Position indicators outside the slides container */
        z-index: 10 !important;
    }
}

@media (max-width: 480px) {
    .slider-section {
        padding-top: 80px !important; /* Proper spacing for mobile header */
    }
    
    .simple-slider {
        overflow: visible !important; /* Allow indicators to show */
    }
    
    .slides {
        height: 40vh !important;
        min-height: 250px !important;
        border-radius: 8px !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: visible !important; /* Remove overflow hidden that clips indicators */
    }
    
    .slider-section .px-4 {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
    
    .slider-navigation .nav-btn {
        width: 35px !important;
        height: 35px !important;
        font-size: 14px !important;
    }
    
    .slider-navigation .nav-btn.prev {
        left: 5px !important;
    }
    
    .slider-navigation .nav-btn.next {
        right: 5px !important;
    }
    
    .slider-indicators {
        bottom: -15px !important; /* Position outside the slides container */
        z-index: 10 !important;
    }
}

