body {
    font-family: 'Noto Sans Tamil', 'Mukta Malar', sans-serif;
    background: url('../img/bg.png');
    background-color: #fcf6ed;
    color: #1e3a5f;
}

.hero-banner {
    background: linear-gradient(180deg, #1e3a5f 0%, #2d4a6f 50%, #1e3a5f 100%);
    position: relative;
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 0px;
    background: linear-gradient(90deg, #d4a574 0%, #c49563 50%, #d4a574 100%);
}

.hero-banner::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #d4a574 0%, #c49563 50%, #d4a574 100%);
}

.decorative-border {
    background: #1e3a5f !important;
    height: 10px;
}

.decorative-borders {
    background: #ffddb9 !important;
    height: 20px;
}

.navbar {
    background: linear-gradient(180deg, #2d4a6f 0%, #1e3a5f 100%);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

/* Navigation Menu Styles */
.nav-link {
    transition: all 0.3s ease;
    position: relative;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 0.75rem 1.25rem;
    text-decoration: none;
    display: inline-block;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #fbbf24;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 80%;
}

.nav-link:hover {
    color: #fbbf24;
}

/* Dropdown Menu Styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    background: none;
    border: none;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.dropdown-toggle::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #fbbf24;
    transition: width 0.3s ease;
}

.dropdown-toggle:hover::after {
    width: 80%;
}

.dropdown-toggle:hover {
    color: #fbbf24;
}

.dropdown-arrow {
    width: 12px;
    height: 12px;
    transition: transform 0.3s ease;
}

.dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    min-width: 280px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    margin-top: 0.5rem;
    border: 2px solid #d4a574;
}

.dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #d4a574;
}

.dropdown-menu::after {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 7px solid white;
}

.dropdown-item {
    padding: 1rem 1.5rem;
    color: #1e3a5f;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
    font-weight: 500;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-item:last-child {
    border-bottom: none;
    border-radius: 0 0 10px 10px;
}

.dropdown-item:first-child {
    border-radius: 10px 10px 0 0;
}

.dropdown-item:hover {
    background: linear-gradient(90deg, #fef3e2 0%, #fff9f0 100%);
    color: #d4a574;
    padding-left: 2rem;
}

.dropdown-item-icon {
    width: 8px;
    height: 8px;
    fill: currentColor;
}

@media (min-width: 1025px) {
    .hero-banner {
        /* min-height: 200px; */
    }
}

@media (min-width: 1400px) {
    .hero-banner {
        min-height: 240px;
    }
}

@media (min-width: 1600px) {
    .hero-banner {
        min-height: 290px;
    }
}

/* --- MEDIA QUERIES FOR NAVBAR --- */

@media (max-width: 768px) {

    .gallery-list-content {
        padding: 15px 14px !important;
    }

    .gallery-list-title {
        margin-bottom: 15px !important;
    }
}

/* Small devices (mobile) */
@media (max-width: 540px) {

    .hero-banner {
        /* display: none !important; */
        height: 64px !important;
    }

    .nav-link,
    .dropdown-toggle {
        font-size: 0.9rem !important;
        padding: 0.5rem 0.75rem !important;
    }

    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
        background: rgba(0, 0, 0, 0.5);
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .sm-gap-0 {
        gap: 0 !important;
    }

    .fs-sm-14 {
        font-size: 14px !important;
    }

    .text-sm-left {
        text-align: left !important;
    }

    .gallery-list-content {
        padding: 15px 14px !important;
    }

    .gallery-list-title {
        margin-bottom: 15px !important;
    }

    .dropdown-menu {
        left: 88% !important;
    }
}

.pdf-btn span {
    font-size: 12px;
    font-weight: 700;
}

.pdf-btn:hover {
    background-color: #dc2626;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(220, 38, 38, 0.2);
}

.pdf-btn svg {
    width: 20px;
    height: 20px;
    margin-right: 4px;
}

/* Medium devices (tablets) */
@media (min-width: 769px) and (max-width: 1024px) {

    .hero-banner {
        min-height: 153px !important;
    }

    .nav-link,
    .dropdown-toggle {
        font-size: 14px !important;
        padding: 0.65rem 14px !important;
    }
}

@media (min-width: 1025px) and (max-width: 1250px) {

    .hero-banner {
        min-height: 187px !important;
    }

    .nav-link,
    .dropdown-toggle {
        font-size: 14px !important;
        padding: 0.65rem 14px !important;
    }
}

@media (min-width: 1251px) and (max-width: 1350px) {

    .hero-banner {
        min-height: 187px !important;
    }

    .nav-link,
    .dropdown-toggle {
        font-size: 14px !important;
        padding: 0.65rem 14px !important;
    }
}

/* Large devices */
@media (min-width: 1025px) {

    .nav-link,
    .dropdown-toggle {
        font-size: 1.1rem;
        padding: 0.75rem 1.25rem;
    }

    .nav-link,
    .dropdown-toggle {
        font-size: 1rem;
        padding: 0.65rem 1rem;
    }
}



@media (min-width: 1350px) {

    .hero-banner {
        min-height: 203px;
    }

    .nav-link,
    .dropdown-toggle {
        font-size: 1.1rem;
        padding: 0.75rem 1.25rem;
    }
}

@media (min-width: 1440px) {

    .hero-banner {
        min-height: 216px;
    }

    .nav-link,
    .dropdown-toggle {
        font-size: 14px !important;
        padding: 0.75rem 1.25rem;
    }
}

@media (min-width: 1500px) {

    .hero-banner {
        min-height: 231px !important;
    }

    .nav-link,
    .dropdown-toggle {
        font-size: 14px !important;
        padding: 0.75rem 1.25rem;
    }
}

@media (min-width: 1600px) {

    .hero-banner {
        min-height: 231px !important;
    }

    .nav-link,
    .dropdown-toggle {
        font-size: 14px !important;
        padding: 0.75rem 1.25rem;
    }
}

@media (min-width: 1700px) {

    .hero-banner {
        min-height: 255px !important;
    }

    .nav-link,
    .dropdown-toggle {
        font-size: 14px !important;
        padding: 0.75rem 1.25rem;
    }
}

@media (min-width: 1800px) {

    .hero-banner {
        min-height: 270px !important;
    }

    .nav-link,
    .dropdown-toggle {
        font-size: 14px !important;
        padding: 0.75rem 1.25rem;
    }
}

@media (min-width: 1900px) {

    .hero-banner {
        min-height: 285px !important;
    }

    .nav-link,
    .dropdown-toggle {
        font-size: 14px !important;
        padding: 0.75rem 1.25rem;
    }
}

@media (min-width: 1500px) and (max-width: 1599px) {
    .container {
        max-width: 1156px !important;
    }

    .hero-banner {
        min-height: 231px;
    }

    .nav-link,
    .dropdown-toggle {
        font-size: 1.1rem;
        padding: 0.75rem 1.25rem;
    }
}

/* --- COPIED NAVBAR STYLES END --- */


/* --- LIST VERSION SPECIFIC STYLES --- */

/* Search Bar Area */
.filter-bar {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.search-input {
    border: 2px solid #e5e7eb;
    border-radius: 50px;
    padding: 10px 20px;
    width: 100%;
    transition: all 0.3s;
}

.search-input:focus {
    border-color: #d4a574;
    outline: none;
    box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.2);
}

/* Horizontal Card Style */
.list-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #eee;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

@media (min-width: 640px) {
    .list-card {
        flex-direction: row;
        height: 220px;
    }
}

.list-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(30, 58, 95, 0.15);
    border-color: #fbbf24;
}

