﻿/* Headings with Original Styling */
.historical-title {
    font-family: "Segoe UI Light", "Segoe UI", sans-serif;
    font-size: 54px;
    font-weight: bold;
    color: var(--historical-brown);
}

.historical-heading {
    font-family: "Segoe UI Light", "Segoe UI", sans-serif;
    font-size: 26px;
    font-weight: 800;
    color: var(--historical-brown);
    line-height: 1.5;
    text-align: left;
    margin: 0;
    padding-bottom: 10px;
}

.historical-subheading {
    font-family: "Segoe UI Light", "Segoe UI", sans-serif;
    font-size: 20px;
    font-weight: bold;
    color: var(--historical-brown);
    text-align: left;
    margin: 0;
}

/* Content Text with Original Styling */
.historical-content p {
    font-size: 16px;
    text-align: left;
    color: var(--historical-brown);
    line-height: 1.5;
    margin-bottom: 1rem;
}

/* Navigation Links with Original Styling */
.historical-nav {
    line-height: 1.8;
}

.historical-link {
    color: var(--historical-brown);
    text-decoration: none;
    font-size: 18px;
    display: block;
}

    .historical-link:hover {
        color: var(--historical-brown);
        text-decoration: underline;
    }

    .historical-link:visited {
        color: #333333;
    }

/* Historical Dates List */
.historical-dates {
    text-align: left;
    color: var(--historical-brown);
}

    .historical-dates li {
        font-size: 18px;
    }

/* VIEW IMAGES Container */
.view-images-container {
    background-color: #333333;
    min-height: 200px;
}

.view-images-container a {
    color: #C0C0C0;
    font-size: 16px;
    text-decoration: none;
    display: inline-block;
    padding: 4px 0;
}

    .view-images-container a:hover {
        color: #fff;
        text-decoration: none;
    }

    .view-images-container a:visited {
        color: #FF6A00;
    }

/* Background images should cover full height */
.sidebar {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.sidebar-background-color {
    background-color: #892708;
}

/* Tree View Styling using Pure CSS */
.tree-view-accordion {
    font-family: "Segoe UI", Arial, sans-serif;
}

/* Ensure accordion doesn't push container height */
.tree-view-accordion {
    height: 100%;
    overflow: visible;
}

    .tree-view-accordion .accordion-item {
        background-color: transparent;
        border: none;
        text-align: start;
    }

    .tree-view-accordion .accordion-header {
        margin-bottom: 0;
        padding-top: 8px;
        padding-bottom: 0;
    }

    .tree-view-accordion .accordion-button {
        background-color: transparent;
        border: none;
        color: #C0C0C0;
        font-size: 13px;
        padding: 2px 0;
        box-shadow: none;
        text-align: left;
        position: relative;
    }

        .tree-view-accordion .accordion-button:hover {
            color: #fff;
            background-color: rgba(255, 255, 255, 0.1);
        }

        .tree-view-accordion .accordion-button:focus {
            box-shadow: none;
            border: none;
        }

        .tree-view-accordion .accordion-button::after {
            display: none;
        }

        .tree-view-accordion .accordion-button:not(.collapsed) {
            background-color: transparent;
            color: #C0C0C0;
        }

/* Tree icon styling */
.tree-icon {
    display: inline-block;
    width: 20px;
    margin-right: 3px;
    font-family: monospace;
}

    .tree-icon::before {
        content: "[+]";
    }

.accordion-button:not(.collapsed) .tree-icon::before {
    content: "[-]";
}

/* Tree content styling */
.tree-view-accordion .accordion-body {
    background-color: transparent;
    padding: 0 0 0 20px;
}

.tree-content a {
    display: block;
    color: #C0C0C0;
    text-decoration: none;
    padding: 2px 0 2px 20px;
    font-size: 12px;
}

    .tree-content a:hover {
        color: #fff;
        background-color: rgba(255, 255, 255, 0.1);
    }

    .tree-content a:visited {
        color: #FF6A00;
    }

/* Override Bootstrap transitions for instant collapse */
.tree-view-accordion .accordion-collapse {
    transition: none;
}

    .tree-view-accordion .accordion-collapse.collapsing {
        transition: none;
        height: auto !important;
    }

/* Direct link tree nodes (no children) */
.tree-node-link {
    display: block;
    color: #C0C0C0;
    text-decoration: none;
    padding: 2px 0 !important;
    font-size: 13px !important;
    position: relative;
    width: 100%;
}

    .tree-node-link:hover {
        color: #fff;
        background-color: rgba(255, 255, 255, 0.1);
        text-decoration: none;
    }

    .tree-node-link:visited {
        color: #C0C0C0;
    }

/* Empty tree icon for non-expandable items */
.tree-icon-empty {
    display: inline-block;
    width: 20px;
    margin-right: 3px;
}

/* Bootstrap Carousel Customization for Historical Look */
.carousel {
    background-color: var(--historical-black);
}

.carousel-item img {
    max-height: 400px;
    object-fit: contain;
    background-color: var(--historical-black);
}

.carousel-caption {
    background: rgba(0, 0, 0, 0.7);
    padding: 12px 20px;
    border-radius: 0;
    bottom: 0;
    left: 0;
    right: 0;
    position: relative;
}

    .carousel-caption p {
        font-size: 18px;
        color: white;
        margin: 0;
    }

.image-grid-bg {
    background-color: #792308 !important;
    color: #fff !important;
}

/* Seadragon Container Styling */
.seadragon-container {
    height: 350px;
    background-color: var(--historical-black);
    border: 1px solid var(--historical-black);
    color: white;
    margin: 0 auto;
    width: 100%;
}

/* Header Customization */
header.bg-dark {
    background-color: var(--historical-dark-bg) !important;
    font-size: 14px;
}

header a {
    color: var(--historical-light-gray) !important;
}

/* Footer Customization */
footer.bg-dark {
    background-color: var(--historical-dark-bg) !important;
    color: var(--historical-light-gray) !important;
}

/* Responsive adjustments for mobile */
@media screen and (max-width: 1200px) {
    .historical-title {
        font-size: 30px;
    }

    .historical-heading {
        font-size: 16px;
        padding-bottom: 6px;
    }

    .historical-subheading {
        font-size: 14px;
    }

    .historical-content p,
    .historical-link,
    .historical-dates li {
        font-size: 14px;
    }

    .seadragon-container {
        height: 250px;
    }
}

@media screen and (max-width: 768px) {
    .historical-title {
        font-size: 24px;
    }

    .seadragon-container {
        height: 200px;
    }
}

@media screen and (max-width: 991px) {
    /* Stack the Seadragon container above content on mobile */
    .float-end {
        float: none !important;
        margin-bottom: 1rem;
        width: 100%;
    }
}