/* --- 1. GLOBAL FOUNDATION --- */
body { background-color: #f4f4f4 !important; }
ul { list-style: none !important; padding: 0 !important; }

/* --- 2. ARTICLE CONTENT (IMAGE & TEXT) --- */
.com-content-article__body img {
    float: left !important;
    margin-right: 30px !important;
    margin-bottom: 20px !important;
    border-radius: 4px !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15) !important;
    max-width: 250px !important;
    height: auto !important;
}

.com-content-article__body h3 {
    clear: none !important;
    display: block !important;
    font-size: 1.25rem !important;
    text-transform: uppercase !important;
    font-weight: 800 !important;
    color: #000 !important;
    border-left: 6px solid #ff4500 !important;
    padding-left: 15px !important;
    margin-top: 10px !important;
    margin-bottom: 15px !important;
}

.com-content-article__body h3:nth-of-type(1) + p {
    font-size: 1.15rem !important;
    line-height: 1.7 !important;
    color: #222 !important;
    font-style: italic !important;
    background: #fdfdfd !important;
    padding: 20px !important;
    border: 1px solid #eee !important;
    border-radius: 8px !important;
    margin-bottom: 20px !important;
}

/* --- 3. THE TAGS BOX --- */
.article-tags-container ul.tags.list-inline {
    background: #ffffff !important;
    border: 1px solid #e0e0e0 !important;
    border-left: 5px solid #ff4500 !important;
    padding: 20px 20px 20px 50px !important; 
    border-radius: 8px !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05) !important;
    margin: 30px 0 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    position: relative !important;
}

.article-tags-container ul.tags.list-inline::before {
    content: "\f02c" !important; 
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    position: absolute !important;
    left: 18px !important;
    top: 22px !important;
    color: #333 !important;
    font-size: 1.2rem !important;
}

/* --- 4. COLLAPSIBLE FIELD CARDS --- */
.field-entry, .field-list > li {
    background: #ffffff !important;
    border: 1px solid #e0e0e0 !important;
    border-left: 5px solid #ff4500 !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05) !important;
    margin-bottom: 15px !important;
    display: block !important;
    overflow: hidden !important;
}

/* The Clickable Header */
.collapsible-field summary {
    display: flex !important;
    align-items: center !important;
    padding: 12px 15px !important;
    cursor: pointer !important;
    list-style: none !important;
    outline: none !important;
}

.collapsible-field summary::-webkit-details-marker { display: none !important; }

/* The Book Icon */
.collapsible-field summary::before {
    content: "\f02d" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    color: #333 !important;
    margin-right: 15px !important;
    font-size: 1.1rem !important;
    flex-shrink: 0 !important;
}

/* The Label */
.collapsible-field .field-label {
    flex-grow: 1 !important;
    font-size: 0.75rem !important;
    color: #ff4500 !important;
    text-transform: uppercase !important;
    font-weight: 800 !important;
}

/* OPEN/CLOSE Text & Arrow */
.toggle-arrow {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.toggle-arrow::before {
    content: "OPEN" !important;
    font-size: 0.7rem !important;
    font-weight: 800 !important;
    color: #ff4500 !important;
}

.toggle-arrow::after {
    content: "\f078" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    font-size: 0.8rem !important;
    transition: transform 0.3s ease !important;
}

.collapsible-field[open] > summary .toggle-arrow::before { content: "CLOSE" !important; }
.collapsible-field[open] > summary .toggle-arrow::after { transform: rotate(180deg) !important; }

/* The Expanded Content Area */
.field-value-wrapper {
    padding: 15px 20px 20px 50px !important;
    border-top: 1px solid #f0f0f0 !important;
    background: #fafafa !important;
}

.field-value {
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    color: #000 !important;
}

/* --- 5. SUBFORM GRID (2x2 LAYOUT) --- */
/* This forces the 'Format Type', 'ISBN', 'Price', and 'Store' into a grid */
.field-subform ul {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 15px !important;
    padding: 20px !important;
    background: #ffffff !important;
}

/* Individual boxes inside that grid */
.nested-field {
    border: none !important;
    background: #fdfdfd !important;
    padding: 12px !important;
    border-left: 3px solid #ff4500 !important;
    border-radius: 4px !important;
    display: flex !important;
    flex-direction: column !important;
}

/* --- 6. LOGO ALIGNMENT (POST-RESIZE) --- */
.field-subform .field-value img {
    display: inline-block !important;
    margin: 10px 10px 10px 0 !important;
    vertical-align: middle !important;
    max-width: 100% !important; /* Safety net for mobile screens */
    height: auto !important;
}

/* Hide the leftover copy-paste junk tags */
.field-subform .field-value p, 
.field-subform .field-value br, 
.field-subform .field-value b {
    display: none !important;
}
/* This targets the 'Format Store' container specifically */
.field-subform .nested-field {
    width: auto !important;
    display: block !important;
    overflow: visible !important;
}
.collapsible-field summary .toggle-arrow::after {
    transition: transform 0.3s ease-in-out !important;
}

.collapsible-field[open] {
    transition: all 0.3s ease !important;
}
/* --- MAKING TAGS LOOK LIKE CARDS --- */
.tags.list-inline li a {
    display: inline-block !important;
    background: #ffffff !important;
    border: 1px solid #e0e0e0 !important;
    border-left: 3px solid #ff4500 !important; /* Matches your orange theme */
    padding: 5px 12px !important;
    border-radius: 4px !important;
    font-weight: 700 !important;
    font-size: 0.8rem !important;
    color: #333 !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    margin-bottom: 5px !important;
    transition: all 0.2s ease !important;
}

.tags.list-inline li a:hover {
    background: #ff4500 !important;
    color: #ffffff !important;
    border-color: #ff4500 !important;
}
#master-field-toggle {
    background-color: #333 !important;
    color: #fff !important;
    border: none !important;
    padding: 8px 15px !important;
    border-radius: 4px !important;
    font-size: 0.75rem !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    margin-bottom: 20px !important;
    cursor: pointer !important;
    transition: background 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
}

