<style>
/*
* Main Styles for New Mendax Lab Layout
*/
body {
  font-family: 'Roboto', sans-serif;
  color: #444;
  background-color: #f8f9fa;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  color: #2c3e50;
}

.section-title {
padding-bottom: 40px;
text-align: center;
}
.section-title h2 {
font-size: 32px;
font-weight: 700;
position: relative;
padding-bottom: 15px;
}
.section-title h2::after {
content: '';
position: absolute;
display: block;
width: 60px;
height: 3px;
background: #0d6efd; /* Bootstrap Primary Blue */
bottom: 0;
left: 50%;
transform: translateX(-50%);
}
.section-title p {
font-size: 1.1rem;
color: #6c757d;
}

/* Header & Navbar */
/* Header & Navbar */
.navbar {
padding: 0; /* Remove padding, we'll control height manually */
position: relative; /* Crucial for the ::before element */
background: #fff; /* The default background is WHITE */
height: 80px; /* Set one fixed height for the navbar */
box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

/* This pseudo-element IS the teal background */
.navbar::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: #206e78; /* Your logo's teal color */

/* THIS IS THE MAGIC */
/* It cuts a polygon shape. We define the 4 corners. */
/* (40% from left-top, 100% top, 100% bottom, 35% from left-bottom) */
clip-path: polygon(40% 0, 100% 0, 100% 100%, 35% 100%);

z-index: 0; /* Sits just behind the content */
}

/* This ensures all your content (logo, links) sits ON TOP */
.navbar .container-fluid {
position: relative;
z-index: 1;
height: 100%;
padding-left: 2rem; /* Add some padding so logo isn't at the edge */
padding-right: 2rem;
}

/* Your logo's sizing */
.navbar-brand {
padding: 0;
}
.navbar-brand img {
height: 60px; /* Adjust as needed */
width: auto;
}

/* --- STYLING THE TWO MENUS --- */

/* Style for ALL links */
.navbar-nav .nav-link {
font-family: 'Montserrat', sans-serif;
font-weight: 500;
padding: 0.5rem 1rem;
transition: color 0.3s;
}

/* 1. LEFT Menu Links (me-auto) */
/* These are on the white background, so they are dark. */
.navbar-nav.me-auto .nav-link {
color: #34495e;
}
.navbar-nav.me-auto .nav-link.active,
.navbar-nav.me-auto .nav-link:hover {
color: #0d6efd; /* Your primary blue */
}

/* 2. RIGHT Menu Links (ms-auto) */
/* These are on the TEAL background, so they must be WHITE. */
.navbar-nav.ms-auto .nav-link {
color: #ffffff;
opacity: 0.9;
}
.navbar-nav.ms-auto .nav-link.active,
.navbar-nav.ms-auto .nav-link:hover {
color: #ffffff;
opacity: 1;
font-weight: 600;
}

/* Mobile Menu (Reverts to a simple white background) */
@media (max-width: 991px) {
.navbar {
  height: auto; /* Let it be auto height on mobile */
  background: #fff; /* Solid white background */
}
.navbar::before {
  display: none; /* Hide the diagonal background */
}
.navbar .container-fluid {
  padding-left: 1rem;
  padding-right: 1rem;
}
/* Ensure all links are dark on the white mobile menu */
.navbar-nav .nav-link {
  color: #34495e !important;
  opacity: 1 !important;
}
}

/* Mobile specific adjustments (optional but good practice) */
@media (max-width: 991px) { /* Bootstrap's 'lg' breakpoint */
  .navbar::before {
      /* On mobile, remove the diagonal or make it simpler */
      display: none; /* Hide the diagonal on smaller screens */
      background: #206e78; /* Or just have a solid background */
  }
  .navbar {
      background: #fff; /* Fallback for mobile */
      height: auto; /* Let it grow with content */
      box-shadow: 0 2px 15px rgba(0,0,0,0.05); /* Add shadow back for mobile */
  }
  .navbar-nav .nav-link {
      color: #34495e; /* Ensure legible text on white mobile menu */
  }
}
.navbar-brand img {
height: 45px;  /* Use 'height' instead of 'max-height' */
width: auto;   /* Tell it to scale the width automatically */
}
.navbar-nav .nav-link {
font-family: 'Montserrat', sans-serif;
font-weight: 500;
color: #34495e;
padding: 0.5rem 1rem;
}
.navbar-nav .nav-link.active,
.navbar-nav .nav-link:hover {
color: #0d6efd;
}

