/* ================================== */
/* ================================== */
body {
    background-color: #ffffff;
    font-family: 'Lato', sans-serif;
    margin: 0;
    padding: 0;
    color: #000000;
    line-height: 1.6;
}

header {
    background-color: #007C41; /* UofA Green */
    padding: 7px 0;
    color: white;
    position: fixed;
    top: 0;
    z-index: 1000;
    width: 100%;
    height: 70px;
    line-height: 1.4;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
    /*justify-content: center;*/
}

/* ============================================== */
/* === FIX FOR YOUTUBE VIDEOS (DESKTOP & MOBILE) === */
/* ============================================== */
.videos-category {
    margin-bottom: 30px;
    width: 100%;
}

.videos-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center; 
    gap: 40px; 
}

.video {
    text-align: center;
    max-width: 100%;
}

.video img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 8px; 
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); 
}


@media screen and (max-width: 768px) {
    .videos-grid {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
}
/* ============================================== */

header .logo {
    text-align: center;
    font-size: 24px;
    font-family: 'Lato', sans-serif;
    color: #FFFFFF;
}

/* New Desktop Menu*/
header nav.desktop-nav {
    text-align: center;
    margin-top: 5px;
}

/* Hiding Menue Items*/
.hamburger-btn,
.mobile-menu {
    display: none;
}

header nav.desktop-nav a {
    color: white;
    margin: 0 15px;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.5;
}

header nav.desktop-nav a:hover {
    text-decoration: underline;
}

.container {
    display: flex;
    max-width: 1150px;
    margin: 20px auto;
    padding: 20px;
    padding-left: 2%;
    padding-top: 100px;
    min-height: 100vh; /* Ensure the container takes up full height */
    background-color: #ffffff;
    /*box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);*/
    box-sizing: border-box;
}

.sidebar {
    position: sticky;
    top: 70px; /* Below the header*/
    /*width: 160px;*/
    height: 100%;
    flex: 0 0 300px;
    background-color: #E7E9ED;
    padding: 5px;
    padding-top: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    z-index: 800; 
}

.sidebar img {
    width: 160px;
    height: auto;
    margin-bottom: 15px;
    border-radius: 8px;
    margin-top: 5%;
}

.image img {
    width: 250px;
    height: auto;
    border-radius: 8px;
    margin-bottom: 0px;
    margin-left: 25px;
}


.image2 img {
    width: 160px;
    height: auto;
    border-radius: 8px;
    margin-bottom: 0px;
    margin-left: 26px;
}

.image22 img {
    width: 350px;
    height: auto;
    border-radius: 8px;
    margin-bottom: 0px;
    margin-left: 25px;
}

.image3 img {
    width: 400px;
    height: auto;
    border-radius: 8px;
    margin: 20px auto; /* Centers the image horizontally */
    display: block; /* Ensures the image behaves as a block element for centering */
    text-align: center; /* Ensures content is aligned to the center */

}

.image4 img {
    width: 200px;
    height: auto;
    border-radius: 8px;
    display: block; /* block element for centering */

}

.centered-text {
    text-align: center;
    margin: 0 auto;
    max-width: 600px; /* Adjust to limit the width */
}

section {
    scroll-margin-top: 90px; /* Adjust to match header's height */
}


.content {
    width: 80vw;
    padding: 20px;
    flex: 1;
    z-index: 900; 
    left: 100px;
}

/*Dropdown Menu*/

.menu-item {
  margin-bottom: 10px;
}

.menu-header {
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  /*display: flex;*/
  justify-content: space-between;
  align-items: center;
}

.toggle-icon {
  font-size: 18px;
  position: absolute;
  margin-left: 5px;
}

.menu-header.active .toggle-icon {
  color: green;
}

.submenu {
  margin-left: 20px;
  margin-top: -10px;
  list-style-type: none;
  padding: 0;
  display: none; /*Hidden by default*/
}

.submenu li {
  margin: 5px 0;
}
/* Sidebar link styles with larger, bold font */
.sidebar .image-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    font-size: 18px; /* Increased font size */
    font-weight: bold; /* Bold font */
    color: #007C41; /* UofA Green */
    text-decoration: none;
    margin: 15px 0; /* Increased vertical spacing */
    padding-left: 35px; /* Space for the image */
    transition: color 0.3s ease;
}

