/* ======================================================
   CUSTOM BOOTSTRAP CAROUSEL (FIXED HEIGHT: 350PX)
====================================================== */

/* Carousel container height */
.carousel {
    height: 380px;
    overflow: hidden;
    position: relative;
}

/* Carousel images auto-fit perfectly within 350px */
.carousel-item img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    /* Ensures full coverage without stretching */
    object-position: center;
}

/* ===========================
   Carousel Indicators (bottom-right)
=========================== */
.carousel-indicators {
    position: absolute;
    bottom: 10px;
    right: 20px;
    left: auto;
    justify-content: flex-end;
    margin: 0;
    z-index: 10;
}

.carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.6);
    border: 1px solid #fff;
    transition: all 0.3s ease;
}

.carousel-indicators .active {
    background-color: #33b71c;
    width: 12px;
    height: 12px;
}

/* ===========================
   Carousel Captions — CENTER BOTTOM
=========================== */
.carousel-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.4);
    padding: 15px 20px;
    border-radius: 8px;
    text-align: center;
    width: auto;
    max-width: 70%;
}

.carousel-caption h5 {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 5px;
}

.carousel-caption p {
    font-size: 1rem;
    color: #f0f0f0;
}

/* Dark mode captions */
body.dark-mode .carousel-caption {
    background: rgba(255, 255, 255, 0.2);
}

body.dark-mode .carousel-caption h5,
body.dark-mode .carousel-caption p {
    color: #fff;
}

/* ===========================
   Hover Navigation Zones (20%) — Fixed & Styled
=========================== */
.carousel-control-prev,
.carousel-control-next {
    width: 50%;
    height: 100%;
    top: 0;
    background: transparent;
    opacity: 1;
    z-index: 9;
    border: none;
}

/* Custom visible arrow buttons */
.carousel-control-prev span,
.carousel-control-next span {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.4s ease;
}

/* Show arrows when hovering over side zones */
.carousel-control-prev:hover span,
.carousel-control-next:hover span {
    opacity: 1;
    visibility: visible;
    transform: scale(1.1);
}

/* Subtle overlay on side hover zones */
.carousel-control-prev:hover,
.carousel-control-next:hover {
    background: rgba(0, 0, 0, 0.15);
}

