body {
    margin: 0;
    font-family: Arial, sans-serif;
}

.fixed-header {
    position: fixed;
    top: 0;
    width: 100%;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    padding: 3px 0;
    font-size: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 22;
    padding-left: 10px;
    padding-right: 10px;
}

.header-left {
    display: flex;
    align-items: center;
}

.icon-button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    margin-right: 10px;
}

.home-icon {
    width: 24px;
    height: 24px;
}

.menu-bar {
    display: flex;
    align-items: center;
    margin-right: 10px;
}

.menu-button {
    background-color: white;
    color: #2575fc;
    border: none;
    font-size: 20px;
    padding: 0;
    cursor: pointer;
    height: 25px;
    width: 25px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-right: 15px;
}

.menu-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: white;
    color: blue;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 11;
    border-radius: 0;
}

.menu-content a {
    display: block;
    padding: 10px;
    text-decoration: none;
    color: blue;
    border-bottom: 1px solid #ddd;
}

.menu-content a:hover {
    background-color: #ddd;
}

.header-title {
    flex-grow: 1;
    text-align: center;
    font-size: 20px;
    margin-left: 35px;
}

.tab-bar {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    padding: 10px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    top: 25px;
    z-index: 5;
}

.tab-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
}

.tab-link {
    text-decoration: none;
    color: white;
    font-size: 10px;
    text-align: center;
    display: inline-block;
    padding: 1px 1px;
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: 2px 4px;
    font-weight: bold;
    flex: 2;
}

.tab-link:hover {
    background-color: white;
    color: blue;
}

.heading-background {
    background-color: lavender;
}

.heading-container {
    margin: 0px;
    text-align: center;
}

.heading-container h2 {
    margin: 0px;
    font-size: 12px;
    color: royalblue;
}

.image-container {
    display: flex;
    overflow-x: scroll;
    width: 100%;
    margin-bottom: 60px;
}

.img-container {
    position: relative;
    flex-shrink: 0;
    margin-right: 10px;
    width: 50%;
     z-index: 1;
       cursor: pointer; 
}

.img-container img {
    height: 300px;
    width: 100%;
    object-fit: cover;
    border-radius: 15px;
    border: 1px solid grey;
}

.caption {
    position: absolute;
    top: 0;
    width: 100%;
    background-color: #DBF3FA;
    color: black;
    text-align: center;
    font-weight: bold;
    padding: 5px 0;
    box-sizing: border-box;
    font-size: 12px;
    border-radius: 15px 15px 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#detailsContainer {
    margin: 0px auto; /* Center the container */
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background-color: white;
    max-width: 600px;
    text-align: left;
}

.detail-item {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 5px;
    padding-bottom: 5px;
}

.detail-item span[data-key="president"],
.detail-item span[data-key="vice_president"],
.detail-item span[data-key="wards"],
.detail-item span[data-key="population"],
.detail-item span[data-key="vao"],
.detail-item span[data-key="clerk"],
.detail-item span[data-key="secretary"] {
    color: blue;
}

.detail-item[data-key="panchayat_type"] {
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    padding-top: 5px;
    padding-bottom: 5px;
    width: 100%;
    box-sizing: border-box;
}

.detail-item strong {
    min-width: 150px;
    text-align: left;
    margin-right: 5px;
}

.detail-item span {
    text-align: left;
    flex-grow: 1;
}

.country-image {
    width: 30px;
    height: 20px;
    vertical-align: middle;
    margin-left: 5px;
}

.state-image {
    width: 30px;
    height: 30px;
    vertical-align: middle;
    margin-left: 5px;
}

button#viewDetailsButton {
    display: block;
    margin: 20px auto;
    padding: 10px 20px;
    font-size: 16px;
    color: #fff;
    background-color: #2575fc;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

button#viewDetailsButton:hover {
    background-color: #1e63cc;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    display: flex;
    justify-content: space-around;
    padding: 0px 0;
    box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.1);
    z-index: 20;
}

.nav-button {
    text-decoration: none;
    color: white;
    font-size: 14px;
    text-align: center;
    flex-grow: 1;
    padding: 10px 0;
    font-weight: bold;
    transition: background-color 0.3s;
}

.nav-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.development-goals-container {
    margin-right: 2px;
    margin-left: 2px;
    margin-top: 1px;
    margin-bottom: 0px; /* No margin at the bottom */
    padding: 0px;
}
.tamil-caption {
    position: absolute;
    top: 40%; /* Position 40% from the top of the image */
    width: 100%;
    color: white;
    text-align: center;
    font-weight: bold;
    background-color: rgba(0, 0, 0, 1); /* Optional: adds a background for better readability */
    padding: 5px 0;
    font-size: 9px;
    border-radius: 15px 15px 0 0;
    white-space: normal; /* Allow text to wrap to the next line */
    overflow: hidden;
    text-overflow: clip; /* Show text without truncation */
    word-wrap: break-word; /* Ensure long words break to the next line */
    
     
}



.row-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 5px 0;
}

.row-container .img-container {
    flex: 1 1 calc(33.33% - 10px);
    margin: -3px 2px;
}

.row-container .img-container img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid grey;
}