/* Small image beside the link */
.sidebar .image-link::before {
    content: "";
    position: absolute;
    left: 0; /* Position the image at the left side */
    top: 50%;
    transform: translateY(-50%);
    width: 20px; /* Adjust the width of the image */
    height: 20px; /* Adjust the height of the image */
    background-image: url('Media/cog3.png'); /* Replace image  */
    background-size: cover;
    transition: transform 0.3s ease;
}

/* Hover effect */
.sidebar .image-link:hover {
    color: #005C29; /* Darker green on hover */
}

.sidebar .image-link:hover::before {
    transform: translateY(-50%) rotate(360deg); /* Rotate the image on hover */
}

/* Active link styling */
.sidebar .image-link.active {
    font-weight: bold; /* Retain bold for active state */
    color: #003C1D; /* */
}


/*---*/

.content h1 {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 20px;
  scroll-margin-top: 110px; /* Adjust this value to at least the height of header */
}

.content h2 {
  font-size: 20px;
  margin-bottom: 5px;
  scroll-margin-top: 110px; /* Adjust this value to at least the height of header */
}

.content h3 {
  color: #555555;
  font-size: 18px;
  margin-top: 0;
  margin-bottom: 20px;
  scroll-margin-top: 110px; /* Adjust this value to at least the height of header */
}

.sidebar .caption {
    font-size: 14px;
    color: #666666;
    margin-bottom: 10px;
    margin-left: 10%;
    text-align: left;
    width: 80%;
}

.sidebar .pdf-links {
    font-size: 16px;
}

.sidebar .pdf-links a {
    color: #007C41;
    text-decoration: none;
}

.sidebar .pdf-links a:hover {
    text-decoration: underline;
}

h1 {
    color: #007C41;
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
}

h2 {
    color: #007C41;
    font-size: 22px;
    margin-top: 30px;
}

h3 {
    color: #007C41;
    font-size: 22px;
    margin-top: 30px;
    margin-left: 8%;
    margin-bottom: -5%;
}

h4 {
    color: #000000;
    font-size: 20px;
    margin-top: 10px;
}

h5 {
    color: #000000;
    font-size: 15px;
    margin-top: 1px;
}

h6 {
    color: #007C41;
    font-size: 18px;
    margin: 20px 0 10px;
    font-weight: bold;
}

h7 {
    color: #007C41;
    font-size: 18px;
    margin: 20px 0 10px;
    font-weight: bold;
    margin-left: 30px;
}

h8 {
    color: #007C41;
    font-size: 22px;
    margin-top: 30px;
    margin-left: 8%;
    margin-bottom: -5%;
    text-align: left;
}

p {
    font-size: 16px;
}

li {
    text-align: justify;
}

.justified-text {
    text-align: justify;
}

.events ul, .news ul {
    list-style-type: none;
    padding: 0;
    text-align: justify;
}

.events li{
    font-size: 16px;
    /*border-bottom: 1px solid #cfcfcf;*/
    padding: 5px 0;
    margin-left: 30px;
    text-align: left;
    margin-bottom: -5px
}

.custom-link {
    padding: 10px 20px; 
    background-color: #f0f0f0; 
    text-decoration: none; 
    margin-left: 10%;
}


.news li {
    font-size: 16px;
    border-bottom: 1px solid #cfcfcf;
    padding: 5px 0;
    text-align: justify;
}

.news-li {
    border-bottom: 2px solid #000;
    padding-bottom: 10px;
    margin-bottom: 20px;
    padding-top: 10px; /* Added top padding */
        }

.intro-section {
    text-align: center;
    margin-bottom: 30px;
}

.intro-section h2 {
    font-size: 2em;
    color: #005C29;
}

.intro-textbox {
    max-width: 650px;
    margin: 0 10px;
    padding: 15px;
    text-align: left;
    border: 1px solid #ddd;
    background-color: #f9f9f9;
    border-radius: 5px;
    font-size: 1.1em;
    color: #555;
}