/* Arrow positioning */
.carousel-control-prev span {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.carousel-control-next span {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

/* Dark mode for arrows */
body.dark-mode .carousel-control-prev span,
body.dark-mode .carousel-control-next span {
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
}

/* ===========================
   Responsive Adjustments
=========================== */
@media (max-width: 992px) {
    .carousel {
        height: 300px;
    }

    .carousel-item img {
        height: 300px;
    }

    .carousel-caption {
        max-width: 80%;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .carousel {
        height: 250px;
    }

    .carousel-item img {
        height: 250px;
    }

    .carousel-caption {
        max-width: 90%;
        font-size: 0.85rem;
        left: 50%;
        transform: translateX(-50%);
        padding: 10px 15px;
    }

    .carousel-control-prev span,
    .carousel-control-next span {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}



/* Ministry/Department Welcome Section */
.grampanchayt-info-section {
    background: #000;
    color: #fff;
    padding: 32px 28px;
    /* border-radius: 8px; */
    /* margin-top: 32px; */
}

.info-title {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.info-description {
    font-size: 1.1rem;
    margin-bottom: 6px;
    letter-spacing: 0.2px;
    position: relative;
    padding-bottom: 6px;
}

.info-underline {
    display: block;
    width: 60px;
    height: 4px;
    background: #17b66e;
    margin: 8px 0 0 0;
}

.info-body {
    font-size: 1rem;
    color: #eee;
    margin-bottom: 1rem;
}

.readmore-btn {
    margin-top: 8px;
    border: 1px solid #eee;
    color: #fff;
    background: transparent;
    padding: 8px 24px;
    border-radius: 6px;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}

.readmore-btn:hover {
    background: #17b66e;
    color: #fff;
    border: 1px solid #17b66e;
    text-decoration: none;
}

/* Action Buttons (Links) */
.action-link-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px;
    border-radius: 8px;
    text-decoration: none;
    color: #fff;
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 1.12rem;
    transition: background 0.2s, transform 0.2s;
    min-height: 75px;
    position: relative;
    border: none;
}

.action-link-red {
    background: #df3d23;
}

.action-link-orange {
    background: #b9571b;
}

.action-link-btn .action-link-title {
    font-size: 1.22rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    align-self: center;
}

.action-link-btn .action-link-sub {
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: 0.1px;
    opacity: 0.80;
    margin-top: 3px;
}

.action-link-btn:hover {
    background: #17b66e;
    color: #fff;
    transform: translateY(-2px) scale(1.02);
    text-decoration: none;
}

@media (max-width: 768px) {
    .grampanchayt-info-section {
        padding: 16px 7px;
    }

    .info-title {
        font-size: 1.25rem;
    }

    .action-link-btn {
        padding: 16px 10px;
        min-height: 64px;
    }
}


/* ==========================================================
   MINISTER SECTION — EXACT LAYOUT FROM PROVIDED IMAGE
   ========================================================== */

.minister-section {
    background-color: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.ticker-minister-box {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* ---------------- Main Minister ---------------- */
.main-minister {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background-color: #fafafa;
    border-radius: 6px;
    padding: 10px 15px 15px;
    border-bottom: 2px solid #1c787b;
}

.main-minister img {
    width: 135px;
    height: 154px;
    object-fit: cover;
    border: 1px solid #ddd;
    border-radius: 4px;
    flex-shrink: 0;
}

.main-minister .info {
    flex: 1;
}

.main-minister .info h5 {
    font-weight: 600;
    margin-bottom: 5px;
    color: #222;
}

.main-minister .info p {
    margin: 0;
    color: #555;
    font-size: 0.9rem;
}

.main-minister .info .underline {
    width: 60px;
    height: 3px;
    background-color: #b71c1c;
    margin: 6px 0 10px;
    border-radius: 2px;
}

.main-minister .btn {
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.main-minister .btn:hover {
    background-color: #222;
    color: #fff;
}

/* ---------------- Divider ---------------- */
.section-divider {
    width: 60px;
    height: 3px;
    background-color: #b71c1c;
    margin: 15px auto;
    border-radius: 2px;
}

/* ---------------- Other Ministers ---------------- */
.other-ministers {
    display: flex;
    justify-content: center;
    gap: 15px;
    background-color: #fafafa;
}

.other-ministers .minister-card {
    text-align: center;
    flex: 1;
    padding: 10px;
    /* border: 1px solid #eee; */
    /* border-radius: 6px; */
    /* background-color: #fafafa; */
}

.other-ministers .minister-card img {
    width: 135px;
    height: 154px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
    display: block;
    margin: 0 auto 10px;
}

.other-ministers .minister-card h6 {
    font-weight: 600;
    font-size: 0.95rem;
    color: #222;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.other-ministers .minister-card p {
    margin: 0;
    font-size: 0.85rem;
    color: #555;
}

/* ---------------- Read More ---------------- */
.text-end .btn-outline-danger {
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.text-end .btn-outline-danger:hover {
    background-color: #b71c1c;
    color: #fff;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 768px) {
    .main-minister {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .other-ministers {
        flex-direction: column;
        align-items: center;
    }

    .other-ministers .minister-card {
        max-width: 220px;
        width: 100%;
    }
}

/* ---------------------------------------------------------------------------------------------- */

.ticker-wrapper {
    height: 350px;
    overflow: hidden;
    position: relative;
}

.ticker-inner {
    position: relative;
    will-change: transform;
}

.ticker-inner ul {
    margin: 0;
    padding: 0;
    list-style: none;
    position: absolute;
    top: 100%;
    /* start below the visible area */
    left: 0;
    width: 100%;
    transform: translateY(0);
    transition: transform 0s linear;
}

.ticker-inner li {
    padding: 5px 0;
    margin: 5px 0;
    border-bottom: 1px solid #ddd;
    /* light grey border */
}

/* Base tab styling */
#newsTabs {
    position: relative;
}

#newsTabs .nav-link {
    border: none;
    /* remove default border */
    border-radius: 0;
    color: #000;
    position: relative;
    transition: color 0.3s ease;
}

/* Hover color */
#newsTabs .nav-link:hover {
    color: #b71c1c;
}

/* Active tab text color */
#newsTabs .nav-link.active {
    color: #33b71c;
}

/* Sliding underline element */
#newsTabs::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    /* thickness of underline */
    width: 0;
    background-color: #33b71c;
    border-radius: 2px 2px 0 0;
    transition: left 0.3s ease, width 0.3s ease;
}

.ticker-inner .tender-li .date-box {
    width: 55px;
    color: white;
    background-color: #1c787b;
}

.ticker-inner .date-box .day {
    background-color: #33b71c;
}



/* ======================================================
   PHOTO & VIDEO GALLERY SECTION
====================================================== */

.gallery-box {
    background-color: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.gallery-box h5 {
    font-size: 1.2rem;
    color: #000;
}

.gallery-box .btn-warning {
    background-color: #ffc107;
    color: #000;
    border: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.gallery-box .btn-warning:hover {
    background-color: #e0a800;
    color: #fff;
}

.main-thumb {
    width: 100% !important;
    height: 150px !important;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
    transition: transform 0.3s ease, border-color 0.3s;
    display: block;
}

.main-thumb:hover {
    transform: scale(1.05);
    border-color: #33b71c;
}

/* Photo Thumbnails */
.small-thumb {
    width: 165px !important;
    height: 135px !important;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
    transition: transform 0.3s ease, border-color 0.3s;
    display: block;
}

.small-thumb:hover {
    transform: scale(1.05);
    border-color: #33b71c;
}

/* Video Gallery */
.video-thumb {
    width: 100%;
    height: 135px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    display: inline-block;
}

.video-thumb img {
    width: 100% !important;
    height: 135px !important;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
    transition: transform 0.3s ease, border-color 0.3s;
    display: block;
}

.video-thumb:hover img {
    transform: scale(1.05);
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: white;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    padding: 12px 18px;
    transition: background 0.3s ease, transform 0.3s ease;
}

.video-thumb:hover .play-icon {
    background: rgba(255, 0, 0, 0.7);
    transform: translate(-50%, -50%) scale(1.1);
}

@media (max-width: 768px) {
    .gallery-box {
        padding: 15px;
    }

    .play-icon {
        font-size: 1.5rem;
        padding: 8px 12px;
    }

    /* Smaller thumbs for mobile */
    .small-thumb,
    .video-thumb img {
        width: 100% !important;
        height: 115px !important;
    }

    .video-thumb {
        width: 100%;
        height: 115px;
    }
}