:root {
    --primary: #0c0074;
    --secondary: #757575;
    --light: #F3F6F8;
    --dark: #0C2B4B;

 /* Dynamically adjusting heights */
 --top-bar-height: clamp(40px, 5vw, 60px); /* Min 35px, responsive, max 60px */
 --min-font-size: clamp(2vw, 2.2vw, 2.3vw);
 --navbar-height: clamp(40px, 5vw, 60px);  /* Min 20px, responsive, max 50px */
 --video-container-height: clamp(40px, 25vw, 500px); /* Min 400px, responsive, max 600px */
 --content-container-height: clamp(40px, 25vw, 500px); /* Min 400px, responsive, max 600px */
 --top-image-height: clamp(40px, 25vw, 500px); /* Min 400px, responsive, max 600px */
 --bottom-image-height: clamp(40px, 25vw, 500px); /* Min 400px, responsive, max 600px */
 --footer-height:clamp(90px, 25vw, 700px);
 --font-size:clamp(10px, 1.2vw, 30px);
 --footer-title-font-size:clamp(30px, 3vw, 40px);
 --footer-content-font-size:clamp(5px, 2vw, 20px);
 --sirbar-height: clamp(22vw, 8vw, 19vw);






 /* Responsive font sizes */
 --font-size-desktop: clamp(14px, 1.5vw, 18px); /* Min 14px, responsive, max 18px */
 --font-size-mobile: clamp(12px, 1.2vw, 16px);  /* Min 12px, responsive, max 16px */

 /* Sidebar width responsive */
 --sidebar-width: clamp(200px, 30vw, 250px); /* Min 200px, responsive, max 250px */
}


