:root{
    --hero-max-w: 800px;                /* content width for both controls */
    --hero-h: clamp(56px, 8vw, 90px);
    --hero-btn-w: clamp(140px, 22vw, 220px);
    --hero-right-gap: 8px;              /* right inset used by the search button */
    --secondary-color: #475467;
    --text-muted: #808388;
    --header-h: 64px;
    --header-h-xl: 72px;
}



*, *::before, *::after { box-sizing: border-box; }

html {
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

body {
    font-family: "Inter", sans-serif!important;
    font-optical-sizing: auto;
    font-weight: 300;
    font-style: normal;
}


.font-secondary {
    color: var(--secondary-color);
}
.font-muted {
    color: var(--text-muted);
}

.inter-normal {
    font-family: "Inter", sans-serif;
    font-optical-sizing: auto;
    font-weight: 300;
    font-style: normal;
}

.inter-strong {
    font-family: "Inter", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
}

.inter-bold {
    font-family: "Inter", sans-serif;
    font-optical-sizing: auto;
    font-weight: 700;
    font-style: normal;
}

.inter-light {
    font-family: "Inter", sans-serif;
    font-optical-sizing: auto;
    font-weight: 200;
    font-style: normal;
}

.hero-text {
    font-size: 4em;
    transform-origin: 0 0;
    letter-spacing: -1px;
    font-family: "Inter", sans-serif;
}

.hero-subtitle {
    font-size: 1.25em;
    font-family: "Inter", sans-serif;
    color: var(--secondary-color);
}

.hero-search {
    width: 850px;
    height: 90px;
    border-radius: 50px;
    border: 2px solid #E0E0E0;
    text-indent: 40px;
    font-size: 1.25em;
    color: #E0E0E0;
}

.hero-search-wrap,
.hero-button-inverse{
    width: min(100%, var(--hero-max-w));
    margin-inline: auto;
}


#hero-search::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;

    width: 32px;
    height: 32px;
    cursor: pointer;
    background-color: #000;
    -webkit-mask-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round'>\
<path d='M6 6L18 18M18 6L6 18'/>\
</svg>");
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;

    mask-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round'>\
<path d='M6 6L18 18M18 6L6 18'/>\
</svg>");
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
    opacity: 0.75;
}

#hero-search::-webkit-search-cancel-button:hover {
    opacity: 1;
}


body.scrolled .header-search {
    display: flex !important;
}

.header-search .form-control{
    border-color: #e5e7eb;
    background-image: none;
    height: 50px;
    text-indent: 20px;
    font-size: 16px;
}

form.header-search {
    display: none!important;
}

body.scrolled form.header-search {
    display: flex!important;
}

