/* ============================================
   HOME SECTION
   ============================================ */

.main-container {
    position: relative;
    width: 100%;
    height: 100vh;
    background-color: var(--theme-bg-light);
    overflow: hidden;
    transition: background-color 0.3s ease;
}

/* Header Image */
.home-header-image {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    height: 407px;
    max-height: 407px;
    overflow: hidden;
    margin-top: -110px;
    z-index: -1;
    display: block;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.15s ease, visibility 0.15s ease, height 0.2s ease, max-height 0.2s ease, margin-top 0.2s ease;
    pointer-events: none;
}

.home-header-image.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    height: 0;
    max-height: 0;
    margin-top: 0;
}

.home-header-image.fade-out {
    opacity: 0;
}

.home-header-image.fade-in {
    opacity: 1;
}

.home-header-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.4s ease-in-out;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    pointer-events: none;
}

.home-header-image .header-img-current {
    opacity: 1;
    z-index: -1;
}

.home-header-image .header-img-next {
    opacity: 0;
    z-index: -1;
}

.home-header-image .header-img-next.fade-in {
    opacity: 1;
}

.home-header-image .header-img-current.fade-out {
    opacity: 0;
}

/* Global Header */
.global-header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 40px;
    z-index: 100;
    mix-blend-mode: multiply;
    transition: background-color 0.3s ease, backdrop-filter 0.3s ease, -webkit-backdrop-filter 0.3s ease, mix-blend-mode 0.3s ease;
    background-color: transparent;
}

/* Override mix-blend-mode for all themes when header-images-visible is present */
.global-header.header-images-visible {
    mix-blend-mode: normal !important;
}

/* When header images are visible: use theme color with opacity for visibility */
/* Class 'header-images-visible' is added/removed by JavaScript */
/* All themes use the same structure: background-color with rgba and mix-blend-mode: normal */

/* Default/Forest theme: use theme-bg-light color (#eef4e7) with 0.3 opacity when images are visible */
/* This applies when body has theme-forest class OR no theme class (forest is default) */
body.theme-forest .global-header:not(.scrolled).header-images-visible,
body:not(.theme-ocean):not(.theme-night):not(.theme-desert) .global-header:not(.scrolled).header-images-visible {
    background-color: rgba(238, 244, 231, 0.3) !important;
    mix-blend-mode: normal !important;
}

/* Ocean theme: use theme-bg-light color (#eaf6f7) with 0.3 opacity when images are visible */
body.theme-ocean .global-header:not(.scrolled).header-images-visible {
    background-color: rgba(234, 246, 247, 0.2) !important;
    mix-blend-mode: normal !important;
}

/* Desert theme: use theme-bg-light color (#f9eac7) with 0.3 opacity when images are visible */
body.theme-desert .global-header:not(.scrolled).header-images-visible {
    background-color: rgba(249, 234, 199, 0.2) !important;
    mix-blend-mode: normal !important;
}

/* Night theme: use theme-bg-light color (#000000) with 0.7 opacity when images are visible */
body.theme-night .global-header:not(.scrolled).header-images-visible {
    background-color: rgba(0, 0, 0, 0.4) !important;
    mix-blend-mode: normal !important;
}

/* When header images are NOT visible: use page background color */
/* Class 'header-images-hidden' is added/removed by JavaScript */
/* All themes use the same structure */
.global-header:not(.scrolled).header-images-hidden {
    background-color: var(--theme-bg-light);
    mix-blend-mode: normal;
}

/* Fix for night theme - ensure header is visible */
/* Only apply transparent background when NOT scrolled and images are NOT visible */
body.theme-night .global-header:not(.scrolled):not(.header-images-visible):not(.header-images-hidden) {
    mix-blend-mode: normal;
    background-color: transparent;
}

/* When scrolled: always use page background color (images are no longer visible in viewport) */
.global-header.scrolled {
    background-color: var(--theme-bg-light);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    mix-blend-mode: normal;
    border-bottom: 0.5px solid var(--theme-border);
}

/* Night theme: remove backdrop-filter opacity when scrolled to ensure solid black background */
body.theme-night .global-header.scrolled {
    background-color: var(--theme-bg-light);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    mix-blend-mode: normal;
    border-bottom: 0.5px solid var(--theme-border);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 101;
}

.cf-icon-header {
    width: 98.527px;
    height: 65.15px;
    position: absolute;
    z-index: 102;
}

.cf-icon-header img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}


.menu-icon {
    width: 16px;
    height: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-title {
    font-family: 'Arial', sans-serif;
    font-weight: bold;
    font-size: 16px;
    letter-spacing: 1px;
    color: var(--theme-color-primary);
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.header-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 101;
}

.logo-container {
    width: 309px;
    height: 17.05px;
}

.logo-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.living-archive-subtitle {
    font-family: 'Times', 'Times New Roman', serif;
    font-size: 18px;
    letter-spacing: 2px;
    color: var(--theme-color-primary);
    text-align: center;
    line-height: 19px;
    transition: color 0.3s ease;
}

.header-right {
    display: flex;
    align-items: center;
   
    position: relative;
    z-index: 101;
}

/* Header Dropdown Styles */
.header-dropdown {
    position: relative;
}

.header-icon-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--theme-color-primary);
    transition: opacity 0.2s ease, color 0.3s ease;
}

.header-icon-btn:hover {
    opacity: 0.7;
}

.header-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    font-size: 20px;
    color: var(--theme-color-primary);
    transition: color 0.3s ease;
}

.dropdown-arrow {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    font-size: 12px;
    color: var(--theme-color-primary);
    transition: transform 0.2s ease, color 0.3s ease;
}

.header-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background-color: var(--theme-bg-light);
    border: 0.5px solid var(--theme-border);
    min-width: 100px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease, background-color 0.3s ease, border-color 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.header-dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    padding: 12px 16px;
    font-family: 'Arial', sans-serif;
    font-size: 14px;
    color: var(--theme-color-primary);
    text-align: right;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.3s ease, border-color 0.3s ease;
    border-bottom: 0.5px solid var(--theme-border);
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: var(--theme-hover-bg);
}

.dropdown-item.active {
    font-weight: bold;
}

/* Auth Modal Styles */
.auth-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.auth-modal-content {
    background-color: var(--theme-bg-light);
    margin: auto;
    padding: 0;
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    overflow: hidden;
}

