/* ========================================
   STQC-Style Hero Slider CSS - W3C Validated
   Enhanced with Comprehensive Screen Reader Accessibility
   ======================================== */

/* STQC-Style Hero Slider - Full Width Clean Government Website Design */
.stqc-hero-section {
    position: relative;
    width: 100%;
    background: #ffffff;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: none;
}

.stqc-slider-container {
    width: 100%;
    margin: 0;
    position: relative;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.stqc-slider {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

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

.stqc-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #ffffff;
    visibility: hidden;
    transform: translateX(100%);
    will-change: transform, opacity;
}

.stqc-slide.active {
    opacity: 1;
    z-index: 1;
    visibility: visible;
    transform: translateX(0);
}

.stqc-slide.prev {
    transform: translateX(-100%);
    opacity: 0;
    z-index: 0;
}

.stqc-slide.next {
    transform: translateX(100%);
    opacity: 0;
    z-index: 0;
}

/* Smooth slide transitions with animation-play-state support */
.stqc-slide.auto-transition {
    animation: slideTransition 6s ease-in-out;
}

.stqc-slide.auto-transition.paused {
    animation-play-state: paused;
}

@keyframes slideTransition {
    0% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(-100%);
        opacity: 0;
    }
}

.stqc-slide-image {
    width: 100%;
    height: 100%;
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    margin: 0;
    padding: 0;
    border: none;
    outline: none;
    object-fit: cover;
    object-position: center center;
    min-width: 100%;
    min-height: 100%;
}

/* Smart image display control */
.stqc-slide-image.wide-banner {
    object-fit: cover;
    object-position: center center;
}

.stqc-slide-image.regular-image {
    object-fit: cover;
    object-position: center center;
}

.stqc-slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 2rem;
    text-align: left;
    z-index: 10;
}

.stqc-slide-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.stqc-slide-description {
    font-size: 1rem;
    margin: 0;
    line-height: 1.5;
    color: rgba(255,255,255,0.9);
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.stqc-slide-link {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.2);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.stqc-slide-link:hover,
.stqc-slide-link:focus {
    background: rgba(255,255,255,0.3);
    outline: 2px solid white;
    outline-offset: 2px;
}

/* STQC-Style Navigation Dots */
.stqc-slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
    background: rgba(0,0,0,0.3);
    padding: 8px 12px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
    list-style: none;
    margin: 0;
}

.stqc-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.5);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    margin: 0;
}

.stqc-dot:hover,
.stqc-dot:focus {
    border-color: white;
    background: rgba(255,255,255,0.3);
    outline: none;
}

.stqc-dot.active {
    background: white;
    border-color: white;
}

/* Navigation Arrows (Hidden by default like STQC) */
.stqc-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10;
}

.stqc-prev {
    left: 20px;
}

.stqc-next {
    right: 20px;
}

.stqc-slider:hover .stqc-nav {
    opacity: 1;
}

.stqc-nav:hover,
.stqc-nav:focus {
    background: rgba(0,0,0,0.8);
    outline: 2px solid white;
    outline-offset: 2px;
}

/* Play/Pause Button - Always Visible for Accessibility */
.stqc-play-pause {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0,0,0,0.7);
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: all 0.3s ease;
    z-index: 10;
    backdrop-filter: blur(5px);
}

.stqc-play-pause:hover,
.stqc-play-pause:focus {
    background: rgba(0,0,0,0.9);
    border-color: white;
    outline: 2px solid white;
    outline-offset: 2px;
    transform: scale(1.05);
}

.stqc-play-pause:active {
    transform: scale(0.95);
}

.stqc-pause-icon,
.stqc-play-icon {
    font-size: 18px;
    line-height: 1;
}

/* Screen reader support */
.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;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 1000;
    border-radius: 4px;
}

.skip-link:focus {
    top: 6px;
}

/* Enhanced Accessibility Features */

