/* -------------------------------------------------------------- //

Disable the "books" direct link in the header

*/

a[href$="/books"] { display: none !important; }

/* -------------------------------------------------------------- //

Logo

*/

#header .logo { 
    flex-direction: column; 
    align-items: flex-start; 
    gap: 3px; 
}

#header .logo-image { 
    max-width: calc(100vw - 160px); 
    width: 250px; 
    height: auto; 
}

#header .logo-text { 
    font-size: 13.4px; 
    letter-spacing: .69em; 
    text-transform: uppercase; 
    margin-top: 0.3em; 
}

@media (max-width: 410px) {
    #header .logo-text { 
        font-size: clamp(10px, 2.9vw, 13.4px); 
    }
}

/* -------------------------------------------------------------- //

Back to Top

*/

.back-to-top { left: 15px; }

/* -------------------------------------------------------------- //

Breadcrumbs

*/

.breadcrumbs .text-book { 
    color: black; 
}

.dark-mode .breadcrumbs .text-book { 
    color: white; 
}

/* -------------------------------------------------------------- //

Headings

*/

h1 { 
    font-size: 2.8275em;
    line-height: 1.22222222em;
    margin-top: .48888889em;
    margin-bottom: .48888889em;
}

h2 {
    font-size: 2.333em;
    line-height: 1.294117647em;
    margin-top: .8627451em;
    margin-bottom: .43137255em;
}

h3 {
    font-size: 1.666em;
    line-height: 1.221428572em;
    margin-top: .78571429em;
    margin-bottom: .43137255em;
}

h4 {
    font-size: 1.2em;
    line-height: 1em;
    margin-top: .78571429em;
    margin-bottom: .43137255em;
}

h1,h2,h3,h4,h5,h6 {
    font-weight: 400;
    position: relative;
    display: block;
    font-family: var(--font-heading, var(--font-body));
    color: #222;
}

td h1,
td h2,
td h3,
td h4,
td h5,
td h6 {
    margin-top: 0;
}

/* -------------------------------------------------------------- //

Blockquotes

*/

blockquote {
    padding: 12px 16px 12px 16px;
}

blockquote:before { 
    display: none !important;
}

/* -------------------------------------------------------------- //

Link Color

*/

.text-bookshelf,
.text-bookshelf:hover {
    color: var(--color-link);
    fill: var(--color-link);
}

/* -------------------------------------------------------------- //

Public Hidden Sections

*/

.user-public #recent-activity,
.user-public .tri-layout-right-contents div.actions {
    display: none !important;
}

/* -------------------------------------------------------------- //

Page Sidebar

*/

.custom-support p {
    max-width: 30ch;
}

.custom-support .button {
    text-align: center;
    color: white !important;
}

/* -------------------------------------------------------------- //

Home Page

*/

/* Hero Section */
.custom-hero {
    background: linear-gradient(180deg, rgba(0, 173, 239, 0) 40%, rgba(0, 115, 181, 0.8) 100%), url(/theme/cybernautic/img/hero-v2.jpg);
    background-size: cover;
    background-position: center 20%;
    color: #fff;
    padding: 1.5rem 0 4rem;
    margin-bottom: 0;
}

.custom-hero .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header Row (Logo + Buttons) */
.hero-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4rem;
}

.hero-logo .hero-logo-svg svg {
    display: block;
    width: 260px;
}

.hero-logo .hero-logo-tagline {
    font-size: 14px;
    letter-spacing: .69em;
    margin-top: 0.3em;
}

.hero-links {
    position: relative;
    display: flex;
    gap: 0.5rem;
}

@media (max-width: 1000px) {

    header .links a, 
    header .links hr.custom-hr { 
        display: block;
        width: 100%;
        text-align: right;
    }

    .user-logged-in header .links [data-shortcut="settings_view"] { 
        text-align: left;
    }

    header .links hr.custom-hr {
        margin: 6px 0;
    }

}

@media (min-width: 1001px) {

    .header-links .links {
        display: inline-flex;
        align-items: center;
        gap: 0.75em;
    }

    .header-links .custom-button {
        border-radius: 50px;
        padding: 0.5rem 1.5rem;
        font-weight: 500;
    }

    .header-links .custom-button.white {
        background: #fff;
        color: #0077b5;
    }
    
    .header-links .custom-button.outline {
        border: 1px solid rgba(255,255,255,0.6);
        background: #4dc1fb54;
        color: #fff;
    }

}