.auth-modal-header {
    padding: 20px 30px;
    background: var(--theme-color-primary);
    color: var(--theme-bg-light);
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.auth-modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    font-family: Arial, sans-serif;
}

.auth-modal-close {
    color: var(--theme-bg-light);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: opacity 0.2s;
}

.auth-modal-close:hover {
    opacity: 0.7;
}

.auth-modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
    background: var(--theme-bg-light);
    color: var(--theme-color-primary);
}

.auth-form-group {
    margin-bottom: 20px;
}

.auth-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--theme-color-primary);
    font-family: Arial, sans-serif;
    font-size: 14px;
}

.auth-form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--theme-border);
    border-radius: 6px;
    font-size: 14px;
    background: var(--theme-bg-input);
    color: var(--theme-color-primary);
    font-family: Arial, sans-serif;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-form-group input::placeholder {
    color: var(--theme-placeholder);
}

.auth-form-group input:focus {
    outline: none;
    border-color: var(--theme-color-primary);
    box-shadow: 0 0 0 3px var(--theme-hover-bg);
}

.auth-recover-link {
    display: inline-block;
    color: var(--theme-color-primary);
    text-decoration: none;
    font-size: 14px;
    margin-top: 5px;
    transition: opacity 0.2s;
    font-family: Arial, sans-serif;
}

.auth-recover-link:hover {
    opacity: 0.7;
    text-decoration: underline;
}

.auth-error {
    color: #ef4444;
    font-size: 14px;
    margin-bottom: 15px;
    min-height: 20px;
    font-family: Arial, sans-serif;
}

.auth-submit-btn {
    width: 100%;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--theme-color-primary);
    color: var(--theme-bg-light);
    font-family: Arial, sans-serif;
}

.auth-submit-btn:hover:not(:disabled) {
    opacity: 0.8;
    transform: translateY(-1px);
}

.auth-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Content Layout Container */
.content-layout {
    position: relative;
    display: flex;
    align-items: flex-start;
    padding: 40px;
 
}

/* Sidebar Navigation */
.sidebar-top {
    position: sticky;
    top: 130px;
    width: 235px;
    flex-shrink: 0;
    margin-right: 102px;
    z-index: 50;
    align-self: flex-start;
    transition: top 0.3s ease;
   
    will-change: top;
}

.sidebar-top.sticky-active {
    top: 130px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
}

.nav-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
   
    font-family: 'Times', 'Times New Roman', serif;
    font-size: 25px;
  
    letter-spacing: 0.25px;
    margin-bottom: 5px;
    color: var(--theme-color-primary);
    text-transform: uppercase;
    cursor: pointer;
    gap: 8px;
}

.nav-icon {
    font-size: 20px;
    color: var(--theme-color-primary);
    flex-shrink: 0;
}

.nav-item span {
    flex: 0 1 auto;
    white-space: nowrap;
}

.expand-btn {
    width: 16px;
    height: 16px;
    border: none;
    background: none;
    color: var(--theme-color-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    position: relative;
}

.expand-btn i {
    font-size: 16px;
    color: var(--theme-color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-item {
    margin-top: 8px;
    padding-top: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-item:hover {
    opacity: 0.7;
}

.search-item svg {
    width: 16px;
    height: 16px;
}

.search-item .nav-icon {
    font-size: 20px;
    color: var(--theme-color-primary);
    flex-shrink: 0;
}

/* Navigation Description */
.nav-description {
    margin-top: 0;
    margin-bottom: 0;
    padding-left: 0;
    display: block;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease-out, margin-top 0.5s cubic-bezier(0.4, 0, 0.2, 1), margin-bottom 0.5s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s 0.5s;
    will-change: max-height, opacity, margin-top, margin-bottom;
}

.nav-description.visible {
    max-height: 220px; /* 200px content + 8px margin-top + 12px margin-bottom */
    margin-top: 8px;
    margin-bottom: 12px;
    opacity: 1;
    visibility: visible;
    display: block;
    transition: max-height 0.4s cubic-bezier(0, 0, 0.2, 1), opacity 0.35s ease-in, margin-top 0.4s cubic-bezier(0, 0, 0.2, 1), margin-bottom 0.4s cubic-bezier(0, 0, 0.2, 1), visibility 0s 0s;
}

.nav-description[style*="display: none"] {
    display: none !important;
}

.nav-description p {
    font-family: 'Arial', sans-serif;
    font-size: 16px;
    line-height: 20px;
    color: var(--theme-color-primary);
    margin: 0;
}

/* Navigation Subsections */
.nav-subsections {
    margin-bottom: 0;
    display: block;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease-out, margin-bottom 0.5s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s 0.5s;
    will-change: max-height, opacity, margin-bottom;
}

.nav-subsections.visible {
    max-height: 1020px; /* 1000px content + 20px margin-bottom */
    margin-bottom: 20px;
    opacity: 1;
    visibility: visible;
    transition: max-height 0.4s cubic-bezier(0, 0, 0.2, 1), opacity 0.35s ease-in, margin-bottom 0.4s cubic-bezier(0, 0, 0.2, 1), visibility 0s 0s;
}

.nav-subsections[style*="display: none"] {
    display: none !important;
}

.nav-subsection {
    font-family: Arial, sans-serif;
    font-size: 16px;
    font-weight: bold;
    line-height: 24px;
    letter-spacing: 0.25px;
    color: var(--theme-color-primary);
    text-transform: uppercase;
    cursor: pointer;
    margin-bottom: 5px;
    margin-left: 20px;
    
    transition: opacity 0.2s ease;
    will-change: transform, opacity;
}

.nav-subsection-header {
    font-family: Arial, sans-serif;
    font-size: 16px;
    font-weight: bold;
    line-height: 24px;
    letter-spacing: 0.25px;
    color: var(--theme-color-primary);
    text-transform: uppercase;
    margin-bottom: 8px;
    margin-left: 20px;
    margin-top: 8px;
}

.nav-subsection-topic {
    font-weight: normal;
    text-transform: none;
    font-size: 16px;
}

/* Faster animation duration override for animate.css */
.nav-description.animate__animated {
    --animate-duration: 0.35s;
}

.nav-subsection.animate__animated {
    --animate-duration: 0.25s;
}


/* Podcasts Section Styles */
.podcasts-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.podcast-search-wrapper {
    width: 100%;
    position: sticky;
    top: 110px;
    z-index: 40;

    padding-bottom: 8px;
}

.podcast-search-input {
    width: 100%;
    padding: 8px 12px;
    font-family: 'Times', 'Times New Roman', serif;
    font-size: 13px;
    line-height: 21px;
    letter-spacing: 0.13px;
    color: var(--theme-color-primary);
    background-color: transparent;
    border: none;
    border-bottom: 0.5px solid var(--theme-border);
    outline: none;
    background-color: var(--theme-bg-light);
}

.podcast-search-input::placeholder {
    color: var(--theme-color-primary);
    opacity: 1;
}

.podcast-items-list {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.podcast-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0; /* Allows flex children to shrink below their content size */
}

.podcast-episode {
    font-family: 'Times', 'Times New Roman', serif;
    font-size: 14px;
    line-height: 21px;
    letter-spacing: 0.14px;
    color: var(--theme-color-primary);
    margin: 0;
}

.podcast-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    font-family: Arial, sans-serif;
    font-size: 32px;
    font-weight: bold;
    line-height: 48px;
    color: var(--theme-color-primary);
    margin: 0;
}

.podcast-meta {
    display: flex;
    gap: 12px;
    font-family: 'Times', 'Times New Roman', serif;
    font-size: 14px;
    line-height: 21px;
    letter-spacing: 0.14px;
    color: var(--theme-color-primary);
}

.podcast-date,
.podcast-duration {
    margin: 0;
}

.podcast-keywords {
    font-family: 'Times', 'Times New Roman', serif;
    font-size: 12px;
    font-style: italic;
    line-height: 15px;
    letter-spacing: 0.36px;
    color: var(--theme-color-primary);
    margin: 0;
}

/* Host link in list items - not a link, uppercase */
.podcast-item .podcast-host-link {
    text-decoration: none;
    text-transform: uppercase;
    cursor: default;
}

.podcast-item .podcast-host-link:hover {
    opacity: 1;
}

.nav-subsection:hover {
    opacity: 0.7;
}

.nav-subsection.active {
    font-weight: bold;
    text-decoration: underline;
    text-decoration-skip-ink: none;
    text-underline-position: from-font;
}

/* Scrollable Content Container */
.main-container-scrollable {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 10;
}

/* Content sections fade transition */
.section-content,
#welcome {
    transition: opacity 0.3s ease, visibility 0.3s ease;
    will-change: opacity;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.section-content.transitioning,
#welcome.transitioning {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    z-index: 1;
}

.section-content.transitioning.active,
#welcome.transitioning.active {
    z-index: 2;
}

/* Main Content */
.home-content {
    position: relative;
    flex: 1;
   
    width: calc(80% - 40px);
    box-sizing: border-box;
    transition: min-height 0.3s ease;
    margin-top: 10px;
}


.section-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-height: 1px; /* Prevent collapse during transitions */
    box-sizing: border-box;
}

