/* ================================================
   CUSTOM STYLES FOR HUGO PES EYELASH THEME
   ================================================ */

/* CSS Variables for Light/Dark Mode */
:root {
    --bg-color: #fff;
    --text-color: #3f3f3f;
    --text-color-dark: #000;
    --text-color-light: rgba(63, 63, 63, .46);
    --text-color-muted: #999;
    --text-color-secondary: #555;
    --border-color: rgba(63, 63, 63, 0.1);
    --border-color-strong: rgba(63, 63, 63, 0.66);
    --accent-color: #559eaa;
    --section-bg: #f8f8f8;
    --tag-bg: rgba(63, 63, 63, 0.1);
    --tag-bg-hover: rgba(63, 63, 63, 0.2);
}

.dark-mode {
    --bg-color: #1a1a1a;
    --text-color: #e0e0e0;
    --text-color-dark: #fff;
    --text-color-light: rgba(224, 224, 224, .46);
    --text-color-muted: #999;
    --text-color-secondary: #bbb;
    --border-color: rgba(224, 224, 224, 0.1);
    --border-color-strong: rgba(224, 224, 224, 0.66);
    --accent-color: #6bb8c4;
    --section-bg: #2a2a2a;
    --tag-bg: rgba(224, 224, 224, 0.1);
    --tag-bg-hover: rgba(224, 224, 224, 0.2);
}

/* Site-wide dark mode styles for Bootstrap buttons */
.dark-mode .btn-outline-secondary {
    color: var(--text-color) !important;
    border-color: var(--border-color-strong) !important;
    background-color: transparent !important;
}

.dark-mode .btn-outline-secondary:hover,
.dark-mode .btn-outline-secondary:focus {
    color: var(--text-color-dark) !important;
    border-color: var(--text-color) !important;
    background-color: var(--tag-bg) !important;
}

.dark-mode .btn-dark {
    color: var(--text-color-dark) !important;
    background-color: var(--text-color) !important;
    border-color: var(--text-color) !important;
}

.dark-mode .btn-dark:hover,
.dark-mode .btn-dark:focus {
    color: var(--bg-color) !important;
    background-color: var(--text-color-dark) !important;
    border-color: var(--text-color-dark) !important;
}

/* Site-wide dark mode styles for text-muted */
.dark-mode .text-muted {
    color: var(--text-color-secondary) !important;
}

/* Site-wide dark mode styles for headings - ensure they use proper color */
.dark-mode h1,
.dark-mode h2,
.dark-mode h3,
.dark-mode h4,
.dark-mode h5,
.dark-mode h6,
.dark-mode .h1,
.dark-mode .h2,
.dark-mode .h3,
.dark-mode .h4,
.dark-mode .h5,
.dark-mode .h6 {
    color: var(--text-color) !important;
}

@media (prefers-color-scheme: dark) {
    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    .h1,
    .h2,
    .h3,
    .h4,
    .h5,
    .h6 {
        color: #e0e0e0 !important;
    }
}

html,
body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: "Baskervville", serif;
}

main {
    flex: 1 0 auto;
    min-height: 96vh;
}

/* Heading styles with Baskervville font - !important to override Bootstrap */
h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
    font-family: "Baskervville", serif;
    color: var(--text-color) !important;
    font-weight: 500 !important;
    font-variant-ligatures: common-ligatures;
    margin-top: 0;
    margin-bottom: 0;
}

.col-md-10.offset-md-1 h1 {
    margin: 20px 0;
}

/* Ensure headings in all contexts use Baskervville */
.main-container h1,
.main-container h2,
.main-container h3,
.main-container h4,
.main-container h5,
.main-container h6,
section h1,
section h2,
section h3,
section h4,
section h5,
section h6 {
    font-family: "Baskervville", serif;
}

a {
    color: black !important;
}

@media (prefers-color-scheme: dark) {
    a {
        color: #e0e0e0 !important;
    }
}

hr {
    margin: 3rem 0 !important;
}

/* Sans-serif uppercase styling */
p.sans,
span.sans,
div.sans,
.sans {
    font-family: Futura, Didact Gothic, sans-serif !important;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Source styling with sans class */
.sans.source {
    letter-spacing: 2px;
    color: var(--text-color-light);
    font-size: .75em;
}

/* Example: Eyelash text styling */
.type--uppercase {
    text-transform: uppercase;
    font-family: Futura, Didact Gothic, sans-serif;
    color: #a7a7a7;
    font-weight: 600;
}

/* Example: Excerpt/intro styling */
.review-intro {
    font-size: 1.3rem;
    margin-bottom: 100px;
}

.review-intro p {
    font-size: 1em !important;
    line-height: 1.3 !important;
    color: var(--text-color);
}

/* Example: Tag styling */
.tag-link,
.tag-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    margin: 0.25rem;
    background: var(--tag-bg);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 3px;
    font-size: 0.875rem;
}

