/* 1. VARIABLES & RESET */
:root {
    /* Brand Colors */
    --ssc-yellow: rgb(254, 189, 63);
    --ssc-blue: rgb(34, 51, 68);
    
    /* UI Colors */
    --bg-main: rgb(209, 209, 209);
    --bg-mist: rgb(168, 179, 188);
    --bg-content: rgb(239, 239, 239);
    --bg-light-yellow: rgb(254, 245, 204);
    --nav-grey: rgb(169, 169, 169);
    --hover-grey: rgb(109, 109, 109);
     
    /* Standard Colors */
    --white: #ffffff;
    --black: #000000;
    --grey-border: #bbbbbb;
    
    /* Fonts */
    --font-serif: Georgia, Lucida, serif;
    --font-sans: "Source Sans Pro", sans-serif;

    /* Transitions */
    --transition-main: all 0.2s ease-in-out;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    background-color: var(--bg-content);
    color: var(--black);
    font-family: var(--font-sans);
    font-size: 1em;
    margin: 0;
}

/* 2. TYPOGRAPHY & LINKS */
h1, h2, h3 { font-family: var(--font-serif); }
h1 { font-size: 2.2em; display: inline-block; padding: 1px; margin: 0; }
h2 { font-size: 1.6em; }
h3 { font-size: 1.3em; }

a:link, a:visited { color: var(--black); }
a:hover { background-color: var(--hover-grey); color: var(--white); }

figcaption { font-size: 0.7em; }

/* 3. LAYOUT COMPONENTS */

main {
    width: clamp(20em, 95%, 75em); 
    margin: 0 auto;
    background-color: var(--bg-main);
    border-radius: 8px;
}

.content {
    padding: 10px;
    background-color: var(--bg-content);
}

img {
    display: block;
    max-height: 25vh;
    width: auto;
    margin-left: 0;
    margin-right: auto;
    object-fit: contain;
    border-radius: 8px;
    padding: 2px;
}

.content-display img {
    max-height: 100%;
}

img.centerscreen {
    margin-left: auto;
    margin-right: auto;
}

/* Reduced size image for auction-list Preview B, adjustments for mobile tiles under media queries */
    .auction-list .col-img img {
        width: 50px;        /* Small image to balance text */
    }

.figcaption {
    text-align: left;
    padding: 10px, 0;
}

.image-container {
    display: table;
    min-width: min-content;
    vertical-align: top;
    margin: 20px auto;
}

.image-container img {
    max-width: 100%;
}

.image-container figcaption {
    display: table-caption;
    caption-side: bottom; /* Ensures text stays underneath */
    font-size: 0.7em;
    padding: 10px 0;
    line-height: 1.4;     /* Improves readability for wrapped text */
    text-align: left;
}

.side-by-side {
    display: inline-flex;
    flex-direction: row;
    justify-content: flex-start; /*left alignment */
    flex-wrap: wrap;
    gap: 20px;
}
.side-by-side img {
    /* flex: 1 1 0; /* share space equally regardles of inherent size */
    flex: 0 1 auto; /*first zero means do not grow to fill space, BUT Chrome makes calx based on original size, not scaled down version by CSS */ 
    min-width: 0;
    width: auto;
    max-width: 100%;
/*    height: auto; */
}

/* for past events images, 2-3 on laptop with center display, 1 on mobile - see media queries below*/
.side-by-side.is-centered {
    justify-content: center; /* Overrides left alignment to center */
}
.center-override { text-align: center; }

.header-box {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 10px;
    background-color: var(--bg-main);
}

.header-text {
    flex-grow: 1;
    color: var(--white);
    text-align: center;
}

.logo {
    height: 20vh;
    font-size: 2.2em;
    max-height: 5cap;
    border-radius: 8px;
    width: auto;
    display: block;
    object-fit: contain;
    }


.footer {
    padding: 10px;
    background-color: var(--nav-grey) ;
    font-size: 0.8em;
}