.header-search .form-control{
    border-color: transparent;
    background-image:
            linear-gradient(#fff, #fff),
            linear-gradient(90deg, #7b61ff, #ff3d77 60%, #ffb347);
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

.hero-button-inverse{
    height: var(--hero-h);
    max-width: var(--hero-max-w);
    border-radius: 999px;
    background:#000;
    color:#fff;
    font-size: clamp(1rem, 1.2vw, 1.25rem);
    line-height: 1;
    padding-inline: 24px;
    border: 0;
}

.hero-submit {
    background: #C353FF;
    background: linear-gradient(90deg,rgba(195, 83, 255, 1) 0%, rgba(255, 75, 75, 1) 100%);
    height: 72px;
    width: 220px;
    border-radius: 50px;
    border: none;
    color: #fff;
    font-size: 1.25em;
    margin-left: -235px;
}

.hero-submit img {
    filter: brightness(0) invert(1);
}

.gradient {
    background: #C353FF;
    background: linear-gradient(to right, #C353FF 0%, #FF4B4B 68%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.bottom-shadow {

    #box-shadow: 0px 14px 14px 0px rgba(0,0,0,0.05);
    #-webkit-box-shadow: 0px 14px 14px 0px rgba(0,0,0,0.05);
    #-moz-box-shadow: 0px 14px 14px 0px rgba(0,0,0,0.05);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.top-menu-bar {
    margin-bottom: 20px;
    height: 50px;
}

.top-menu-bar .links {
    width: 40%;
    display: flex;
}

.top-menu-bar .link {
    font-size: 1.25em;
    flex: 1;
    letter-spacing: -1px;
    vertical-align: middle;
}

.top-menu-bar .obooko-logo {
    display: flex;
}

.top-menu-bar .obooko-logo-small {
    display: none;
}

.letter-spacing-1 {
    letter-spacing: -1px;
}

.letter-spacing-2 {
    letter-spacing: -2px;
}

.menu-link a {
    font-size: 1em;
    text-decoration: none;
    color: #000f;
}

.menu-link {
    flex: 1;
    text-align: center;
    padding-top: 10px;
}

.upload-link {
    flex: 1;
    color: #000f;
}

.upload-link a {
    color: #808388;
    font-size: 1em;
    text-decoration: underline;
    margin-left: 10px;
    flex: 1;
}

.upload-link a:visited {
    color: #808388;
    font-size: 1em;
    text-decoration: underline;
}

.upload-link a:active {
    color: #808388;
    font-size: 1em;
    text-decoration: underline;
    line-height: 40px;
    text-align: end;
}


.l-link {
    flex: 1;
}

.l-link  a {
    color: #808388;
    font-size: 1em;
    text-decoration: underline;
    margin-left: 10px;
    flex: 1;
}

.l-link  a:visited {
    color: #808388;
    font-size: 1em;
    text-decoration: underline;
}

.l-link  a:active {
    color: #808388;
    font-size: 1em;
    text-decoration: underline;
    line-height: 40px;
    text-align: end;
}

.o-button {
    border-radius: 50px;
    padding: 8px;
    min-width: 120px;
    font-size: 1em;
}

.button-light {
    color: var(--secondary-color);
    background-color: #EAECF0;
    border: none;
    font-weight: 500;
}

.button-dark {
    color: #fff;
    background-color: black;
    border: none;
    font-weight: 500;
}

.button-category {
    background-color: unset;
    color: #000;
    font-weight: 300;
    border: 1px solid var(--secondary-color);
}

.spacer {
    height: 100px;
    width: 100%;
    clear: both;
}


.hero-search-wrap{
    position: relative;
    --h: var(--hero-h);
    --btn-w: var(--hero-btn-w);
}

.hero-search-wrap input{
    height: var(--h);
    width: 100%;
    border-radius: 999px;
    border: 2px solid #E0E0E0;
    font-size: clamp(1rem, 1.2vw, 1.25rem);
    padding-inline: 40px calc(var(--btn-w) + var(--hero-right-gap) + 8px);
    color: #1f1f1f;
    outline: none;
}

.hero-search-wrap input::placeholder{
    color: #A7A7A7;
}


.hero-search-wrap button{
    position: absolute;
    top: 50%;
    right: var(--hero-right-gap);
    transform: translateY(-50%);
    width: var(--btn-w);
    height: calc(var(--h) - 18px);
    border: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    font-size: clamp(1rem, 1.1vw, 1.25rem);
    color: #fff;
    background: linear-gradient(90deg,#C353FF 0%,#FF4B4B 100%);
    box-shadow: 0 2px 0 rgba(0,0,0,.05) inset;
}

.hero-search-wrap button img{
    filter: brightness(0) invert(1);
}

.burger{
    width: 44px; height: 44px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    display: inline-flex; align-items: center; justify-content: center;
    background: #fff;
}
.burger-bar{
    width: 22px; height: 2px; background: #111; position: relative; display: block;
}
.burger-bar::before, .burger-bar::after{
    content:""; position:absolute; left:0; width:22px; height:2px; background:#111;
}
.burger-bar::before{ top:-6px; }
.burger-bar::after{ top: 6px; }



#siteHeader { transition: box-shadow 200ms ease; }

:root {
    --header-h: 64px;     /* base header height */
    --header-h-xl: 72px;  /* ≥1200px header height */
}
#siteHeader .top-menu-bar { min-height: var(--header-h); }
@media (min-width: 1200px) {
    #siteHeader .top-menu-bar { min-height: var(--header-h-xl); }
}

body.scrolled #siteHeader .top-menu-bar {
    min-height: var(--header-h-xl);
}

body.scrolled #siteHeader {
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

body.scrolled .obooko-logo { display: none !important; }
body.scrolled .obooko-logo-small { display: block !important; }

/*
Book row stuff
 */
.book-row-subtitle {
    font-size: 2em;
    font-weight: lighter;
    color: var(--text-muted);
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.book-row-title {
    font-size: 2em;
    font-weight: normal;
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}


.book-cover {
    display: block;
    width: 100%;
    height: auto;
    max-width: 160px;
    aspect-ratio: 160 / 230;
    margin-inline: auto;
}


.book-row-container {
    text-align: center;
    border-radius: 10px;
    background-color: #F6F6F6;
    padding: 8px;
    margin-left: 10px;
    margin-right: 10px;
}

.book-row-book-author {
    color: var(--text-muted);
    font-weight: normal;
    text-indent: 10px;
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.book-row-book-title {
    padding-left:10px;
    font-weight: 500;
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.book-row-book-stars {
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    text-indent: 0px;
    font-weight: normal;
    margin-left: 10px;
}

.book-row-book-stars svg {
    display: block;
    width: 1em;
    height: 1em;
    margin-right: 10px
}

/*
FAQ
 */
.faq_row {
    background-color: #fff;
    border: 1px solid var(--secondary-color);
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.faq-toggle { background: transparent; border: 0; }
.faq-toggle:focus { box-shadow: none; outline: none; }
.faq-toggle .chev { transition: transform .2s ease; }
.faq-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }

/* Pagination

 */
.o-pagination{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:1rem;
    margin-top:1rem;
}

.o-pagination-prev,
.o-pagination-next{
    flex:0 0 auto;
}

.o-pagination-pages{
    list-style:none;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:16px;
    margin:0;
    padding:0;
    min-width:220px;
}

.o-page{
    display:inline-block;
    min-width:32px;
    height:32px;
    line-height:32px;
    text-align:center;
    border-radius:8px;
    padding:0 10px;
    text-decoration:none;
    color:#111;
}

.o-page.active{
    background:#F2F2F2;
    font-weight:600;
}

.o-ellipsis{
    color:#777;
}

.o-link{
    color:#111;
    text-decoration:none;
    font-weight:600;
    display:inline-flex;
    align-items:center;
    gap:8px;
}

.o-link:hover{ text-decoration:underline; }
.o-link.disabled{
    color:#bbb;
    pointer-events:none;
    text-decoration:none;
}

.underlined {
    text-decoration: underline;
}


/* Base layout (desktop/tablet) */
.o-pagination{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
}

.o-pagination-prev,
.o-pagination-next{
    flex:0 0 auto;
    white-space:nowrap; /* stops "Next →" splitting awkwardly */
}

.o-pagination-pages{
    flex:1 1 auto;
    min-width:0;              /* IMPORTANT: allows the middle section to shrink */
    display:flex;
    justify-content:center;
    align-items:center;
    flex-wrap:wrap;           /* allows pages to wrap instead of overlapping */
    gap:6px;
    list-style:none;
    margin:0;
    padding:0;
}

.o-pagination-pages li{
    flex:0 0 auto;
}

.o-page{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:8px 12px;
    line-height:1;
}

/* Mobile */
@media (max-width: 576px){
    .o-pagination{
        flex-wrap:wrap;
        row-gap:10px;
    }

    .o-pagination-prev,
    .o-pagination-next{
        flex:1 1 0;
    }

    .o-pagination-prev{ order:1; text-align:left; }
    .o-pagination-next{ order:2; text-align:right; }

    .o-pagination-pages{
        order:3;
        width:100%;
        justify-content:center;
    }

    .o-link{ font-size:14px; }
    .o-page{ padding:6px 10px; font-size:14px; }
}

.breadcrumb-link {
    text-decoration: none;
    font-weight: normal;
    color: var(--secondary-color);
    padding-right: 5px;
}

/* Very narrow phones: make page numbers scroll instead of wrapping into a tall block */
@media (max-width: 420px){
    .o-pagination-pages{
        flex-wrap:nowrap;
        overflow-x:auto;
        justify-content:flex-start;
        -webkit-overflow-scrolling:touch;
        padding-bottom:4px; /* room for scrollbar overlay */
    }
}





#book-description {
  overflow: hidden;
  max-height: 140px;
  transition: max-height 0.3s ease;
}
#book-description.truncated + #read-more-btn { display: inline;}
#book-description:not(.truncated) + #read-more-btn { display: none;}
#book-description.expanded {max-height: 1000px;}

/* Category description truncation - mobile only */
@media (max-width: 767.98px) {
    #category-description {
        overflow: hidden;
        max-height: 120px;
        transition: max-height 0.3s ease;
    }
    #category-description.truncated + #category-read-more-btn { display: inline; }
    #category-description:not(.truncated) + #category-read-more-btn { display: none; }
    #category-description.expanded { max-height: 2000px; }
}

/* Hide read more button on tablet and desktop */
@media (min-width: 768px) {
    #category-description {
        max-height: none !important;
        overflow: visible !important;
    }
    #category-read-more-btn { display: none !important; }
}

/* Category custom text (br_text) section - mobile truncation */
@media (max-width: 767.98px) {
    #category-custom-text {
        overflow: hidden;
        max-height: 120px;
        transition: max-height 0.3s ease;
    }
    #category-custom-text.truncated + #custom-text-read-more-btn { display: inline; }
    #category-custom-text:not(.truncated) + #custom-text-read-more-btn { display: none; }
    #category-custom-text.expanded { max-height: 5000px; }
}

@media (min-width: 768px) {
    #category-custom-text {
        max-height: none !important;
        overflow: visible !important;
    }
    #custom-text-read-more-btn { display: none !important; }
}

/* Override CKEditor inline styles in br_text to match lightreads design */
#category-custom-text span[style*="color"] {
    color: inherit !important;
}
#category-custom-text span[style*="font-size"] {
    font-size: 1.25rem !important;
    font-weight: 600;
    display: block;
    margin-bottom: 0.75rem;
}
#category-custom-text p {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}
#category-custom-text a {
    color: #000;
    text-decoration: underline;
    text-underline-offset: 2px;
}
#category-custom-text a:hover {
    opacity: 0.7;
}