/* Welcome Layout - Text wraps around image */
.welcome-layout {
    margin-top: 60px;
    margin-bottom: 60px;
    position: relative;
}

.home-welcome {
    font-family: 'Times', 'Times New Roman', serif;
    font-weight: normal;
    font-size: 38px;
    letter-spacing: 0.75px;
    color: var(--theme-color-primary);
    margin: 0 0 20px 0;
    margin-left: 357px; /* 307px (image width) + 50px (gap) */
    padding-top: 0;
    line-height: 40px;
    white-space: pre-wrap;
    overflow: hidden; /* Prevent wrapping around image */
    clear: none; /* Allow title to be next to image */
}

.home-text {
    font-family: 'Arial', sans-serif;
    font-size: 16px;
    line-height: 23px;
    color: var(--theme-color-primary);
    margin-top: 0;
    margin-bottom: 0;
}

.home-text p {
    white-space: pre-wrap;
    margin-bottom: 0;
    margin-top: 0;
    font-family: 'Arial', sans-serif;
    font-size: 16px;
    font-weight: normal;
    line-height: 23px;
    letter-spacing: 0;
}

.home-text p + p {
    margin-top: 0;
}

/* Exclude long-cv-content from general home-text styles */
#long-cv-content p,
#long-cv .home-text p {
    /* Reset to let HTML from database control, but keep paragraph spacing */
    white-space: normal;
    margin-bottom: 16px;
    font-family: 'Arial', sans-serif;
    font-size: 16px;
    font-weight: unset;
    line-height: unset;
    letter-spacing: unset;
    display: block;
}

/* Portrait Image - Floated Left for Text Wrapping */
.welcome-layout .portrait-image {
    float: left;
    margin: 0 50px 20px 0;
    clear: left;
}

.welcome-layout .portrait-image-container {
    display: block;
    width: 307px;
    height: 394px;
}

.welcome-layout #welcomePortraitLeft {
    width: 307px;
    height: 394px;
    display: block;
    object-fit: cover;
}


/* Clear float after text content */
.welcome-layout::after {
    content: "";
    display: table;
    clear: both;
}

/* Legacy Portrait Image Styles (for other sections) */
.portrait-image {
    margin-top: 60px;
    margin-bottom: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.portrait-image-container {
    display: flex;
    align-items: center;
    gap: 50px;
    max-width: 590px;
    max-height: 385px;
    width: 100%;
}

#welcomePortraitLeft {
    width: 309px;
    height: 313px;
    display: block;
    object-fit: contain;
    flex-shrink: 0;
}

#welcomePortraitRight {
    width: 232px;
    height: 107px;
    display: block;
    object-fit: contain;
    flex-shrink: 0;
}

.home-text strong {
    font-weight: bold;
}

/* Exclude long-cv-content from general home-text strong styles */
#long-cv-content strong,
#long-cv .home-text strong {
    /* Reset to let HTML from database control */
    font-weight: unset;
}

/* Subsection Content */
.subsection-content {
    width: 100%;
}

.subsection-image {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;

}

.subsection-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* Long CV Subsection Styles - Based on Figma Design */
/* Container should be neutral - only apply font-family and font-size */
#long-cv .home-text,
#long-cv-content {
    /* Keep font-family and font-size, reset other styles */
    font-family: 'Arial', sans-serif;
    font-size: 16px;
    font-weight: unset;
    line-height: unset;
    letter-spacing: unset;
    color: unset;
    text-transform: none;
    white-space: normal;
    text-align: left;
    /* Keep minimal layout styles */
    margin: 0;
    padding: 0;
    display: block;
}

