
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    padding-top: 0px; 
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #32325d; 
    background-color: #f6f9fc; 
}

/* #region Layout */
header {
    background-color: #1a1f36; 
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    padding: 1rem 2rem;
    position: fixed; 
    top: 0; 
    left: 0; 
    right: 0; 
    width: 100%; 
    z-index: 1000 !important; 
    height: 80px;
    transition: box-shadow 0.3s ease; 
    transform: translateZ(0);
}

header.scrolled {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    transform: translateZ(0);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    z-index: 100;
    position: relative;
}
/*#endregion*/

/* #region Updated Logo Styles */

.logo-container {
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.2s ease;
    position: relative
}

.logo-link:hover {
    transform: scale(1.02);
}

.logo-s-container {
    position: relative;
    display: flex;
    align-items: center;
    width: 45px; 
    height: 50px;
    margin-right: -12px; 
    z-index: 1;
}

.logo-s-image {
    width: 100%;
    height: auto;
    transition: opacity 0.3s ease;
    position: absolute;
    top: 0;
    left: 0;
}

.logo-s-image-hover {
    width: 100%;
    height: auto;
    transition: opacity 0.3s ease;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

/* Hover effect for logo swap */
.logo-link:hover .logo-s-image {
    opacity: 0;
}

.logo-link:hover .logo-s-image-hover {
    opacity: 1;
}

.logo-image {
    display: flex;
    align-items: center;
    margin-right: 12px;
    
}

.actual-logo {
    height: 50px;
    width: auto;
    transition: transform 0.2s ease;
}


/* Responsive logo sizing */
@media (max-width: 768px) {
    .actual-logo {
        height: 40px;
    }
}

@media (max-width: 480px) {
    .actual-logo {
        height: 35px;
    }
}

/* #endregion */

/*#region Brand*/

.brand-text {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 2;
}

.brand-name {
    font-family: 'Babas Neue', serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
    padding-left: 6px; 
    margin-left: -4px; 
    letter-spacing: 0.07em; 
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
}

.logo-link:hover .brand-name {
    color: #6772e5; 
}

.brand-motto {
    position: absolute;
    left: calc(100% + 0px);
    top: 50%;
    transform: translateY(-50%);
    margin-left: 12px;
    font-family: 'Caveat', cursive;
    font-size: 1.1rem;
    color: #6772e5;
    white-space: nowrap;
}

/*#endregion*/

/* #region nav bar additions*/

.nav-right-container {
    display: flex;
    align-items: center;
    height: 100%;
}
/*#endregion*/

/* #region Nav links */

.nav-links {
    display: flex;
    flex-direction: row;  
    list-style: none;
    margin: 0;
    padding: 0;
    height: 100%;
}

.nav-links li {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    margin: 0 0.2rem; 
}

.nav-links a {
    color: rgba(255, 255, 255, 0.8); 
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1.2rem; 
    transition: all 0.3s ease;
    height: calc(100% - 20px); 
    display: flex;
    align-items: center;
    position: relative;
    border-radius: 6px; 
}

.nav-links a:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1); 
}

.nav-links a.active {
    color: #6772e5;
    background-color: rgba(103, 114, 229, 0.15);
}

/*#endregion*/

/* #region User Profile on Nav Bar */
.user-profile {
    position: relative;
    margin-left: 1.5rem;
}

.profile-image {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.profile-image-placeholder {
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
}

.profile-image-placeholder::before {
    content: "P";
    font-size: 1.4rem;
    line-height: 1;
}

.user-profile:hover .profile-image {
    box-shadow: 0 4px 12px rgba(103, 114, 229, 0.4);
    border-color: #6772e5;
    transform: scale(1.05);
}

/* Add this to your static/css/style.css file */

/* Non-authenticated user icon */
.user-auth-icon {
    position: relative;
    margin-left: 1.5rem;
    height: 100%;
    display: flex;
    align-items: center;
}

.auth-icon-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.8);
}

.auth-icon-link:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.15);
    border-color: #6772e5;
    box-shadow: 0 4px 12px rgba(103, 114, 229, 0.4);
    transform: scale(1.05);
}

.auth-icon-link svg {
    width: 22px;
    height: 22px;
}

/* Active state when on auth pages */
body:has(.auth-wrapper) .auth-icon-link {
    color: #6772e5;
    background-color: rgba(103, 114, 229, 0.15);
    border-color: #6772e5;
}

/*#endregion*/

/* #region Profile dropdown */

.profile-dropdown {
    min-width: 200px;
    right: auto; 
    left: auto; 
    transform-origin: top right; 
}

.user-profile .dropdown-content {
    position: absolute;
    top: 100%;
    right: -85px; 
    min-width: 220px;
    left: auto;
    z-index: 9999 !important;
}

.profile-icon {
    margin-right: 0.8rem;
    font-style: normal;
    display: inline-block;
    width: 1.2rem;
    text-align: center;
}

.logout-link {
    color: #ff6b6b !important;
}

.logout-link:hover {
    background-color: rgba(255, 107, 107, 0.1) !important;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .brand-motto {
        display: none;
    }
    
    .nav-links a {
        padding: 0 0.8rem;
    }
    
    .profile-dropdown {
        right: 0; 
        transform-origin: top right; 
    }
}

@media (max-width: 768px) {
    .logo-s-container {
        width: 35px;
        height: 40px;
        margin-right: -9px;
    }
    
    .brand-name {
        font-size: 1.8rem;
        padding-left: 2px;
        margin-left: -3px;
    }

    .nav-right-container {
        display: none;
    }
}

@media (max-width: 480px) {
    .logo-s-container {
        width: 30px;
        height: 35px;
        margin-right: -7px;
    }
    
    .brand-name {
        font-size: 1.6rem;
        padding-left: 1px;
        margin-right: -2px;
    }
}

@media (max-width: 768px) {
    .actual-logo {
        height: 40px;
        width: 35px;
        margin-right: -9px;
    }
    
    .nav-right-container {
        display: none; 
    }
}