.footer-contact {
    margin-left: 40px; 
}

.footer-content p {
    margin-top: 10px; /* Space between the top line and the copyright line */
    font-size: 0.8em;
}

.viewer-button {
    display: block;
    width: fit-content;
    margin: 5px auto;
    color: var(--nav-grey);
    background-color: var(--bg-main);
    border: 1px solid var(--nav-grey);
    padding: 10px 20px;
    border-radius: 8px;
    font-family: var(--font-serif);
    font-size: 1em;
    text-decoration: none;
    transition: background-color 0.3s;
}

.viewer-button {
    color: var(--nav-grey);
    border-radius: 8px;
}

/* 4. NAVIGATION */
    .main-nav {
        overflow: hidden;
        background-color: var(--nav-grey);
    }

        .main-nav a {
            float: left;
            display: block;
            color: var(--white);
            text-align: center;
            padding: 14px 16px;
            text-decoration: none;
            font-family: var(--font-serif);
            font-size: 1.2em;
            background-color: var(--nav-grey);
        }

        .main-nav a.icon {
            display: none;
            font-size: 1.2em;
            border-radius: 8px;
            transition: background-color 0.2s;
        }

    .subnav {
        float: left;
        overflow: hidden;
    }

        .subnav .subnavbtn {
            font-family: var(--font-serif);
            font-size: 1.2em;
            border: none;
            outline: none;
            color: var(--white);
            padding: 14px 16px;
            background-color: inherit;
            margin: 0;
        }

    .main-nav a:hover, .subnav:hover, .subnav:hover .subnavbtn, .subnav-content a:hover {
        color: var(--ssc-blue);
        background-color: var(--ssc-yellow);
    }
        .subnav-content {
            display: none;
            position: absolute;
            min-width: 160px;
            z-index: 1;
}
            .subnav-content a {
                float: none;
                font-size: 1.2em;
                color: black;
                background-color: white;
                padding: 12px 16px;
                text-decoration: none;
                display: block;
                text-align: left;
            }

    .subnav:hover .subnav-content {
        display: block;
    }
    .subnav i {
        padding-left: 5px;
    }
        
    .active {
        background-color: var(--ssc-yellow);
        color: var(--ssc-blue);
    }

/* sub-sub nav -- redundant per 10.5
@media screen and (min-width: 40em) {
    .sub-subnavbtn {
        min-width: 160px;
        text-align: left;
        font-family: var(--font-serif);
        font-size: 1.2em;
        border: none;
        outline: none;
        color: var(--black);
        padding: 14px 16px;
        background-color: var(--white);
        margin: 0;
    }

    .sub-subnavbtn i {
        float: right;
    }

    .sub-subnav {
    position: relative; /* Context for the flyout 
    }

  .sub-subnav-content {
    display: none;
    position: absolute;
    left: 100%; /* Pushes it to the right of the current menu 
    top: 0;
    background-color: var(--white);
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  }
       .sub-subnav-content a {
        font-size: 1em;
        padding: 10px 16px;
    }

  .sub-subnav:hover .sub-subnav-content {
    display: block; /* Show on hover for desktop 
  } 
}  */

/* 5. SLIDESHOW */
.slideshow-container {
    width: clamp(18.75rem, 90%, 62.5rem);
    position: relative;
    margin: auto;
}

.mySlides { display: none; }

.mySlides img {
    width: 100%;
    display: block;
    max-height: none; 
    border-radius: 8px; 
}

.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 16px;
    color: var(--ssc-yellow);
    font-weight: bold;
    font-size: 24px;
    z-index: 10;
    transition: 0.3s;
}

.next { right: 0; }
.prev:hover, .next:hover { background-color: var(--ssc-blue); }

.desc {
    font-size: 16px;
    padding: 10px 5px 5px 5px; 
    text-align: center;
}

.dot-container {
    text-align: center;
    margin-top: -5px; 
    padding-bottom: 10px;
}

