@font-face {
    font-family: 'Bahnschrift';
    src: url('../fonts/BAHNSCHRIFT.TTF') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* Basic CSS for the navigation bar */
body {
    font-family: 'Bahnschrift', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f0f0f0;
    color: #333;
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f0f0f0; /* Adjusted to a lighter shade of pink */
    padding: 10px 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}


.nav-logo img {
    height: 40px; /* Keep the height */
    width: auto; /* Remove this property */
    max-width: 200px; /* Set a maximum width for the logo */
}

.nav-links {
    display: flex;
    gap: 20px;
}


.nav-links a {
    color: black; /* Set default color to black */
    text-decoration: none;
    padding: 10px 15px;
    transition: color 0.3s, background-color 0.3s;
    border-radius: 5px;
}

.nav-links a:hover {
    background-color: #e81a32;
    color: white; /* Change text color to white on hover */
}

.hamburger-menu {
    display:none;
}

.red-bar {
    width: 100%;
    height: 4px;
    background-color: #e81a32;
}

.content {
    padding: 40px 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-width: 1200px;
    margin: 20px auto;
}

.flashes {
    list-style-type: none;
    padding: 0;
    margin: 20px 0;
}

.flashes li {
    margin-bottom: 10px;
    padding: 15px;
    border-radius: 5px;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.flashes .info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left: 5px solid #0c5460;
}

.flashes .warning {
    background-color: #fff3cd;
    color: #856404;
    border-left: 5px solid #856404;
}

.flashes .error {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 5px solid #721c24;
}

.flashes .success {
    background-color: #d4edda;
    color: #155724;
    border-left: 5px solid #155724;
}

/* Additional modern touches */
button {
    background-color: #e81a32;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-bottom: 10px;
}

button:hover {
    background-color: #bf1628;
}

input, textarea {
    width: 98%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #e81a32;
    box-shadow: 0 0 5px rgba(232, 26, 50, 0.5);
}


/* General table styling */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background-color: white;
    border-radius: 8px;
    overflow: hidden; /* Ensures rounded corners are applied */
}

/* Table header styling */
table th {
    background-color: #f4f4f4;
    color: #333;
    text-align: left;
    padding: 10px;
    font-weight: bold;
}

/* Table cell styling */
table td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

/* Add zebra striping for table rows */
table tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Table row hover effect */
table tr:hover {
    background-color: #d9e8ff;
}

/* Remove bottom border for the last row */
table tr:last-child td {
    border-bottom: none;
}


.hamburger-icon {
    font-size: 30px;
    cursor: pointer;
    user-select: none;
}

.menu-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 40px;
    right: 40%;
    background-color: #fff; 
    border: 5px solid #ccc;
    padding: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 1000;
    width: 250px;
    font-size: 22px;
}

.menu-links a {
    padding: 8px 12px;
    text-decoration: none;
    color: #000;
}

.menu-links a:hover {
    background-color: #f0f0f0;
}


    @media (max-width: 768px) {
    table, table th, table td {
        display: block;
        width: 100%;
    }

    table th, table td {
        padding: 10px 5px;
    }

    table tr {
        margin-bottom: 10px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        border-radius: 8px;
    }

    table tr:hover {
        background-color: transparent; /* Disable hover effect on small screens */
    }
}


footer {
    background-color: #f9f9f9;
    color: #333; /* Set default text color to #333 */
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    font-size: 14px;
    width: 100%;
}

footer h1 {
    color: #e81a32; /* Set h1 color to red */
}

footer a {
    color: #e81a32; /* Set link text color */
    text-decoration: none; /* Remove default underline */
    outline: none; /* Remove default outline */
    border-bottom: 1px solid #e81a32; /* Add bottom border as outline */
    transition: border-bottom 0.3s; /* Add transition effect */
}

footer a:hover {
    border-bottom: 1px solid transparent; /* Hide bottom border on hover */
}


footer div {
    width: 30%; /* Adjusted for three divs */
    padding: 20px;
    margin-bottom: 20px;
}

footer div p {
    margin: 0;
    line-height: 1.5;
    font-size: large;
}


/* Adjustments when body doesn't take up full page */
body.full-height {
    flex-direction: column;
}