@media (max-width: 480px) {
    .actual-logo {
        height: 35px;
    }
}

.dropdown:hover .dropdown-content {
    display: block;
    opacity: 1;
    transform: translateY(0);
}
/*#endregion*/

/* #region main */

main {
    min-height: calc(100vh - 160px); 
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Allow specific pages to override main constraints */
main:has(.full-width) {
    max-width: none;
    margin: 0;
    padding: 0;
}

/* #endregion */

/* #region footer */

.site-footer {
    background-color: #32325d; 
    color: white;
    padding: 0;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section {
    display: flex;
    flex-direction: column;
}

.footer-heading {
    color: white;
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
    font-weight: 600;
    position: relative;
    padding-bottom: 0.75rem;
}

.footer-heading:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 2.5rem;
    height: 2px;
    background-color: #6772e5; 
    border-radius: 2px;
}

.footer-tagline {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
    font-style: italic;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

.social-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.2s ease;
}

.social-link:hover {
    color: white;
}

.footer-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-nav li {
    margin-bottom: 0.75rem;
}

.footer-nav a, 
.legal-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-block;
}

.footer-nav a:hover,
.legal-links a:hover {
    color: white;
    transform: translateX(3px);
}

.contact-info p {
    margin-bottom: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
}

.footer-bottom {
    padding: 1.5rem 2rem;
    background-color: rgba(0, 0, 0, 0.1);
    text-align: center;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
}

.legal-links {
    display: flex;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        align-items: center;
    }
    
    .legal-links {
        margin-top: 0.75rem;
    }
}
/* #endregion */

/* #region home page */

.hero {
    text-align: center;
    padding: 5rem 1rem 4rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
    margin: 2rem 0;
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    color: #32325d; 
    letter-spacing: 0.02em; 
    font-weight: 600;
    font-family: Arial, sans-serif; 
}

.hero .tagline {
    font-size: 1.3rem;
    margin: 0 auto 2.5rem;
    color: #6b7c93; 
    max-width: 600px;
    line-height: 1.6;
    font-weight: 400; 
    font-style: italic;
}

.cta-button {
    display: inline-block;
    background-color: #6772e5; 
    color: white;
    padding: 0.85rem 2rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
    font-size: 0.95rem;
}

.cta-button:hover {
    background-color: #5469d4;
    transform: translateY(-1px);
    box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);
}

.cta-button:active {
    transform: translateY(1px);
}
/*#endregion*/

/* #region Alexandria and Just Talk specific styling */

.just-talk-section,
.alexandria-section {
    background-color: white; 
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(50, 50, 93, 0.1);
    border: 1px solid rgba(103, 114, 229, 0.1);
}

.home-section:hover .section-content {
    transform: none; 
}

.section-title {
    font-size: 2.6rem;
    color: #32325d;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
    transition: color 0.4s ease; 
}

.section-title::after {
    content: none; 
}

.home-section:hover .section-title {
    color: #6772e5; 
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.section-button {
    display: inline-block;
    background-color: #6772e5;
    color: white;
    padding: 0.9rem 2.5rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(103, 114, 229, 0.2);
    position: relative;
    overflow: hidden;
}

.section-button::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.7s ease;
}

.home-section:hover .section-button::before {
    left: 100%;
}

.section-button:hover {
    background-color: #5469d4;
    transform: translateY(-3px);
    box-shadow: 0 7px 14px rgba(103, 114, 229, 0.3);
}

.section-cta {
    color: #6772e5;
    font-weight: 600;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    position: relative;
    padding-bottom: 3px;
    transition: all 0.3s ease;
}

.section-cta::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #6772e5;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
}

.home-section:hover .section-cta::after {
    transform: scaleX(1);
}

.section-cta::before {
    content: "→";
    opacity: 0;
    margin-left: 0;
    margin-right: -10px;
    transition: all 0.3s ease;
}

.home-section:hover .section-cta::before {
    opacity: 1;
    margin-left: 5px;
    margin-right: 0;
}

/* #endregion */

/* #region Placeholder content for recruitment section */

.placeholder-content {
    padding: 1.5rem;
    background-color: #f8fafc;
    border-radius: 4px;
    border: 1px solid #e6ebf1;
}

.placeholder-content a {
    color: #6772e5;
    text-decoration: none;
}

.placeholder-content a:hover {
    text-decoration: underline;
}
/* #endregion */

/* #region Dropdowns */