/* Loading message in long CV should match short bios exactly */
#long-cv .home-text .podcast-detail-description {
    font-family: 'Arial', sans-serif;
    font-size: 16px;
    line-height: 23px;
    color: var(--theme-color-primary);
    margin: 0 0 40px 0;
}

#long-cv .home-text > div {
    font-family: 'Arial', sans-serif;
    font-size: 16px;
    line-height: 23px;
    color: var(--theme-color-primary);
    margin: 0 0 40px 0;
}

/* Apply font-family and font-size to all elements inside long-cv-content */
/* Let HTML from database control everything else */
#long-cv-content * {
    font-family: 'Arial', sans-serif;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0;
    /* No text-transform: uppercase - keep original case */
}

/* Only uppercase for section titles like "EXPERIENCIA PROFESIONAL" */
#long-cv .home-text h2,
#long-cv .home-text h3 {
    font-family: 'Arial', sans-serif;
    font-weight: bold;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 40px;
    margin-bottom: 20px;
}

#long-cv .home-text h2:first-child,
#long-cv .home-text h3:first-child {
    margin-top: 0;
}

#long-cv .home-text ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
    margin-bottom: 16px;
}

#long-cv .home-text ul:last-child {
    margin-bottom: 0;
}

/* Ensure li styles are applied with higher specificity */
#long-cv .home-text ul li,
#long-cv .home-text li {
    font-family: 'Arial', sans-serif !important;
    font-size: 16px !important;
    line-height: 24px !important;
    color: var(--theme-color-primary) !important;
    margin-bottom: 8px !important;
    padding-left: 0 !important;
    list-style: none !important;
}

#long-cv .home-text ul li:last-child,
#long-cv .home-text li:last-child {
    margin-bottom: 0 !important;
}

/* Paragraphs in long CV */
#long-cv .home-text p {
    font-family: 'Arial', sans-serif;
    font-size: 16px;
    line-height: 24px;
    color: var(--theme-color-primary);
    margin-bottom: 16px;
}

#long-cv .home-text p:last-child {
    margin-bottom: 0;
}

/* Ensure proper spacing for content loaded from Supabase */
#long-cv .home-text > * {
    font-family: 'Arial', sans-serif;
    font-size: 16px;
    line-height: 24px;
    color: var(--theme-color-primary);
}

/* Ensure paragraphs have proper spacing */
#long-cv-content p {
    margin-bottom: 16px !important;
    margin-top: 0;
    display: block;
}

/* Ensure line breaks create spacing */
#long-cv-content br {
    display: block;
    margin-bottom: 16px;
    line-height: 16px;
}

/* Ensure divs that act as paragraphs have spacing - only direct children */
#long-cv-content > div {
    margin-bottom: 16px !important;
    display: block;
}

/* Accordion Container Box */
.accordion-container {
    background-color: var(--theme-bg-accent);
    padding: 31px 42px;
    margin-top: 60px;
    margin-bottom: 40px;
    position: relative;
    transition: background-color 0.3s ease;
}

/* Credits Section */
.credits-section {
    position: relative;
    margin-bottom: 40px;
}

.credits-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    cursor: pointer;
}

.credits-header:hover {
    opacity: 0.8;
}

.credits-title {
    font-family: 'Arial', sans-serif;
    font-weight: bold;
    font-size: 16px;
    letter-spacing: 1px;
    color: var(--theme-color-primary);
    text-transform: uppercase;
}

.credits-content {
    font-family: 'Arial', sans-serif;
    font-size: 16px;
    line-height: 23px;
    color: var(--theme-color-primary);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.4s ease, opacity 0.4s ease, visibility 0.4s ease;
}

.credits-content.expanded {
    max-height: 2000px;
    opacity: 1;
    visibility: visible;
}

.credits-intro {
    margin-bottom: 20px;
}

.team-member {
    margin-bottom: 20px;
    padding-left: 20px;
}


.team-member p {
    margin-bottom: 0;
}

.team-member strong {
    font-weight: bold;
}

/* Environmental Features Section */
.environmental-section {
    position: relative;
    margin-bottom: 40px;
}

.environmental-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    cursor: pointer;
}

.environmental-header:hover {
    opacity: 0.8;
}

.environmental-title {
    font-family: 'Arial', sans-serif;
    font-weight: bold;
    font-size: 16px;
    letter-spacing: 1px;
    color: var(--theme-color-primary);
    text-transform: uppercase;
}

.environmental-content {
    margin-top: 20px;
    margin-bottom: 20px;
    font-family: 'Arial', sans-serif;
    font-size: 16px;
    line-height: 23px;
    color: var(--theme-color-primary);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.4s ease, opacity 0.4s ease, visibility 0.4s ease;
}

.environmental-content.expanded {
    max-height: 2000px;
    opacity: 1;
    visibility: visible;
}

.environmental-content p {
    margin-bottom: 20px;
}

.environmental-content p:last-child {
    margin-bottom: 0;
}

/* Open Source Section */
.opensource-section {
    position: relative;
}

.opensource-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    cursor: pointer;
}

.opensource-header:hover {
    opacity: 0.8;
}

.opensource-title {
    font-family: 'Arial', sans-serif;
    font-weight: bold;
    font-size: 16px;
    letter-spacing: 1px;
    color: var(--theme-color-primary);
    text-transform: uppercase;
}

.opensource-content {
    margin-top: 20px;
    margin-bottom: 20px;
    font-family: 'Arial', sans-serif;
    font-size: 16px;
    line-height: 23px;
    color: var(--theme-color-primary);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.4s ease, opacity 0.4s ease, visibility 0.4s ease;
}

.opensource-content.expanded {
    max-height: 2000px;
    opacity: 1;
    visibility: visible;
}

.opensource-content p {
    margin-bottom: 20px;
}

.opensource-content p:last-child {
    margin-bottom: 0;
}

/* Sidebar Social Links - Bottom Part (now inside top sidebar) */
.sidebar-bottom-content {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}