/* Hero Section */
#hero {
width: 100%;
height: 90vh;
min-height: 700px;
background: linear-gradient(rgba(44, 62, 80, 0.7), rgba(44, 62, 80, 0.7)), url('assets/img/gallery/img1.png') center center no-repeat;
background-size: cover;
background-attachment: fixed;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
color: #fff;
}
#hero h1 {
font-size: 3.5rem;
font-weight: 700;
color: #fff;
}
#hero h2 {
font-size: 1.5rem;
font-weight: 400;
color: rgba(255, 255, 255, 0.85);
margin-bottom: 30px;
}
.btn-get-started {
font-family: 'Montserrat', sans-serif;
font-weight: 600;
font-size: 1rem;
padding: 12px 30px;
border-radius: 50px;
background: #0d6efd;
border: 2px solid #0d6efd;
color: #fff;
text-decoration: none;
transition: 0.3s;
}
.btn-get-started:hover {
background: transparent;
border-color: #fff;
color: #fff;
}

/* Sections General */
section {
padding: 60px 0;
overflow: hidden;
}
.section-bg {
background-color: #fff;
}

/* About Section */
#about .about-img {
max-width: 100%;
border-radius: 8px;
box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}
#about .content h3 {
font-weight: 700;
font-size: 2rem;
color: #2c3e50;
}
#about .content p:last-child {
margin-bottom: 0;
}
/* --- Style for text on the #focus section --- */
#focus .section-title p {
color: #ffffff; /* White color */
}

#focus .section-title p {
opacity: 0.8; /* Makes the subtitle slightly less bright */
}
/* Research/Focus Section */
.focus-box {
background: #fff;
padding: 30px;
border-radius: 8px;
box-shadow: 0 0 30px rgba(0,0,0,0.08);
text-align: center;
transition: 0.3s;
height: 100%;
}
.focus-box:hover {
transform: translateY(-10px);
box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}
.focus-box .icon {
font-size: 3rem;
color: #0d6efd;
margin-bottom: 20px;
line-height: 1;

}
.focus-box .icon svg {
/* This is a more direct selector that will win the conflict.
  The !important tag is a final "sledgehammer" to ensure it works.
*/
width: 50px !important;
height: 50px !important;
fill: currentColor;
}
.focus-box h4 {
font-size: 1.25rem;
font-weight: 700;
margin-bottom: 15px;
}

/* Team Section */
/* --- Force all team photos to be squares --- */

.member .pic {
/* This sets a perfect 1:1 (square) aspect ratio */
aspect-ratio: 1 / 1; 
width: 100%; /* Ensures it fills its column */
overflow: hidden; /* Hides any part of the image that spills over */
border-radius: 8px; /* Keeps the container rounded/shaped as before */
}

.member .pic img {
/* This tells the image to fill the entire container */
width: 100%;
height: 100%;

/* Crucial: It crops the image to fill the space without stretching or squishing */
object-fit: cover; 
}
.team-member {
background: #fff;
border-radius: 8px;
overflow: hidden;
box-shadow: 0 0 30px rgba(0,0,0,0.08);
text-align: center;
transition: 0.3s;
}
.team-member:hover {
transform: translateY(-10px);
box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}
.team-member img {
width: 100%;
}
.team-member .member-info {
padding: 25px;
}
.team-member h4 {
font-size: 1.2rem;
font-weight: 700;
}
.team-member span {
display: block;
font-size: 0.9rem;
color: #6c757d;
margin-bottom: 10px;
}

/* FAQ Section */
.accordion-item {
border: 0;
border-bottom: 1px solid #e9ecef;
margin-bottom: 10px;
}
.accordion-button {
font-family: 'Montserrat', sans-serif;
font-weight: 600;
font-size: 1.1rem;
color: #2c3e50;
background: #fff;
padding: 20px;
border: 0;
}
.accordion-button:not(.collapsed) {
color: #0d6efd;
background: #fff;
box-shadow: none;
}
.accordion-button:focus {
box-shadow: none;
}
/* --- FAQ Accordion Arrow (Force Animation Fix) --- */

#faqAccordion .accordion-button::after {
font-family: initial !important;
content: '' !important;
background-image: var(--bs-accordion-btn-icon) !important;
font-weight: initial;
background-color: transparent;

/* Set the default state */
transform: var(--bs-accordion-btn-icon-transform);

/* Set the animation.
  We are transitioning the 'transform' property over 0.2 seconds.
*/
transition: transform 0.2s ease-in-out !important;
}

#faqAccordion .accordion-button:not(.collapsed)::after {
content: '' !important;
background-image: var(--bs-accordion-btn-active-icon) !important;

/* Set the 'open' state */
transform: var(--bs-accordion-btn-active-icon-transform);
}

/* THIS IS THE OVERRIDE.
It tells the browser to animate even if "Reduce Motion" is on.
*/
@media (prefers-reduced-motion: reduce) {
#faqAccordion .accordion-button::after {
  transition: transform 0.2s ease-in-out !important;
}
}
.accordion-body {
padding: 0 20px 20px 20px;
font-size: 1rem;
color: #495057;
}
#faq .section-title p {
color: #ffffff; /* White color */
}