/* High contrast mode support */
@media (prefers-contrast: more) {
    .stqc-slide-content {
        background: linear-gradient(transparent, rgba(0,0,0,0.95));
    }
    
    .stqc-slide-title {
        color: #ffffff;
        text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    }
    
    .stqc-slide-description {
        color: #ffffff;
        text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    }
    
    .stqc-nav,
    .stqc-play-pause {
        background: rgba(0,0,0,0.9);
        border: 3px solid #ffffff;
    }
    
    .stqc-dot {
        border: 3px solid rgba(255,255,255,0.8);
    }
    
    .stqc-dot.active {
        background: #ffffff;
        border-color: #ffffff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .stqc-slide {
        transition: none;
    }
    
    .stqc-slide.auto-transition {
        animation: none;
    }
    
    .stqc-nav,
    .stqc-play-pause,
    .stqc-dot {
        transition: none;
    }
    
    .stqc-play-pause:hover,
    .stqc-play-pause:focus {
        transform: none;
    }
}

/* Focus indicators for keyboard navigation */
.stqc-nav:focus-visible,
.stqc-play-pause:focus-visible,
.stqc-dot:focus-visible,
.stqc-slide-link:focus-visible {
    outline: 3px solid #007cba;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.3);
}

/* ARIA live regions for screen readers */
.stqc-slider[aria-live] {
    position: relative;
}

/* Enhanced button accessibility */
.stqc-nav[aria-label]:focus::after,
.stqc-play-pause[aria-label]:focus::after {
    content: attr(aria-label);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
}

/* Tab navigation improvements */
.stqc-nav:focus,
.stqc-play-pause:focus,
.stqc-dot:focus {
    opacity: 1 !important;
}

