/* Global Styles 
- Background: #FFFFFF (white)
- Primary text: #4A4041 (dark brown)
- Main Colour: #D2423A (red) 
- Accent: #FBA04F (Orange)
- Highlight: #FF5D46 (light red)
- Strong highlight: #FFFFC6 (beige)
*/
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background: #FFFFFF;
    color: #13364a;
    min-height: 100vh;
}

a {
    color: #D2423A;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #FF5D46;
}

/* Home Page (index.html) */
.home-body {
    background: linear-gradient(135deg, #FFFFFF 0%, #f5f5f5 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 70px;
}

.home-container {
    text-align: center;
    padding: 40px;
    background: rgba(210, 66, 58, 0.05);
    border-radius: 5px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(19, 54, 74, 0.1);
    border: 1px solid rgba(210, 66, 58, 0.1);
}

.home-container h1 {
    font-size: 3em;
    margin-bottom: 10px;
    color: #13364a;
}

.home-container .subtitle {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 30px;
}

.home-container .icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.gallery-link {
    display: inline-block;
    padding: 15px 40px;
    font-size: 1.3em;
    color: #13364a;
    background: #fff;
    border: 2px solid #13364a;
    border-radius: 5px;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(19, 54, 74, 0.4);
}

.gallery-link:hover {
    transform: translateY(-3px);
    color: #FF5D46;
    background: #fff;
    border: 2px solid #FF5D46;
    
}

.gallery-link:active {
    transform: translateY(-1px);
}

.gallery-link.secondary {
    background: linear-gradient(135deg, #FBA04F, #FF5D46);
    box-shadow: 0 4px 15px rgba(251, 160, 79, 0.4);
}

/* Timeline Page (timeline.html) */
.timeline-body {
    margin-top: 70px;
}

/* Photos Page (photos.html) */
.photos-body {
    margin-top: 70px;
}

/* Header (shared) */
header {
    padding: 15px 40px;
    background: #D2423A;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #D2423A;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1
}

header h1 {
    margin: 0;
    font-size: 1.8em;
    color: #FBA04F;
    font-family: 'Courier New', Courier, monospace;
}

/* Main Navigation */
.main-nav {
    display: flex;
    align-items: center;
    gap: 25px;
}

.nav-logo {
    font-size: 1.6em;
    color: #FBA04F;
    font-family: 'Courier New', Courier, monospace;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.nav-logo:hover {
    color: #FFFFC6;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 5px;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: #13364a;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    display: block;
}

.nav-link:hover {
    color: #FFFFC6;
    /* scale: 1.05; */
}

.nav-link.active {
    color: #FBA04F;
    text-decoration: underline;
    text-underline-offset: 5px;
}

.nav-link.active:hover {
    color: #FFFFC6
}

/* Dropdown menu */
.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: #D2423A;
    border-radius: 5px;
    /* box-shadow: 0 4px 10px rgba(19, 54, 74, 0.15); */
    /* min-width: 160px; */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
    list-style: none;
    padding: 5px 0;
    margin: 0;
}

.nav-item:hover .nav-dropdown {
    opacity: 1;
    color: #FFFFC6;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown li a {
    color: #13364a;
    text-decoration: none;
    padding: 10px 16px;
    display: block;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    transition: all 0.2s ease;
}

.nav-dropdown li a:hover {
    background: #D2423A;
    color: #FFFFC6;
}

.nav-dropdown li a.active {
    background: #D2423A;
    text-decoration: underline;
    color: #FBA04F;
}

.nav-dropdown li a.active:hover {
    color: #FFFFC6
}

/* Hamburger menu button */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 999;
    color: #FFFFFF;
}

/* Always show hamburger menu on HDRI gallery page */
.hdri-body .hamburger-menu {
    display: flex;
}

.hdri-body .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #D2423A;
    flex-direction: column;
    align-items: stretch;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.hdri-body .main-nav.open {
    max-height: 500px;
    opacity: 1;
    visibility: visible;
}

.hdri-body .nav-menu {
    flex-direction: column;
    padding: 10px 0;
}

.hdri-body .nav-item {
    width: 100%;
}

.hdri-body .nav-link {
    padding: 12px 20px;
}

.hdri-body .nav-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 0;
    max-height: none;
    overflow: visible;
}

.hdri-body .nav-dropdown li a {
    padding: 10px 30px;
    color: #FFFFC6;
}

.hdri-body .nav-dropdown li a:hover {
    background: rgba(0, 0, 0, 0.2);
}

.hdri-body .nav-dropdown li a.active {
    color: #FBA04F;
}

.hamburger-menu:hover {
    background: transparent;
    color: #19799f;
}