#master-field-toggle:hover {
    background-color: #ff4500 !important; /* Your theme orange */
}

/* Add a small icon effect */
#master-field-toggle::before {
    content: "\f0b2" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}
/* --- LATEST ADDITIONS GRID STYLING --- */

/* The Title of the whole module */
.latest-books-grid h3, .latest-books-grid .module-title {
    color: #333 !important;
    border-bottom: 2px solid #ff4500 !important;
    padding-bottom: 5px;
    margin-bottom: 20px;
}

/* The Individual Book Titles */
.latest-books-grid a {
    color: #ff4500 !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    font-size: 1.1rem !important;
    display: block !important;
}

/* The Book Card */
.latest-books-grid li {
    border: 1px solid #e0e0e0 !important;
    border-top: 5px solid #ff4500 !important;
    padding: 20px !important;
    background: #ffffff !important;
    border-radius: 8px !important;
    margin-bottom: 20px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05) !important;
    list-style: none !important;
    text-align: center !important; /* This helps center the whole block */
}

/* Centering the Image */
.latest-books-grid img {
    display: block !important;
    margin: 0 auto 15px auto !important; /* Force center */
    max-width: 100% !important;
    height: auto !important;
    border-radius: 4px !important;
}

/* Short Description Text */
.latest-books-grid .mod-articles-category-introtext {
    text-align: left !important; /* Keep text readable */
    font-size: 0.9rem !important;
    color: #444 !important;
    display: block !important;
}
/* Reduce Logo Size */
.navbar-brand img, 
.logo-image img {
    width: 300px !important;
    height: auto !important;
    display: block;
}

/* Optional: Center it on Mobile */
@media (max-width: 991.98px) {
    .navbar-brand img {
        margin: 0 auto;
    }
}
/* Container for the Grid */
.finder-results-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    list-style: none;
    padding: 0;
    margin-top: 20px;
}

