/** Q U I V I S  B O D Y **/
body { 
    background-image: url(../images/website/wrinkly.jpg);
    background-color: Silver;
    background-repeat: repeat; 
}			
	
.dark-theme { 
    background-image: url(../images/website/dark.jpg);
    background-size: cover;
    background-attachment: fixed;
    background-color: #000000;
    color: #f0f0f0; 
}

/* Ensure the background is transparent for content areas */
.dark-theme .container,
.dark-theme .card { background-color: transparent !important; }

.dark-theme h1, .dark-theme h2 { color: #ffffff; }

/** TEXT READABILITY CONTAINER **/
.narrow-text {
    margin-left: auto;
    margin-right: auto;
    padding: 1rem;
    line-height: 1.6;
}

@media (min-width: 768px) { 
    .narrow-text {
        max-width: 804px;
    }
}

/* N A V B A R */
@media (max-width: 500px) {
    .navbar {
        background: none !important;
        padding: 0 !important; 
    }
    .navbar-nav {
        margin: 0 auto;
        justify-content: center; 
    }
    nav.navbar .nav-link {
        padding: 0.25rem 0.5rem;
        color: #616161 !important;
        text-decoration: none; 
    }
} 
  
.navbar-toggler:focus {
    box-shadow: none;
    outline: 0;
}

.no-scrollbar {
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none; 
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.quivis-sidebar {
    --bs-offcanvas-width: 250px;
    background-image: url('../images/website/foxed.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.quivis-sidebar .offcanvas-body {
    background-color: rgba(255, 255, 255, 0.5); 
}
  
/* SUB INDICES IMAGE INVERSION */
.card-container {
    max-width: 800px;
    margin: 1rem auto;
}

.card {
    border: none;
    border-radius: 0;
    transition: box-shadow 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.card-img-top {
    display: block; 
    width: 100%;
    height: auto;
}

.card-body {
    padding: 1rem;
}

.menu-image {
    transition: filter 0.3s ease-in-out; 
}

.position-relative a:hover .menu-image {
    filter: invert(100%);
}

.card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2) !important;
    transform: translateY(-5px); 
}

.foxed-bg {
    background-image: url(../images/website/foxed.jpg);     
    background-repeat: no-repeat;    
    background-size: cover;     
    background-position: center center;
}

/* IMAGE LINK LIFT */
/* Targeted lift for menu images within links */
.menu-image {
    /* Change 'filter' to 'all' to capture the lift and the shadow smoothly */
    transition: all 0.3s ease-in-out; 
}

/* Ensure the hover state handles both effects together */
.position-relative a:hover .menu-image {
    filter: invert(100%);
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3) !important;
}

/** TEXT LINKS **/
a.textlink:link, a.textlink:visited {
    color:#1B6AA5;
    font-weight:bold; font-style:italic; text-decoration:none;  
}
a.textlink:hover, a.textlink:active {
    background:#ffefd5; color:#b93a32;
    font-weight:bold; font-style:italic; text-decoration:none; 
}
  
/** EMAIL LINKS **/
a.email:link, a.email:visited {
    color:#1B6AA5;
    font-weight:bold; font-style:italic; text-decoration:none;  
}
a.email:hover, a.email:active {
    font-weight:bold; font-style:italic; text-decoration:none; 
}
  
/* CUSTOM ANCHOR */
.custom-anchor {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease, background-color 0.3s ease; 
}

.custom-anchor:hover {
    color: orange;
    background-color: transparent;
}

/** GOOGLEFONTS **/
.titleabril { font-family: 'Abril Fatface', cursive; }
.titleralmen { font-family: 'Almendra', cursive; }
.titleuncial { font-family: 'Uncial Antiqua', cursive; }
.titlecherry { font-family: 'Cherry Cream Soda', cursive; }
.titlepap { font-family: 'Paprika', cursive; }
.titlefontdiner { font-family: 'Fontdiner Swanky', cursive; }
.titlesalsa { font-family: 'Salsa', cursive; }
.titlerakkas { font-family: 'Rakkas', cursive; }
.titlehenny { font-family: 'Henny Penny', cursive; }
.titleirish { font-family: 'Irish Grover', cursive; } 

/** GOOGLEFONTS HANDWRITING BS5 **/
.titlesatisfy { font-family: 'Satisfy', cursive; color: #3c1310; }
.titleyester { font-family: 'Yesteryear', cursive; color: #3c1310; }
.titlemeddon { font-family: 'Meddon', cursive; color: #3c1310; }
.titlebedfort { font-family: 'Mr Bedfort', cursive; color: #3c1310; }
.titledancing { font-family: 'Dancing Script', cursive; color: #3c1310; }
.titlekaushan { font-family: 'Kaushan Script', cursive; color: #3c1310; }
.titlevibes { font-family: 'Great Vibes', cursive; color: #3c1310; } 
.titlehomemade { font-family: 'Homemade Apple', cursive; color: #3c1310; }
.titleallura { font-family: 'Allura', cursive; color: #3c1310; }

/** NAV CARD LINKS FOR SUB_INDEX **/
.image-hover {
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    object-fit: cover; 
}
.card-link-wrapper:hover .image-hover {
    opacity: 1; 
}
  
.image-normal {
    transition: opacity 0.3s ease;
    z-index: 0; 
}

nav a.nav-link {
    color: white !important;
    font-weight: bold;
    font-style: italic;
    text-decoration: none;
} 

nav a.nav-link:hover,
nav a.nav-link:active {
    background: #ffefd5;
    color: #b93a32 !important;
}

/** BUTTONS NAV STYLE **/
.btn-nav-like {
    color: White !important;
    font-weight: bold;
    font-style: italic;
    text-decoration: none;
    padding: 0.3rem 0.75rem;
    border: none;
    background-color: #F57C00; 
}
.btn-nav-like:hover,
.btn-nav-like:active {
    background: #ffefd5;
    color: #b93a32 !important;
    outline: none; 
}

/** QUIVIS BUTTON **/
.btn.quivis-button {
    color: white !important;
    font-weight: bold;
    font-style: italic;
    text-decoration: none;
}
.btn.quivis-button:hover {
    background-color: #ffefd5; 
    border-color: #ffefd5;
    color: #b93a32 !important; 
}

.btn.quivis-button.active {
    background-color: #303030;
    color: white !important; 
} 

/** WEEKLY BUTTONS **/
/* Custom button styling for the weekly page */
.btn.weekly {
    background-color: #16260c;
    color: #ffffff;
    border-color: #16260c;
}

/* Hover and focus states */
.btn.weekly:hover, 
.btn.weekly:focus {
    background-color: #616b26 !important;
    color: #b93a32 !important;
    border-color: #616b26 !important;
}

/** CUSTOM BUTTON STYLES **/
.square-pill {
    border-radius: 0;
    border-width: 1px;
    font-weight: bold;
    padding: 4px 12px;
    min-width: 40px;
    display: inline-block;
    text-align: center;
    transition: all 0.2s ease;
}

.square-pill.active {
    border-bottom: 3px solid;
}

/** GEMINI BS5 DROPDOWN **/
.navbar-nav {
    flex-direction: row !important; 
}

@media (max-width: 767px) { 
    .navbar-nav {
        flex-wrap: nowrap !important;
        overflow-y: visible !important;
        flex-direction: row !important;
    }
}
.dropdown-menu-center {
    left: 50% !important;
    transform: translateX(-50%) !important;
}

/** COLOURS BS5 **/
.black {color: #000000;}
.dkblue {color: #1A237E;}
.ltblue {color: #0277BD;}
.dkgreen {color: #1B5E20;}
.ltgreen {color: #2E7D32;}
.brown {color: #4E342E;}
.evelyn {color: Green;}
.naena {color: Purple;}
.pink {color: #E57373;}
.mauve {color: #BA68C8;}
.dumblue {color: #0D47A1;}
.orange {color: #F57C00;}
.bluegrey {color: #546E7A;}
.red {color: #D32F2F;}
.dkred {color: #B93A32;}
.purple {color: #5E35B1;}
.gold {color: #C89F10;} 

/** BACKGROUND COLOURS **/
.quivisgrey {
    color: #ffffff; /* Text white for readability */
    background-color: #616161; 
}

/** MISC TEXT FORMATTING **/
.dropcap { 
    color: #B93A32;
    float: left;
    font-family: serif;
    font-size: 4.2rem;
    line-height: 0.8;
    margin-top: 6px;
    padding-right: 8px;
    padding-left: 3px;
    font-weight: normal;
}
	
.cap { 
    float:left;
    font-family: serif;
    font-size:400%;
    line-height:80%; 
    padding-top: 4px;
    padding-right: 8px; 
    padding-left: 3px; 
} 

.quote { display: block; color: Maroon; font-style: italic; padding: 10px 20px 5px 50px; }
.indent { text-indent: 2em; }
.inlinequote { display: inline; color: Maroon; font-style: italic; }
.sup { vertical-align: super; font-size: smaller; }
.sub { vertical-align: sub; font-size: smaller; }
.boatname { font-variant: small-caps; font-weight: bold; }
.smcaps { font-variant: small-caps; }
.note { font-size: 0.8em; color: black; font-weight: bold; }
.fnote { font-size: 1.0em; font-weight: bold; }

/** BS5 FOXED SHEETS & CARDS **/
.foxed {
    background-image: url(../images/website/foxed.jpg);
    background-repeat: repeat;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.card.foxed {	
    background-image: url(../images/website/foxed.jpg);
    background-repeat: repeat;
    min-height: 50px;
    background-size: auto;
    border-radius: 0.75rem;
    box-shadow: 8px 8px 15px rgba(0, 0, 0, 0.3);
    border: none;
}

/** TOOLTIPS & UI BUTTONS **/
a[data-bs-toggle="tooltip"] {
    color: #0277BD;
    font-weight: bold;
    text-decoration: none; 
}
a[data-bs-toggle="tooltip"]:hover {
    color: #B93A32;
    text-decoration: underline; 
}

.btn-danger { background-color: #D32F2F !important; border-color: #D32F2F !important; color: #fff; }
.btn-danger:hover { background-color: #ef9a9a !important; color: #000; }
.btn-success { background-color: #2E7D32 !important; border-color: #2E7D32 !important; color: #fff; } 
.btn-success:hover { background-color: #a5d6a7 !important; color: #000; }
.btn-warning { background-color: #C89F10 !important; border-color: #C89F10 !important; color: #fff; }
.btn-warning:hover { background-color: #a5d6a7 !important; color: #000; }

/** CAROUSEL **/
#quivis_carousel { max-height: 80vh; overflow: hidden; }
.carousel-item { background-color: transparent; text-align: center; transition: opacity 1s ease-in-out; }
.carousel-item img { max-height: 80vh; width: auto; height: auto; object-fit: contain; margin: 0 auto; }	
.carousel-control-prev, .carousel-control-next { animation: flash 1.0s infinite alternate; } 
@keyframes flash { from { opacity: 1; } to { opacity: 0.5; } }

/** TABLES (LEDGER & PETERKIN) **/
TABLE.ledger { 
    background-image: url(../images/website/foxed.jpg); 
    font-family: "Times New Roman", Times, serif; 
    font-size: 18px;
    border-collapse: collapse;
    margin-bottom: 2rem;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); 
    border: none;
}

TABLE.ledger TH, TABLE.ledger TD {
    padding: 0 20px !important;
    vertical-align: top;
}

TABLE.ledger TD {
    background-image: linear-gradient(to right, #9cf 80%, rgba(153, 204, 255, 0) 0%);
    background-position: bottom;
    background-size: 8px 1px;
    background-repeat: repeat-x;
}

TABLE.ledger .leftmargin { border-left: 3px double Red; }
TABLE.ledger .rightmargin { border-right: 3px double Red; }

/** PRINT RULES **/
@media print {
    TABLE.ledger { background-image: none !important; box-shadow: none !important; color: black !important; }
    TABLE.ledger TD { border-bottom: 1px solid #ccc !important; background-image: none !important; }
    .btn, .navbar, .dropcap { display: none; }
}

/** GENEALOGY CARDS **/
.card.genealogy-card, .card.genealogy-card .card-body {
    background-color: transparent;
    border: none;
    box-shadow: none;
}

.genealogy-card table.table, .genealogy-card table.table tr, .genealogy-card table.table th, .genealogy-card table.table td {
    background-color: transparent;
    --bs-table-bg: transparent;
    --bs-table-color: inherit;
}

/** ------------------------------------------------------------------------
    G A L L E R Y  &  G L I G H T B O X (Restored & Consolidated)
    ------------------------------------------------------------------------- **/

/* 1. The Grid Thumbnails */
.gallery-container a, .gallery-grid a {
    display: block;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 15px;
}

.gallery-container img, .gallery-thumb { 
    width: 100% !important;
    aspect-ratio: 1 / 1 !important; 
    object-fit: cover !important;
    object-position: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-container a:hover img { 
    transform: scale(1.05); 
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* 2. Backgrounds for Modal/Gallery Areas */
.brown-background { background: url(../images/website/brown.jpg) center/cover no-repeat; color: #F57C00; }	
.paper-background { background: url(../images/website/paper.jpg) center/cover no-repeat; color: #F57C00; }	
.slate-background { background: url(../images/website/slate.jpg) center/cover no-repeat; color: #F57C00; }

/* 3. GLightbox UI (Restoring Navigation Arrows) */
.glightbox-clean .gprev, 
.glightbox-clean .gnext {
    display: flex !important; /* Ensure they aren't hidden */
    background-color: rgba(0, 0, 0, 0.5); 
    border-radius: 50%;
    width: 45px;
    height: 45px;
}

.glightbox-clean .gprev svg, 
.glightbox-clean .gnext svg {
    width: 20px;
    height: 20px;
}

/* 4. Full Image & Caption Styling */
.glightbox-clean .gslide-image img {
    width: auto !important;
    height: auto !important;
    max-height: 90vh !important;
    max-width: 90vw !important;
    object-fit: contain !important;
}

.gslide-title {
    background: transparent !important;
    padding: 0.2rem 0.5rem !important;
    margin: 0 !important;
    font-size: 0.9rem !important;
    color: white !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.gslide-description {
    background: transparent !important;
    padding: 0.2rem 0.5rem !important;
    box-shadow: none !important;
}

/* GALLERY INDEX */
@media (max-width: 767.98px) {
  /* Hide the table header on mobile */
  .table-stack thead {
    display: none;
  }

  /* Force table parts to behave like block elements */
  .table-stack tr, 
  .table-stack td {
    display: block;
    width: 100% !important;
  }

  /* Add some spacing between the image and the text when stacked */
  .table-stack .image-cell {
    border-bottom: none;
    padding-bottom: 0;
  }
  
  .table-stack .text-cell {
    padding-top: 1rem;
    padding-bottom: 1.5rem;
  }
}

/** --- SPLASH PAGE SPECIFIC STYLES --- **/
/* Use .splash-page prefix to ensure these don't affect other pages */

.splash-page {
    background-image: url(../images/website/tadpoles.jpg); 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.splash-page .main-content-wrapper {
    margin-top: 5vh;
    /* Centring fix: remove flex-grow and forced padding */
    width: 100%;
    max-width: 900px; 
    margin-left: auto;
    margin-right: auto;
}

.splash-page .custom-button-hover {
    font-weight: 700 !important;
    color: #333 !important;
    text-decoration: none !important;
    background-color: #fbfcdc !important;
    border: none !important;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out;
}

.splash-page .custom-button-hover:hover,
.splash-page .custom-button-hover:focus {
    color: #b93a32 !important;
    background-color: #ffefd5 !important;
}

/* Ensure the Bootstrap secondary button on splash follows the theme */
.splash-page .btn-secondary {
    color: #333;
    text-shadow: none;
}

.splash-page .btn-secondary:hover {
    color: #b93a32;
}

.splash-content-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* This pulls the element back by half its own width/height */
    width: 100%;
    max-width: 1000px;
    padding: 0;
    margin: 0;
}