.email-subscription {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.email-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.email-input {
    width: 100%;
    background: none;
    border: none;
    border-bottom: 1px solid var(--theme-border-light);
    padding: 8px 32px 8px 0;
    font-family: 'Times', 'Times New Roman', serif;
    font-size: 16px;
    color: var(--theme-color-primary);
    outline: none;
    transition: border-color 0.2s ease, color 0.3s ease;
}

.email-input::placeholder {
    color: var(--theme-placeholder);
}

.email-input:focus {
    border-bottom-color: var(--theme-color-primary);
}

.email-submit-btn {
    position: absolute;
    right: 0;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    color: var(--theme-color-primary);
    transition: color 0.2s ease, transform 0.2s ease;
    outline: none;
}

.email-submit-btn:hover:not(:disabled) {
    color: var(--theme-color-primary);
    transform: translateX(2px);
}

.email-submit-btn:active:not(:disabled) {
    transform: translateX(4px);
}

.email-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.email-submit-btn-loading {
    animation: pulse 1.5s ease-in-out infinite;
}

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

.email-submit-btn i {
    font-size: 18px;
}

.subscribe-text {
    margin-top: 8px;
    font-family: 'Arial', sans-serif;
    font-size: 14px;
    color: var(--theme-color-primary);
    margin-bottom: 0;
}

/* Newsletter Alert Styles */
.newsletter-alert {
    margin-top: 12px;
    padding: 12px 16px;
    border-radius: 4px;
    font-family: 'Arial', sans-serif;
    font-size: 14px;
    line-height: 1.4;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    max-width: 100%;
    word-wrap: break-word;
}

.newsletter-alert-show {
    opacity: 1;
    transform: translateY(0);
}

.newsletter-alert-success {
    background-color: rgba(44, 85, 48, 0.1);
    border: 1px solid rgba(44, 85, 48, 0.3);
    color: var(--theme-color-primary);
}

.newsletter-alert-error {
    background-color: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #dc3545;
}

.social-link-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.social-link {
    font-family: 'Arial', sans-serif;
    font-size: 14px;
    line-height: 22px;
    color: var(--theme-color-primary);
    text-decoration: none;
    border-bottom: none;
}

.goto-link-icon,
.social-icon i,
.goto-link-icon i {
    font-size: 12px;
    color: var(--theme-color-primary);
border-bottom: none;
}

.goto-link-icon {
    width: 8px;
    height: 8px;
    flex-shrink: 0;
}

.social-icons {
    display: flex;
    gap: 63px;
    align-items: center;
}

.social-icon {
    width: 12px;
    height: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.social-icon i {
    font-size: 16px;
    color: var(--theme-color-primary);
}

.social-icon svg {
    width: 100%;
    height: 100%;
}

/* ============================================
   BOOK SECTION
   ============================================ */

.book-section-container {
    width: 100%;
    max-width: 100%;
    position: relative;
}

/* Quote/Heading - Times New Roman, 25px, line-height 32px, letter-spacing 0.25px */
.book-quote {
    font-family: 'Times', 'Times New Roman', serif;
    font-size: 25px;
    line-height: 32px;
    letter-spacing: 0.25px;
    color: var(--theme-color-primary);
    font-weight: normal;
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
}

/* Description Paragraphs - Arial Regular, 16px, line-height 23px */
.book-description {
    font-family: 'Arial', sans-serif;
    font-size: 16px;
    line-height: 23px;
    color: var(--theme-color-primary);
    font-weight: normal;
    margin: 0;
    padding: 0;
    margin-top: 40px;
    margin-bottom: 0;
    width: 100%;
    max-width: 100%;
}

.book-description p {
    margin: 0;
    padding: 0;
    line-height: 23px;
}

/* Paragraph spacing - minimal spacing between paragraphs */
.book-description p:not(:last-child) {
    margin-bottom: 0;
}

/* Empty paragraph for spacing */
.book-description p:empty {
    height: 0;
    margin: 0;
    padding: 0;
    line-height: 0;
}

.book-description strong {
    font-weight: bold;
}

/* Book Cover and Buy Section Container */
/* Increased margin for better spacing between description and book cover/stores */
.book-content-wrapper {
    display: flex;
    align-items: flex-start;
    margin-top: 40px;
    gap: 71px;
    position: relative;
    clear: both;
}

/* Book Cover Section - 415px wide, 639px tall */
/* From Figma: x=597, y=674, width=415, height=639 */
/* Book cover ends at 597+415=1012px, BUY starts at 1083px, gap = 71px */
.book-cover-section {
    flex: 0 0 auto;
    width: 415px;
    max-width: 100%;
    margin-right: 0;
    position: relative;
}

.book-cover-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 100%;
}

.book-cover-image {
    width: 415px;
    height: 639px;
    position: relative;
    flex-shrink: 0;
}

.book-cover-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

/* Buy Section */
/* From Figma: BUY at x=1083, y=674 (aligned with book cover top) */
/* Gap from book cover (ends at 1012px) to BUY (starts at 1083px) = 71px */
.book-buy-section {
    flex: 0 0 auto;
    margin-left: 0;
    position: relative;
    padding-left: 0;
    min-width: 200px;
}

/* BUY title - Arial Bold, 16px, line-height 21px, letter-spacing 1px */
/* From Figma: x=1083, y=674, height=11 */
.book-buy-title {
    font-family: 'Arial', sans-serif;
    font-weight: bold;
    font-size: 16px;
    line-height: 21px;
    letter-spacing: 1px;
    color: var(--theme-color-primary);
    text-transform: uppercase;
    margin: 0;
    padding: 0;
    height: 21px;
}

/* Language dropdown - Times New Roman, 14px, line-height 21px, letter-spacing 0.14px */
/* From Figma: x=1084, y=703 (29px gap from BUY at 674) */
.book-language-dropdown {
    position: relative;
    margin: 0;
    padding: 0;
    margin-top: 29px;
}

.book-language-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 100%;
    font-family: 'Times', 'Times New Roman', serif;
    font-size: 14px;
    line-height: 21px;
    letter-spacing: 0.14px;
    color: var(--theme-color-primary);
    text-align: left;
}

.book-language-text {
    display: inline-block;
}