.tag-link:hover,
.tag-badge:hover {
    background: var(--tag-bg-hover);
}

/* Example: Feature links styling */
.feature-links {
    margin-bottom: 2em;
}

.feature-links>div {
    border-top: 2px solid var(--border-color-strong);
    padding-top: 20px;
}

.feature-links h4 {
    margin-bottom: 25px;
    padding-top: 20px;
}

.terms-list .feature-links h4 {
    margin-bottom: 25px;
    padding-top: 5px;
    font-size: 16px;
}

@media all and (max-width: 650px) {
    .feature-links h4 {
        margin-bottom: 20px;
        padding-top: 10px;
    }

    .sans.source {
        font-size: .82em;
    }
}

.feature-links h4 a {
    color: var(--text-color);
    text-decoration: none;
}

.feature-links h4 a:hover {
    color: var(--text-color-dark);
}

.feature-links a {
    color: var(--accent-color) !important;
    text-decoration: none;
}

/* Logo styling */
.logo {
    max-height: 85px;
    width: auto;
    margin: 20px;
    display: block;
}

.logo-light {
    display: none;
}

.logo-dark {
    display: block;
}

.dark-mode .logo-light {
    display: block;
}

.dark-mode .logo-dark {
    display: none;
}

.bar__module h1 a {
    color: var(--text-color-dark);
    text-decoration: none;
}

.dark-mode .bar__module h1 a {
    color: #fff !important;
}

/* Ensure only one navigation shows at a time */
.show-on-mobile.hide-on-tablet.hide-on-desktop {
    display: block;
}

@media (min-width: 768px) {
    .show-on-mobile.hide-on-tablet.hide-on-desktop {
        display: none !important;
    }

    .show-on-desktop.hide-on-mobile.show-on-tablet {
        display: block !important;
    }
}

@media (max-width: 767px) {
    .show-on-desktop.hide-on-mobile.show-on-tablet {
        display: none !important;
    }
}

/* Bar module heading styling */
.bar__module h1 {
    font-family: Futura, Didact Gothic, sans-serif !important;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 12px;
    padding-top: 50px;
    padding-right: 20px;
    color: var(--text-color-dark);
}

/* Home intro text styling */
.home-intro-text {
    font-size: 1.2rem;
}

/* More Posts / Feature section styling */
#more-posts {
    background-color: var(--section-bg);
    padding: 50px 0;
    margin-top: 100px;
}

.single-post .main-container h1 {
    margin: 20px 0;
}

.single-post .main-container h2 {
    margin: 25px 0 10px 0;
    font-size: 24px;
    line-height: 30px;
}

.single-post .main-container a {
    color: var(--text-color-dark) !important;

}

.single-post .main-container a:hover {
    color: var(--accent-color) !important;
}

.single-post .main-container p {
    font-size: 16px;
    line-height: 24px;
}

.feature {
    padding-bottom: 1.5rem;
}

.feature h6.type--uppercase.sans {
    font-family: Futura, Didact Gothic, sans-serif;
    font-size: 0.7rem;
    letter-spacing: 1.5px;
    margin-bottom: 0.5rem;
    color: #999;
    font-weight: 600;
    text-transform: uppercase;
}

.feature h4 {
    font-family: "Baskervville", serif !important;
    font-size: 1.1rem;
    line-height: 1.5;
    margin-top: 0;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.feature h4 a {
    color: var(--text-color) !important;
    text-decoration: none;
}

.feature h4 a:hover {
    color: var(--text-color-dark) !important;
}

.feature p {
    font-size: 0.9rem;
    line-height: 1.65;
    color: var(--text-color-secondary);
    margin-bottom: 0;
}

/* More Posts heading */
.more-posts {
    font-size: 12px;
    margin-bottom: 10px;
}

#more-posts h6 a {
    color: #a7a7a7 !important;
    text-decoration: none;
}

#more-posts h6 a:hover {
    color: #888 !important;
}

/* Pagination styling */
.pagination-nav {
    margin-top: 3rem;
    margin-bottom: 2rem;
    text-align: center;
}

.pagination {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    gap: 0.5rem;
}

.pagination .page-item {
    display: inline-block;
}

.pagination .page-link {
    font-family: Futura, Didact Gothic, sans-serif;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    padding: 0.5rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    transition: all 0.2s ease;
}

.pagination .page-link:hover {
    background-color: var(--tag-bg);
    color: var(--text-color-dark);
}

.pagination .page-item.active .page-link {
    background-color: white;
    color: var(--bg-color);
    border-color: var(--text-color);
}

