/* Theme Variables - Central Theme Control */
:root {
    --primary-theme-color: #f97212;
    --primary-theme-hover: #e85d00;
    --primary-theme-light: #ffa666;
    --primary-theme-dark: #d45500;
    --primary-theme-rgba: rgba(249, 114, 18, 0.9);
    --primary-theme-rgba-light: rgba(249, 114, 18, 0.1);
    --primary-theme-rgba-medium: rgba(249, 114, 18, 0.5);
}

/* Theme-based CSS Classes */
.bg-theme-primary {
    background-color: var(--primary-theme-color) !important;
}

.bg-theme-primary:hover {
    background-color: var(--primary-theme-hover) !important;
}

.text-theme-primary {
    color: var(--primary-theme-color) !important;
}

.border-theme-primary {
    border-color: var(--primary-theme-color) !important;
}

.btn-theme-primary {
    background-color: var(--primary-theme-color);
    border-color: var(--primary-theme-color);
    color: white;
}

.btn-theme-primary:hover {
    background-color: var(--primary-theme-hover);
    border-color: var(--primary-theme-hover);
    color: white;
}

.badge-theme-primary {
    background-color: var(--primary-theme-color);
    color: white;
}

/* Dashboard Card Hover Effects */
.dashboard-card-hover {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    cursor: pointer;
}

.dashboard-card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
}

a:hover .dashboard-card-hover {
    color: inherit;
}

/* Ensure text color stays white on colored cards */
a .dashboard-card-hover.bg-primary:hover,
a .dashboard-card-hover.bg-success:hover,
a .dashboard-card-hover.bg-warning:hover,
a .dashboard-card-hover.bg-info:hover,
a .dashboard-card-hover.bg-theme-primary:hover {
    color: white !important;
}

a .dashboard-card-hover h5,
a .dashboard-card-hover h2 {
    color: inherit !important;
}

html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--primary-theme-color);
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

body {
    background-color: #f8f9fa;
}
.book-card {
   
    cursor: pointer;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    position: relative; /* Needed for z-index and overflow */
    overflow: hidden; /* MODIFICATION 1: This stops the animation from going outside the card's boundary. */
}

    .book-card:hover {
        transform: translateY(-10px);
      /*  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);*/
        z-index: 10;
    }

.card-img-top-wrapper {
    position: relative;
    height: 270px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    perspective: 2000px;
    transform-style: preserve-3d;
}

.card-img-top {
    width: auto;
    height: 100%;
    object-fit: contain;
    padding: 0;
    transform-origin: left center;
    transition: transform 0.5s ease-in-out;
    z-index: 10;
    position: relative;
}

.book-card:hover .card-img-top {
    /* MODIFICATION 2: Changed from -160deg to -45deg for a partial open effect. */
    transform: rotateY(-20deg);
}

.card-img-top-wrapper::after {
    content: '';
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    background: #fff;
    box-shadow: inset 5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.card-img-top-wrapper::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 1.2rem;
    width: 30px;
    height: calc(100% - 2.4rem);
    background: linear-gradient(to right, #e0e0e0, #ffffff);
    transform-origin: right;
    transform: translateX(-100%) rotateY(90deg);
    z-index: 5;
}

.card-title {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-text {
    font-size: 0.85rem;
}

.ratings i {
    color: #f5c518;
}

/* Modal Customizations */
.modal-body .book-cover {
    max-height: 350px;
    width: auto;
    object-fit: contain;
    border-radius: .375rem;
}

.modal-footer {
    justify-content: flex-start;
}

.book-details-table dt {
    font-weight: normal;
}

.book-details-table dd {
    font-weight: 600;
}

/* Compact, consistent content cards */
:root {
  --card-radius: 14px;
  --card-shadow: 0 8px 18px rgba(0,0,0,0.06);
  --card-font: 0.88rem;  /* smaller, clean */
  --title-font: 0.98rem;
  --meta-font: 0.78rem;
  --summary-font: 0.82rem;
  --card-height: 330px;  /* target overall height for image+body */
  --img-ratio: 16/9;     /* use 3/4 for books if you prefer */
  --primary: #f97212;
}

.content-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--card-radius);
  border: 1px solid #eef2f6;
  background: #fff;
  box-shadow: var(--card-shadow);
  overflow: hidden;
  font-size: var(--card-font);
  height: var(--card-height);
}

