/* Fonts */
@font-face {
    font-family: 'EurostileExtended';
    src: url('fonts/eurostile/Eurostile\ LT\ Std\ Extended\ 2.otf') format('opentype');
    font-weight: normal;
}

@font-face {
    font-family: 'EurostileExtendedBold';
    src: url('fonts/eurostile/EurostileLTStd-BoldEx2.otf') format('opentype');
    font-weight: bold;
}

/* Base styles */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    height: 100vh;
    background-color: #f5f5f5;
    position: relative;
}

/* Top section styles */
.top-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: black;
    color: white;
    flex-shrink: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.logotype {
    font-size: 24px;
    font-family: 'EurostileExtendedBold', Arial, sans-serif;
}

.navigation span {
    margin: 0 10px;
    font-size: 14px;
    cursor: pointer;
    font-family: 'EurostileExtended', Arial, sans-serif;
}

/* Mobile menu styles */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 3px 0;
    transition: 0.3s;
}

.mobile-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 20px;
    background-color: black;
    border: 1px solid #333;
    border-radius: 5px;
    padding: 10px 0;
    min-width: 180px;
    z-index: 1000;
}

.mobile-dropdown span {
    display: block;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    font-family: 'EurostileExtended', Arial, sans-serif;
    color: white;
    transition: background-color 0.3s;
}

.mobile-dropdown span:hover {
    background-color: #333;
}

.mobile-dropdown.show {
    display: block;
}

/* Middle section styles */
.middle-section {
    display: flex;
    justify-content: space-around;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.left-middle, .right-middle {
    width: 45%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    overflow: hidden;
    height: 100%;
    padding: 20px 0;
}

.left-middle img, .right-middle img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.right-middle p {
    font-family: 'EurostileExtended', Arial, sans-serif;
    font-size: 16px;
}

/* Overlay styles */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.overlay-images-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.overlay-img {
    position: absolute;
    max-height: 90%;
    max-width: 90%;
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    will-change: transform;
}

.overlay-img-current {
    transform: translateX(0%);
}

.overlay-img-prev {
    transform: translateX(-100vw);
}

.overlay-img-next {
    transform: translateX(100vw);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    z-index: 1002;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tags-btn {
    position: absolute;
    top: 20px;
    left: 30px;
    font-size: 30px;
    color: white;
    cursor: pointer;
    font-weight: bold;
    z-index: 1001;
    font-family: 'EurostileExtendedBold', Arial, sans-serif;
}

.overlay-tags {
    position: absolute;
    top: 70px;
    left: 30px;
    color: white;
    font-family: 'EurostileExtended', Arial, sans-serif;
    font-size: 16px;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 8px;
    z-index: 1001;
    display: none;
    max-width: 300px;
}

.overlay-tags .tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    margin: 2px 4px;
    border-radius: 12px;
    font-size: 14px;
}

.overlay-nav {
    position: absolute;
    bottom: 80px;
    cursor: pointer;
    user-select: none;
    width: 80px;
    height: 80px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 1001;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.overlay-nav::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
}

.overlay-nav:hover,
.overlay-nav:active {
    background: rgba(0, 0, 0, 0.6);
    transform: scale(1.1);
}

.prev-btn {
    left: 50%;
    transform: translateX(-120px);
}

.prev-btn::before {
    border-right: 12px solid white;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    transform: translate(-50%, -50%);
}

.next-btn {
    left: 50%;
    transform: translateX(40px);
}

.next-btn::before {
    border-left: 12px solid white;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    transform: translate(-50%, -50%);
}

.prev-btn:hover,
.prev-btn:active {
    transform: translateX(-120px) scale(1.1);
}

.next-btn:hover,
.next-btn:active {
    transform: translateX(40px) scale(1.1);
}

/* Utility classes */
.hidden {
    display: none;
}

#dynamic-content {
    padding-top: 60px;
}

.splash-image {
    width: 100%;
    height: auto;
}

/* Publications Content Styling */
.content {
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

h1 {
    text-align: center;
    font-family: 'EurostileExtendedBold', Arial, sans-serif;
    font-size: 28px;
    margin-bottom: 20px;
}

hr {
    margin: 20px 0;
}

.row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.column {
    flex: 0 0 100px;
    margin-right: 20px;
}

.custom-text {
    flex: 1;
}

.custom-text p {
    font-size: 16px;
    line-height: 1.4;
    margin: 0;
    text-align: left !important;
    font-family: 'EurostileExtended', Arial, sans-serif;
}

/* About page styles */
#about-content #about-contact-container {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    flex-direction: row;
    margin: 50px auto;
    max-width: 1000px;
    padding: 20px;
    background-color: white;
    box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

#about-content #left-column {
    flex-basis: 40%;
    text-align: center;
}