.book-language-arrow {
    font-size: 12px;
    margin-left: 8px;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.book-language-btn.active .book-language-arrow {
    transform: rotate(180deg);
}

.book-language-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background-color: var(--theme-bg-light);
    border: 0.5px solid var(--theme-border);
    border-radius: 4px;
    min-width: 200px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.book-language-dropdown.active .book-language-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.book-language-item {
    padding: 12px 16px;
    font-family: 'Times', 'Times New Roman', serif;
    font-size: 14px;
    line-height: 21px;
    letter-spacing: 0.14px;
    color: var(--theme-color-primary);
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 0.5px solid var(--theme-border);
}

.book-language-item:last-child {
    border-bottom: none;
}

.book-language-item:hover {
    background-color: var(--theme-hover-bg);
}

/* Retailers list - Arial Regular, 16px, line-height 23px */
/* From Figma: first retailer Amazon at y=752 (36px gap from language bottom at 703+13=716) */
/* Retailers spaced ~32px apart (752, 784, 817, 848, 880, 913, 944, 976) */
.book-retailers-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 36px;
}

.book-retailer-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: 'Arial', sans-serif;
    font-size: 16px;
    line-height: 23px;
    color: var(--theme-color-primary);
    text-decoration: none;
    transition: opacity 0.2s ease;
    margin: 0;
    padding: 0;
    height: 23px;
    margin-bottom: 32px;
}

.book-retailer-link:last-child {
    margin-bottom: 0;
}

.book-retailer-link:hover {
    opacity: 0.7;
}

.book-retailer-link span {
    display: inline-block;
}

/* Go To Link icon - 8px size */
.book-retailer-link i {
    font-size: 8px;
    flex-shrink: 0;
    margin-left: 8px;
    width: 8px;
    height: 8px;
}

/* Responsive */
@media (max-width: 1024px) {
    .book-content-wrapper {
        flex-direction: column;
        gap: 40px;
    }
    
    .book-cover-section {
        max-width: 100%;
    }
    
    .book-buy-section {
        width: 100%;
    }
}

/* ============================================
   SEARCH SECTION
   ============================================ */

.search-section-container {
    width: 100%;
    max-width: 100%;
    position: relative;
}

.search-input-wrapper {
    width: 100%;
    margin-bottom: 40px;
}

.search-input {
    width: 100%;
    padding: 8px 12px;
    font-family: 'Times', 'Times New Roman', serif;
    font-size: 13px;
    line-height: 32px;
    letter-spacing: 0.13px;
    color: var(--theme-color-primary);
    background-color: transparent;
    border: none;
    border-bottom: 0.5px solid var(--theme-border);
    outline: none;
}

.search-input::placeholder {
    color: var(--theme-color-primary);
    opacity: 1;
}

/* ============================================
   GALLERY SECTION
   ============================================ */

.gallery-section-container {
    width: 100%;
    max-width: 100%;
    position: relative;
}

/* Search Bar */
.gallery-search-container {
    width: 100%;
    margin-bottom: 40px;
}

.gallery-search-input {
    width: 100%;
    max-width: 825px;
    height: 31px;
    background-color: var(--theme-bg-input);
    border: none;
    padding: 0 16px;
    font-family: 'Times', 'Times New Roman', serif;
    font-size: 13px;
    line-height: 32px;
    letter-spacing: 0.13px;
    color: var(--theme-color-primary);
    outline: none;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.gallery-search-input::placeholder {
    color: var(--theme-color-primary);
    opacity: 1;
}

/* Gallery Tabs */
.gallery-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 40px;
}

.gallery-tab {
    background: none;
    border: none;
    font-family: 'Arial', sans-serif;
    font-weight: bold;
    font-size: 16px;
    line-height: 21px;
    letter-spacing: 1px;
    color: var(--theme-color-primary);
    text-transform: uppercase;
    cursor: pointer;
    padding: 0;
    margin-right: 40px;
    transition: opacity 0.2s ease;
}

.gallery-tab:hover {
    opacity: 0.7;
}

.gallery-tab.active {
    opacity: 1;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 31px;
    width: 100%;
    max-width: 825px;
}

.gallery-item {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.gallery-placeholder {
    width: 100%;
    height: 520px;
    background-color: var(--theme-bg-input);
    border: 1px solid var(--theme-border-accent);
    position: relative;
    margin-bottom: 0;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-placeholder::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: var(--theme-border-accent);
    border-radius: 4px;
    transition: background-color 0.3s ease;
    z-index: 0;
}

/* Hide placeholder icon when content is present */
.gallery-placeholder:has(img),
.gallery-placeholder:has(video),
.gallery-placeholder:has(iframe) {
    border: none;
}

.gallery-placeholder:has(img)::before,
.gallery-placeholder:has(video)::before,
.gallery-placeholder:has(iframe)::before {
    display: none;
}

/* Style for images and videos inside gallery placeholder */
.gallery-placeholder img,
.gallery-placeholder video {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.gallery-placeholder iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.gallery-item-title {
    font-family: 'Arial', sans-serif;
    font-size: 16px;
    line-height: 23px;
    color: var(--theme-color-primary);
    margin: 0;
    padding: 0;
    margin-top: 20px;
    width: 100%;
    max-width: 359px;
}

/* Responsive */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .gallery-placeholder {
        height: 400px;
    }
}

/* ============================================
   SPECIES SECTION
   ============================================ */

.species-description {
    font-family: 'Arial', sans-serif;
    font-size: 16px;
    line-height: 23px;
    color: var(--theme-color-primary);
    margin: 0 0 40px 0;
    font-weight: normal;
}

.species-grid {
    display: flex;
    gap: 40px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.species-card {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 200px;
    max-width: 100%;
}

.species-image-placeholder {
    width: 100%;
    height: 300px;
    background-color: var(--theme-bg-input);
    border: 2px solid var(--theme-border-accent-2);
    transition: background-color 0.3s ease, border-color 0.3s ease;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.species-image-container {
    width: 100%;
    height: 300px;
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.species-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease;
    border-radius: 8px;
}

.species-image:hover {
    transform: scale(1.05);
    opacity: 0.9;
}



.species-name {
    font-family: 'Arial', sans-serif;
    font-weight: bold;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0.25px;
    color: var(--theme-color-primary);
    text-transform: uppercase;
    margin: 0 0 8px 0;
}

.subsection-title {
    font-family: 'Arial', sans-serif;
    font-weight: bold;
    font-size: 16px;
    line-height: 21px;
    letter-spacing: 1px;
    color: var(--theme-color-primary);
    text-transform: uppercase;
}

/* Species description spacing - same as species-grid margin-top */
#species-description {
    margin-top: 40px;
}

/* Pictorial description spacing - no margin-top, margin-bottom 20px */
#pictorial-description {
    margin-top: 0;
    margin-bottom: 20px;
}

/* Postal stamp description spacing - margin-top 40px, margin-bottom 20px */
#postal-stamp-description {
    margin-top: 40px;
    margin-bottom: 20px;
}