.dot {
    cursor: pointer;
    height: 10px; 
    width: 10px;
    margin: 0 4px;
    background-color: var(--grey-border);
    border-radius: 50%;
    display: inline-block;
    transition: 0.6s;
}

.dot.active, .dot:hover { background-color: var(--ssc-yellow); }

/* Caroussel for digital content */
.dc-carousel-container {
    background-color: var(--bg-main);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    overflow-x: auto; /* Enables horizontal scrolling */
    scroll-snap-type: x mandatory;
    gap: 20px;
    justify-content: flex-start;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    
}
/* Hide scrollbar for a cleaner look while keeping functionality */
.dc-carousel-container::-webkit-scrollbar {display: none;}

.dc-card {
    background-color: var(--white);
    border: 1px solid var(--grey-border);
    border-radius: 8px;
    max-height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    flex-grow: 0;
    flex-basis: auto;  /* these 3 lines can be shorted to flex: 0 0 auto; */
    scroll-snap-align: start;
}

.dc-media-wrapper {
/*    aspect-ratio: 9 / 16; */
    background-color: var(--black); /* Fallback for loading */
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center; 
    width: 100%;
}

.dc-media-wrapper video {
    display: block;
    max-width: 100%;
    max-height: 100;
    width: auto;
    height: auto;
    object-fit: contain;
}

.dc-info-tray {
    background-color: var(--bg-light-yellow);
    flex-shrink: 0;
    padding: 15px;
    font-family: var(--font-serif);
    border-top: 3px solid var(--ssc-yellow);
}

.dc-title {
    color: var(--hover-grey);
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.dc-description {
    color: var(--hover-grey);
    font-family: var(--font-sans);
    font-size: 0.9rem;
}

/* 6. TABLES & ACCORDIONS */
table {
    display: table;
    width: max-content;
    min-width: 35%;
    max-width: 95%;   
    margin: 20px auto;
    border-collapse: collapse;
    border: 1;
    font-size: 0.8em;
    table-layout: auto; 
}

caption {
    background-color: var(--ssc-yellow);
    padding: 10px;
    font-weight: bold;
    caption-side: top;
    width: auto;
}

thead th {
    background-color: var(--ssc-yellow);
}

th, td {
    border: 1px solid var(--white);
    padding: 10px;
    background-color: var(--bg-main);
    text-align: left;
    vertical-align: top;
    white-space: nowrap; 

}

th:first-child, td:first-child {
    width: 1%; 
    white-space: nowrap;
}

th:nth-child(2), td:nth-child(2) {
    width: auto; 
    min-width: 0; 
    white-space: normal; /* allows wrapping if the name if very long */
}

th:nth-child(n+3), td:nth-child(n+3) {
    width: auto;
    min-width: 120px;
    white-space: normal;   /* Overrides inherited 'nowrap' */
    overflow-wrap: break-word; 
} 
abbr[title] {
  text-decoration: underline dotted; 
  cursor: help; /* Changes the mouse pointer to a question mark on desktop */
}

.nodesk { display: none; }

#table-container th  {
    background-color: var(--ssc-yellow);
    font-weight: bold;
    text-align: left;
}

.mobile-label { display: none; }

/* styling for auction list */

/* form */
form {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    margin: 20px auto;
    width: max-content;
    min-width: 35%;
    max-width: 95%;
    background-color: var(--bg-main);
    border-radius: 8px;
    padding: 2rem;
    font-size: 1rem;
    color: inherit;
}

form button {
    background-color: var(--ssc-yellow);
    color: var(--ssc-blue);
    font-family: var(--font-serif);
    font-weight: bold;
    font-size: 1rem;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    align-self: center; /* Keeps it centered in the form */
    transition: transform 0.2s ease, filter 0.2s ease;
}

form button:hover {
    filter: brightness(0.9);
    transform: translateY(-1px); /* A little "lift" when hovering */
}