/* Buttons */
.hero-links .button {
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
}
.hero-links .button.white {
    background: #fff;
    color: #0077b5;
}
.hero-links .button.outline {
    border: 1px solid rgba(255,255,255,0.6);
    background: #4dc1fb54;
    color: #fff;
}

/* Hero Content (Title + Search) */
.hero-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    padding-top: 10em;
}

.hero-content h1 {
    font-weight: 300;
    font-size: clamp(1.5rem, 7vw, 2.5rem);
    margin-bottom: 2rem;
    color: #fff;
}

/* Search Bar */
.hero-search-box {
    position: relative;
    width: 100%;
}

.hero-search-box input {
    width: 100%;
    padding: 1rem 1rem 1rem 3.5rem; /* Space for icon */
    border-radius: 50px;
    border: none;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    outline: 7px solid rgb(123 209 251 / 60%);
    transition: all 250ms ease-in-out;
}

    .hero-search-box input:focus {
        outline: 7px solid rgb(123 209 251 / 80%);
    }

.hero-search-box button {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    width: 20px;
}

.hero-search-box button svg {
    width: 20px;
    display: block;
}

/* Main Content Layout (Split Screen) */
.custom-layout-container {
    display: flex;
    min-height: 60vh; /* Ensure it takes up vertical space */
}

/* Left Column */
.main-topics {
    flex: 2; /* Takes 2/3 space */
    padding: 3rem 4rem 4rem;
    background: #fff;
}

/* Right Column */
.support-sidebar {
    flex: 1; /* Takes 1/3 space */
    background: #f8f9fa; /* Light gray */
    padding: 8rem 6rem 4rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

@media (min-width: 901px) {
    .support-sidebar {
        padding-left: clamp(10px, 4vw, 94px);
        padding-right: clamp(10px, 4vw, 94px);
    }
}

.support-badge {
    margin-top: 3em;
}

/* Section Titles */
.section-title {
    font-weight: 300;
    color: #0077b5;
    font-size: 2rem;
    margin-top: 0;
    margin-bottom: 3rem;
    border-bottom: none; /* Override BookStack default */
}

/* Topics Grid */
.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 3rem;
}

.topic-card {
    display: flex;
    gap: 1.5rem;
    text-decoration: none !important; /* Remove link underline */
    color: inherit;
    transition: transform 0.2s;
}

.topic-card:hover {
    transform: translateY(-3px);
}

.topic-icon svg {
    width: 40px;
    height: 40px;
    stroke: #0077b5; /* Blue icons */
}

.topic-details h3 {
    margin: 0 0 0.5rem 0;
    color: #0077b5;
    font-weight: 400;
    font-size: 1.4rem;
}

.topic-details p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

/* Support Sidebar Content */
.support-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.support-header h3 {
    margin: 0;
    color: #0077b5;
    font-weight: 300;
    font-size: 1.5rem;
}

.support-content p {
    color: #666;
    margin-bottom: 1.5rem;
    max-width: 30ch;
}

.phone-number {
    font-weight: bold;
    color: #005580 !important;
}

.support-content .button {
    border: 1px solid #0077b5;
    color: #0077b5;
    background: transparent;
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    display: inline-block;
    margin-top: 1rem;
    text-align: center;
}
.support-content .button:hover {
    background: #0077b5;
    color: #fff;
    text-decoration: none;
}

/* Mobile Responsive Adjustments */
@media (max-width: 900px) {
    .custom-hero {
        background-image: linear-gradient(180deg, rgba(0, 173, 239, 0.8) 0%, rgba(0, 115, 181, 0.8) 100%), url(/theme/cybernautic/img/hero-v2.jpg);
    }
    .custom-hero .container {
        padding-left: 2em;
        padding-right: 2em;
    }
    .hero-content {
        padding-top: 0;
    }
    .hero-search-box input {
        font-size: 0.8rem;
    }
    .custom-layout-container {
        flex-direction: column;
    }
    .hero-header {
        flex-direction: column;
        gap: 1rem;
    }
    .main-topics, .support-sidebar {
        padding: 2rem;
    }
    .support-sidebar {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }
    .support-content {
        text-align: center;
    }
    .support-header {
        justify-content: center;
    }
    .support-content p {
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 640px) {
    .button+.button {
        margin-inline-start: 0;
    }

    .button {
        font-size: 0.75rem;
    }
}