.species-scientific {
    font-family: 'Times', 'Times New Roman', serif;
    font-size: 14px;
    line-height: 21px;
    letter-spacing: 0.14px;
    color: var(--theme-color-primary);
    margin: 0 0 12px 0;
    font-style: normal;
}

.species-link {
    display: inline-flex;
    align-items: center;
    color: var(--theme-color-primary);
    text-decoration: none;
    margin-top: 4px;
    transition: opacity 0.2s ease;
    cursor: pointer;
}

.species-link:hover {
    opacity: 0.7;
}

.species-link i {
    font-size: 12px;
    width: 12px;
    height: 12px;
}

/* Responsive */
@media (max-width: 1024px) {
    .species-grid {
        flex-direction: column;
        gap: 40px;
    }
    
    .species-card {
        max-width: 100%;
    }
    
    .species-image-placeholder {
        height: 250px;
    }
}

/* ============================================
   POSTAL STAMP SECTION
   ============================================ */

.stamp-section {
    margin-top: 40px;
}

.stamp-subtitle {
    font-family: 'Arial', sans-serif;
    font-size: 16px;
    font-weight: bold;
    line-height: 24px;
    letter-spacing: 0.25px;
    color: var(--theme-color-primary);
    text-transform: uppercase;
    margin: 0 0 20px 0;
}

.stamp-container {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.stamp-grid {
    display: flex;
    gap: 20px;
    flex: 1;
    min-width: 0;
}

.stamp-item {
    /* Empty - styles applied to child elements */
}

.stamp-image-placeholder {
    width: 750px;
    height: 200px;
    background-color: var(--theme-bg-input);
    border: 2px solid var(--theme-border-accent-2);
    transition: background-color 0.3s ease, border-color 0.3s ease;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}



.stamp-footer {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-top: 20px;
}

.stamp-footer-link {
    display: inline-flex;
    align-items: center;
    color: var(--theme-color-primary);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.stamp-footer-link:hover {
    opacity: 0.7;
}

.stamp-footer-link i {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Responsive */
@media (max-width: 1024px) {
    .stamp-container {
        flex-direction: column;
    }
    
    .stamp-grid {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
    
    .stamp-image-placeholder {
        width: 120px;
        height: 160px;
    }
    
    .postmark-placeholder {
        width: 150px;
        height: 150px;
    }
}

/* ============================================
   AWARDS SECTION
   ============================================ */

.award-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 0.5px solid var(--theme-border-accent-2);
    transition: border-color 0.3s ease;
}

.award-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.award-text {
    font-family: 'Arial', sans-serif;
    font-size: 16px;
    line-height: 23px;
    color: var(--theme-color-primary);
    flex: 1;
}

.award-links-container {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.award-link {
    display: inline-flex;
    align-items: center;
    color: var(--theme-color-primary);
    text-decoration: none;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}

.award-link:hover {
    opacity: 0.7;
}

.award-link i {
    font-size: 12px;
    width: 12px;
    height: 12px;
}

.award-photos-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--theme-color-primary);
    cursor: pointer;
    padding: 0;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}

.award-photos-btn:hover {
    opacity: 0.7;
}

.award-photos-btn i {
    font-size: 12px;
    width: 12px;
    height: 12px;
}

/* Award Photos Carousel Modal */
.award-photos-carousel-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: var(--theme-bg-light);
    align-items: center;
    justify-content: center;
}

.award-photos-carousel-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.award-photos-image-container {
    position: relative;
    max-width: 90vw;
    max-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.award-photos-image-container img {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
    border-radius: 4px;
}

.award-photos-close {
    position: fixed;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--theme-color-primary);
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
    z-index: 10001;
}

.award-photos-close:hover {
    opacity: 0.7;
}

.award-photos-prev,
.award-photos-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--theme-color-primary);
    font-size: 48px;
    font-weight: 300;
    cursor: pointer;
    padding: 16px 8px;
    transition: opacity 0.2s ease;
    z-index: 10001;
    user-select: none;
    opacity: 0.6;
}

.award-photos-prev:hover,
.award-photos-next:hover {
    opacity: 1;
}

.award-photos-prev:disabled,
.award-photos-next:disabled {
    opacity: 0.2;
    cursor: not-allowed;
}

.award-photos-prev {
    left: -60px;
}

.award-photos-next {
    right: -60px;
}

.award-photos-caption {
    margin-top: 16px;
    text-align: center;
    color: var(--theme-color-primary);
    font-family: 'Times', 'Times New Roman', serif;
    font-size: 14px;
    line-height: 21px;
    letter-spacing: 0.14px;
    max-width: 90vw;
    padding: 0 20px;
}

.award-photos-counter {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--theme-color-primary);
    font-size: 16px;
    font-family: 'Arial', sans-serif;
}

/* Species Lightbox Info */
.species-lightbox-info {
    margin-top: 20px;
    text-align: center;
    padding: 0 20px;
}

.species-lightbox-name {
    font-family: 'Arial', sans-serif;
    font-weight: bold;
    font-size: 18px;
    line-height: 24px;
    letter-spacing: 0.25px;
    color: var(--theme-color-primary);
    text-transform: uppercase;
    margin: 0 0 8px 0;
}

.species-lightbox-scientific {
    font-family: 'Times', 'Times New Roman', serif;
    font-size: 16px;
    line-height: 21px;
    letter-spacing: 0.14px;
    color: var(--theme-color-primary);
    margin: 0;
    font-style: italic;
}

.award-photos-thumbnails {
    display: flex;
    gap: 8px;
    margin-top: 60px;
    padding: 10px;
    max-width: 90vw;
    overflow-x: auto;
    justify-content: center;
    flex-wrap: wrap;
}

.award-photos-thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.2s ease, opacity 0.2s ease;
    opacity: 0.6;
    flex-shrink: 0;
}