.pagination .page-item.active .page-link:hover {
    background-color: var(--text-color-dark);
    border-color: var(--text-color-dark);
}

.insta #menu1 {
    display: none !important;
}

@media all and (max-width: 650px) {

    .insta .bar__module {
        width: 96vw;
    }

    .insta .logo {
        margin: 20px auto 0;
    }

    .bar__module h1 {
        padding-top: 4px;
    }

    /* Hide logo and menu on insta page */
    .insta .mobile-header-left,
    .insta .mobile-header-right {
        display: none !important;
    }

    /* Center breadcrumb when logo/menu are hidden */
    .insta .mobile-header-center {
        text-align: center;
        width: 100%;
    }
}

/* Mobile Header Flexbox Layout */
.d-md-none .mobile-header-flex {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0;
    margin: 10px 0
}

.d-md-none .mobile-header-left {
    flex: 0 0 auto;
}

.d-md-none .mobile-header-left a {
    display: inline-block;
}

.d-md-none .mobile-header-left .logo-dark {
    max-height: 60px;
    height: 60px;
    width: auto;
    display: block !important;
    margin: 0;
    margin-left: -5px;
}

.d-md-none .mobile-header-left .logo-light {
    max-height: 60px;
    height: 60px;
    width: auto;
    display: none !important;
    margin: 0;
    margin-left: -5px;
}

.dark-mode .d-md-none .mobile-header-left .logo-dark {
    display: none !important;
}

.dark-mode .d-md-none .mobile-header-left .logo-light {
    display: block !important;
}

.d-md-none .mobile-header-center {
    flex: 1 1 auto;
    text-align: center;
    padding: 0;
    margin-left: 5px;
}

.d-md-none .mobile-header-right {
    flex: 0 0 auto;
}

/* Hamburger Menu Icon */
.hamburger-menu {
    background: none;
    border: none;
    padding: 10px 0 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
    transition: all 0.3s ease;
}

.hamburger-line {
    width: 25px;
    height: 2px;
    background-color: var(--text-color);
    transition: all 0.3s ease;
    display: block;
    transform-origin: center;
}

.hamburger-menu:hover .hamburger-line {
    background-color: var(--text-color-dark);
}

/* Mobile Menu Content */
.mobile-menu-content {
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    margin-top: 15px;
}

/* Ensure mobile navigation is hidden on desktop */
@media (min-width: 768px) {
    .bar-toggle.d-md-none {
        display: none !important;
    }
    
    /* Ensure desktop navigation shows on desktop */
    .bar.d-none.d-md-block {
        display: block !important;
    }
}

/* Ensure mobile menu collapse is hidden by default */
#mobileMenu.collapse:not(.show) {
    display: none;
}

/* Mobile Breadcrumb */
.mobile-breadcrumb {
    font-family: Futura, Didact Gothic, sans-serif !important;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 12px;
    color: var(--text-color-dark);
    line-height: 1.2;
    text-align: center;
    margin: 0;
    padding: 0;
}

.mobile-breadcrumb a {
    color: var(--text-color-dark);
    text-decoration: none;
}

.mobile-breadcrumb a:hover {
    color: var(--text-color-dark);
    opacity: 0.7;
}

.dark-mode .mobile-breadcrumb a {
    color: #fff !important;
}

.dark-mode .mobile-breadcrumb a:hover {
    color: #fff !important;
    opacity: 0.8;
}

.mobile-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu-list li {
    padding: 10px 0;
}

.mobile-menu-list li a {
    color: var(--text-color);
    text-decoration: none;
    font-family: Futura, Didact Gothic, sans-serif;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
    display: block;
    transition: color 0.2s ease;
}

.mobile-menu-list li a:hover {
    color: var(--text-color-dark);
}

.dark-mode .mobile-menu-list li a {
    color: #fff !important;
}

.dark-mode .mobile-menu-list li a:hover {
    color: #fff !important;
    opacity: 0.8;
}

/* Footer Styling */
.site-footer {
    background-color: var(--bg-color);
    border-top: 1px solid var(--border-color);
    padding: 20px 0;
}

/* Remove all bottom spacing from sections */
section {
    margin-bottom: 0 !important;
}

/* Ensure main content container has no bottom margin */
.main-container {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    min-height: 80vh;
    flex: 1 0 auto;
}

main {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    min-height: 96vh;
    flex: 1 0 auto;
}

.footer-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    align-items: center;
}

@media all and (max-width: 650px) {
    .footer-links {
        gap: 10px;
    }
}

.footer-links li {
    display: flex;
    align-items: center;
}

.footer-links a {
    font-family: Futura, Didact Gothic, sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-color-muted);
    text-decoration: none;
    font-size: 11px;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.footer-links a:hover {
    color: var(--text-color-secondary);
}