/* Image Section */
.card-image-wrapper {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
    background: #f0f0f0;
}

@media (min-width: 640px) {
    .card-image-wrapper {
        width: 180px;
        height: 100%;
        flex-shrink: 0;
    }
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* Content Section */
.card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1;
}

.card-tag {
    display: none !important;
    background: #fff9f0;
    color: #d4a574;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 0.75rem;
    width: fit-content;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e3a5f;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.card-desc {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
    display: none !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Action Buttons */
.card-actions {
    /* margin-top: auto; */
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn-read {
    background: #1e3a5f;
    color: white;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: 0.3s;
    text-decoration: none;
}

.btn-read:hover {
    background: #2d4a6f;
}

.btn-icon {
    display: none !important;
    color: #d4a574;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #eee;
    transition: 0.3s;
}

.btn-icon:hover {
    border-color: #d4a574;
    background: #fff9f0;
}

/* Animation Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

@media (max-width:500px) {
    .sm-relative {
        position: relative !important;
    }
}

.gallery-list-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    /* No underline on links */
    border: 1px solid rgba(212, 165, 116, 0.1);
    height: 100%;
    /* Equal height */
    position: relative;
}

/* Hover Effect: Lift Up */
.gallery-list-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(30, 58, 95, 0.15);
    border-color: rgba(212, 165, 116, 0.4);
}

/* Image Area - Taller and Centered */
.gallery-list-img-wrapper {
    height: 260px;
    overflow: hidden;
    position: relative;
    background: #f8f8f8;
    /* Subtle gray background like the reference */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

/* The Book Cover */
.gallery-list-img {
    height: 100%;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    /* Ensures the full book cover is visible */
    filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.15));
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.gallery-list-card:hover .gallery-list-img {
    transform: scale(1.08);
}

/* Content Area */
.gallery-list-content {
    padding: 1.5rem;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    background: white;
}

.gallery-list-title {
    font-family: 'Mukta Malar', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e3a5f;
    line-height: 1.5;
    margin-bottom: 1.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    /* Limit to 2 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* The Pill Button (Read Button) */
.gallery-list-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 30px;
    border-radius: 50px;
    /* Pill shape */
    font-size: 0.95rem;
    font-weight: 600;
    color: #d4a574;
    /* Gold Text */
    border: 1px solid #d4a574;
    /* Gold Border */
    transition: all 0.3s ease;
    background: transparent;
    gap: 8px;
    text-decoration: none;
}

.gallery-list-btn svg {
    transition: transform 0.3s ease;
    fill: currentColor;
}

/* Button Hover State */
.gallery-list-card:hover .gallery-list-btn {
    background: #d4a574;
    color: #ffffff;
}

.gallery-list-card:hover .gallery-list-btn svg {
    transform: translateX(4px);
}

.gallery-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #eee;
    transition: all 0.4s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.gallery-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(30, 58, 95, 0.2);
    border-color: #d4a574;
}