/* Screen reader announcement styles */
.stqc-slider-announcement {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Enhanced semantic structure */
.stqc-slide[role="option"] {
    outline: none;
}

.stqc-slide[role="option"]:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Improved color contrast for better accessibility */
.stqc-slide-link {
    background: rgba(255,255,255,0.25);
    color: #ffffff;
    font-weight: 600;
}

.stqc-slide-link:hover,
.stqc-slide-link:focus {
    background: rgba(255,255,255,0.4);
    color: #ffffff;
}

/* Responsive design */
@media (max-width: 1024px) and (min-width: 769px) {
    .stqc-slider {
        height: 450px;
    }
    
    .stqc-slide-title {
        font-size: 1.6rem;
    }
    
    .stqc-slide-description {
        font-size: 0.95rem;
    }
    
    .stqc-play-pause {
        width: 48px;
        height: 48px;
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    .stqc-hero-section {
        margin-top: 0;
        padding-top: 0;
    }
    
    .static-hero,
    .critical-news-ticker-container,
    .tcl-ticker-container {
        margin-top: 0;
        padding-top: 0;
    }
    
    .tcl-ticker-list {
        margin-top: 0;
    }
    
    .stqc-slider-container {
        margin-top: 0;
        padding-top: 0;
    }
    
    .stqc-slider {
        height: 400px;
        min-height: 400px;
        max-height: 600px;
    }
    
    .stqc-slider-wrapper {
        height: 100%;
    }
    
    .stqc-slide {
        height: 100%;
        min-height: 400px;
        max-height: 600px;
    }
    
    .stqc-slide-image {
        height: 100%;
        min-height: 400px;
        max-height: 600px;
    }
    
    .stqc-slide-content {
        padding: 1.5rem;
        bottom: 0;
    }
    
    .stqc-slide-title {
        font-size: 1.4rem;
        margin-bottom: 0.5rem;
    }
    
    .stqc-slide-description {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .stqc-nav {
        width: 36px;
        height: 36px;
        font-size: 16px;
        opacity: 1;
    }
    
    .stqc-nav:hover {
        background: rgba(0,0,0,0.8);
    }
    
    .stqc-prev {
        left: 10px;
    }
    
    .stqc-next {
        right: 10px;
    }
    
    .stqc-slider-dots {
        bottom: 15px;
        padding: 6px 10px;
        gap: 6px;
    }
    
    .stqc-dot {
        width: 10px;
        height: 10px;
    }
    
    .stqc-dot.active {
        background: white;
    }
    
    .stqc-slide {
        height: 100vh;
        min-height: 400px;
        max-height: 600px;
    }
    
    .stqc-slide.active {
        height: 100vh;
        min-height: 400px;
        max-height: 600px;
    }
    
    .stqc-slide-image {
        height: 100vh;
        min-height: 400px;
        max-height: 600px;
    }
    
    .stqc-slide:nth-child(1) {
        background-color: #1a1a1a;
    }
    
    .stqc-slide:nth-child(2) {
        background-color: #2a2a2a;
    }
    
    .stqc-slide:nth-child(3) {
        background-color: #3a3a3a;
    }
    
    .stqc-slide:nth-child(4) {
        background-color: #4a4a4a;
    }
    
    .stqc-slide.active {
        background-color: #000;
        height: 100vh;
        min-height: 400px;
        max-height: 600px;
    }
    
    .stqc-hero-section::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, transparent 50%, rgba(0,0,0,0.3) 100%);
        z-index: 5;
        pointer-events: none;
    }
    
    body {
        margin-top: 0;
    }
    
    header,
    .tcl-navigation {
        margin-top: 0;
    }
    
    #main-content,
    .main-content {
        margin-top: 0;
        padding-top: 0;
    }
    
    .tcl-navigation + .stqc-hero-section,
    header + .stqc-hero-section {
        margin-top: 0;
    }
    
    .static-hero,
    .critical-news-ticker-container,
    .tcl-ticker-container {
        margin-top: 0;
        padding-top: 0;
    }
    
    .tcl-ticker-list {
        margin-top: 0;
    }
    
    .stqc-hero-section {
        margin-top: 0;
        padding-top: 0;
        height: 100vh;
        min-height: 400px;
        max-height: 600px;
    }
    
    #dynamic-hero {
        margin-top: 0;
    }
    
    #hero-container,
    .hero-container {
        margin-top: 0;
        padding-top: 0;
    }
    
    /* Mobile play/pause button */
    .stqc-play-pause {
        width: 40px;
        height: 40px;
        font-size: 14px;
        bottom: 15px;
        right: 15px;
    }
    
    .stqc-pause-icon,
    .stqc-play-icon {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .stqc-hero-section {
        height: 100vh;
        min-height: 350px;
        max-height: 500px;
    }
    
    .stqc-slider {
        height: 350px;
        min-height: 350px;
        max-height: 500px;
    }
    
    .stqc-slide-content {
        padding: 1rem;
        bottom: 0;
    }
    
    .stqc-slide-title {
        font-size: 1.2rem;
        margin-bottom: 0.25rem;
    }
    
    .stqc-slide-description {
        font-size: 0.85rem;
        margin-bottom: 0.25rem;
    }
    
    .stqc-nav {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .stqc-prev {
        left: 8px;
    }
    
    .stqc-next {
        right: 8px;
    }
    
    .stqc-slider-dots {
        bottom: 10px;
        padding: 4px 8px;
        gap: 4px;
    }
    
    .stqc-dot {
        width: 8px;
        height: 8px;
    }
    
    .stqc-slide {
        height: 100vh;
        min-height: 350px;
        max-height: 500px;
    }
    
    .stqc-slide.active {
        height: 100vh;
        min-height: 350px;
        max-height: 500px;
    }
    
    .stqc-slide-image {
        height: 100vh;
        min-height: 350px;
        max-height: 500px;
    }
    
    .static-hero,
    .critical-news-ticker-container,
    .tcl-ticker-container {
        margin-top: 0;
        padding-top: 0;
    }
    
    .tcl-ticker-list {
        margin-top: 0;
    }
    
    .stqc-hero-section {
        margin-top: 0;
        padding-top: 0;
        height: 100vh;
        min-height: 350px;
        max-height: 500px;
    }
    
    /* Small mobile play/pause button */
    .stqc-play-pause {
        width: 36px;
        height: 36px;
        font-size: 12px;
        bottom: 10px;
        right: 10px;
    }
    
    .stqc-pause-icon,
    .stqc-play-icon {
        font-size: 14px;
    }
}

/* Language-specific typography adjustments */
.stqc-slide-title[lang="hi"],
.stqc-slide-description[lang="hi"] {
    font-family: 'Noto Sans Devanagari', 'Arial Unicode MS', sans-serif;
    line-height: 1.6;
}

/* Force full width and remove any container constraints */
.stqc-hero-section,
.stqc-slider-container,
.stqc-slider {
    max-width: none !important;
    width: 100% !important;
}

.stqc-slide[style*="background-image"] {
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}

.stqc-slide[style*="background-image"]:not([style*="background-size"]) {
    background-size: contain !important;
    background-color: #f8f9fa !important;
}

.stqc-slide[style*="background-image"] .stqc-slide-image {
    display: none !important;
}

.stqc-fallback-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
}

.stqc-fallback-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #333;
} 