/**
Shop
 */

.item-image {
     display: block;
     height: 400px;
     background-size: cover;
     background-repeat: no-repeat;
     background-position: center;
 }

/*
Blog
 */
.recent-post .media img.media-object {
    width: 70px;
    height: 70px;
    object-fit: cover;
    padding: 2px;
    border: 1px solid #c0c0c0;
    display: block;
}
.recent-post .media {
    align-items: flex-start;
}


#siteHeader .top-menu-bar {
    min-height: 64px;
}


#siteHeader .menu-link {
    display: flex;
    align-items: center;
}


#siteHeader .upload-link,
#siteHeader .menu-link {
    display: flex;
    align-items: center;
}

#siteHeader .upload-link a,
#siteHeader .menu-link a {
    display: inline-flex;
    align-items: center;
    line-height: 1.2;
    margin: 0;
}

#siteHeader .profile-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
    background-color: #FF40AF;
    color: white;
}

.side-menu a {
    color: var(--secondary-color);
    text-decoration: none;
}

/* Profile bubble */
.profile-circle {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: #f3047b;        /* or whatever brand colour */
    color: #fff;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
}

/* Remove default button styles when used inside dropdown */
.profile-circle:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(243, 4, 123, 0.3);
}

/* Dropdown styling */
.profile-dropdown {
    min-width: 220px;
    border-radius: 12px;
    padding-top: 0;
    padding-bottom: 0;
}

