/*font declaration */
:root {
    --cassiopeia-font-family-body: "Trebuchet MS", "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Tahoma, sans-serif;
    --cassiopeia-font-family-headings: "Trebuchet MS", "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Tahoma, sans-serif;
    --cassiopeia-color-primary: #f7f2e0; /* Main brand/header color */
    --cassiopeia-color-link: #8b0000;    /* Link color */
    --cassiopeia-color-hover: #c00;   /* Hover state color */
}

.site-grid > .main-row, 
#content,
.container-component {
    /* background-color: #f7f2e0 !important; */
    background-image: url('/templates/cassiopeia_scratchboardstock/images/bgpattern_02-960x800.jpg') !important;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}
/* Force below-top to take up the full horizontal grid span */
.grid-child .container-below-top {
    grid-column: 1 / -1 !important;
    width: 100% !important;
}

body {
    font-family: var(--cassiopeia-font-family-body);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--cassiopeia-font-family-headings);
}

body {
    background-image: url('../images/siteBG-1889x1737.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
}

/* Style the header container */
.header {
    background: #000000 !important;
    background-image: none !important;
    border-bottom: 4px solid #8b0000 !important; /* Dark red bottom border */
    padding: 20px 0;
    display: flex;
    justify-content: center;
}
.header.container-header {
    padding: 0 !important;
}

/* Style the text/navigation within the header */
header.header .navbar-brand, 
header.header .container-nav {
    color: #8b0000 !important; /* Dark red text */
    font-family: "Times New Roman", Times, serif; /* Match the serif style */
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: bold;
}

.container-top-a {
    background-color: #8b0000 !important;
}
/* Force top-a menu items to sit side-by-side */
.container-top-a ul.mod-menu {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap;
    list-style: none;
    padding: 0 20px;
    margin: 0;
}

.container-top-a .mod-menu li {
    margin-right: 1.5rem; 
}

.container-top-a .mod-menu li.active a,
.container-top-a .mod-menu li.current a {
    text-decoration: none !important;
}

.container-top-a .mod-menu a {
    text-decoration: none;
    color: #e3f2fd; 
}
.container-top-a .mod-menu a:hover {
    text-decoration: none;
    color: #f2c53e; 
}

/* Ensure links in the header are also red */
header.header a {
    color: #8b0000 !important;
    text-decoration: none;
    margin: 0 15px;
}

.techniques-container {
    background-color: #F0E8D0 !important;
    border-bottom: #8b0000 6px solid !important;
    width: 100%;
}
.techniques-container .techniques-inner-container {
    display: flex;
    /* Remove justify-content; flex: 1 handles the spacing */
    max-width: var(--cassiopeia-grid-container, 1320px);
    margin: 0 auto;
    padding: 0 1rem;
    gap: 1rem; 
}
.techniques-container .techniques-inner-container > div {
    flex: 1 1 0px; /* Forces each of the 4 divs to be exactly the same width */
    text-align: center;
    color: #993234;
    font-size: 26px;
    font-weight: bold;
    line-height: 36px;
    font-family: "Times New Roman", Times, serif;
}

.card.carousel .card-body,
.carousel .card-body {
    padding: 0 !important;
    margin: 0 !important;
}
.card.carousel {
    border-radius: 0px;
    border: none;
}
.container-top-a>* {
    margin: 0; padding:0;
}

/* Removes top margin from moduletables containing slideshowck on the home page */
.home .moduletable:has(.slideshowck) {
    margin-top: 0 !important;
}

footer.footer {
    max-width: var(--cassiopeia-grid-container, 1320px);
    margin-right: auto;
    margin-left: auto;
    padding-left: 1rem;
    padding-right: 1rem;
    background-image: url('/templates/cassiopeia_scratchboardstock/images/page-foot-bg-960x240.jpg') !important;
    background-size: cover; /* Add this to ensure image covers the footer */
    background-position: center center; /* Center the background image */
    background-repeat: no-repeat; /* Prevent image from repeating */
    border-radius: 0 0 10px 10px;
    margin-bottom: 50px;
    margin-top:0px !important;
    color:#333333;
}
.site-grid {
    margin-bottom:0px !important;
}
.container-footer .footer {
    margin-top:0px !important;
}
.container-footer .footer > .grid-child {
    padding-top:0px !important;
}
/* Force the footer container to allow modules to sit side-by-side */
.footer .grid-child {
    display: flex;
    flex-wrap: wrap; /* Allows the 3 modules to fill the row */
    align-items: flex-start;
    gap: 0; /* Bootstrap columns handle their own spacing */
    padding: 1.5rem 0;
}

/* Ensure the modules respect the 'Bootstrap Size 4' (33.33%) setting */
.footer .grid-child > * {
    flex: 0 0 33.333333%; /* Force them into 1/3 width */
    max-width: 33.333333%;
    padding: 0 15px; /* Creates the 'gap' between modules */
}

/* Mobile responsive: stack them on smaller screens */
@media (max-width: 768px) {
    .footer .grid-child > * {
        flex: 0 0 100%;
        max-width: 100%;
    }
}
/* phocagallery adjustments */
.g5i {
  background-color: #f7f2e0 !important;
}
#phocagallery {
    grid-column: main;
    max-width: var(--cassiopeia-grid-container, 1320px);
    margin-left: auto;
    margin-right: auto;
}
.pg-category-view, .phocagallery-box-file {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px; /* Adjust spacing between thumbnails */
}
.contentpane.component {
    background: #f7f2e0 !important;
}
.modal-content {
    background: #f7f2e0 !important;
    color:#333333 !important;
}
.pg-detail-nav-box {
    background: #f7f2e0 !important;
    color:#333333 !important;
}
.pg-detail-nav-box a,
.ph-si.ph-si-next-btn {
    color:#333333 !important;
}
.pg-detail-nav-box a:hover,
.ph-si.ph-si-next-btn:hover {
    color:#ffffff !important;
}
.pg-detail-nav-box a:active {
    color:#8b0000 !important;
}
/* Remove background and border from the left sidebar container */
.sidebar-left, 
.container-sidebar-left .card {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.random-images-homepage-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}
.random-images-homepage-wrapper .pg-item-box {
    width: 7.33% !important;
    margin: 0.5% !important;
    float: left !important;
    border: none !important;
    box-shadow: none !important;
    background-color: transparent !important;
}
.card.random-images-homepage {
    border: none !important;
    box-shadow: none !important;
    background-color: #555555 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.phocagallery-custom-page .pg-masonry {
    -moz-column-count: 4;
    -webkit-column-count: 4;
    column-count: 4;
}