.content-card .card-media {
  width: 100%;
  aspect-ratio: var(--img-ratio);
  background: #f6f7fb;
  display: block;
  object-fit: cover;
}

.content-card .card-body {
  display: flex;
  flex-direction: column;
  padding: .6rem .75rem .7rem;
  gap: .35rem;
  min-height: 0; /* allow clamping to work */
}

.content-card .title {
  font-size: var(--title-font);
  font-weight: 700;
  color: #111827;
  margin: 0;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.content-card .summary {
  font-size: var(--summary-font);
  color: #6b7280;
  line-height: 1.35;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;   /* keep cards equal height */
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3.5em; /* visual stability */
}

.content-card .meta {
  font-size: var(--meta-font);
  color: #94a3b8;
  margin-top: auto; /* push meta + button to bottom */
}

.content-card .actions {
  margin-top: .35rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-compact {
  --btn-bg: var(--primary);
  background: var(--btn-bg);
  color: #fff;
  border: 0;
  border-radius: 10px;
  font-size: .80rem;
  padding: .35rem .6rem;
  text-decoration: none;
}

.btn-compact:hover {
  filter: brightness(.95);
}

.tag-badge {
  display:inline-block;
  background:#eef2ff;
  color:#4338ca;
  border-radius:9999px;
  padding:.15rem .5rem;
  font-size:.70rem;
}

/* Video card tweaks (same height as other cards) */
.video-card .card-media {
  aspect-ratio: 16/9;
  background: #000;
}
.video-card iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  border-radius: 0;
}

.language-wrapper {
    overflow: hidden; /* Hide extra items */
    flex-grow: 1;
}

.language-container {
    display: flex;
    transition: transform 0.5s ease-in-out;
    gap: 20px;
    padding:3%;
}

.language-item {
    flex: 0 0 calc(100% / 6 - 20px); /* exactly 6 items per row */
    max-width: 120px;
    height: 120px;
    border: 2px dashed var(--primary-theme-color);
    border-radius: 50%;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s;
    font-size: 14px;
    text-align: center;
    color:black;
}

    .language-item:hover {
        transform: scale(1.1);
    }

.scroll-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.box-wrapper {
    /* border: 2px solid #093d4e; */
    border-radius: 15px;
    padding: 10px;
    /* background: #0d6b82; */
    width: 100%;
    display: flex;
    align-items: center;
}

/* Responsive tweaks */
@media (max-width: 992px) {
    .language-item {
        flex: 0 0 calc(100% / 3 - 20px); /* show 3 per row on tablets */
        height: 120px;
        width: auto;
    }
}

@media (max-width: 576px) {
    .language-item {
        flex: 0 0 calc(100% / 2 - 20px); /* show 2 per row on mobiles */
        height: 70px;
        width: auto;
    }
}
/*Slider Css Start*/

.main {
    display: flex-col;
    width: 100%;
    text-align: center;
    padding: 10px;
}



.carousel {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    max-width: 100%;
    height: 55vh;
    min-height: 400px;
}

.slide {

    /* position: absolute; */
/* inset: 0; */
background-size: cover;
background-position: center;
/* opacity: 1; */
/* transform: translateX(100%); */
transition: all var(--transition-duration) ease-in-out;
/* display: flex; */
align-items: flex-end;
    /* position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: translateX(100%);
    transition: all var(--transition-duration) ease-in-out;
    display: flex;
    align-items: flex-end; */
}

    .slide.active {
        opacity: 1;
        transform: translateX(0);
        z-index: 1;
    }

    .slide.exit-left {
        transform: translateX(-100%);
    }

    .slide.exit-right {
        transform: translateX(100%);
    }

.overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient( to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.1) );
    z-index: 0;
}

.slide-content {
    padding: 2rem;
    z-index: 2;
    max-width: 700px;
    margin-bottom: 30px;
}

    .slide-content h1 {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }

    .slide-content p {
        font-size: 1rem;
        color: #ddd;
        margin-bottom: 1rem;
    }

    .slide-content .author {
        font-size: 0.85rem;
        color: #aaa;
    }