body.full-height footer {
    margin-top: auto;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.project-square {
    border: 1px solid #ccc;
    padding: 20px;
    text-align: left;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.project-square:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.project-square a {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: block;
    text-decoration: none;
    color: inherit;
}

.project-title {
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
    font-size: 1.5em;
}

.project-link {
    text-decoration: none;
    color: #e81a32;
    display: inline;
    font-weight: bold;
}

.project-link:hover {
    text-decoration: underline;
}

.nan-cell {
    color: red;
}

.project-image {
    max-width: 100%;
    max-height: 200px;
    display: block;
    margin: 0 auto 10px auto;
    border-radius: 8px;
}

.project-table {
    display: none;
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.project-table th,
.project-table td {
    border: 1px solid #ccc;
    padding: 10px;
    text-align: left;
}

.project-table th {
    background-color: #f4f4f4;
}

.custom-view-toggle {
    display: inline-flex;
    border-radius: 10px;
    border: 1px solid #ccc;
    height: 40px;
    width: 120px;
    margin-top: 7px;
    
}

.toggle-btn {
  padding: 10px 20px;
  border: none;
  background-color: white;
  color: #333;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s, color 0.3s;
  margin-bottom: 0px;
}

.toggle-btn.active {
  background-color: #e81a32;
  color: white;
}


.toggle-btn:focus {
    outline: none;
}

h1.centeredh1 {
    text-align: center;
    margin-bottom: 20px;
}

.button-container {
    text-align: center;
    margin-top: 20px;
}

.button-container a button {
    background-color: #e81a32;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin: 10px;
    transition: background-color 0.3s;
}

.button-container a button:hover {
    background-color: #bf1628;
}

.clickable-row {
    cursor: pointer;
}

.clickable-row:hover {
    background-color: #d9e8ff;
}

.clickable-row td {
    padding: 15px;
}


.checkbox-container {
    display: flex;
    align-items: flex-start; /* Align items at the start */
    margin-bottom: 0px; /* Adjust margin as needed */
    width: 100px;
}


.social-icon {
    width: 1em; /* Adjust as needed based on text size and icon size preference */
    height: 1em; /* Adjust as needed based on text size and icon size preference */
    margin-right: 5px; /* Add spacing between icon and text (optional) */
}


/* Style for the select element */
select {
    appearance: none; /* Remove default arrow */
    -webkit-appearance: none; /* For Safari */
    -moz-appearance: none; /* For Firefox */
    background-color: #f5f5f5; /* Light grey */
    border: 1px solid #ccc; /* Light grey border */
    border-radius: 4px;
    padding: 10px;
    font-size: 16px;
    color: #333; /* Dark grey for text */
    width: 100%;
    max-width: 300px; /* Optional max width */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    transition: all 0.3s ease; /* Smooth transition for hover/focus states */
    margin-bottom: 14px;
}

/* Style for the options within the select */
select option {
    background-color: #ffffff; /* White background for options */
    color: #333; /* Dark grey text */
}

/* Style for the select element on hover */
select:hover {
    border-color: #e53935; /* Red border on hover */
}

/* Style for the select element when focused */
select:focus {
    border-color: #e53935; /* Red border on focus */
    box-shadow: 0 0 5px rgba(229, 57, 53, 0.5); /* Red shadow on focus */
    outline: none; /* Remove default outline */
}

/* Custom arrow for the select dropdown */
select::after {
    content: '▼'; /* Unicode for down arrow */
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    pointer-events: none; /* Ensure the arrow is not clickable */
    color: #333; /* Dark grey for the arrow */
}

/* Container for positioning the custom arrow */
select-container {
    position: relative;
    display: inline-block;
}


input[type="checkbox"] {
    width: 20px;
}
.filter-container {
  position: relative;
  display: inline-block;
}

.filter-btn {
  background-color: #f5f5f5;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 10px 14px;
  font-size: 16px;
  color: #333;
  width: 100%;
  height: 40px;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  margin-bottom: 0;
  vertical-align: middle;
}

.filter-btn:hover {
  background-color: #e9e9e9;
}

.filter-options {
  display: none;
  position: absolute;
  top: 110%;
  left: 0;
  background-color: white;
  border: 1px solid #ccc;
  border-radius: 4px;
  width: 200px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  z-index: 1000;
}

.filter-options button {
  width: 100%;
  padding: 10px;
  border: none;
  background: none;
  text-align: left;
  font-size: 16px;
  color: #333;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-options button:hover {
  background-color: #f0f0f0;
}

/* Glow effect when selected */
.filter-options button.selected {
  background-color: #e0f0ff;
  box-shadow: 0 0 8px rgba(0, 120, 255, 0.7);
  border-radius: 4px;
}

.projectsearchbar {
    display:flex;
    width: 100%;
}

.Form-Project{
    width: 100%;

}

/* Base table for research_projects page */
.rp-table {
    width: 100%;
    border-collapse: collapse;
}

/* Table base */
.rp-table {
    width: 100%;
    border-collapse: collapse;
}
.rp-table th, .rp-table td {
    border: 1px solid #ddd;
    padding: 8px;
}

/* Expand icon */
.rp-expand-icon {
    margin-left: 6px;
    font-size: 0.9em;
    color: #666;
}

/* Mobile hidden details */
.rp-mobile-details {
    display: none;
}
.rp-details-content {
    background: #f9f9f9;
    padding: 8px 10px;
    border-top: 1px solid #ddd;

    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}


 @media (max-width: 768px) {
    /* Hides all cells except the first one */
    .rp-row td:not(:first-child) {
        display: none;
    }

    .rp-mobile-details {
        display: table-row;
    }

    .rp-row {
        cursor: pointer;
    }

    .rp-header-row {
        display: none;
    }
} 

/* MOBILE VIEW */
@media (max-width: 768px) {
    .nav-links{
        display: none;
    }

    .hamburger-menu {
        position: relative;
        display:grid;
    }

    nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        z-index: 1001;
        box-sizing: border-box;
        background-color: #f0f0f0;
        border-bottom: 4px solid #e81a32; 
    }
    .red-bar {
        margin-top: 0;
        position: relative;
        z-index: 1000;
    }
    .content {
        margin-top: 64px; 
    }

    table, table th, table td {
        display: block;
        width: 100%;
    }

    table th, table td {
        padding: 10px 5px;
    }

    table tr {
        margin-bottom: 10px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        border-radius: 8px;
    }

    table tr:hover {
        background-color: transparent; 
    }

    
    .project-table thead th.desktop-only,
    .project-table td.desktop-only {
        display: none;
    }

    /* Mobile specific table styles */
    .project-table {
        border-collapse: separate;
        border-spacing: 0 12px;
        width: 100%;
    }

    
    .project-table .title-cell {
        cursor: pointer;
        background: #fff;
        border: 1px solid #ddd;
        border-radius: 10px;
        padding: 14px 16px;
        font-size: 16px;
        font-weight: 600;
        box-shadow: 0 2px 6px rgba(0,0,0,0.08);
        position: relative;
        padding-right: 36px; /* space for icon */
        transition: background 0.2s ease, transform 0.15s ease;
    }

    .project-table .title-cell:hover {
        background: #f9f9f9;
        transform: scale(1.01);
    }

    
    .project-table .expand-icon {
        display: block;
        position: absolute;
        right: 16px;
        top: 50%;
        transform: translateY(-50%);
        font-weight: bold;
        font-size: 18px;
        color: #666;
    }

    .project-table .mobile-details.show {
        display: table-row;
    }

    .project-table .mobile-details td {
        background: #fff;
        border: 1px solid #ddd;
        border-top: none;
        border-radius: 0 0 10px 10px;
        box-shadow: 0 2px 6px rgba(0,0,0,0.05);
        padding: 0;
    }

    
    .project-table .mobile-details .details-content {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
        padding: 0 16px;
    }

    .project-table .mobile-details.show .details-content {
        max-height: 600px;
        padding: 12px 16px;
    }

    
    .project-table .mobile-details p {
        margin: 6px 0;
        font-size: 14px;
        line-height: 1.5;
    }

    
    .project-table .mobile-details {
        display: none;
    }

   
    .project-table .expand-icon {
        display: none;
    }

    
    .rp-row td:not(:first-child) {
        display: none;
    }

    .rp-mobile-details {
        display: table-row;
    }

    .rp-row {
        cursor: pointer;
    }

    .rp-header-row {
        display: none;
    }

    .expand-icon {
        display: block; 
    }

    .mobile-details {
        display: none; 
    }

    .mobile-details.show {
        display: table-row; 
    }
} 

.expand-icon {
    display: none; /* hidden on desktop */
}

.mobile-details {
    display: none; /* hidden on desktop */
}

.details-btn {
    display: inline-block;
    margin-top: 8px;
    padding: 8px 14px;
    background-color: #ff3737;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.details-btn:hover {
    background-color: #b30000;
}

/* Floating Action Button (New Project) */
.fab {
    position: fixed;
    right: calc(20px + env(safe-area-inset-right));
    bottom: calc(20px + env(safe-area-inset-bottom));
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #c50c0c; /* primary blue */
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 28px;
    font-weight: 600;
    box-shadow: 0 6px 14px rgba(13,110,253,0.25);
    z-index: 1100;
    transition: transform .12s ease, box-shadow .12s ease;
    -webkit-tap-highlight-color: transparent;
}

/* Hover / focus styles */
.fab:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(13,110,253,0.28); }
.fab:active { transform: translateY(-1px); }
.fab:focus { outline: 3px solid rgba(13,110,253,0.18); outline-offset: 3px; border-radius: 50%; }

/* Smaller on narrow screens */
@media (max-width: 480px) {
    .fab {
        width: 48px;
        height: 48px;
        font-size: 22px;
        right: calc(12px + env(safe-area-inset-right));
        bottom: calc(12px + env(safe-area-inset-bottom));
    }
}

/* Ensure FAB doesn't obscure important controls on very small viewports
   (fine-tune selectors if your page has a footer/action bar) */
@media (max-width: 420px) {
    .custom-view-toggle {
        margin-bottom: 72px; /* leave space for FAB */
    }
}