/* Individual Book Card */
.finder-result-item {
    border-top: 4px solid #e65100; /* Your orange/red brand color */
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    padding: 15px;
    background: #fff;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Book Title Styling */
.finder-result-item h4, 
.finder-result-item .result-title {
    font-size: 14px !important; /* Smaller font as requested */
    text-transform: uppercase;
    color: #e65100; /* Match the red/orange style */
    text-align: center;
    line-height: 1.2;
    margin-bottom: 10px;
    font-weight: 800;
}

/* Meta info (Author/Category) */
.finder-result-item .result-metadata,
.finder-result-item .result-extra {
    font-size: 12px;
    color: #333;
    margin-bottom: 15px;
}

/* Image styling to keep them consistent */
.finder-result-item img {
    max-width: 100%;
    height: auto;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
    margin-bottom: 10px;
}

/* Hide the "You are here" or URL if it appears */
.finder-result-item .result-url {
    display: none;
}
/* --- 7. SMART SEARCH GRID (Unified Brand Style) --- */

/* The Parent Container */
.js-finder-results-list, 
.finder-results-list {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 25px !important;
    list-style: none !important;
    padding: 0 !important;
}

/* The Book Card (Matches Field Cards & Latest Editions) */
.result__item--new {
    background: #ffffff !important;
    border: 1px solid #e0e0e0 !important;
    border-top: 5px solid #ff4500 !important; /* Your signature Orange */
    border-radius: 8px !important;
    padding: 20px !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
}

/* Title Styling (Small, Bold, Orange) */
.result__item--new h4.result-title {
    margin-bottom: 5px !important;
}

.result__item--new h4.result-title a {
    color: #ff4500 !important;
    font-size: 0.9rem !important;
    text-transform: uppercase !important;
    font-weight: 800 !important;
    text-decoration: none !important;
}

/* Category/Author Styling */
.result-meta-info {
    display: block !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #444 !important;
    text-transform: uppercase !important;
    margin-bottom: 15px !important;
    letter-spacing: 1px !important;
}

/* Image Scaling & Shadow */
.result-image img {
    max-width: 150px !important;
    height: auto !important;
    border-radius: 4px !important;
    box-shadow: 0 8px 15px rgba(0,0,0,0.1) !important;
    transition: transform 0.3s ease !important;
}

.result-image img:hover {
    transform: translateY(-5px) !important;
}

/* Container for both lines */
.result-meta-info {
    display: block !important;
    margin-bottom: 15px !important;
    text-align: center !important;
}

/* Individual line styling */
.meta-author, .meta-category {
    font-size: 12px !important;
    font-weight: 800 !important;
    color: #000000 !important; /* Bold Black */
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    line-height: 1.4 !important; /* Tightens vertical space between lines */
}

/* Optional: Make the category slightly lighter if you want a hierarchy */
.meta-category {
    color: #444444 !important; 
    font-weight: 700 !important;
}
/* --- CENTER LOGO AND SLOGAN --- */

/* Target the header container */
.navbar-brand {
    display: flex !important;
    flex-direction: column !important; /* Stack logo over text */
    align-items: center !important;    /* Center horizontally */
    justify-content: center !important;
    text-align: center !important;
    width: 100% !important;            /* Take up full width to allow centering */
    margin-right: 0 !important;
}

/* Ensure the logo image itself doesn't lean left */
.navbar-brand img {
    margin: 0 auto 10px auto !important; 
    display: block !important;
}

/* Style the Slogan/Tagline */
.site-description {
    display: block !important;
    font-size: 0.85rem !important;
    color: #333 !important; /* Matches your black text theme */
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    margin-top: 5px !important;
}
/* --- 8. FINAL ACYMAILING STYLING (BUTTON VERSION) --- */

/* Force the Header Red-Orange */
.bookhome-subscribe-mod .card-header {
    background-color: #ff4500 !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    padding: 12px 20px !important;
}

/* GREEN Subscribe Button: Move it right and style */
.bookhome-form .btn-primary, 
.bookhome-form .acymailing_finalconfirm {
    background-color: #28a745 !important;
    border: none !important;
    padding: 10px 25px !important;
    
    /* ADD THIS LINE BELOW */
    margin-left: 20px !important;  /* Pushes it away from the text on the left */
    
    margin-right: 40px !important; /* Keeps the gap from the Red button */
    border-radius: 4px !important;
    font-weight: 800 !important;
    color: #fff !important;
    text-transform: uppercase !important;
}

/* RED Unsubscribe Button: Using the class found in HTML */
.bookhome-form .unsubbutton {
    background-color: #ff4500 !important; /* Your brand red-orange */
    color: #ffffff !important;
    padding: 10px 20px !important;
    border-radius: 4px !important;
    border: 1px solid #cc3700 !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    display: inline-block !important;
}

/* Hover effects */
.bookhome-form .btn-primary:hover { background-color: #218838 !important; }
.bookhome-form .unsubbutton:hover { background-color: #cc3700 !important; }

/* Keep the input fields matching the theme */
.bookhome-form .acyfield_email input, 
.bookhome-form .acyfield_name input {
    border: 1px solid #e0e0e0 !important;
    border-left: 3px solid #ff4500 !important;
    padding: 8px !important;
    border-radius: 4px !important;
}
/* --- 9. MOBILE RESPONSIVENESS FOR NEWSLETTER --- */
@media (max-width: 768px) {
    /* Force everything to its own line */
    .bookhome-form .acymailing_form,
    .bookhome-form .acysubscribe,
    .bookhome-form [class*="acyfield_"],
    .bookhome-form .acym_gdpr_declaration {
        display: block !important;
        width: 100% !important;
        clear: both !important;
    }

    /* Make Name and Email fields BIG and white */
    .bookhome-form .acyfield_name input, 
    .bookhome-form .acyfield_email input {
        width: 100% !important;
        min-width: 100% !important;
        height: 45px !important; /* Forces vertical height */
        padding: 10px !important;
        margin-bottom: 10px !important;
        display: block !important;
        background-color: #ffffff !important;
        border: 1px solid #cccccc !important;
        box-sizing: border-box !important;
    }

    /* Force the Checkbox/Privacy text to wrap and sit below inputs */
    .bookhome-form .acym_gdpr_declaration {
        margin-top: 10px !important;
        margin-bottom: 15px !important;
        line-height: 1.4 !important;
    }

    /* Stack the buttons at the bottom */
    .bookhome-form .btn-primary, 
    .bookhome-form .acymailing_finalconfirm,
    .bookhome-form .unsubbutton {
        display: block !important;
        width: 100% !important;
        margin: 10px 0 !important;
        height: 45px !important;
        text-align: center !important;
    }
}
/* --- 10. FOOTER MENU HOVER COLOR --- */

/* This targets links specifically inside the footer area */
footer a:hover, 
.footer-content a:hover,
.mod-menu.footer-menu a:hover {
    color: #ff4500 !important; /* Your Brand Red-Orange */
    text-decoration: underline !important; /* Optional: adds a nice touch */
}

/* If the menu uses the standard Joomla 'metismenu' class */
footer .metismenu li a:hover {
    color: #ff4500 !important;
}
/* ---11 AUTHOR LIST HOVER EFFECT (RED-ORANGE) --- */

.author-list-row {
    transition: all 0.3s ease-in-out !important;
}

.author-list-row:hover {
    /* Subtle red-orange tint to the background */
    background-color: #fff5f2 !important; 
    
    /* Make the signature border thicker and darker */
    border-left: 8px solid #cc3700 !important; 
    
    /* Move it slightly to the right for a "pop-out" feel */
    transform: translateX(5px);
    
    /* Add a warmer shadow */
    box-shadow: 0 4px 12px rgba(255, 69, 0, 0.15) !important;
    
    cursor: pointer;
}

/* Optional: Make the Author Name change to your red-orange on hover too */
.author-list-row:hover .author-list-info h3 a {
    color: #ff4500 !important;
}
/* ---11 SOCIAL ICONS Container to align with menu--- */
.header-socials {
    display: flex;
    gap: 15px;
    align-items: center;
    padding: 0 15px;
}

/* Base Icon Style */
.header-socials a {
    color: #ffffff !important;
    font-size: 1.2rem;
    transition: color 0.3s ease, transform 0.2s ease;
    text-decoration: none !important;
}

/* Royal Blue Hover Effect */
.header-socials a:hover {
    color: #4169E1 !important; /* Royal Blue */
    transform: translateY(-2px); /* Subtle lift effect */
}

/* Ensure the header container spreads out */
.container-header .container-nav {
    display: flex;
    justify-content: space-between;
    width: 100%;
}
/* ---12 SCROLL TO BOTTOM--- */
#scrollToBottom {
    position: fixed;
    bottom: 85px; /* Adjust this so it sits nicely above the 'Top' button */
    right: 20px;
    z-index: 99;
    border: none;
    outline: none;
    background-color: #ff4500; /* Your Bookhome Red */
    color: white;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: none; /* Hidden by default, JS shows it */
    transition: background-color 0.3s, transform 0.2s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

#scrollToBottom:hover {
    background-color: #4169E1; /* Your Royal Blue hover effect! */
    transform: scale(1.1);
}

/* Ensure FontAwesome chevron is centered */
#scrollToBottom i {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}
/* 13 Responsive adjustments for Author Page */
@media (max-width: 768px) {
    .author-profile-header {
        flex-direction: column !important;
        align-items: center !important;
    }
    
    .author-main-img {
        flex: 0 0 auto !important;
        width: 80% !important;
        margin-bottom: 20px;
    }
    
    .author-bio-box {
        border-left: none !important;
        border-top: 6px solid #ff4500 !important;
        border-radius: 0 0 8px 8px !important;
    }
}

/* 14 Book Categories - Ensure the text inside the box flows nicely */
.author-description p {
    line-height: 1.6;
    margin-bottom: 1.2rem;
}
/* Align table content vertically so text stays centered with the circle */
.author-book-list td {
    vertical-align: middle !important;
}

/* Hover effect on the book circle */
.book-circle-thumb img {
    transition: transform 0.2s ease-in-out;
}

.book-circle-thumb:hover img {
    transform: scale(1.2);
    border-color: #4169E1; /* Switch to your Royal Blue on hover */
}

/* Make sure the badges match your style */
.author-book-list .badge.bg-info {
    background-color: #4169E1 !important; /* Royal Blue for hits */
}