.grid-child.container-sidebar-left {
    padding: 0 !important;
    background-image: url('/templates/cassiopeia_scratchboardstock/images/left-lighthouse.jpg') !important;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}
.com-content-article.item-page {
    margin: 20px; /* Adds a 20px margin on all sides */
    background-color: rgba(247, 242, 224, 0.75); 
    padding: 15px; /* (Optional but recommended) Add some internal padding so the content doesn't touch the edges of the background */
    border-radius: 8px; /* (Optional) Slightly rounds the corners of the background */
  }

.carousel-container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.carousel-container img {
    flex: 0 0 auto;
}

form[name="adminForm"] {
    color: #f7f2e0;
}

/* Change Smart Search results from a List to a Grid */
ul#search-result-list,
#search-result-list,
.com-finder__results-grid,
ul.com-finder__results-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 20px !important;
    padding-left: 0 !important;
    list-style: none !important;
    margin: 20px 0 !important;
    align-items: start !important;
}

/* Style search form as a centered card */
#search-form.com-finder__form {
    max-width: 800px !important;
    margin: 40px auto !important;
    padding: 30px !important;
    background: #fff !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

/* Ensure text in search form is readable */
#search-form.com-finder__form label,
#search-form.com-finder__form .form-control,
#search-form.com-finder__form .form-inline {
    color: #333 !important;
}

@media (min-width: 768px) {
    #search-form.com-finder__form {
        padding: 40px !important;
        margin: 50px auto !important;
    }
}

@media (min-width: 1200px) {
    #search-form.com-finder__form {
        padding: 50px !important;
        margin: 60px auto !important;
    }
}

/* Add padding to search results container */
#search-results.com-finder__results {
    padding: 0 20px !important;
}