.gallery-img-wrapper {
    height: 280px;
    overflow: hidden;
    position: relative;
    background: #f0f0f0;
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.6s ease;
}

.gallery-card:hover .gallery-img {
    transform: scale(1.08);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(30, 58, 95, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-card:hover .gallery-overlay {
    opacity: 1;
}

.zoom-icon {
    color: white;
    background: rgba(212, 165, 116, 0.9);
    padding: 12px;
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.gallery-card:hover .zoom-icon {
    transform: scale(1);
}

/* --- SKELETON LOADER STYLES --- */
.skeleton-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #eee;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.shimmer {
    animation-duration: 1.5s;
    animation-fill-mode: forwards;
    animation-iteration-count: infinite;
    animation-name: shimmer;
    animation-timing-function: linear;
    background: #f6f7f8;
    background: linear-gradient(to right, #eeeeee 8%, #dddddd 18%, #eeeeee 33%);
    background-size: 1000px 100%;
}

#lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    padding: 2rem;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

#lightbox.active {
    display: flex;
}

.lightbox-img {
    max-height: 80vh;
    max-width: 100%;
    border: 4px solid #fff;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
    color: #d4a574;
    margin-top: 1rem;
    text-align: center;
    font-size: 1.1rem;
    max-width: 800px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s;
}

.lightbox-close:hover {
    color: #d4a574;
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

/* Lightbox Navigation Buttons */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    padding: 0;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10001;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-nav:hover {
    background: rgba(212, 165, 116, 0.9);
    color: #1e3a5f;
}