.profile-dropdown .dropdown-item {
    font-size: 0.9rem;
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
}


.profile-circle-sm {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
    text-align: center;
    line-height: 28px;
}


/*
Login Modal
 */
/* Rounded edges & no default borders */
.custom-modal-content {
    border: none!important;
    border-radius: 30px!important;
    min-height: 800px;
}

/* Blur + dim the background when modal is open */
.modal.fade.show {
    background-color: rgba(0, 0, 0, 0.01)!important; /* dim */
    backdrop-filter: blur(14px);
}

.login-image {
    background-image: url("/images/login.jpg");
    background-position: center;
    background-size: cover;
    width:50%;
    height: 100%;
    position:absolute;
    right: 0;
    z-index: 0;
    border-top-right-radius: 30px;
    border-bottom-right-radius: 30px;
}

/*
Signup and login
 */
.signup-form {
    max-width: 380px;
    margin: 0 auto;
}

.signup-input {
    background-color: #f5f5f5!important;
    border-radius: 999px!important;
    border: 1px solid transparent!important;
    padding: 0.75rem 1.2rem!important;
    font-size: 0.95rem!important;
}

.signup-input:focus {
    background-color: #ffffff;
    border-color: #000000;
    box-shadow: none;
}

.signup-input::placeholder {
    color: #b3b3b3;
}

.btn-dark {
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.75rem 1.5rem;
}

.form-label {
    font-weight: 500;
    font-size: 0.85rem;
}

.small,
.tiny-text {
    font-size: 0.8rem;
}