.hamburger-menu:hover span {
    background: #FFFFC6;
}

.hamburger-menu span {
    display: block;
    width: 100%;
    height: 4px;
    background: #FBA04F;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-menu span:hover {
    display: block;
    scale: 1.1;
    background: #FFFFC6;
    /* width: 100%;
    height: 3px;
    
    border-radius: 2px;
    transition: all 0.3s ease; */
}

.hamburger-menu.active span:nth-child(1) {
    transform: translateY(10.5px) rotate(45deg);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: translateY(-10.5px) rotate(-45deg);
}

/* Responsive navigation */
@media (max-width: 768px) {
    header {
        padding: 15px 20px;
    }

    .hamburger-menu {
        display: flex;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #D2423A;
        flex-direction: column;
        align-items: stretch;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transition: max-height 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
        z-index: 1000;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    }

    .main-nav.open {
        max-height: 500px;
        opacity: 1;
        visibility: visible;
    }

    .nav-menu {
        flex-direction: column;
        padding: 10px 0;
    }

    .nav-item {
        width: 100%;
    }

    .nav-link {
        padding: 12px 20px;
    }

    /* Make dropdowns static and always visible as subitems */
    .nav-dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: rgba(0, 0, 0, 0.1);
        border-radius: 0;
        max-height: none;
        overflow: visible;
    }

    .nav-dropdown li a {
        padding: 10px 30px;
        color: #FFFFC6;
    }

    .nav-dropdown li a:hover {
        background: rgba(0, 0, 0, 0.2);
    }

    .nav-dropdown li a.active {
        color: #FBA04F;
    }
}

.back-link {
    color: #13364a;
    text-decoration: none;
    padding: 10px 20px;
    border: 1px solid rgba(19, 54, 74, 0.3);
    border-radius: 5px;
    transition: all 0.3s ease;
}

.back-link:hover {
    background: #FF5D46;
    border-color: #FFFFC6;
    color: #FFFFC6;
}

/* Container (shared) */
.container {
    padding: 40px;
}

/* Container (fullscreen) */
.container-fullscreen {
    padding: 0px;
}

/* Breadcrumbs */
.breadcrumbs-container {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 80%;
    margin-bottom: 0px;
}

.breadcrumbs {
    flex: 1;
    margin-bottom: 0px;
    padding: 10px 15px;
    background: #D2423A;
    border-radius: 5px;
    font-size: 16px;
}

.sort-dropdown {
    padding: 10px 16px;
    background: #D2423A;
    font-size: 14px;
    font-family: 'Courier New', Courier, monospace;
    color: #4A4041;
    cursor: pointer;
    transition: all 0.2s ease;
    border-color: #D2423A;

    
    
    background: #D2423A;
    border-radius: 5px;
    transition: all 0.2s ease;
    margin: 0;
}

.sort-dropdown:hover {
    border-color: #FF5D46;
}

.sort-dropdown:focus {
    border-color: #FBA04F;
    box-shadow: 0 0 5px rgba(251, 160, 79, 0.5);
}

.sort-dropdown option {
    color: #4A4041;
}
.sort-dropdown option:hover {
    color: #FFFFC6  ;
}

.breadcrumbs .crumb {
    color: #4A4041;
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 16px;
    font-family: 'Courier New', Courier, monospace;
}

.breadcrumbs .crumb:hover {
    color: #FFFFC6;
}

.breadcrumbs .crumb.current {
    color: #FBA04F;
    font-weight: bold;
}

.breadcrumbs .separator {
    color: #999;
    margin: 0 8px;
}

/* Photo Grid */
.photo-grid {
    display: block;
    width: 80%;
    /* background-color: #FFFFC6;    */
}

.photo-row {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    overflow: hidden;
}

.photo-item {
    position: relative;
    overflow: hidden;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    flex-shrink: 0;
}

.photo-item:hover {
    /* transform: translateY(-5px); */
    transform: scale(1.05);
    border-radius: 5px;
    /* box-shadow: 0 8px 25px rgba(210, 66, 58, 0.3); */
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* display: block; */
    transition: transform 0.3s ease;
    border-radius: 5px;
}

.photo-item:hover img {
    transform: scale(1.05); 
    border-radius: 5px;
}

.photo-item .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, #000);
    padding: 25px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.photo-item:hover .overlay {
    opacity: 1;
}

.photo-item .name {
    font-size: 14px;
    font-weight: bold;
    color: #fff;
}

.photo-item.folder-item {
    background: rgba(255, 255, 255, 0.0);
    object-fit: cover;
}