.controls {
    position: absolute;
    bottom: 1rem;
    left: 0;
    right: 0;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.dots {
    display: flex;
    gap: 0.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 9999px;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

    .dot.active {
        width: 32px;
        background-color: var(--primary-theme-color);
    }

.arrows {
    display: flex;
    gap: 0.5rem;
}

.arrow-btn {
    padding: 0.5rem 0.8rem;
    border-radius: 12px;
    border: 0.5px solid rgba(255, 255, 255, 0.3);
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    transition: background 0.3s;
}

    .arrow-btn:hover {
        background-color: rgba(255, 255, 255, 0.3);
    }

@media (max-width: 768px) {
    .slide-content {
        padding: 1.5rem;
    }

        .slide-content h1 {
            font-size: 1.5rem;
        }

        .slide-content p {
            font-size: 0.9rem;
        }
}

@media (max-width: 480px) {
    .slide-content h1 {
        font-size: 1.2rem;
    }

    .slide-content p {
        display: none;
    }
}
/*Slider Css End*/
/*genere Css Start */
.genre-heading {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 40px;
    text-align: center;
}

.genre-card {
    /* Updated background image for all cards */
    background-image: url('/img/bgimg_genrce.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    height: 150px;
    background: linear-gradient(45deg, black, transparent);
}

    .genre-card:hover {
        transform: scale(1.05);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    }

    .genre-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        /* Decreased the opacity to 0.4 to make the background visible */
        background-color: var(--primary-theme-rgba-medium);
        transition: background-color 0.3s ease-in-out;
    }

    .genre-card:hover::before {
        /* Decreased the hover opacity to 0.2 for a more transparent look */
        background-color: var(--primary-theme-rgba-light);
    }

.genre-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    white-space: nowrap;
}

.genre-line {
    width: 80%;
    height: 2px;
    background-color: white;
    margin: 5px auto;
}
/*genere Css End */

/*Gallery Css Start*/
.gallery-container {
    padding: 2rem;
}

.gallery-item {
    overflow: hidden;
    border-radius: 0.5rem;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .gallery-item:hover {
        transform: scale(1.05);
        box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
    }

    .gallery-item img {
        width: 100%;
        height: 250px; /* Consistent height for all images */
        object-fit: cover;
        transition: filter 0.3s ease;
    }

    .gallery-item:hover img {
        filter: grayscale(50%);
    }

/* Modal (Slideshow) Styles */
#imageModal {
    display: none;
    position: fixed;
    z-index: 1050;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    animation: fadeIn 0.5s;
}

    #imageModal .modal-dialog {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100%;
    }

    #imageModal .modal-content {
        border: none;
        width: 100%;
        max-width: 1000px;
        height: auto;
        animation: zoomIn 0.6s;
        position: relative;
    }

     #imageModal .modal-header {
        color: #fff;
        padding: 10px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-top-left-radius: 0.5rem;
        border-top-right-radius: 0.5rem;
    }

    #imageModal .modal-body {
        position: relative;
    }

#imageModal .modal-body img {
    width: 100%;
    height: auto;
    max-height: 80vh;
    display: block;
    margin: auto;
    object-fit: contain;
}

    #imageModal .modal-footer {
        padding: 10px 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        border-bottom-left-radius: 0.5rem;
        border-bottom-right-radius: 0.5rem;
        min-height: 50px; /* Add some space for the footer */
    }

/* Controls */
.control-btn {
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

    .control-btn:hover {
        background-color: rgba(255, 255, 255, 0.5);
    }

.header-controls {
    display: flex;
    gap: 10px;
}

.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 20px;
    transition: 0.6s ease;
    user-select: none;
    background-color: rgba(0, 0, 0, 0.5);
}

.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev {
    left: 0;
    border-radius: 0 3px 3px 0;
}

    .prev:hover, .next:hover {
        background-color: rgba(0, 0, 0, 0.8);
    }

@keyframes fadeIn {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.1)
    }

    to {
        transform: scale(1)
    }
}
/*Gallery Css End*/