#faq .section-title p {
opacity: 0.8; /* Makes the subtitle slightly less bright */
}


/* Contact Section */
.contact-info {
background: #fff;
padding: 30px;
border-radius: 8px;
box-shadow: 0 0 30px rgba(0,0,0,0.08);
height: 100%;
}
.contact-info .info-box {
display: flex;
align-items: center;
margin-bottom: 20px;
}
.contact-info .icon {
font-size: 2rem;
color: #0d6efd;
width: 44px;
height: 44px;
background: #e7f1ff;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.contact-info .info-box div {
margin-left: 20px;
}
.contact-info h4 {
font-size: 1.2rem;
margin-bottom: 5px;
}
.contact-info p {
margin-bottom: 0;
font-size: 0.9rem;
}
.contact-form {
background: #fff;
padding: 30px;
border-radius: 8px;
box-shadow: 0 0 30px rgba(0,0,0,0.08);
height: 100%;
}
.contact-form iframe {
border: 0;
}
/* Gallery Section */

.gallery .gallery-item {
overflow: hidden;
border-radius: 8px;
box-shadow: 0 0 15px rgba(0,0,0,0.08);
margin-bottom: 24px;

/* --- NEW --- */
/* This forces a 4:3 aspect ratio. 
   You can change it to '1 / 1' to make them perfectly square. */
aspect-ratio: 4 / 3;
}

.gallery .gallery-item a {
/* Make the link fill the container */
display: block;
width: 100%;
height: 100%;
}

.gallery .gallery-item img {
transition: 0.3s ease-in-out;

/* --- NEW --- */
/* These new rules make the image fill the box */
width: 100%;
height: 100%;
object-fit: cover; /* This is the magic part: it crops, not stretches */
}

.gallery .gallery-item:hover img {
transform: scale(1.1);
}
/* ======= Section Flair (Altern-ating Colors & Geometry) ======= */

/* First, make the "section-bg" (white) sections have a stacking context */
.section-bg {
background-color: #fff;
position: relative; /* This is important for the zig-zag overlap */
z-index: 1; /* Sits on top */
}

/* --- Rule for the FIRST teal shape (#focus) --- */
#focus {
position: relative; /* Stacking context */
z-index: 2; /* Sits on top of the section above it */
}

/* This pseudo-element IS the colored shape */
#focus::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1; /* Sits behind the text content */

/* VVV THIS IS THE COLOR TO CHANGE VVV 
*/
background-color: #206e78; /* The light teal */

/* This is your original diagonal */
clip-path: polygon(0% 50px, 100% 0%, 100% 100%, 0% 100%);
}

/* --- Rule for the SECOND teal shape (#faq) --- */
#faq {
position: relative; /* Stacking context */
z-index: 3; /* Sits on top of the section above it */
}

/* This pseudo-element IS the colored shape */
#faq::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1; /* Sits behind the text content */

/* VVV THIS IS THE COLOR TO CHANGE VVV 
*/
background-color: #206e78; /* The light teal */

/* This is the alternating diagonal */
clip-path: polygon(0% 0%, 100% 50px, 100% 100%, 0% 100%);
}

/* We still need this padding to push the content down */
#focus,
#faq {
 padding-top: 100px;
}
/* Footer */
#footer {
background: #2c3e50;
color: #fff;
padding: 40px 0;
font-size: 0.9rem;
}
#footer .copyright {
padding-top: 10px;
}
#footer .social-links a {
font-size: 1.2rem;
color: #fff;
margin-left: 15px;
transition: 0.3s;
}
#footer .social-links a:hover {
color: #0d6efd;
}
/* ======= Footer Group Logo Styling ======= */
.footer-group-links {
display: flex;
align-items: center;
gap: 15px; /* Creates space between the text and the logo */
}

.footer-legal-link {
color: rgba(255, 255, 255, 0.7); /* Light white, like footer text */
text-decoration: none;
font-size: 0.9rem;
}
.footer-legal-link:hover {
color: #fff;
text-decoration: underline;
}