.intro-images {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}

.intro-images .image-box {
    max-width: 600px;
    margin: 0 auto;
    padding: 15px;
    text-align: center;
    justify-content: center; 
    align-items: center; 
}

.intro-images img {
    height: 600px;
    width: auto;
    border-radius: 5px;
    object-fit: cover;
    margin: 0 auto;
    justify-content: center;
    align-items: center; 
}

/* Members grid layout */
.members-grid1 {
    display: flex;
    grid-template-columns: repeat(1, 1fr);
    flex-wrap: wrap;
    justify-content: center;
    /*gap: 20px; /* Space between items
    margin: 20px 0;*/
}

.members-grid2 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /*flex-wrap: wrap;
    justify-content: center;*/
    gap: 20px; /* Space between items */
    margin: 20px 0;
}


.member {
    /*width: 220px; /* Set fixed width for even columns */
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    background-color: #f9f9f9;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.members-category h2 {
    text-align: center;
    font-size: 1.5em;
    margin-bottom: 0px; /* Reduced margin to allow subtext to appear closer */
    color: #007C41; /* Optional: set color to match the theme */
}

.members-category p { /* Subtext style */
    text-align: center;
    font-size: 1em; /* Smaller font size for subtext */
    color: #555;; /* Subtle color for subtext */
    margin-top: 5px;
    margin-bottom: 20px; /* Space before the members grid starts */
}

.member img {
    width: 150px; /* Ensure the width is properly specified */
    height: 150px; /* Maintain square aspect ratio */
    border-radius: 8px;
    margin-top: 25px;
    margin-bottom: 10px;
}

.name {
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 5px;
}

.position {
    color: #555;
    font-size: 0.9em;
}

.field {
    color: #777;
    font-size: 0.9em;
    font-style: italic;
}


a {
    color: #007C41; /* UofA Green */
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.footer {
    background-color: #007C41; /* UofA Green */
    color: white;
    text-align: center;
    padding: 10px 0;
    margin-top: 40px;
    font-size: 14px;
}

.back-to-top a {
     transition: background-color 0.3s ease; /* Smooth transition */
}

/* Back to Top button styling */
#backToTopBtn {
    position: fixed;
    bottom: 50px;
    right: 600px;
    padding: 5px 10px;
    font-size: 16px;
    background-color: rgba(0, 124, 65, 0.7); /* Transparent green */
    color: #ffffff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    display: none; /* Initially hidden */
    z-index: 1500;
}

#backToTopBtn:hover {
    background-color: rgba(0, 124, 65, 1); /* Darker green on hover */
}


/* For small devices (cellphones): max-width 768px */
/* @media (max-width: 768px) {
    body {
        font-size: 14px; 
    }
} */
/* ^^^ DisActive  ^^^*/


/* For medium devices (tablets): min-width 768px and max-width 1024px */
@media (min-width: 768px) and (max-width: 1024px) {
    .container {
        display: flex;
        flex-direction: row; /* Horizontal layout for tablets */
    }

    .sidebar {
        width: 30%; /* Sidebar occupies 30% of the width */
        margin-right: 20px; /* Add spacing to the right of the sidebar */
    }

    .content {
        width: 70%; /* Content area occupies 70% of the width */
    }

    body {
        font-size: 16px; /* Set a slightly larger font size for tablets */
    }
}

/* For large devices (laptops and desktops): min-width 1025px */
@media (min-width: 1025px) {
    .container {
        display: flex;
        flex-direction: row; /* Horizontal layout for larger screens */
    }

    .sidebar {
        width: 25%; /* Adjust sidebar to take up 25% of the width */
        margin-right: 30px; /* Increase spacing for larger screens */
    }

    .content {
        width: 75%; /* Adjust content to take up 75% of the width */
    }

    body {
        font-size: 18px; /* Use larger font size for desktops */
    }
}
/* Carousel container */
.carousel {
    position: relative;
    width: 100%;
    max-width: 800px;
    height: 400px;
    margin: 0 auto;
    overflow: hidden;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px; /* Rounded edges */
}