.dark-mode .footer-links a {
    color: #fff !important;
}

.dark-mode .footer-links a:hover {
    color: #fff !important;
    opacity: 0.8;
}

.footer-social {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
}

.footer-social li {
    display: flex;
    align-items: center;
    padding-left: 20px !important;
}

.footer-social a {
    color: var(--text-color-muted);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.footer-social a:hover {
    color: var(--text-color-secondary);
}

.dark-mode .footer-social a {
    color: #fff !important;
}

.dark-mode .footer-social a:hover {
    color: #fff !important;
    opacity: 0.8;
}

.insta footer.site-footer {
    display: none;
}

.insta nav {
    display: none;
}

body.insta {
    font-family: futura;
}

body.insta .btn-outline-secondary:hover {
    color: #fff !important;
}

body.insta .btn-dark,
body.insta .btn-dark:hover {
    color: #fff !important;
}

/* Insta page specific dark mode overrides */
.dark-mode body.insta .btn-outline-secondary {
    color: var(--text-color) !important;
    border-color: var(--border-color-strong) !important;
    background-color: transparent !important;
}

.dark-mode body.insta .btn-outline-secondary:hover,
.dark-mode body.insta .btn-outline-secondary:focus {
    color: var(--text-color-dark) !important;
    border-color: var(--text-color) !important;
    background-color: var(--tag-bg) !important;
}

.dark-mode body.insta .btn-dark {
    color: var(--bg-color) !important;
    background-color: var(--text-color) !important;
    border-color: var(--text-color) !important;
}

.dark-mode body.insta .btn-dark:hover,
.dark-mode body.insta .btn-dark:focus {
    color: var(--bg-color) !important;
    background-color: var(--text-color-dark) !important;
    border-color: var(--text-color-dark) !important;
}

.dark-mode body.insta .text-muted {
    color: var(--text-color-secondary) !important;
}

.dark-mode body.insta h1 {
    color: var(--text-color) !important;
}

/* === FORCE ENABLE HORIZONTAL SCROLL FOR EDITORIAL CAROUSELS === */

/* Neutralize theme containers that kill overflow */
main,
.container,
.container-fluid,
.content,
.page,
.page-content,
.post,
.post-content {
    overflow-x: visible !important;
}

/* Explicitly allow our carousel to scroll */
.scroll-carousel-breakout,
.scroll-carousel-wrap {
    overflow-x: auto !important;
}

.scroll-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    display: block;
    border-radius: 6px;
    background: #eee;
}

/* Dark Mode Toggle Button */
.dark-mode-toggle {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    transition: color 0.2s ease;
    line-height: 1;
    position: relative;
    width: 36px;
    height: 36px;
    margin-top: 47px;
}

.dark-mode-toggle:hover {
    color: var(--text-color-dark);
}

.dark-mode-toggle svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    position: absolute;
    transition: opacity 0.2s ease;
}

@media all and (max-width: 767px) {
    .dark-mode-toggle {
        margin-top: 0;
    }
}

.dark-mode-toggle .sun-icon {
    opacity: 1;
}

.dark-mode-toggle .moon-icon {
    opacity: 0;
}

.dark-mode .dark-mode-toggle .sun-icon {
    opacity: 0;
}

.dark-mode .dark-mode-toggle .moon-icon {
    opacity: 1;
}

.dark-mode .pagination .page-link {
    background: black;
    color: white !important;
}

.dark-mode .pagination .page-item.active .page-link {
    background-color: #202020;
    color: white !important;
}

.dark-mode .pagination .page-item.active .page-link:hover {
    background-color: #000000;
    border-color: #7d7c7c;
    color: white;
}

.dark-mode .reading-carousel-container {
    background: #222222;
}

.dark-mode .books-alphabetical-list a {
    color: #b6b5b5 !important;
    text-decoration: none;
}

.dark-mode .book-carousel-container {
    background: #292727;
}

.dark-mode .single-post .main-container h2 {
    color: #71bdcc !important;
}

.dark-mode .themes-alphabetical-list a {
    color: #b6b5b5;
    text-decoration: none;
}

.dark-mode .sans.source {
    color: #9e9b9b;
}

/* Cusdis base styling */
#cusdis_thread,
å #cusdis_thread * {
    font-family: inherit;
}

#cusdis_thread textarea,
#cusdis_thread input {
    font-size: 0.95rem;
}

#cusdis_thread button {
    font-size: 0.9rem;
    padding: 0.4rem 0.75rem;
}

/* Cusdis iframe fix */
#cusdis_thread iframe {
    width: 100% !important;
    min-height: 280px;
    border: none;
}

/* Blockquote styling with Cousine font */
blockquote {
    font-family: "Cousine", monospace;
}

blockquote p {
    font-size: 14px !important;
}