@font-face {
    font-family: 'kcobraletra';
    src: url('../font/KCObraLetraRegular.woff2') format('woff2');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'Beckman';
    src: url('../font/subset-BeckmanFREE.woff2') format('woff2');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'Lexend';
    src: url('../font/subset-Lexend-Regular.woff2') format('woff2');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'Playfair';
    src: url('../font/PlayfairDisplay-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'Benedict';
    src: url('../font/Benedict\ Regular.woff') format('woff');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'Garamond'; /* Name of the font */
    src: url('../font/EBGaramond08-Regular.woff') format('woff'); /* Path to the font file */
    font-weight: normal; /* Specify the font weight */
    font-style: normal; /* Specify the font style */
    font-display: swap; /* Optional: Fallback text display while font loads */
}
@font-face {
    font-family: 'Montserrat'; /* Name of the font */
    src: url('../font/monserrat/Montserrat-Regular.woff') format('woff2'); /* Path to the font file */
    font-weight: normal; /* Specify the font weight */
    font-style: normal; /* Specify the font style */
    font-display: swap; /* Optional: Fallback text display while font loads */
}
@font-face {
    font-family: 'Tex-gyre'; /* Name of the font */
    src: url('../font/monserrat/subset-TeXGyreTermes-Regular.woff2') format('woff2'); /* Path to the font file */
    font-weight: normal; /* Specify the font weight */
    font-style: normal; /* Specify the font style */
}


/* Set height for parent elements */
html, body {
    margin: 0; /* Remove default margins */
    padding: 0; /* Remove default padding */
    box-sizing: border-box;
    font-family: garamond, sans-serif;
}

body {
    font-family: 'KC Obra Letra', sans-serif;
    display: flex;
    flex-direction: column; /* Align elements vertically */
}





/* Top Bar */
.top-bar1 {
    background-color: #000;
    display: flex;
    align-items: center;
    position: relative;
    top: 0;
    height: var(--top-bar-height); /* Dynamically adjust height */
    width: 100%;
    z-index: 1000;
    transition: height 0.3s ease, opacity 0.5s ease, top 0.5s ease;
}


/* Top Bar Scroll Effect */
.top-bar1.hidden {
    opacity: 0;
    top: -50px;
    transition: opacity 0.5s ease, top 0.5s ease;
}

/* Navbar Scroll Effect */
nav.scrolled {
    position: fixed;
    top: 0;
    background-color: #ffffff;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    transition: top 0.5s ease, opacity 0.5s ease;
    z-index: 10000;
}

.navbar-brand {
    display: flex;
    position: absolute;
    max-height: var(--top-bar-height);
    height: 100%;
    width: auto;
    white-space: nowrap;


}
/* Bioprocess Text */
.top-bar1 h21 {
  font-family: "montserrat", sans-serif;
  font-style: normal;
  font-size: 2.3vw;
  color: white;
  align-self: center;
  position: absolute;
  margin-left: 23vw;
  margin-right: 20vh;
  box-sizing: border-box;
}

/* Hover Effect */
.top-bar1:hover {
    opacity: 0.8; /* Slightly fade on hover */
}

/* When scrolled */
.top-bar1.scrolled {
    opacity: 0.5;
    top: -50px; /* Moves the bar upwards */
}

/* Hidden state for .top-bar */
.hidden {
    opacity: 0;
    top: -50px;
    transition: opacity 0.5s ease, top 0.5s ease;
}
/*End of Top Bar*/



/* Navigation Bar */
nav {
    position: relative; /* Fixed to ensure visibility when it reappears */
    height: var(--navbar-height);
    width: 100%;
    background-color: rgb(87, 192, 248);
    box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 99911;
}

/* Show Navigation Bar */
nav.visible {
    opacity: 1; /* Make visible */
    pointer-events: auto; /* Enable interactions */
    top: var(--top-bar-height); /* Fixed position below the top bar */
}

/* Navigation List */
nav ul {
    width: 100%; /* Full width */
    list-style: none; /* Remove bullet points */
    display: flex; /* Align items horizontally */
    justify-content: flex-end; /* Align items to the right */
    align-items: center; /* Center items vertically */
    margin: 0; /* Remove default margin */
    padding: 0; /* Remove default padding */
}

/* Navigation Items */
nav li {
    height: 40px; /* Match the height of the navbar */
    display: flex; /* Flexbox for alignment */
    align-items: center; /* Center content vertically */
}


/* Navigation Links */
nav a {
    height: 100%;
    padding: 0 30px;
    font-size: clamp(14px, 1.2vw, 18px); /* Responsive font size */
    text-decoration: wavy; /* Remove underline */
    display: flex; /* Flexbox for alignment */
    align-items: center; /* Center content vertically */
    color: #0b088f;
    transition: color 0.2s ease, background-color 0.2s ease; /* Smooth hover effect for color and background */
    display: flex;
    align-items: center;
    color: black;
}
/* Active Link Styling */
nav a.active {
    color: #ffffff; /* Change text color for active website button */
    font-weight:lighter; 
    text-decoration: none; /* Remove underline */
    background-color: rgba(255, 255, 255, 0); /* Subtle background for active link */
    transition: color 0.2s ease, background-color 0.2s ease; /* Smooth transition */
}


/* Hover Effect */
nav a:hover {
    text-decoration: wavy;
    color: #F3BD00; /* Change text color */
    background-color: #000000; /* Optional: Add a background color on hover */

}

nav li:first-child {
    margin-right: 0; /* Push all other items to the right */
}

.sidebar{
  position: fixed;
  margin-top: var(--top-bar-height);
  top: 0;
  right: 0;
  height: 240px;
  width: 200px;
  background-color: rgb(87, 192, 248);
  box-shadow: -10px 0 10px rgba(0, 0, 0, 0.1);
  list-style: none;
  display: none;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
}
.sidebar li{
    width: 100%;
  }
.sidebar a{
    width: 100%;
  }

  .menu-button{
    display: none;
  }
  @media(max-width: 800px){
    .hideOnMobile{
      display: none;
    }
    .menu-button{
      display: block;
    }
  }
  @media(max-width: 400px){
    .sidebar{
      width: 100%;
    }
  }

.publi-bar-image{
    height: 5vw;
}
.header{
    position: relative;
    display: flex;
    height: 20vw;;
    width: 100%;
}
.header img{
    height: 20vw;
    width: 100%;

}
.header h2 {
    position: absolute;
    font-family: 'kcobraletra';
    left: 50vw;
    top: 7vw;
    transform: translate(-50%, -50%);
    font-size: clamp(5vw, 1vw, 3vw);
}

h5 {
    position: absolute;
    font-family: 'kcobraletra';
    left: 50vw;
    top: 7vw;
    width: 100%;
    transform: translate(-28%, -135%);
    font-size: clamp(5vw, 1vw, 3vw);
}


.sidenav {
    position: absolute; /* Start as absolute */
    left: 0; /* Align to the left */
    width: 18vw; /* Sidebar width */
    background-color: #333; /* Sidebar background color */
    z-index: 1000; /* Ensure it's above other elements */
    transition: none; /* Smooth transitions */
    top: 40vw;
    height:100%;
}


/* Sidebar Links */
.sidenav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidenav ul li {
    width: 100%;
}

.sidenav ul li a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 15px 20px;
    font-size: 1rem;
    font-weight: bold;
    transition: background-color 0.5s ease;
}

.sidenav ul li a:hover {
    background-color: #444; /* Highlight on hover */
}