/* Image container */
.carousel-images {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 1s ease-in-out;
    border-radius: 20px; /* Ensures inner images match rounded edges */
}

/* Individual images */
.carousel-images img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures uniform size with cropping */
    flex-shrink: 0;
    border-radius: 20px; /* Ensures images also have rounded corners */
}

/* Image description banner */
.carousel-caption {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    text-align: center;
    padding: 10px;
    font-size: 16px;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}

/* Navigation arrows */
.carousel .arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 24px;
    z-index: 10;
    transition: background-color 0.3s ease;
    border-radius: 50%; /* Round buttons */
}

.carousel .arrow:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.carousel .arrow.left {
    left: 10px;
}

.carousel .arrow.right {
    right: 10px;
}

/* Responsive adjustments */
/* @media (max-width: 768px) { ... } */
/* @media (max-width: 480px) { ... } */
/* ^^^  DisActive ^^^*/


/* Image container to match carousel dimensions */
.image-container {
    width: 100%;
    max-width: 800px;
    height: 400px;
    margin: 0 auto;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px; /* Rounded edges */
    background-color: #fff;
}

/* Image styling to match carousel */
.rounded-photo {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures uniform size with cropping */
    border-radius: 20px; /* Ensures images also have rounded corners */
}


/* ============================================== */
/* == Responsive == */
/* ============================================== */

/* Part 1 )
*/
@media (max-width: 768px) {
    /* Body & Font */
    body {
        font-size: 14px; 
        overflow-x: hidden !important; 
        width: 100%;
    }

    /* Sidebar & Content */
    .container {
        flex-direction: column;  
        padding: 70px 15px 15px 15px; 
        max-width: 100%;
        width: 100%;
        box-sizing: border-box; 
    } /*  */

    /* Sidebar */
    .sidebar {
        position: static; /* No sticky */
        top: auto;
        flex: 1 1 100%; 
        width: 100%;
        height: auto; 
        margin-bottom: 20px;
        padding: 15px;
        box-sizing: border-box;
    }
    
    .sidebar img {
        width: 120px; 
        margin: 10px auto;
        display: block;
    }

    .sidebar .caption {
        text-align: center; 
        margin-left: 0;
        width: 100%;
    }

    /* Main Content */
    .content {
        flex: 1 1 100%; 
        width: 100%;
        padding: 0;
        left: auto;
        box-sizing: border-box;
    }

    /* Image & Grid */
    
   
    .image img, .image2 img, .image22 img, .image3 img, .image4 img {
        width: 100%; 
        max-width: 100%; 
        height: auto;
        margin-left: 0;
        margin-right: 0;
    }
    
   
    .sidebar .image img {
        width: 200px;
        height: auto;
        display: block;
        margin: 10px auto;
    }

   
    .intro-images .image-box img {
        width: 100% !important; 
        height: auto !important;
    }

   
    .intro-images {
        flex-direction: column;
    }

   
    .members-grid1, .members-grid2 {
   
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .member {
        width: auto; 
        max-width: 300px; 
        margin: 0 auto; 
    }

 
    .carousel {
        height: 300px; 
        border-radius: 10px; 
    }

    .carousel-images img {
        border-radius: 10px;
    }
    
    .carousel-caption {
        font-size: 14px;
        padding: 8px;
        border-bottom-left-radius: 10px;
        border-bottom-right-radius: 10px;
    }

    .carousel .arrow {
        font-size: 18px;
        padding: 8px;
    }

   
    @media (max-width: 480px) {
        .carousel {
            height: 200px;
        }

        .carousel .arrow {
            font-size: 16px;
            padding: 6px;
        }

        .carousel-caption {
            font-size: 12px;
            padding: 6px;
        }
    }

   
    .image-container {
        height: 300px; 
        border-radius: 10px;
    }
    
    .rounded-photo {
        border-radius: 10px;
    }

   
    #backToTopBtn {
       
        right: 20px;
        bottom: 20px;
        padding: 8px 12px;
        z-index: 9999; /* <<<  THE FIX. */
    }

   
    .content h1 {
        font-size: 24px;
    }
    
    .content h2, h2, h3, h8 {
        font-size: 20px;
    }
    
    h3, h8 {
        margin-left: 0;
        margin-bottom: 0;
        text-align: center; 
    }
    
    .events li {
        margin-left: 15px;
        text-align: left;
    }
} 