.photo-item.folder-item .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, #000);
    padding: 25px;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.empty-message {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 1.2em;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255, 0.95);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
    border-radius: 5px;
    transition: transform 0.3s ease;
    cursor: zoom-in;
}

.lightbox img.zoomed {
    max-width: none;
    max-height: none;
    width: auto;
    height: auto;
    cursor: zoom-out;
    transition: transform 0.0s ease;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: rgba(19, 54, 74, 1);
    cursor: pointer;
    z-index: 1001;
    transition: all 0.2s ease;
}

.lightbox-close:hover {
    color: #FF5D46;
    font-size: 50px;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 40px;
    color: rgba(19, 54, 74, 1);
    cursor: pointer;
    padding: 20px;
    user-select: none;
    transition: all 0.2s ease;
}

.lightbox-nav:hover {
    color: #FF5D46;
    font-size: 60px;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* Lightbox Info Button */
.lightbox-info-btn {
    position: absolute;
    top: 25px;
    right: 80px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid rgba(19, 54, 74, 1);
    color: rgba(19, 54, 74, 1);
    font-size: 20px;
    font-weight: bold;
    font-family: 'Courier New', Courier, monospace;
    cursor: pointer;
    z-index: 1001;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
}

.lightbox-info-btn:hover {
    border: 2px solid #FF5D46;
    background: #fff;
    color: #FF5D46;
    width: 48px;
    height: 48px;
    font-size: 27px;
}

.lightbox-info-btn.active {
    border: 2px solid rgba(19, 54, 74, 1);
    background: rgba(19, 54, 74, 1);
    color: #fff;
}

.lightbox-info-btn.active:hover {
    border: 2px solid #FF5D46;
    background: #FF5D46;
    color: #fff;
    font-size: 27px;
}

/* Lightbox Info Panel */
.lightbox-info-panel {
    position: absolute;
    bottom: auto;
    top: 7.5%;
    right: 0%;
    width: 10%;
    min-width: 150px;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(19, 54, 74, 0.2);
    z-index: 1002;
    padding: 15px;
    transform: translateX(120%);
    transition: transform 0.3s ease;
    overflow: hidden;
    box-shadow: -4px 0 15px rgba(19, 54, 74, 0.1);
    border-radius: 5px;
}

.lightbox-info-panel.active {
    transform: translateX(0);
}

.lightbox-info-panel h3 {
    margin: 0 0 15px 0;
    color: #13364a;
    font-size: 16px;
    border-bottom: 2px solid #D2423A;
    padding-bottom: 8px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    /* border-bottom: 1px solid rgba(19, 54, 74, 0.1); */
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: #666;
    font-size: 12px;
    font-weight: 500;
}

.info-name {
    color: #13364a;
    font-size: 20px;
    font-weight: 600;
    text-align: left;
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
}

.info-value {
    color: #13364a;
    font-size: 16px;
    font-weight: 600;
    text-align: left;
    font-family: 'Courier New', Courier, monospace;
}

.info-description {
    margin-top: 12px;
    padding: 10px;
    background: rgba(210, 66, 58, 0.05);
    border-radius: 3px;
    border-left: 3px solid #D2423A;
    max-height: 100px;
    overflow-y: auto;
}

.info-description .info-label {
    display: block;
    margin-bottom: 5px;
}

.info-description .info-value {
    display: block;
    font-weight: 400;
    line-height: 1.4;
    white-space: pre-wrap;
    font-size: 11px;
}

.info-panel-content {
    max-width: 100%;
}

/* HDRI Gallery (gallery.html) */
.hdri-body {
    background-color: #000;
    color: #fff;
    overflow: hidden;
    height: 100vh;
    /* padding-top: 70px; */
}

.hdri-body .container {
    display: flex;
    height: 100vh;
}

.hdri-body .viewer {
    width: 100%;
    height: 100vh;
}

#bottomPanel {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #D2423A;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 5px;
    transition: transform 0.3s ease;
}

#bottomPanel.collapsed {
    transform: translateY(calc(100%));
}

#bottomPanel.collapsed .thumbnailsRow {
    display: none;
}

#bottomPanel .thumbnailsRow {
    display: flex;
    flex-direction: row;
    gap: 5px;
    flex-shrink: 0;
    max-height: 170px;
    overflow-y: auto;
}

#bottomPanel .folderPathRow {
    color: #FFFFC6;
    font-size: 12px;
    padding: 5px 50px 5px 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
    font-family: 'Courier New', Courier, monospace;
}

.folderPathText {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Panel collapse button */
.panel-collapse-btn {
    position: absolute;
    bottom: 6px;
    right: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 999;
}

/* Fullscreen button - positioned left of collapse button */
#panelFullscreenBtn {
    right: 85px;
}