input, textarea, select {
    background-color: var(--white); 
    border: 1px solid var(--grey-border);
    border-radius: 4px;
    padding: 10px;
    font-family: var(--font-sans);
    font-size: 0.8em;
    width: 100%;
    box-sizing: border-box;
}

/* accordion */
.accordion {
    background-color: var(--ssc-blue);
    color: var(--white);
    font-family: var(--font-serif);
    font-size: 1.2em;
    width: 100%;
    padding: 15px 20px;
    text-align: left;
    cursor: pointer;
    border: 1px solid var(--black); 
    border-radius: 5px;
    outline: none;
    transition: 0.4s;
    position: relative; /* positions + sign */
}

.accordion:hover { 
    background-color: var(--ssc-yellow);
    color: var(--ssc-blue);
}

.accordion::after {
    content: '\002B'; /* Unicode for the + sign */
    color: var(--white);
    font-weight: bold;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.accordion.active {
    background-color: var(--ssc-yellow);
    color: var(--ssc-blue);
    border-color: transparent;
    border-radius: 5px 5px 0 0;
}

.accordion.active + .panel {
    border-color: transparent;
    background-color: var(--bg-content);
}

.accordion.active::after {
    content: "\2212"; /* Unicode for the - sign */
}

.panel {
    background-color: var(--white);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease-out;
    border: 1px solid var(--black);
    border-top: none;
    border-radius: 0 0 5px 5px;
    margin-bottom: 5px;
    border-width: 0 1px;
}

.panel-content {
    padding: 15px 20px; 
}

.panel img {
    display: block;
    margin-left: 0;  
    margin-right: auto;    
    margin-bottom: 5px; /* Creates the gap between image and caption */
    border-radius: 8px;
    width: auto;
    max-width: 100%;
    max-height: 25vh;
}

.panel p, 
.panel div, 
.panel figcaption {
    padding: 0; 
    margin: 0;
    line-height: 1.3;
}

.panel figcaption {
    font-size: 0.8em;
    margin-bottom: 10px; /* Space before any following paragraph */
}

.panel p {
    margin-top: 10px;
}

/* slide-show */
    .slideshow-container {
        width: 95%;
    }

    .prev, .next {
        padding: 8px;
        font-size: 18px;
    }


/* 7. ANIMATIONS */
.fade { animation: fadeEffect 1.5s; }
@keyframes fadeEffect {
    from { opacity: 0.4; } to { opacity: 1; }
}

/* 8. MEDIA QUERIES */
@media screen and (max-width: 40em) {
    h1 { font-size: 1.4em; }
    h2 { font-size: 1.2em; }
    h3 { font-size: 1.1em; }

    .nomob { display:none; }
 
    .header-box { flex-direction: row; justify-content: center; }

    img {
        max-height: 20vh;
        margin-left: auto;
        margin-right: auto;
    }

        .main-nav a:not(:first-child), .subnav .subnavbtn {
            display: none;
        }

        .main-nav a.icon {
            float: right;
            display: block;
         }
  
            .main-nav.responsive {
                position: relative;
            }

            .main-nav.responsive a.icon {
                position: absolute;
                right: 0;
                top: 0;
            }

            .main-nav.responsive a {
                float: none;
                display: block;
                text-align: left;
            }

            .main-nav.responsive .subnav {
                float: none;
            }

            .main-nav.responsive .subnav-content {
                position: relative;
                background-color: var(--bg-light-yellow);
            }

                .main-nav.responsive .subnav-content a {
                    color: var(--black);
                    font-size: 1em;
                }

            .main-nav.responsive .subnav .subnavbtn {
                display: block;
                width: 100%;
                text-align: left;
            }

/* sub-subnav on mobile */
/*old 27.5 - didn't work because of specificity conflict ...
  .main-nav.responsive .sub-subnav-content {
    display: none; /* Hidden by default 
    position: relative; /* Stacked, not floating 
  }*/

  /* re-written: now content opens immediately on click of sub-nav: but it listens to the script. so fine for now */
  .main-nav.responsive .sub-subnav.open .sub-subnav-content {
    display: block !important; 
  }

  /* Indent the deeper links */
  .main-nav.responsive .sub-subnav-content a {
    padding-left: 40px; 
  }

  /* When active/clicked, show the content */
  .sub-subnav.open .sub-subnav-content {
    display: block;
  }

   .sub-subnavbtn {
        display: block;
        width: 100%;
        text-align: left;
        font-family: Georgia, Lucida, serif;
        font-size: 1em;
        border: none;
        outline: none;
        color: var(--black);
        padding: 14px 16px;
        background-color: var(--white);
        margin: 0;
    }

    .sub-subnavbtn i {
        float: right;
    }

    .sub-subnavbtn i {
        float: right;
        /* Rotate the right-pointing caret 90 degrees to point DOWN */
        transform: rotate(90deg); 
    }
    
    /* Optional: If the menu is OPEN, you could even rotate it back up! */
    .sub-subnav.open .sub-subnavbtn i {
        transform: rotate(270deg); /* Points UP when open */
    }
}
/* Responsive table */
@media screen and (max-width: 40em) {
  .responsive-table {
    padding: 5px;
    table-layout: fixed;
  }

  .responsive-table tbody {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    width: 100%;
    box-sizing: border-box;
  }

.responsive-table caption {
    display: none;
} 

.responsive-table thead {
    display: block;
    font-weight: bold;
} 

.responsive-table thead tr td {
    background-color: var(--ssc-yellow);
}

  .responsive-table tr {
    display: block; /* flex was partial cause for text overrunning cell limits */
    width: 95%;
    padding: 5px;
    border: 1px solid var(--white);
    border-radius: 8px;
    background-color: var(--bg-content);
    box-sizing: border-box;
  }

.responsive-table td {
    display: block;
    width: 100%;
    padding: 3px 0 3px 3px;
    margin-bottom: 3px; 
    border-radius: 5px;
 /* overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word; these lines*/
/* above changed as text over-ran cell limits, replaced with: */
    white-space: normal;    /* Overrides any inherited 'nowrap' */
    overflow-wrap: anywhere; /* Harder version of break-word */
    word-break: normal;     /* Allows standard linguistic wrapping */
    hyphens: auto;
    border: none;
   }

.responsive-table td:nth-child(n+2) .responsive-table td:nth-child(n+3) {
    width: auto;
    min-width: auto;
    word-wrap: break-word; 
}
.responsive-table thead.nomob { display: none; }

.responsive-table tr.nomob {
    display: none;
  }
/* .responsive-table td.cell-issue-desktop { display: none; } */

.responsive-table tfoot { display: none; }

.mobile-issue-label {
        display: inline; 
        float: right;
        margin-right: 20px;
/*        justify-content: space-between; */
        font-weight: normal;
} 
.responsive-table td.cell-date {
        font-weight: bold;
        border-bottom: 1px solid var(--white);
        margin-bottom: 5px;
        background-color: var(--nav-grey);
    }
.responsive-table td.nomob { display:none; }
}

/* Media queries for slide-show & caroussel */
@media screen and (min-width: 90em) {
    .slideshow-container {
            max-width: 80rem;
    }
}

@media (max-width:39.99em) {
   .dc-card {
        flex-basis: calc(100% - 20px); 
        width: min-content;
    }
}

/* Tablet/Laptop: 3 cards visible (40em and above) */
@media (min-width: 40em) {
   .dc-card {
         flex-basis: calc(33.33% - 20px); 
        width: min-content;
    }
}

/* Wide Screen: 5 cards visible (90em and above) */
@media (min-width: 90em) {
   .dc-card {
        flex-basis: calc(20% - 20px); 
        width: min-content;
    }
}
    /* 9.  Auction list */

.category-section {
    margin-bottom: 10px;
/*    border: 1px solid var(--white); */
    border-radius: 8px;
    overflow: hidden;
}

.category-header {
    background: var(--ssc-blue);
    color: var(--white);
    margin: 0;
    padding: 15px;
    cursor: pointer;
    font-size: 1.2em;
}

.category-header:hover {
    background: var(--ssc-yellow);
}

.category-content {
    background: var(--bg-mist);
    padding: 5px;
}

.category-header::after {
    font-family: FontAwesome;
    content: "\f0d7"; 
    font-size: 0.8em;
    display: inline-block;
    margin-left: 15px;
}
.category-content td {
    display: table-cell; 
    vertical-align: middle;
}

.category-content td:nth-child(3) {
    text-align: center;
}

/* ended up not using these zebrastripes but note that they need td to function otherwise default table settings prevail 
.category-content tr:nth-child(even) td {
    background-color: var(--bg-light-yellow);
} */

/* Sub-category Tiles */
.subcategory-item {
    margin: 5px 0;
    border-radius: 5px; 
}

.subcategory-header {
    background: var(--white);
    padding: 12px;
    border-radius: 5px;
    cursor: pointer;
    font-family: var(--font-serif);
    font-weight: bold;
    transition: all 0.3s;
}

.subcategory-item.is-open, .subcategory-header.is-open {
    border-radius: 5px 5px 0 0;
    transition: var(--transition-main);
}

.subcategory-header:hover {
    background: var(--ssc-yellow); 
    color: var(--ssc-blue);
}

.subcategory-content {
    background: var(--white);
    padding: 10px;
    border-top: 1px solid var(--white);
}

.subcategory-row td {
    background-color: var(--ssc-yellow);
    font-family: var(--font-serif);
    color: var(--ssc-blue);
    font-weight: bold;
    font-size: 1.2em;
}

@media screen and (max-width: 40em) {
.auction-list, .auction-list tbody { display: block; width: 100%;} 
.auction-list tr {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row; /* Stacks cells horizontally so that 0 and 2 can sit on one line */
    padding: 5px;
    border-radius: 8px;
 /*   box-shadow: 0 2px 5px rgba(0,0,0,0.1); */
}
.mob-lab {
    display: inline;
}
    /* Row 1: Lot Number (takes up 50% width) */
    .col-lot { 
        order: 2; 
        width: 50%; 
    }
    /* Row 1: Reserve (takes up 50% width) */
    .col-rsv { 
        order: 3; 
        width: 50%; 
    }
    .auction-list td.col-rsv {
        text-align: left !important;
        display: flex;
    }
/* Row 2: Thumbnail (takes up 100% width, below Lot/Rsv) */
    .col-img { 
        order: 1; 
        width: 100%; 
        padding: 10px 0;
        text-align: center;
    }

/* Row 3: Description (Moves to the very bottom) */
    .col-desc { 
        order: 4; 
        width: 100%; 
        padding-top: 10px;
    }

.auction-list td:last-child {
    border-bottom: none;
    justify-content: center; /* Centers the image at the bottom */
    padding-top: 15px;
  }

/* Fix for auction list image display - Gemini on 29.4 */
    .auction-list .col-img img {
        width: 100%;        /* Make image span the container width*/
        max-width: 300px;   /* Optional: prevents it from getting TOO huge on wide phones */
        height: auto;       /* Maintain aspect ratio */
        max-height: 40vh;   /* Increased from 20vh to give it "ample space" */
        object-fit: cover;  /* Or 'contain' if you don't want any cropping */
        margin: 0 auto;     /* Ensure it stays centered */
    }
    
    /* Adjust cell padding */
    .auction-list td.col-img {
        padding: 15px 5px; 
    } 

/* for TSG past events, don't display 2nd picture on mobile */
    .side-by-side { display: flex; }
    .side-by-side img:not(:first-of-type) { display: none; }      
}