/* Part 2 
*/
@media (max-width: 768px) and (orientation: portrait) {
    
    header {
        height: 60px; 
    }

    header .logo {
        
        text-align: center;
        padding-left: 50px; 
        padding-right: 20px;
        font-size: 20px; 
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    
    header .desktop-nav {
        display: none;
    }

   
    .hamburger-btn {
        display: block;
        position: fixed;
        top: 15px;
        left: 15px; 
        z-index: 1101; 
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
        width: 30px;
        height: 30px;
    }

    .hamburger-btn span {
        display: block;
        width: 100%;
        height: 3px;
        background-color: white; 
        margin: 6px 0;
        transition: all 0.3s ease;
    }

    
    
   
    .hamburger-btn.active span {
        background-color: #000000; 
    }
    
    .hamburger-btn.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    .hamburger-btn.active span:nth-child(2) {
        opacity: 0;
    }
    .hamburger-btn.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

 
    .mobile-menu {
        display: none; 
        position: fixed;
        top: 0;
        left: -100%; 
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: #f4f4f4;
        z-index: 1100;
        padding-top: 80px; 
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
        transition: left 0.3s ease-in-out;
        flex-direction: column;
    }

    .mobile-menu.active {
        display: flex;
        left: 0; 
    }

    .mobile-menu a {
        color: #007C41; 
        padding: 15px 20px;
        text-decoration: none;
        font-size: 18px;
        display: block;
        border-bottom: 1px solid #ddd;
    }

    .mobile-menu a:hover {
        background-color: #e9e9e9;
    }
} 

section .image-container {
    height: auto; 
}

section .image-container .rounded-photo {
    height: auto; 
    object-fit: contain; 
}



@media (max-width: 768px) {
    .carousel-full-images {
        height: auto; 
    }

    .carousel-full-images .carousel-images img {
        object-fit: contain; 
        height: auto; 
    }
}
@media (orientation: portrait) and (max-width: 768px) {
 

  body.page-publications .sidebar .image img,
  body.page-service .sidebar .image img {
    width: 300px; 
  }
}


/* Filter Buttons Styling */
./* ================================== */
/* ===  FILTER BUTTONS STYLING    === */
/* ================================== */
/* Filter Container Styling */
.filter-wrapper {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
}

.filter-label {
    font-weight: bold;
    margin-bottom: 10px;
    color: #007C41;
    font-size: 16px;
}

.checkbox-container {
    display: grid;                  
    grid-template-columns: 1fr 1fr; 
    gap: 10px;                     
    width: 100%;
    align-items: center;
}


@media (max-width: 400px) {
    .checkbox-container {
        grid-template-columns: 1fr; 
}

/* Custom Checkbox Styling */
.container-checkbox {
    display: block;
    position: relative;
    padding-left: 30px;
    margin-bottom: 5px;
    cursor: pointer;
    font-size: 15px;
    user-select: none;
    font-weight: normal;
}

/* Hide the browser's default checkbox */
.container-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Create a custom checkmark */
.checkmark {
    position: absolute;
    top: 2px;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #eee;
    border-radius: 4px;
    border: 1px solid #ccc;
}

/* add a grey background color */
.container-checkbox:hover input ~ .checkmark {
    background-color: #ccc;
}

/* add a green background */
.container-checkbox input:checked ~ .checkmark {
    background-color: #007C41;
    border-color: #007C41;
}

/* the checkmark/indicator */
.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

/* Show the checkmark when checked */
.container-checkbox input:checked ~ .checkmark:after {
    display: block;
}

/* Style the checkmark/indicator */
.container-checkbox .checkmark:after {
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 3px 3px 0;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
}

.hidden {
    display: none !important;
}



/* Date: 04.2026 N.S */