.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #2a3150; /* Darker blue for dropdowns */
    min-width: 220px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    padding: 0.5rem 0;
    z-index: 9999;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown:hover .dropdown-content {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-content a {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.6rem 1.2rem;
    text-decoration: none;
    display: block;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.dropdown-content a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.dropdown-divider {
    height: 1px;
    margin: 0.5rem 0;
    background-color: rgba(255, 255, 255, 0.1);
}

/* #endregion */

/* #region Library Page Styling */

.library {
    padding: 4rem 0 2rem; 
    max-width: 1200px;
    margin: 0 auto;
}

.library-title {
    text-align: center;
    margin-bottom: 0rem; 
    position: relative;
}

.library .library-title h1 {
    color: #6772e5 !important; 
    font-size: 5rem !important; 
    font-family: Arial, sans-serif;
    font-weight: 700;
    margin: 50px;
    letter-spacing: -0.01em;
    display: inline-block;
}

.library .library-title h1:after {
    display: none !important;
    content: none !important;
}

.library h1 {
    color: #32325d;
    text-align: center;
    font-size: 2.4rem;
    margin-bottom: 2rem; 
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 0 1.5rem;
}

@media (max-width: 768px) {
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

.category-card {
    background-color: white;
    border-radius: 12px;
    padding: 2.5rem 2rem;
    box-shadow: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid rgba(103, 114, 229, 0.1);
}

.category-card:hover {
    transform: scale(1.05); 
    box-shadow: 0 8px 15px rgba(103, 114, 229, 0.15);
    border-color: rgba(103, 114, 229, 0.2);
}

.category-icon-placeholder {
    width: 80px;
    height: 80px;
    margin-bottom: 1.5rem;
    border-radius: 50%;
    background-color: #f0f4ff; 
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(103, 114, 229, 0.2);
    transition: all 0.3s ease;
}

.category-card:hover .category-icon-placeholder {
    background-color: #e6ebff; 
    border-color: rgba(103, 114, 229, 0.4);
}

.category-card h2 {
    color: #32325d;
    margin-bottom: 0.8rem;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.category-card:hover h2 {
    color: #6772e5; 
}

.category-card p {
    color: #6b7c93;
    margin: 0;
    line-height: 1.5;
}

/* #endregion */

/* #region Library Carousel styling */

.featured-carousel,
.recent-carousel {
    margin-bottom: 3rem;
}


.carousel-controls {
    display: flex;
    gap: 0.5rem;
}

.carousel-arrow {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: white;
    border: 1px solid rgba(103, 114, 229, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6772e5;
    font-size: 1.2rem;
    box-shadow: 0 2px 8px rgba(103, 114, 229, 0.1);
}

.carousel-arrow:hover {
    background-color: #6772e5;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(103, 114, 229, 0.2);
}

.carousel-arrow:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.carousel-container {
    position: relative;
    overflow: hidden;
    margin: 0 -1rem;
    padding: 1rem;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
    gap: 1.5rem;
    padding: 0.5rem 0;
}

.carousel-item {
    min-width: 220px;
    flex-shrink: 0;
}

.book-card {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(50, 50, 93, 0.1);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(103, 114, 229, 0.15);
}

.book-cover {
    height: 280px;
    overflow: hidden;
    background-color: #f0f4ff;
    position: relative;
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.book-card:hover .book-cover img {
    transform: scale(1.05);
}

.book-info {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.book-title {
    color: #32325d;
    font-size: 1.1rem;
    margin: 0 0 0.4rem;
    line-height: 1.4;
    font-weight: 600;
}

.book-author {
    color: #6b7c93;
    font-size: 0.9rem;
    margin: 0 0 0.8rem;
}

@media (max-width: 768px) {
    .carousel-item {
        min-width: 180px;
    }
    
    .book-cover {
        height: 240px;
    }
}
/*#endregion*/

/* #region Category Page in Library */

.category h1 {
    margin-bottom: 1rem;
    color: #32325d;
}

.category-description {
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
}

.category-description p {
    color: #6b7c93;
    font-size: 1.1rem;
    line-height: 1.6;
}

.book-grid {
    background-color: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
}

.placeholder-text {
    color: #8898aa;
    text-align: center;
    padding: 2rem;
    font-style: italic;
}
/*#endregion*/

/* #region Book Links */
.simple-book-link {
    display: block;
    text-decoration: none;
    transition: transform 0.3s ease;
    width: 200px;
    margin: 0 auto;
}

.simple-book-link:hover {
    transform: scale(1.05);
}

.simple-book-placeholder {
    text-align: center;
    padding: 1rem;
}

.placeholder-image {
    width: 160px;
    height: 240px;
    background-color: #f0f4ff;
    border: 2px solid #6772e5;
    border-radius: 8px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect width="100" height="100" fill="%23f0f4ff"/><text x="50" y="50" text-anchor="middle" dominant-baseline="middle" font-family="Arial" font-size="12" fill="%236772e5">JPG</text></svg>');
    background-size: cover;
    background-repeat: no-repeat;
    transition: all 0.3s ease;
}

.simple-book-link:hover .placeholder-image {
    border-color: #5469d4;
    background-color: #e6efff;
    box-shadow: 0 4px 12px rgba(103, 114, 229, 0.2);
}

.simple-book-title {
    color: #1a1f36;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
    transition: color 0.3s ease;
}

.simple-book-link:hover .simple-book-title {
    color: #6772e5;
}

.book-grid {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 300px;
    padding: 2rem;
}

.placeholder-text {
    color: #8898aa;
    text-align: center;
    padding: 2rem;
    font-style: italic;
}

.placeholder-image {
    width: 160px;
    height: 240px;
    background-color: #f0f4ff;
    border: 2px solid #6772e5;
    border-radius: 8px;
    margin: 0 auto 1rem;
    background-image: url('/static/images/placeholder.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: all 0.3s ease;
}
/*#endregion */

/* #region Alexandria Interface */

.alexandria-interface {
    border-radius: 12px;
    position: relative;
    min-height: calc(100vh - 160px);
    display: flex;
    flex-direction: column;
}

.text-reading-container {
    background-color: #1a1f36;
    padding: 0; 
    min-height: 70vh;
    max-height: 80vh;
    overflow-y: auto;
    overflow-x: hidden; 
    border-radius: 0 0 12px 12px;
    position: relative;
    scroll-behavior: smooth; 
    flex-grow: 1;
}

.text-content-reading {
    font-size: 1.4rem;
    line-height: 2;
    font-family: Georgia, serif;
    letter-spacing: 0.02em;
    padding: 3rem; 
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap; 
}

.text-content-reading .word {
    display: inline;
    padding: 0 1px;
    border-radius: 2px;
    transition: all 0.3s ease;
    cursor: default;
    position: relative; 
}

.text-content-reading .word.unread {
    color: rgba(255, 255, 255, 0.3);
}

.text-content-reading .word.current {
    color: #6772e5;
    background-color: rgba(103, 114, 229, 0.15);
    padding: 0 3px;
    border-radius: 3px;
    font-weight: 500;
    box-shadow: 0 0 8px rgba(103, 114, 229, 0.3);
    transform: scale(1.02);
    z-index: 1; 
}

.text-content-reading .word.read {
    color: #6772e5;
    opacity: 0.9;
}

.text-reading-container::-webkit-scrollbar {
    width: 12px;
}

.text-reading-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
}

.text-reading-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    transition: background 0.3s ease;
}

.text-reading-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/*#endregion*/

/* #region Just Talk Hero Section on Homepage */

.just-talk-hero {
    margin-bottom: 2rem;
    background-color: #f6f9fc; 
    border: 1px solid #e6ebf1;
}

.just-talk-hero h1 {
    color: #6772e5; 
}
/*#endregion*/

/* #region Voice Controls */

.voice-controls-area {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    background-color: rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.voice-microphone-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #6772e5;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 4px 20px rgba(103, 114, 229, 0.3);
}

.voice-microphone-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(103, 114, 229, 0.4);
    background-color: #5469d4;
}

.voice-microphone-btn:active {
    transform: scale(0.95);
}

.voice-microphone-btn[data-state="listening"] {
    background-color: #ff6b6b;
    animation: listening-pulse 1s infinite;
}

.voice-microphone-btn[data-state="processing"] {
    background-color: #ffd93d;
}

@keyframes listening-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.microphone-icon {
    width: 32px;
    height: 32px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.microphone-icon::before {
    content: "MIC";
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.voice-help {
    text-align: center;
}

.voice-help p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    margin: 0;
    font-weight: 400;
}

@media (max-width: 768px) {
    .mode-toggle-container {
        padding: 0.75rem 1rem 1.25rem;
        background-color: transparent;
    }
    
    .mode-btn {
        padding: 0.45rem 1rem;
        min-width: 60px;
        font-size: 0.8rem;
    }
    
    .mode-indicator {
        width: 60px;
    }
    
    .mode-toggle[data-active="voice"] .mode-indicator {
        transform: translateX(60px);
    }
    
    .voice-messages {
        padding: 1.5rem;
    }
    
    .voice-message {
        max-width: 90%;
    }
    
    .voice-message-content {
        padding: 1rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .voice-microphone-btn {
        width: 70px;
        height: 70px;
    }
    
    .microphone-icon {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }
    
    .microphone-icon::before {
        font-size: 0.6rem;
    }
    
    .voice-controls-area {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .voice-microphone-btn {
        width: 65px;
        height: 65px;
    }
    
    .microphone-icon {
        width: 26px;
        height: 26px;
    }
    
    .microphone-icon::before {
        font-size: 0.55rem;
    }
    
    .voice-help p {
        font-size: 0.8rem;
    }
}

/* #endregion */

/*#region Converbookfunctionality */

.text-reading-container.playing {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.control-btn.playing {
    background-color: #e53e3e;
    color: white;
    animation: pulse-playing 2s infinite ease-in-out;
}

.control-btn.playing:hover {
    background-color: #c53030;
}

.control-btn.listening {
    background-color: #e53e3e;
    color: white;
    animation: pulse-listening 1s infinite ease-in-out;
}

@keyframes pulse-playing {
    0% { 
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(229, 62, 62, 0.3);
    }
    50% { 
        transform: scale(1.02);
        box-shadow: 0 6px 16px rgba(229, 62, 62, 0.4);
    }
    100% { 
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(229, 62, 62, 0.3);
    }
}

@keyframes pulse-listening {
    0% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(1.05);
        opacity: 0.8;
    }
    100% { 
        transform: scale(1);
        opacity: 1;
    }
}

.btn-icon {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
}

.conversation-panel {
    margin: 2rem 0 0 0;
    margin-top: 0;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(50, 50, 93, 0.08);
    position: relative; 
}

.conversation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(103, 114, 229, 0.1);
    background-color: #f8faff;
    position: sticky;
    top: 0;
    z-index: 5;
    border-radius: 12px 12px 0 0;
}

.messages-container {
    max-height: 400px;
    overflow-y: auto;
    padding: 1.5rem 2rem;
    scroll-behavior: smooth;
}

.message {
    margin: 1.5rem 0;
    padding: 1.2rem;
    border-radius: 12px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.message.user {
    background: linear-gradient(135deg, #e6fffa 0%, #b2f5ea 100%);
    border-left: 4px solid #38b2ac;
}

.message.assistant {
    background: linear-gradient(135deg, #f0fff4 0%, #c6f6d5 100%);
    border-left: 4px solid #48bb78;
}

@media (max-width: 768px) {
    .text-reading-container {
        min-height: 400px;
        max-height: 600px;
    }
    
    .text-content-reading {
        font-size: 1.2rem;
        line-height: 1.8;
        padding: 2rem;
    }
    
    .control-btn {
        min-width: 140px;
        height: 50px;
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .voice-controls {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .voice-controls {
    margin-top: 1.5rem;
    }

    .text-reading-container {
    min-height: 55vh;
    max-height: 65vh;
    }
    
    .text-content-reading {
        font-size: 1.1rem;
        line-height: 1.7;
        padding: 1.5rem;
    }
    
    .control-btn {
        min-width: 120px;
        height: 45px;
        padding: 0.7rem 1.2rem;
        font-size: 0.85rem;
    }
    
    .text-content-reading .word.current {
        padding: 0 2px;
        transform: scale(1.01);
    }
}

.control-btn.playing {
    background-color: #e53e3e;
    color: white;
}

.control-btn.playing:hover {
    background-color: #c53030;
}

.control-btn.listening {
    background-color: #e53e3e;
    color: white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.btn-icon {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px; 
}

.status-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 2rem;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(50, 50, 93, 0.08);
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #a0aec0;
    transition: all 0.3s ease;
}

.status-text {
    font-weight: 500;
    color: #4a5568;
}

.text-display-container {
    padding: 2rem;
}

.text-display {
    background-color: #f7fafc;
    border-radius: 12px;
    padding: 2rem;
    border-left: 4px solid #6772e5;
    min-height: 300px;
}

.text-content {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #2d3748;
}

.conversation-panel {
    margin: 2rem;
    margin-top: 0;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(50, 50, 93, 0.08);
}

.conversation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(103, 114, 229, 0.1);
    background-color: #f8faff;
}

.messages-container {
    max-height: 400px;
    overflow-y: auto;
    padding: 1.5rem 2rem;
}

.message {
    margin: 1.5rem 0;
    padding: 1.2rem;
    border-radius: 12px;
}

.message.user {
    background: linear-gradient(135deg, #e6fffa 0%, #b2f5ea 100%);
    border-left: 4px solid #38b2ac;
}

.message.assistant {
    background: linear-gradient(135deg, #f0fff4 0%, #c6f6d5 100%);
    border-left: 4px solid #48bb78;
}

/*#endregion*/

/* #region Voice Controls */

.voice-controls-area {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    background-color: rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.voice-microphone-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #6772e5;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 4px 20px rgba(103, 114, 229, 0.3);
}

.voice-microphone-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(103, 114, 229, 0.4);
    background-color: #5469d4;
}

.voice-microphone-btn:active {
    transform: scale(0.95);
}

.voice-microphone-btn[data-state="listening"] {
    background-color: #ff6b6b;
    animation: listening-pulse 1s infinite;
}

.voice-microphone-btn[data-state="processing"] {
    background-color: #ffd93d;
}

@keyframes listening-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.microphone-icon {
    width: 32px;
    height: 32px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.microphone-icon::before {
    content: "MIC";
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.voice-help {
    text-align: center;
}

.voice-help p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    margin: 0;
    font-weight: 400;
}

@media (max-width: 768px) {
    .mode-toggle-container {
        padding: 0.75rem 1rem 1.25rem;
        background-color: transparent; /* Remove dark blue container on mobile */
    }
    
    .mode-btn {
        padding: 0.45rem 1rem;
        min-width: 60px;
        font-size: 0.8rem;
    }
    
    .mode-indicator {
        width: 60px;
    }
    
    .mode-toggle[data-active="voice"] .mode-indicator {
        transform: translateX(60px);
    }
    
    .voice-messages {
        padding: 1.5rem;
    }
    
    .voice-message {
        max-width: 90%;
    }
    
    .voice-message-content {
        padding: 1rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .voice-microphone-btn {
        width: 70px;
        height: 70px;
    }
    
    .microphone-icon {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }
    
    .microphone-icon::before {
        font-size: 0.6rem;
    }
    
    .voice-controls-area {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .voice-microphone-btn {
        width: 65px;
        height: 65px;
    }
    
    .microphone-icon {
        width: 26px;
        height: 26px;
    }
    
    .microphone-icon::before {
        font-size: 0.55rem;
    }
    
    .voice-help p {
        font-size: 0.8rem;
    }
}

/* #endregion */

/* #region Search Controls Misc */

/* Navigation Dropdown Disable Styles */
/* Add this to your style.css or create as separate file */

/* When search is active, disable all nav dropdowns */
body.search-active-disable-nav .dropdown-content,
nav.dropdowns-disabled .dropdown-content {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Prevent hover effects on dropdown triggers */
body.search-active-disable-nav .dropdown:hover .dropdown-content,
nav.dropdowns-disabled .dropdown:hover .dropdown-content {
    display: none !important;
    opacity: 0 !important;
    transform: translateY(10px) !important;
}

/* Disable pointer events on dropdown links when search is active */
body.search-active-disable-nav .dropdown > a[data-dropdown-disabled="true"],
nav.dropdowns-disabled .dropdown > a {
    pointer-events: none !important;
    cursor: default !important;
}

/* Optional: Visual indicator that dropdowns are disabled */
body.search-active-disable-nav .dropdown > a,
nav.dropdowns-disabled .dropdown > a {
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

/* Keep the main nav links visible but non-interactive for dropdowns */
body.search-active-disable-nav nav .dropdown::after,
nav.dropdowns-disabled .dropdown::after {
    display: none; /* Hide dropdown arrow if you have one */
}

/* Ensure search elements stay interactive */
body.search-active-disable-nav .bubble-search-container,
body.search-active-disable-nav .bubble-search-container *,
body.search-active-disable-nav .search-dropdown,
body.search-active-disable-nav .search-dropdown * {
    pointer-events: auto !important;
}

/* Profile dropdown should also be disabled */
body.search-active-disable-nav .user-profile .dropdown-content,
nav.dropdowns-disabled .user-profile .dropdown-content {
    display: none !important;
}

body.search-active-disable-nav .user-profile:hover .dropdown-content,
nav.dropdowns-disabled .user-profile:hover .dropdown-content {
    display: none !important;
}

/* Mobile responsive - ensure dropdowns stay disabled on mobile too */
@media (max-width: 768px) {
    body.search-active-disable-nav .dropdown-content,
    nav.dropdowns-disabled .dropdown-content {
        display: none !important;
        visibility: hidden !important;
    }
}

/*#endregion*/

@media (max-width: 992px) {
    .chat-container {
        flex-direction: column;
        min-height: 0;
    }
    
    .character-panel {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(103, 114, 229, 0.1);
    }
    
    .character-header {
        flex-direction: row;
        align-items: center;
        text-align: left;
    }
    
    .character-portrait {
        margin-bottom: 0;
        margin-right: 1.5rem;
        width: 80px;
        height: 80px;
    }
    
    .suggested-topics {
        padding-bottom: 2rem;
    }
    
    .messages-container {
        max-height: 500px;
    }
}

/* #region Sub-header search bar */

/* Clipping wrapper to contain the sub-header */
.search-subheader-wrapper {
    position: fixed;
    top: 80px; /* Start below main nav */
    left: 0;
    right: 0;
    height: 80px;
    overflow: hidden; /* This clips the sub-header when it slides up */
    z-index: 99;
    pointer-events: none; /* Allow clicks to pass through the wrapper */
}

/* Updated Glassmorphic Search Sub-Header Styles */
.search-subheader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    /* Added white tint to the glassmorphic background */
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
    pointer-events: auto; /* Re-enable pointer events for the actual sub-header */
}

/* Hidden state - slides up within the wrapper (gets clipped) */
.search-subheader.hidden {
    transform: translateY(-100%);
}

/* Enhanced glass morphism for library pages (purple gradient background) */
.library ~ .search-subheader-wrapper .search-subheader,
.enhanced-library-category ~ .search-subheader-wrapper .search-subheader {
    background: rgba(255, 255, 255, 0.18);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

/* Enhanced glass morphism for Just Talk pages (purple-red gradient) */
.just-talk-body .search-subheader,
.just-talk-category-body .search-subheader {
    background: rgba(255, 255, 255, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

/* Content container - updated for flexible layout */
.search-subheader-content {
    width: 100%;
    max-width: 1400px; /* Increased to accommodate left-positioned button */
    padding: 0 2rem;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Back button styling */
.subheader-back-button {
    position: absolute;
    left: 1rem; /* Align with logo position */
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
    z-index: 10;
}

.subheader-back-button:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
    /* Removed transform effect */
}

.back-arrow {
    font-size: 1.2rem;
    display: inline-block;
}

/* Removed hover transform for back arrow */

.back-text {
    font-size: 1rem;
}

/* Bubble Search Container - constant width across all pages */
.bubble-search-container {
    position: relative;
    width: 100%;
    max-width: 600px; /* Fixed max-width for consistency */
    margin: 0 auto;
}

/* Removed the .with-back-button variant to keep consistent width */

/* Bubble Search Input */
.bubble-search-input {
    width: 100%;
    padding: 1rem 3.5rem 1rem 1.5rem;
    font-size: 1rem;
    border: none;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.95);
    color: #1a1b2e;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    outline: none;
}

.bubble-search-input::placeholder {
    color: rgba(26, 27, 46, 0.5);
}

.bubble-search-input:focus {
    background: rgba(255, 255, 255, 1);
    box-shadow: 
        0 12px 48px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05),
        0 0 0 3px rgba(102, 126, 234, 0.2);
}

/* Different focus colors for different sections */
.just-talk-body .bubble-search-input:focus,
.just-talk-category-body .bubble-search-input:focus {
    box-shadow: 
        0 12px 48px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05),
        0 0 0 3px rgba(139, 92, 246, 0.2);
}

/* Bubble Search Button */
.bubble-search-button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Different button gradient for Just Talk pages */
.just-talk-body .bubble-search-button,
.just-talk-category-body .bubble-search-button {
    background: linear-gradient(135deg, #8B5CF6 0%, #EF4444 100%);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.bubble-search-button:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.just-talk-body .bubble-search-button:hover,
.just-talk-category-body .bubble-search-button:hover {
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.bubble-search-button:active {
    transform: translateY(-50%) scale(0.95);
}

/* Adjust page content to account for sub-header */
body.has-search-subheader {
    padding-top: 160px; /* 80px nav + 80px sub-header */
}

/* Hide original back buttons when sub-header is present */
body.has-search-subheader .back-button,
body.has-search-subheader .back-link-container {
    display: none !important;
}

/* Large screens - maintain consistent positioning */
@media (min-width: 1400px) {
    .subheader-back-button {
        left: 1rem !important
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .search-subheader-wrapper,
    .search-subheader {
        height: 70px;
    }
    
    .search-subheader-content {
        padding: 0 1rem;
    }
    
    .subheader-back-button {
        left: 1rem; /* Adjust for smaller screens */
        padding: 0.6rem 1rem;
    }
    
    .back-text {
        display: none; /* Hide text on mobile, keep arrow only */
    }
    
    .bubble-search-input {
        padding: 0.875rem 3rem 0.875rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .bubble-search-button {
        width: 36px;
        height: 36px;
    }
    
    body.has-search-subheader {
        padding-top: 150px;
    }
}

@media (max-width: 480px) {
    .bubble-search-input::placeholder {
        font-size: 0.85rem;
    }
    
    .subheader-back-button {
        padding: 0.6rem 0.8rem;
    }
}

/* Nav above search sub-header */
nav, .navbar {
    z-index: 1100 !important;
    position: relative;
}

.dropdown-content {
    z-index: 1100 !important;
}
/* #endregion */


/*#region Just Talk Search*/

/* Just Talk Search Dropdown Styles */
/* Add these to your style.css file */

/* Just Talk specific dropdown styling */
.just-talk-dropdown {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 92, 246, 0.2);
    box-shadow: 
        0 20px 60px rgba(139, 92, 246, 0.15),
        0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Just Talk dropdown sections */
.just-talk-dropdown .dropdown-section {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(139, 92, 246, 0.1);
}

.just-talk-dropdown .dropdown-section:last-child {
    border-bottom: none;
}

.just-talk-dropdown .dropdown-section-header {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(139, 92, 246, 0.6);
}

/* Just Talk dropdown items */
.just-talk-dropdown .dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.just-talk-dropdown .dropdown-item:hover,
.just-talk-dropdown .dropdown-item.active {
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.1) 0%, rgba(239, 68, 68, 0.1) 100%);
    color: #8B5CF6;
}

.just-talk-dropdown .figure-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.just-talk-dropdown .figure-title {
    font-size: 1rem;
    font-weight: 500;
    color: #1a1a1a;
}

.just-talk-dropdown .dropdown-item:hover .figure-title {
    color: #8B5CF6;
}

.just-talk-dropdown .category-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(239, 68, 68, 0.1) 100%);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #8B5CF6;
}

.just-talk-dropdown .dropdown-item:hover .category-tag {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(239, 68, 68, 0.2) 100%);
}

/* Just Talk dropdown footer */
.just-talk-dropdown .dropdown-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid rgba(139, 92, 246, 0.1);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, rgba(239, 68, 68, 0.05) 100%);
}

.just-talk-dropdown .see-all-results {
    display: block;
    text-align: center;
    color: #8B5CF6;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.just-talk-dropdown .see-all-results:hover {
    color: #EF4444;
}

/* Just Talk dropdown loading state */
.just-talk-dropdown .dropdown-loading {
    padding: 2rem;
    text-align: center;
    color: #8B5CF6;
}

.just-talk-dropdown .spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(139, 92, 246, 0.2);
    border-top-color: #8B5CF6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

/* Just Talk dropdown no results */
.just-talk-dropdown .dropdown-no-results {
    padding: 2rem;
    text-align: center;
    color: #666;
}

.just-talk-dropdown .no-results-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.just-talk-dropdown .no-results-text {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.just-talk-dropdown .no-results-suggestion {
    font-size: 0.9rem;
    color: #666;
}

/* Search overlay for Just Talk */
.just-talk-body .search-overlay,
.just-talk-category-body .search-overlay {
    background: rgba(139, 92, 246, 0.3);
}

/* Animation for dropdown appearance */
.just-talk-dropdown {
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.just-talk-dropdown.active {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .just-talk-dropdown {
        max-height: 60vh;
        overflow-y: auto;
    }
    
    .just-talk-dropdown .dropdown-item {
        padding: 1rem;
    }
}

/* Spinner animation */
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Just Talk Search Dropdown Styles */
/* Add these to your style.css file */

/* Base dropdown styling for Just Talk */
.search-dropdown.just-talk-dropdown {
    position: fixed !important;
    z-index: 10000 !important;
    display: none;
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    box-shadow: 
        0 20px 60px rgba(139, 92, 246, 0.15),
        0 10px 30px rgba(0, 0, 0, 0.1);
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Ensure dropdown content is visible */
.just-talk-dropdown .search-dropdown-content {
    padding: 8px 0;
    min-height: 50px;
}

/* Just Talk dropdown sections */
.just-talk-dropdown .dropdown-section {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(139, 92, 246, 0.1);
}

.just-talk-dropdown .dropdown-section:last-child {
    border-bottom: none;
}

.just-talk-dropdown .dropdown-section-header {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(139, 92, 246, 0.6);
}

/* Just Talk dropdown items */
.just-talk-dropdown .dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.just-talk-dropdown .dropdown-item:hover,
.just-talk-dropdown .dropdown-item.active {
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.1) 0%, rgba(239, 68, 68, 0.1) 100%);
    color: #8B5CF6;
}

.just-talk-dropdown .figure-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.just-talk-dropdown .figure-title {
    font-size: 1rem;
    font-weight: 500;
    color: #1a1a1a;
}

.just-talk-dropdown .dropdown-item:hover .figure-title {
    color: #8B5CF6;
}

.just-talk-dropdown .category-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(239, 68, 68, 0.1) 100%);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #8B5CF6;
}

.just-talk-dropdown .dropdown-item:hover .category-tag {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(239, 68, 68, 0.2) 100%);
}

/* Just Talk dropdown footer */
.just-talk-dropdown .dropdown-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid rgba(139, 92, 246, 0.1);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, rgba(239, 68, 68, 0.05) 100%);
}

.just-talk-dropdown .see-all-results {
    display: block;
    text-align: center;
    color: #8B5CF6;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.just-talk-dropdown .see-all-results:hover {
    color: #EF4444;
}

/* Just Talk dropdown loading state */
.just-talk-dropdown .dropdown-loading {
    padding: 2rem;
    text-align: center;
    color: #8B5CF6;
}

.just-talk-dropdown .spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(139, 92, 246, 0.2);
    border-top-color: #8B5CF6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

/* Just Talk dropdown no results */
.just-talk-dropdown .dropdown-no-results {
    padding: 2rem;
    text-align: center;
    color: #666;
}

.just-talk-dropdown .no-results-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.just-talk-dropdown .no-results-text {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.just-talk-dropdown .no-results-suggestion {
    font-size: 0.9rem;
    color: #666;
}

/* Search overlay for Just Talk */
.just-talk-body .search-overlay,
.just-talk-category-body .search-overlay {
    background: rgba(139, 92, 246, 0.3);
}

/* Animation for dropdown appearance */
.just-talk-dropdown {
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.just-talk-dropdown.active {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .just-talk-dropdown {
        max-height: 60vh;
        overflow-y: auto;
    }
    
    .just-talk-dropdown .dropdown-item {
        padding: 1rem;
    }
}

/* Spinner animation */
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Just Talk Search Dropdown Styles - Simplified */
/* Add these to your style.css file */

/* Base dropdown styling for Just Talk */
.search-dropdown.just-talk-dropdown {
    position: fixed !important;
    z-index: 10000 !important;
    display: none;
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    box-shadow: 
        0 20px 60px rgba(139, 92, 246, 0.15),
        0 10px 30px rgba(0, 0, 0, 0.1);
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Ensure dropdown content is visible */
.just-talk-dropdown .search-dropdown-content {
    padding: 8px 0;
    min-height: 50px;
}

/* Just Talk dropdown sections */
.just-talk-dropdown .dropdown-section {
    padding: 0.5rem 0;
}

/* Simplified section header */
.just-talk-dropdown .dropdown-section-header {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(139, 92, 246, 0.6);
    border-bottom: 1px solid rgba(139, 92, 246, 0.1);
    margin-bottom: 0.5rem;
}

/* Just Talk dropdown items - figures only */
.just-talk-dropdown .dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.just-talk-dropdown .dropdown-item:hover,
.just-talk-dropdown .dropdown-item.active {
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.1) 0%, rgba(239, 68, 68, 0.1) 100%);
    color: #8B5CF6;
}

.just-talk-dropdown .figure-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.just-talk-dropdown .figure-title {
    font-size: 1rem;
    font-weight: 500;
    color: #1a1a1a;
}

.just-talk-dropdown .dropdown-item:hover .figure-title {
    color: #8B5CF6;
}

/* Just Talk dropdown loading state */
.just-talk-dropdown .dropdown-loading {
    padding: 2rem;
    text-align: center;
    color: #8B5CF6;
}

.just-talk-dropdown .spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(139, 92, 246, 0.2);
    border-top-color: #8B5CF6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

/* Just Talk dropdown no results */
.just-talk-dropdown .dropdown-no-results {
    padding: 2rem;
    text-align: center;
    color: #666;
}

.just-talk-dropdown .no-results-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.just-talk-dropdown .no-results-text {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.just-talk-dropdown .no-results-suggestion {
    font-size: 0.9rem;
    color: #666;
}

/* Search overlay for Just Talk */
.just-talk-body .search-overlay,
.just-talk-category-body .search-overlay,
.just-talk-search-body .search-overlay {
    background: rgba(139, 92, 246, 0.3);
}

/* Animation for dropdown appearance */
.just-talk-dropdown {
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.just-talk-dropdown.active {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .just-talk-dropdown {
        max-height: 60vh;
        overflow-y: auto;
    }
    
    .just-talk-dropdown .dropdown-item {
        padding: 1rem;
    }
}

/* Spinner animation */
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Disable ALL browser autocomplete/autofill styling for Just Talk search */
#justTalkGlobalSearch::-webkit-contacts-auto-fill-button,
#justTalkGlobalSearch::-webkit-credentials-auto-fill-button {
    visibility: hidden;
    display: none !important;
    pointer-events: none;
    height: 0;
    width: 0;
    margin: 0;
}

/* Hide autocomplete dropdown arrow/indicator */
#justTalkGlobalSearch::-webkit-calendar-picker-indicator {
    display: none !important;
}

/* Prevent Chrome's autocomplete dropdown */
#justTalkGlobalSearch:-webkit-autofill,
#justTalkGlobalSearch:-webkit-autofill:hover,
#justTalkGlobalSearch:-webkit-autofill:focus,
#justTalkGlobalSearch:-webkit-autofill:active {
    transition: background-color 5000s ease-in-out 0s;
    -webkit-text-fill-color: #1a1b2e !important;
}

/* Firefox autocomplete disable */
#justTalkGlobalSearch:-moz-autofill,
#justTalkGlobalSearch:-moz-autofill-preview {
    filter: none;
}

/* Additional measure: make input read-only briefly then remove */
.just-talk-body .bubble-search-input[readonly] {
    background: rgba(255, 255, 255, 0.95) !important;
    cursor: text !important;
}

/* ===== REMOVE 'X' CLEAR BUTTON FROM SEARCH INPUTS ===== */

/* Remove the 'X' clear button from search inputs - WebKit browsers */
#justTalkGlobalSearch::-webkit-search-decoration,
#justTalkGlobalSearch::-webkit-search-cancel-button,
#justTalkGlobalSearch::-webkit-search-results-button,
#justTalkGlobalSearch::-webkit-search-results-decoration {
    -webkit-appearance: none !important;
    appearance: none !important;
    display: none !important;
}

/* Remove clear button - Edge/IE */
#justTalkGlobalSearch::-ms-clear,
#justTalkGlobalSearch::-ms-reveal {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* Also apply to library search for consistency */
#libraryGlobalSearch::-webkit-search-decoration,
#libraryGlobalSearch::-webkit-search-cancel-button,
#libraryGlobalSearch::-webkit-search-results-button,
#libraryGlobalSearch::-webkit-search-results-decoration {
    -webkit-appearance: none !important;
    appearance: none !important;
    display: none !important;
}

#libraryGlobalSearch::-ms-clear,
#libraryGlobalSearch::-ms-reveal {
    display: none !important;
}

/* ===== JUST TALK SEARCH OVERLAY AND BULGE EFFECT ===== */

/* Create overlay for Just Talk pages */
.just-talk-body .search-overlay,
.just-talk-category-body .search-overlay,
.just-talk-search-body .search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Use Just Talk's purple-red gradient with transparency */
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.5) 0%, rgba(239, 68, 68, 0.5) 100%);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

/* Active overlay state */
.just-talk-body .search-overlay.active,
.just-talk-category-body .search-overlay.active,
.just-talk-search-body .search-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

/* Keep search elements above overlay */
.just-talk-body .search-subheader-wrapper,
.just-talk-category-body .search-subheader-wrapper,
.just-talk-search-body .search-subheader-wrapper {
    z-index: 999 !important;
}

.just-talk-body .bubble-search-container,
.just-talk-category-body .bubble-search-container,
.just-talk-search-body .bubble-search-container {
    position: relative;
    z-index: 1001 !important;
}

/* BULGE AND HIGHLIGHT EFFECT when overlay is active */
.just-talk-body.search-overlay-active .bubble-search-input,
.just-talk-category-body.search-overlay-active .bubble-search-input,
.just-talk-search-body.search-overlay-active .bubble-search-input {
    background: rgba(255, 255, 255, 1) !important;
    /* Use Just Talk's purple-red colors for the glow */
    box-shadow: 
        0 0 0 3px rgba(139, 92, 246, 0.3),
        0 10px 40px rgba(139, 92, 246, 0.3) !important;
    transform: scale(1.02); /* Bulge effect */
    transition: all 0.3s ease;
}

/* Alternative selector for overlay active state */
.search-overlay.active ~ .search-subheader-wrapper .bubble-search-input {
    background: rgba(255, 255, 255, 1) !important;
    box-shadow: 
        0 0 0 3px rgba(139, 92, 246, 0.3),
        0 10px 40px rgba(139, 92, 246, 0.3) !important;
    transform: scale(1.02);
    transition: all 0.3s ease;
}

/* Enhanced search button when overlay is active */
.just-talk-body.search-overlay-active .bubble-search-button,
.just-talk-category-body.search-overlay-active .bubble-search-button,
.just-talk-search-body.search-overlay-active .bubble-search-button {
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5) !important;
    transform: translateY(-50%) scale(1.05);
}

/* Alternative selector for button */
.search-overlay.active ~ .search-subheader-wrapper .bubble-search-button {
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5) !important;
    transform: translateY(-50%) scale(1.05);
}

/* Subtle animation for focus effect */
@keyframes justTalkSearchFocus {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.02);
    }
}

.just-talk-body.search-overlay-active .bubble-search-container,
.just-talk-category-body.search-overlay-active .bubble-search-container,
.just-talk-search-body.search-overlay-active .bubble-search-container {
    animation: justTalkSearchFocus 0.3s ease forwards;
}

/*#endregion*/