.modal-close {
    position: absolute;
    height: 60px;
    right: 40px;
    top: 30px;
    background-image: url('/images/close-icon.png?v=1');
    width: 60px;
    background-size: contain;
    background-color: unset;
    cursor: pointer;
    border: none;
}

.library-remove-btn{
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 999px;
    line-height: 28px;
    font-size: 20px;
    cursor: pointer;
    background: rgba(10,12,14,0.9);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.library-remove-btn:hover{
    background: rgba(10,12,14,1);
}

.book-rating-star {
    border: 0;
    background: transparent;
    padding: 0;
    line-height: 0;
    cursor: pointer;
}

.book-rating-star svg { display: block; }

.book-rating-star svg path {
    fill: none;
    stroke: #212529;
    stroke-width: 1.5;
    stroke-linejoin: round;
}

.book-rating-star.is-hovered svg path,
.book-rating-star.is-filled svg path {
    fill: #FFCB2E;
    stroke: #FFCB2E;
}

.book-rating-widget.is-locked .book-rating-star {
    cursor: default;
    opacity: 0.9;
}

/* Mid-width header (iPad-ish): show a few links + shrink search */
#siteHeader .header-mid-nav{
    display: flex;
    align-items: center;
    gap: 14px;
    white-space: nowrap;
}

#siteHeader .header-mid-nav a{
    text-decoration: none;
    color: #000;
    font-size: 0.95rem;
    line-height: 1;
}

#siteHeader .header-mid-nav a:hover{
    text-decoration: underline;
}

@media (min-width: 768px) and (max-width: 1199.98px) {
    #siteHeader form.header-search{
        flex-grow: 0 !important;
        flex: 0 1 clamp(180px, 26vw, 360px);
        max-width: 420px;
    }

    #siteHeader .upload-link{
        display: none !important;
    }
}

/*hide upload link on any devices that support touch (mobile, tablet etc)*/
@media (pointer: coarse){
    #siteHeader .upload-link{ display:none !important; }
}



/*
Breakpoints
 */
@media (max-width: 380px){
    .hero-search-wrap { --btn-w: 44%; }
    .hero-search-wrap input{
        padding-inline: 16px calc(var(--btn-w) + var(--hero-right-gap));
    }

}

@media (max-width: 575.98px) {
    .filter-btn {
        padding: 6px 10px !important;
        font-size: 13px !important;
        line-height: 1.1;
    }
}
.download-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

@media (max-width: 575.98px) {
    .download-cta {
        flex: 0 0 100%;
        justify-content: center;
        width: 100%;
        padding-left: 0 !important;
    }
}


/* <576px */
@media (max-width: 575.98px) {

}

/* <768px */
@media (max-width: 767.98px) {
    .book-view-title{
        margin-top: 15px;
        text-align: center;
        font-size: 2.5em;
    }

    .book-view-subtitle{
        text-align: center;
    }

    .book-view-filler-text {
        display: none;
    }
    .book-view-genres {
        text-align: center;
    }

    .book-view-statistics {
       justify-content: center !important;
    }
    .book-view-controls {
        text-align: center;
    }
    .book-view-cover {
        height: unset;
        width: unset;
    }
}

/* <992px */
@media (max-width: 991.98px) {
    .hero-search-wrap { --btn-w: 70px; }
    .hero-search-wrap button { font-size: 0; } /* icon-only */
    .hero-text {
        font-size: 2.5em;
    }
    .hero-subtitle {
        font-size: 1em;
    }

    .hero-testimonials {
        text-align: left!important;
    }

    .index-2, .index-3, .index-4, .index-5 {
        display: none;
    }

    .book-row-title, .book-row-subtitle {
        font-size: 1.5em;
    }

    .login-image {
        background-image: url(/images/login.jpg);
        background-position: center;
        background-size: cover;
        width: 100%;
        height: 130px;
        position: relative;
        right: 0;
        z-index: 0;
        border-top-right-radius: 30px;
        border-bottom-right-radius: 0;
        border-top-left-radius:  30px;
        border-bottom-right-radius: 0;
        display: block;
    }
}

/* <1200px */
@media (max-width: 1199.98px) {
    .top-menu-bar .obooko-logo-small + .header-search {
        margin-left: 0.5rem;
    }
}

/* <1400px */
@media (max-width: 1399.98px) {

    .menu-link a {
        font-size: 0.8em;
        line-height: 30px;
    }

    .upload-link {
        font-size: 0.8em;
    }

    .top-menu-bar .o-button {
        font-size: 0.8em;
    }
}