#about-content #left-column img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

#about-content #right-column {
    flex-basis: 60%;
    padding-left: 20px;
    margin-left: 30px;
    margin-right: 30px;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
}

#about-content .custom-title {
    font-size: 48px;
    font-family: 'EurostileExtendedBold', Arial, sans-serif;
    margin-bottom: 60px;
    margin-top: 0;
    text-align: left;
    align-self: flex-start;
}

#about-content .custom-text {
    font-size: 18px;
    font-family: 'EurostileExtended', Arial, sans-serif;
    line-height: 1.5;
    margin-top: 0;
    text-align: left;
}

#about-content #email-link {
    display: block;
    margin-top: 20px;
    font-size: 18px;
    font-family: 'EurostileExtended', Arial, sans-serif;
    color: #0000EE;
    text-decoration: none;
    text-align: left;
}

#about-content #email-link:hover {
    text-decoration: underline;
}

#about-content #right-column img {
    margin-top: 20px;
}

#about-content #right-column a img {
    width: 25px;
}


@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

/* Scrollbar styling */
.bottom-section::-webkit-scrollbar {
    height: 8px;
}

.bottom-section::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.bottom-section::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.bottom-section::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.bottom-section {
    overflow-x: scroll;  /* Changed from auto to ensure horizontal scroll works */
    overflow-y: hidden;
    white-space: nowrap;
    padding: 20px;
    background-color: rgba(249, 249, 249, 0.85); /* Add slight transparency */
    flex-shrink: 0;
    height: 150px;
    position: fixed;  /* Changed from relative */
    bottom: 0;
    left: 0;
    right: 0;
    transform: translateY(130px);  /* Hide 2/3 of the height */
    transition: transform 0.3s ease;  /* Smooth slide animation */
}

.bottom-section:hover {
    transform: translateY(0);  /* Fully visible on hover */
}

.carousel {
    display: block;  /* Changed from flex */
    white-space: nowrap;  /* Ensure items stay in a row */
}

.carousel > * {  /* Target all direct children of carousel */
    display: inline-block;  /* Make all items display horizontally */
    vertical-align: middle;  /* Align items vertically */
}

.carousel img {
    height: 150px;
    margin: 0 5px;
    cursor: pointer;
    object-fit: cover;
}

.loading-placeholder {
    display: inline-block;
    width: 150px;
    height: 150px;
    margin: 0 5px;
    background-color: #f0f0f0;
    animation: pulse 1.5s infinite;
}

/* Portrait orientation - use hamburger menu regardless of screen size */
@media screen and (orientation: portrait) {
    .top-section {
        position: relative;
    }
    
    .navigation {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .middle-section {
        flex-direction: column;
        padding: 10px;
    }
    
    .left-middle, .right-middle {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .left-middle {
        flex: 3; /* Give image section 3x the space of caption */
    }
    
    .right-middle {
        flex: 1; /* Give caption section minimal space */
        align-items: flex-start; /* Align caption to top of its section */
        justify-content: center; /* Center horizontally */
        text-align: center; /* Center the text content */
    }
    
    /* For sequence images (>>) in portrait orientation, make second image same size as first */
    .right-middle img {
        max-width: 95%;
        max-height: 70vh; /* Same constraint as top image */
        width: auto;
        height: auto;
        object-fit: contain;
    }
    
    /* When right-middle contains an image, give it the same space as left-middle */
    .right-middle:has(img) {
        flex: 3; /* Same as left-middle when it contains an image */
    }
    
    .overlay-nav {
        display: none;
    }
}

/* Responsive design for tablets and mobile */
@media screen and (max-width: 768px) {
    .top-section {
        position: relative;
    }
    
    .navigation {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .logotype {
        font-size: 18px;
    }
    
    .middle-section {
        flex-direction: column;
        padding: 10px;
    }
    
    .left-middle, .right-middle {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .bottom-section {
        height: 120px;
        transform: translateY(100px);
    }
    
    .carousel img {
        height: 120px;
    }
    
    .loading-placeholder {
        height: 120px;
        width: 120px;
    }
    
    .overlay-nav {
        display: none;
    }
}

@media screen and (max-width: 480px) {
    .logotype {
        font-size: 16px;
    }
    
    .top-section {
        padding: 8px 15px;
    }
    
    #dynamic-content {
        padding-top: 50px;
    }
    
    .mobile-dropdown {
        right: 15px;
        min-width: 150px;
    }
    
    .bottom-section {
        height: 100px;
        transform: translateY(80px);
    }
    
    .carousel img {
        height: 100px;
        margin: 0 3px;
    }
    
    .loading-placeholder {
        height: 100px;
        width: 100px;
        margin: 0 3px;
    }
    
}