.banner-container {
    position: relative;
    width: 95%;
    padding: 0 10px;
    overflow: hidden;
}

.banner-slider {
    display: flex;
    width: 99%;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.banner-slider::-webkit-scrollbar {
    display: none;
}

.banner-item {
    position: relative;
    flex-shrink: 0;
    width: 100%;
    margin: 0 10px;
    box-sizing: border-box;
}

.banner-item img {
    margin-top: 27px;
    width: 100%;
    height: 130px; /* Main banner original size */
    border-radius: 10px;
}

/* Random Banner Styles */
.random-banner-container {
    position: relative;
    width: 95%;
    padding: 0 10px;
    overflow: hidden;
}

.random-banner-container#randomBanner2 {
    margin-bottom: 100px; /* Ensure there's space above the bottom nav bar */
}

.random-banner .banner-item {
    width: 100%;
    height: 130px;
    margin: 0 auto;
    position: relative;
}

.random-banner img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    border-radius: 10px;
    margin-top: 0px;
}

.random-banner .banner-overlay {
    position: absolute;
    bottom: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.8); /* Semi-transparent white background */
    color: black;
    text-align: center;
    padding: 5px;
    box-sizing: border-box;
    font-size: 14px;
    border-radius: 0 0 10px 10px;
}

.random-banner .banner-name {
    width: 100%;
    text-align: center;
    padding: 0 5px; /* Reduced padding */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Banner overlay for name and date */
.banner-overlay {
    position: absolute;
    bottom: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    color: black;
    display: flex;
    justify-content: space-between;
    padding: 5px 10px;
    box-sizing: border-box;
    font-size: 14px;
}

.banner-name {
    text-align: left;
}

.banner-date {
    text-align: right;
}

/* Styles for smaller screens */
@media (max-width: 767px) {
    .tab-container {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-around;
    }

    .row-container .img-container {
        flex: 1 1 calc(33.33% - 10px);
        height: 95px;
    }

    .row-container .img-container img {
        height: 95px;
        margin: 0px;
    }

    .random-banner img {
        height: 95px; /* Random banner size for smaller screens */
    }

    .banner-item img {
        height: 130px; /* Main banner remains the original size */
    }
}

/* Styles for larger screens */
@media (min-width: 768px) {
    .tab-container {
        flex-direction: row;
        flex-wrap: nowrap;
    }

    .tab-link {
        flex: 1;
        font-size: 14px;
    }

    .heading-container {
        margin: 0px;
        text-align: center;
    }

    .heading-container h2 {
        margin: 0px;
        font-size: 25px;
        color: royalblue;
    }

    .banner-container {
        position: relative;
        width: 100%;
        padding: 0 20px;
        overflow: hidden;
    }

    .banner-slider {
        display: flex;
        width: 100%;
        overflow-x: auto;
        scroll-behavior: smooth;
        scrollbar-width: none;
    }

    .banner-slider::-webkit-scrollbar {
        display: none;
    }

    .banner-item {
        flex-shrink: 0;
        width: 100%;
        margin: 0 20px;
        box-sizing: border-box;
    }

    .banner-item img {
        margin-top: 10px;
        width: 100%;
        height: 400px; /* Main banner original size */
        border-radius: 15px;
    }
    
    .tamil-caption {
    position: absolute;
    top: 45%; /* Position 40% from the top of the image */
    width: 100%;
    color: white;
    text-align: center;
    font-weight: bold;
    background-color: rgba(0, 0, 0, 1); /* Optional: adds a background for better readability */
    padding: 5px 0;
    font-size: 16px;
    border-radius: 15px 15px 0 0;
    white-space: normal; /* Allow text to wrap to the next line */
    overflow: hidden;
    text-overflow: clip; /* Show text without truncation */
    word-wrap: break-word; /* Ensure long words break to the next line */
     pointer-events: none; /* Ensure caption does not block parent clicks */
}

    .random-banner-container {
        width: 100%;
        padding: 0 20px;
        overflow: hidden;
    }

    .random-banner-container#randomBanner2 {
        margin-bottom: 100px; /* Ensure space above the bottom nav bar */
    }

    .random-banner .banner-item {
        width: 100%;
        height: 400px; /* Remove fixed height */
        margin: 0 auto;
        position: relative;
    }

    .random-banner img {
        width: 100%;
        height: auto; /* Maintain aspect ratio */
        max-height: 500px; /* Set a maximum height for the banner */
        object-fit: cover;
        border-radius: 10px;
    }

    .random-banner .banner-overlay {
        position: absolute;
        bottom: 0;
        width: 100%;
        background-color: rgba(255, 255, 255, 0.8);
        color: black;
        text-align: center;
        padding: 5px;
        box-sizing: border-box;
        font-size: 16px;
        border-radius: 0 0 10px 10px;
    }

    .img-container {
        width: 20%;
        cursor: pointer; /* Add pointer cursor for better UX */
    z-index: 1;
    }

    .img-container img {
        height: 400px;
    }

    .row-container .img-container {
        flex: 3 3 calc(18.33% - 33px);
        margin: 5px;
    }

    .row-container .img-container img {
        width: 100%;
        height: 350px;
        object-fit: cover;
        border-radius: 10px;
        border: 1px solid grey;
    }
}