@media (min-width: 768px) {
    #search-results.com-finder__results {
        padding: 0 30px !important;
    }
}

@media (min-width: 1200px) {
    #search-results.com-finder__results {
        padding: 0 40px !important;
    }
}
/* Style search button to match navbar red */
.com-finder__form .btn-primary,
#search-form .btn-primary {
    background-color: #8b0000 !important;
    border-color: #8b0000 !important;
    color: #fff !important;
}

.com-finder__form .btn-primary:hover,
.com-finder__form .btn-primary:focus,
#search-form .btn-primary:hover,
#search-form .btn-primary:focus {
    background-color: #c00 !important;
    border-color: #c00 !important;
    color: #fff !important;
}
/* Style search results messages and text with cream color */
.com-finder__empty,
.com-finder__explained,
.com-finder__sorting,
.com-finder__navigation,
.com-finder__counter,
#search-result-empty,
#search-query-explained,
#search-sorting {
    color: #f7f2e0 !important;
}

/* Ensure headings in empty state are also cream */
.com-finder__empty h2,
#search-result-empty h2 {
    color: #f7f2e0 !important;
}

/* Style pagination text */
.com-finder__pagination,
.search-pagination,
.search-pages-counter {
    color: #f7f2e0 !important;
}
/* Style links in search results with rose color */
.com-finder a,
#search-results a,
.com-finder__explained a,
.com-finder__empty a,
.com-finder__navigation a,
.com-finder__pagination a,
.result__title-link,
.result__title-link:visited {
    color: #d4a5a5 !important;
}

.com-finder a:hover,
.com-finder a:focus,
#search-results a:hover,
#search-results a:focus,
.com-finder__explained a:hover,
.com-finder__navigation a:hover,
.com-finder__pagination a:hover,
.result__title-link:hover,
.result__title-link:focus {
    color: #e6b8b8 !important;
    text-decoration: underline !important;
}

/* Style pagination links specifically */
.com-finder__pagination a,
.search-pagination a {
    color: #d4a5a5 !important;
}

.com-finder__pagination a:hover,
.search-pagination a:hover {
    color: #e6b8b8 !important;
}
.com-finder__form .btn-primary:active,
#search-form .btn-primary:active {
    background-color: #a00 !important;
    border-color: #a00 !important;
    color: #fff !important;
}
/* Style individual items as cards */
li.result__item,
.result__item {
    border: 1px solid #ddd;
    padding: 0;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
    display: flex !important;
    flex-direction: column !important;
}

/* Override parent template's list spacing for grid layout */
.com-finder__results-grid .result__item + .result__item,
ul.com-finder__results-grid .result__item + .result__item,
#search-result-list .result__item + .result__item,
ul#search-result-list .result__item + .result__item {
    border-top: none !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

li.result__item:hover,
.result__item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.result__card-inner {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    flex-grow: 1;
}

.result__image {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.result__image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.result__content {
    padding: 15px;
    flex-grow: 1 !important;
    display: flex !important;
    flex-direction: column !important;
}

.result__title {
    margin: 0 0 10px 0;
    font-weight: 600;
}

.result__title-link {
    text-decoration: none;
    color: inherit;
}

.result__title-link:hover {
    text-decoration: underline;
}

.result__description {
    margin: 0 0 10px 0;
    flex-grow: 1;
    color: #666;
    font-size: 0.9em;
    line-height: 1.5;
}

.result__date {
    display: block;
    font-size: 0.85em;
    color: #999;
    margin-bottom: 8px;
}

.result__taxonomy {
    margin: 10px 0 0 0;
    padding: 0;
    list-style: none;
    font-size: 0.85em;
    color: #888;
}

.result__taxonomy-item {
    margin: 5px 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    ul#search-result-list,
    #search-result-list,
    .com-finder__results-grid,
    ul.com-finder__results-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
}

@media (min-width: 1200px) {
    ul#search-result-list,
    #search-result-list,
    .com-finder__results-grid,
    ul.com-finder__results-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
    }
}
/* Add bottom padding to content area on search pages */
.com-finder .container-component,
.container-component:has(.com-finder) {
    padding-bottom: 40px !important;
}