.award-photos-thumbnail:hover {
    opacity: 1;
    border-color: var(--theme-color-primary);
}

.award-photos-thumbnail.active {
    opacity: 1;
    border-color: var(--theme-color-primary);
    border-width: 3px;
}

@media (max-width: 768px) {
    .award-photos-prev {
        left: 10px;
    }
    
    .award-photos-next {
        right: 10px;
    }
    
    .award-photos-close {
        top: 10px;
        right: 10px;
        position: fixed;
    }
    
    .award-photos-counter {
        bottom: 10px;
    }
}

/* ============================================
   MOBILE NAVIGATION (< 1024px)
   ============================================ */

/* Mobile Navigation Button */
.mobile-nav-button {
    display: none; /* Hidden by default */
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 75px;
    background-color: var(--theme-bg-light);
    border-top: 0.5px solid var(--theme-border);
    z-index: 200;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(100%);
}

.mobile-nav-button.visible {
    display: flex;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile-nav-button.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(100%);
}

.mobile-nav-button-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--theme-color-primary);
}

.mobile-nav-button-content i {
    font-size: 12px;
    color: var(--theme-color-primary);
}

.mobile-nav-button-content span {
    font-family: 'Arial', sans-serif;
    font-weight: bold;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--theme-color-primary);
}

/* Mobile Breakpoint - Hide sidebar and show mobile button */
@media (max-width: 1023px) {
    /* Hide header image on mobile */
    .home-header-image {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        height: 0 !important;
        max-height: 0 !important;
        margin-top: 0 !important;
    }

    /* Mobile header adjustments */
    /* Use flexbox to create equal-width containers on left and right, with icon centered */
    .global-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: relative;
    }

    /* Make header-left fixed width matching header-right for perfect centering */
    .header-left {
        position: static;
        left: auto;
        transform: none;
        width: 120px;
        flex: 0 0 120px;
        display: flex;
        justify-content: flex-start;
        align-items: center;
    }

    /* Move CF icon from header-left to center position on mobile */
    /* Position it absolutely relative to global-header for perfect centering */
    .header-left .cf-icon-header {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        z-index: 102;
    }

    /* Hide header-center content (logo and text) on mobile */
    .header-center {
        display: none !important;
    }

    .logo-container,
    .living-archive-subtitle {
        display: none !important;
    }

    /* Ensure header-right stays on the right with same fixed width as left */
    .header-right {
        position: relative;
        width: 120px;
        flex: 0 0 120px;
        display: flex;
        justify-content: flex-end;
        align-items: center;
     
    }

    /* Make header-right contents smaller on mobile */
    .header-right .header-icon-btn {
        padding: 4px;
      
    }

    .header-right .header-icon {
        width: 16px;
        height: 16px;
        font-size: 16px;
    }

    .header-right .dropdown-arrow {
        width: 10px;
        height: 10px;
        font-size: 10px;
    }

    /* Hide sidebar by default on mobile - positioned on left side, slides in from left */
    .sidebar-top {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw;
        height: 100vh;
        margin: 0;
        z-index: 1000;
        background-color: var(--theme-bg-light);
        border-right: 0.5px solid var(--theme-border);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        overflow: hidden;
        padding: 0;
    }

    /* Show sidebar when mobile menu is open - slides in from left, full viewport */
    .sidebar-top.mobile-open {
        transform: translateX(0);
        width: 100vw;
        height: 100vh;
        z-index: 1000;
    }

    /* Make sidebar-nav scrollable on mobile - full height container with scrollable content */
    .sidebar-top .sidebar-nav {
        width: 100%;
   
        overflow-y: auto;
        overflow-x: hidden;
        padding: 20px;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
    }

    /* Ensure descriptions and subsections maintain full height on mobile - remove max-height constraint */
    .sidebar-top .nav-description.visible {
        max-height: none !important;
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .sidebar-top .nav-subsections.visible {
        max-height: none !important;
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }


    /* Slide main content to the right when sidebar opens */
    .content-layout.sidebar-open .home-content {
        transform: translateX(100%);
        transition: transform 0.3s ease;
    }

    /* Adjust content layout padding on mobile */
    .content-layout {
        padding: 40px;
        padding-top: 0px;
    }

    /* Mobile nav button visibility controlled by JavaScript classes */
    /* Button is shown/hidden via .visible and .hidden classes */

    /* Hide mobile button when sidebar is open */
    .content-layout.sidebar-open .mobile-nav-button {
        opacity: 0;
        visibility: hidden;
        transform: translateY(100%);
    }

    /* Adjust main content padding on mobile */
    .home-content {
        padding-right: 0px;
        padding-left: 0;
        transition: transform 0.3s ease;
    }

    /* Welcome Layout - Mobile Responsive */
    .welcome-layout {
        margin-top: 40px;
        margin-bottom: 40px;
    }

    .welcome-layout .portrait-image {
        float: none;
        margin: 0 auto 30px auto;
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .welcome-layout .portrait-image-container {
        width: 100%;
        max-width: 307px;
        height: auto;
        aspect-ratio: 307 / 394;
    }

    .welcome-layout #welcomePortraitLeft {
        width: 100%;
        height: auto;
        object-fit: contain;
    }

    .home-welcome {
        font-size: 28px;
        line-height: 32px;
        margin-left: 0;
        margin-bottom: 20px;
    }

    /* Remove sticky positioning from search inputs on mobile */
    .podcast-search-wrapper {
        position: static !important;
        top: auto !important;
    }

    .search-input-wrapper {
        position: static !important;
    }

    .gallery-search-container {
        position: static !important;
    }

    /* Ensure content doesn't overflow */
    .main-container-scrollable {
        overflow-x: hidden;
    }

    /* Prevent body and page scrolling when sidebar is open */
    body.sidebar-open-mobile {
        overflow: hidden;
        position: fixed;
        width: 100%;
        height: 100%;
    }

    /* Prevent main container from scrolling when sidebar is open */
    body.sidebar-open-mobile .main-container-scrollable {
        overflow: hidden;
        height: 100vh;
    }

}

/* Desktop - ensure mobile button is hidden */
@media (min-width: 1024px) {
    .mobile-nav-button {
        display: none !important;
    }

    .sidebar-top {
        transform: translateX(0) !important;
    }

    .home-content {
        transform: translateX(0) !important;
    }
}