.panel-collapse-btn:hover {
    background: transparent;
}

.panel-collapse-btn span {
    display: block;
    width: 70%;
    height: 4px;
    background: #FBA04F;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.panel-collapse-btn span:first-child {
    transform-origin: center;
    transform: translateX(30%) translateY(4px) rotate(-45deg);
}

.panel-collapse-btn span:last-child {
    transform-origin: center;
    transform: translateX(-30%) translateY(0px) rotate(45deg);
}

.panel-collapse-btn:hover span {
    background: #FFFFC6;
    scale: 1.1;
}

.panel-collapse-btn.collapsed span:first-child {
    transform-origin: center;
    transform: translateX(30%) translateY(2px) rotate(45deg);
}

.panel-collapse-btn.collapsed span:last-child {
    transform-origin: center;
    transform: translateX(-30%) translateY(-2px) rotate(-45deg);
}

/* Fullscreen button icon - expand arrows */
#panelFullscreenBtn span:nth-child(1) {
    width: 12px;
    height: 12px;
    border-top: 4px solid #FBA04F;
    border-right: 4px solid #FBA04F;
    background: transparent;
    border-radius: 0;
    transform: translateX(10px) translateY(-1px);
}

#panelFullscreenBtn span:nth-child(2) {
    width: 12px;
    height: 10px;
    border-bottom: 4px solid #FBA04F;
    border-right: 4px solid #FBA04F;
    background: transparent;
    border-radius: 0;
    transform: translateX(10px) translateY(10px);
}
#panelFullscreenBtn span:nth-child(3) {
    width: 12px;
    height: 10px;
    border-bottom: 4px solid #FBA04F;
    border-left: 4px solid #FBA04F;
    background: transparent;
    border-radius: 0;
    transform: translateX(-10px) translateY(4px);
}

#panelFullscreenBtn span:nth-child(4) {
    width: 12px;
    height: 10px;
    border-top: 4px solid #FBA04F;
    border-left: 4px solid #FBA04F;
    background: transparent;
    border-radius: 0;
    transform: translateX(-10px) translateY(-18px);
}

#panelFullscreenBtn:hover span {
    border-color: #FFFFC6;
    scale: 1.1;
}

/* Fullscreen active - compress to plus */
#panelFullscreenBtn.active span:nth-child(1) {
    border-top: none;
    border-right: none;
    border-bottom: 4px solid #FBA04F;
    border-left: 4px solid #FBA04F;
}

#panelFullscreenBtn.active span:nth-child(2) {
    border-top: 4px solid #FBA04F;
    border-right: none;
    border-bottom: none;
    border-left: 4px solid #FBA04F;
}

#panelFullscreenBtn.active span:nth-child(3) {
    border-top: 4px solid #FBA04F;
    border-right: 4px solid #FBA04F;
    border-bottom: none;
    border-left: none;
}

#panelFullscreenBtn.active span:nth-child(4) {
    border-top: none;
    border-right: 4px solid #FBA04F;
    border-bottom: 4px solid #FBA04F;
    border-left: none;
}

#panelFullscreenBtn.active:hover span {
    border-color: #FFFFC6;
    scale: 1.1;
}

.thumbnail {
    width: 150px;
    height: 150px;
    background-size: cover;
    background-position: center;
    border: 2px solid #13364a;
    cursor: pointer;
    border-radius: 5px;
    position: relative;
    flex: 0 0 auto;
}

.thumbnail:hover {
    border-color: #FFFFC6;
}

.thumbnail.selected {
    border-color: #FBA04F;
}

.thumbnail .name {
    position: absolute;
    top: 5px;
    left: 5px;
    color: #FFFFC6;
    background-color: #13364a;
    padding: 2px 5px;
    border-radius: 5px;
    font-size: 12px;
    font-family: 'Courier New', Courier, monospace;
}

.variant-buttons {
    position: absolute;
    bottom: 5px;
    left: 5px;
    display: flex;
    gap: 2px;
}

.variant-btn {
    background-color: #13364a;
    color: #FFFFC6;
    border: 1px solid #13364a;
    padding: 2px 6px;
    font-size: 10px;
    cursor: pointer;
    border-radius: 5px;
    font-family: 'Courier New', Courier, monospace;
}

.variant-btn:hover {
    background-color: #FFFFC6;
    color: #13364a;
    border-color: #FFFFC6;
}

.viewer div {
    width: 100%;
    height: 100%;
}

.controls {
    float: left;
    margin-top: 10px;
}

button {
    background-color: rgba(210, 66, 58, 0.8);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.2s ease;
}

button:hover {
    background-color: rgba(255, 93, 70, 0.9);
}