.footer-group-logo {
height: 35px; /* Set the height of your small group logo */
width: auto;
opacity: 0.8;
transition: opacity 0.3s;
}
.footer-group-logo:hover {
opacity: 1;
}
.bi::before,
[class^="bi-"]::before,
[class*=" bi-"]::before {
font-family: "bootstrap-icons" !important;
font-style: normal !important;
font-weight: normal !important;
font-variant: normal !important;
text-transform: none !important;
line-height: 1 !important;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
/* --- 1. GLOBAL VARIABLES --- */

/* Base Variables for the Default Light Theme */
:root {
    --bg-main: #f8f9fa; /* Light Gray Page Background */
    --bg-secondary: #ffffff; /* White Sections (Team, Contact) */
    --text-primary: #2c3e50; /* Dark headings */
    --text-secondary: #444; /* General body text */
    --geo-bg: #206e78; /* Light teal geometry */
}

/* HIGH-SPECIFICITY DARK MODE DEFINITION */
body.theme-dark {
    --bg-main: #111111; /* Near-black background */
    --bg-secondary: #1a1a1a; /* Dark sections */
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --geo-bg: #223336; /* Darkened teal geometry */
}

/* --- 2. FORCING VARIABLE APPLICATION (THE FIX) --- */

/* Apply to base elements with !important to win conflicts */
body {
    background-color: var(--bg-main) !important;
    color: var(--text-secondary) !important;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary) !important;
}

/* Force the background change on the specific white sections */
.section-bg {
    background-color: var(--bg-secondary) !important;
}

/* Force geometry layers to use the variable color */
#focus::before, #faq::before {
    background-color: var(--geo-bg) !important;
}

/* Force Team and general section text to remain legible */
.team-member span, 
.accordion-body,
.contact-info p {
    color: var(--text-secondary) !important;
}
/* 1. NAVBAR BACKGROUND FIX */
.navbar {
    background-color: var(--bg-secondary) !important; 
}

/* 2. NESTED BOX BACKGROUND FIX (Focus, Team, FAQ) */

/* Targets the individual cards/boxes inside sections */
.team-member,
.focus-box,
.accordion-item,
.accordion-body {
    background-color: var(--bg-secondary) !important;
}

/* Ensures the accordion button's default style changes */
.accordion-button {
    background-color: var(--bg-secondary) !important;
}

/* 3. GALLERY LAYOUT FIX */

/* Forces the gallery item containers to be squares */
.gallery .gallery-item {
    aspect-ratio: 1 / 1 !important;
    overflow: hidden !important;
}

/* Ensures the image fills the square container without stretching */
.gallery .gallery-item img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}
/* --- 1. CONTACT SECTION COLOR FIX (Dark Mode) --- */

/* Fixes the white background of the Location/Email box */
.contact-info {
    background-color: var(--bg-secondary) !important;
}

/* Fixes the white background of the section containing the embedded contact form */
.contact-form {
    background-color: var(--bg-secondary) !important;
}

/* --- 2. GALLERY LAYOUT FIX (Uniform Squares) --- */

/* Fixes the height/width of the container to be a perfect square */
.gallery .gallery-item {
    aspect-ratio: 1 / 1 !important; 
    overflow: hidden !important;
}

/* Ensures the image fills the square container without stretching */
.gallery .gallery-item img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}
/* --- GALLERY LAYOUT FIX (Final Robust Solution) --- */

/* Fixes the container to be a fixed square shape */
.gallery .gallery-item {
    height: 0 !important;
    padding-top: 100% !important; /* 1:1 Aspect Ratio (Square) */
    position: relative !important;
    overflow: hidden !important;
}

/* Fixes the image to fill the absolutely sized square */
.gallery .gallery-item img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}
#hero h1 {
    color: #ffffff !important; /* Force white for maximum visibility */
}

#hero h2 {
    color: rgba(255, 255, 255, 0.85) !important; /* Keep the subtitle soft white */
}
/* --- FIX: MOBILE NAVBAR LEGIBILITY IN DARK MODE --- */

/* Ensures the text color is white/light when the menu is expanded in dark mode. */
@media (max-width: 991px) { /* This media query targets mobile screens */
    body.theme-dark .navbar-collapse {
        /* Makes the expanded background the dark navbar color */
        background-color: var(--nav-bg) !important; 
    }

    body.theme-dark .navbar-collapse .navbar-nav .nav-link {
        /* Forces the link text to white/light for readability */
        color: var(--nav-text) !important; 
    }
}
/* --- 1. HAMBURGER MENU ICON FIX --- */

/* Overrides Bootstrap's default black SVG with a white one */
body.theme-dark .navbar-toggler-icon {
    /* This is the base64 SVG for three white lines */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* 2. DARK MODE TOGGLE ICON FIX */

/* Forces the button background to the dark theme color and ensures the icon text is white */
body.theme-dark #theme-toggle {
    background-color: var(--nav-bg) !important; 
    color: var(--nav-text) !important; /* Sets text/icon color to white */
    border-color: var(--nav-bg) !important; /* Hides the border in dark mode */
}

/* Ensures the icon element itself inherits the color */
body.theme-dark #theme-toggle i {
    color: var(--nav-text) !important; 
}
</style>