.sidenav ul li a.active {
    background-color: #555; /* Active link background */
    color: #fff;
}

  
  /* Style page content */
  .main {
    position: absolute;


  }
  
  /* On smaller screens, where height is less than 450px, change the style of the sidebar (less padding and a smaller font size) */
  @media screen and (max-height: 450px) {
    .sidenav {padding-top: 15px;}
    .sidenav a {font-size: 18px;}
  }






  .publications {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

h3 {
    margin-top: 20px;
    color: #333;
    border-bottom: 2px solid #ccc;
    padding-bottom: 5px;
}

.year-content {
    margin: 10px 0 20px 20px;
    color: #666;
}

.publication {
    display: flex;
    align-items: flex-start;
    margin: 10px 0;
}

.publication .number {
    font-weight: bold;
    color: #333;
    margin-right: 10px;
    white-space: nowrap;
}

.publication .details {
    flex: 1;
    color: #333;
    font-size: 14px;
}

.publication i {
    font-style: italic;
    color: #555;
}

.publication a {
    color: #007BFF;
    text-decoration: none;
}

.publication a:hover {
    text-decoration: underline;
}









.publication {
    margin-bottom: 10px;
}
.year-content {
    margin-top: 20px;
}




.controls{
    position: absolute;
    right: 5%;
}

#sortOptions {
    display: inline-block; /* Keeps it inline */
    visibility: visible;   /* Always visible */
    z-index: 1000;         /* Brings it to the top */
    position: relative;    /* Ensure no overlapping */
}

#sortOptions:focus {
    outline: none;         /* Optional: Removes outline for better UX */
}




#vertical-sidebar {
    position: fixed;
    top: 0;
    left: -250px; /* Initially hidden off-screen */
    width: 250px;
    height: 100%;
    background-color: #333;
    color: white;
    display: none; /* Start hidden */
    transition: left 0.3s ease-in-out; /* Smooth transition for open/close */
    z-index: 1000; /* Same as menu toggle for proper stacking */
    overflow-y: auto;
}

#vertical-sidebar.open {
    display: block !important; /* Ensure visibility overrides display: none */
    left: 0; /* Slide in when open */
}

/* Sidebar Links */
#vertical-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#vertical-sidebar ul li a {
    display: block;
    padding: 15px;
    color: white;
    text-decoration: none;
    font-size: 1rem;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

#vertical-sidebar ul li a:hover {
    background-color: #939393;
}

#vertical-sidebar ul li a.active {
    background-color: #121b46; /* Highlight background color */
    color: #ffcc00; /* Highlight text color */
    font-weight: bold; /* Optional: Make the text bold */
    border-left: 5px solid #ffcc00; /* Optional: Add a visual indicator */
}

  
  

/* Close Button */
#close-sidebar {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1000; /* Matches menu toggle and sidebar z-index */
}

/* Menu Toggle Button */
#menu-toggle {
    position: fixed;
    top:33.9%; /* Below the navbar */
    left: 15px;
    font-size: 15px;
    background-color: #555;
    border: 2px solid #333;
    border-radius: 5px;
    color: white;
    padding: 1% 1.5%;
    cursor: pointer;
    z-index: 1000; /* Matches sidebar z-index */
    display: none; /* Hidden by default for large screens */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, transform 0.3s ease;
}

/* Overlay for Sidebar */
#sidebar-overlay {
    visibility: hidden; /* Hidden by default */
    opacity: 0; /* Fully transparent by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 900; /* Below the sidebar */
    transition: visibility 0.3s ease, opacity 0.3s ease; /* Smooth transition */
}

#sidebar-overlay.active {
    visibility: visible; /* Make it visible */
    opacity: 1; /* Fully opaque */
}

/* Responsive Design */
@media (max-width: 768px) {
    #menu-toggle {
        display: block; /* Show menu toggle for smaller screens */
    }

    #close-sidebar {
        display: block; /* Show close button for smaller screens */
    }

    #vertical-sidebar {
        left: -250px; /* Hidden by default */
        position: fixed;
    }
}

@media (min-width: 769px) {
    #menu-toggle {
        display: none; /* Hide menu toggle for large screens */
    }

    #close-sidebar {
        display: none; /* Hide close button for large screens */
    }

    #vertical-sidebar {
        left: 0; /* Always visible on larger screens */
        position: fixed;
        display: block; /* Ensure visibility on larger screens */
    }

    #sidebar-overlay {
        display: none; /* No overlay needed for large screens */
    }
}



.publication, .patent {
    background: #ffffff;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.publication .number, .patent .number {
    font-weight: bold;
    font-size: 1.2em;
    color: #ffc60b;
}
.publication .details, .patent .details {
    margin-left: 20px;
}
footer {
    text-align: center;
    background: #333;
    color: #ffffff;
    padding: 20px 0;
}


/* Scroll-to-top button styles */
#scrollTop {
    position: fixed;
    right: 20px;
    bottom: 50px;
    display: none; /* Initially hidden */
    z-index: 9999; /* Ensure it's above other elements */
}

#scrollTop a img {
    width: 50px; /* Adjust the width of the image */
    height: 50px; /* Adjust the height of the image */
    border-radius: 50%; /* Optional: make it circular */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease; /* Add animation on hover */
}

#scrollTop a img:hover {
    transform: translateY(-5px) scale(1.1); /* Slight hover animation */
}
