@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap');

@keyframes fadeInSlideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Playfair Display;
}

body {
    background-color: #f4f4f4;
}

/* HEADER STYLES */

.header {
    background-color: wheat;
    
    position: relative;
    text-align: center;
    align-items: center;
    flex-direction: column;
}

.header-content {
    display: flex;
    align-items: center;
    flex-direction: column;
    width: 100%;
}

.hamburger-menu {
    margin-left: auto;
    font-weight: bold;
}

.header-title {
    text-align: center;
    padding-top: 10px;
    font-size: clamp(1.5em, 4vw, 3.5em); /* Minimum 1.5em, scales with 5vw, max 3em */
    font-weight: bold;
    text-decoration: none;
    color: black;
}

.header-navigation-main {
    display: flex;
    position: relative;
}

.nav-container {
    display: flex; /* Align nav-items horizontally */
    position: relative; /* For dropdown positioning */
    flex: 1; /* Allows nav-container to stretch */
}

.nav-item {
    position: relative;
    padding: 10px 30px;
    cursor: pointer;
    z-index: 1; /* Ensure nav-item is above dropdown */
    font-size: 18px;
}

/* Create the half-height border with a pseudo-element */
.nav-item::after {
    content: ''; /* Generates an empty element */
    position: absolute;
    right: 0;
    top: 50%; /* Start at the middle of the element */
    transform: translateY(-50%); /* Vertically center the pseudo-element */
    width: 2px; /* Thickness of the border */
    height: 75%; /* Height is 50% of the parent element */
    background-color: black; /* Same color as your original border */
}

/* Remove the border for the last nav-item */
.nav-item:last-child::after {
    display: none;
}

.header-navigation-main a {
    text-decoration: none;
    color: black;
    display: flex;
}

.nav-item1 {
    border-left: none;
}

.nav-item-end {
    position: relative;
    padding: 10px 30px;
    cursor: pointer;
    z-index: 1; /* Ensure nav-item is above dropdown */
    border-radius: none;
    font-size: 18px;
}

.nav-item a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
}

.nav-item-end a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
}

.nav-item:hover {
    background-color: #f9f9f9;
}

.nav-item-end:hover {
    background-color: #f9f9f9;
}

/* Dropdown wrapper */
.dropdown-wrapper {
    
    position: absolute; /* Position dropdown relative to the nav-container */
    top: 100%; /* Position dropdowns directly below nav items */
    left: 0; /* Align dropdown to start at the left edge of nav-container */
    width: fit-content; /* Full width of the viewport */
    background-color: #e4e4e4;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 1000;
    display: inline-block; /* Stack dropdowns horizontally */   
}

/* Show dropdown wrapper when the 'visible' class is applied */
.dropdown-wrapper.visible {
    display: block;
}

/* Dropdown style */
.dropdown {


    flex: 1 1 auto; /* Flex grow and shrink for responsiveness */
    min-width: 900px; /* Minimum width for each dropdown */
    max-width: 900px;
    display: flex;
    flex-wrap: nowrap; /* Do not wrap content */
}


/* Dropdown headers */
.dropdown-headers {

    
   
    flex: 0 0 200px; /* Fixed width for dropdown-column */
    box-sizing: border-box;
    overflow-y: auto; /* Allows scrolling if content overflows */
    list-style: none;
    padding: 0;
    margin: 0;
    padding: 0px;
    border-right: solid grey;
    opacity: 0; /* Start with hidden items */
    animation: fadeInSlideDown 0.5s forwards; /* Apply the animation */
}

.dropdown-headers a {
    text-decoration: none;
    color: black;
}

.dropdown-headers ul {
    width: 100%;
    list-style: none;
}

.dropdown-headers li {
    padding: 10px;
    cursor: pointer;
    white-space: wrap; /* Prevent text wrapping */
    overflow: hidden; /* Hide overflowing text */
    text-overflow: ellipsis; /* Add ellipsis if text overflows */
    text-align: left;
}

.dropdown-headers li:hover {
    background-color: #f9f9f9;
    cursor: default;
}

.dropdown-subheaders {
    
    flex-wrap: wrap; /* Allow wrapping of ul elements */
    width: 200px;
    height: 100%;
    position: relative;  
    list-style: none;
    border-right: solid rgb(175, 175, 175);

    opacity: 0; /* Start with hidden items */
    animation: fadeInSlideDown 0.5s forwards; /* Apply the animation */
}

.visible {
    display: block;
}

.dropdown-subheaders.visible {
    display: block;
}

.dropdown-subheaders ul {
    list-style: none;
    width: 100%;
}

.dropdown-subheaders li {
    padding: 10px;
    white-space: wrap; /* Prevent text wrapping */
}

.dropdown-items li {
    padding-right: 0px;
}

.dropdown-items li a {
    text-decoration: none;
    color: #333;
    display: block;
}

.dropdown-items li a:hover {
    background-color: #f0f0f0;
}

.dropdown-items li:hover {
    background-color: #f0f0f0;
    cursor: default;
}

.dropdown-main {
    flex-wrap: wrap; /* Allow wrapping of ul elements */
    width: 100%;
    position: relative;  
    list-style: none;
    opacity: 0; /* Start with hidden items */
    animation: fadeInSlideDown 0.5s forwards; /* Apply the animation */
}

/* When the visible class is applied, display it */
.dropdown-main.visible {
    display: flex; /* Display when visible */
    flex-wrap: wrap;
    width: 100%;
    position: relative;
    list-style: none;
    opacity: 1;
    animation: fadeInSlideDown 0.5s forwards;
}

.main-category {
    width: 200px;
    font-weight: bold;
    margin-top: 10px;
    margin-bottom: 5px;
    text-align: center;
}

.dropdown-main ul {
    list-style: none;
    width: 200px;
    margin: 2px;
    display: flex; /* Use flex for the li items */
    flex-direction: column; 
}

.dropdown-main li a{
   padding: 10px;
}

/* Show dropdown-wrapper when hovering over any nav-item */
.nav-item:hover ~ .dropdown-wrapper, .dropdown-wrapper:hover {
    opacity: 1;
    transform: translateY(0); /* Slide to normal position */
    max-height: 1000px; /* Allow dropdown to expand fully */
    overflow: visible; /* Make content visible */
}


/* Show specific dropdown when hovering over nav-item */
.nav-item:hover + .dropdown-wrapper .dropdown, .dropdown-wrapper:hover .dropdown {
    display: flex;
}

.hidden {
    display: none;
}

/* Mobile styles */
.hamburger-menu {
    display: none; /* Hidden by default */
    cursor: pointer;
    font-size: 30px;
    padding: 10px;
    margin-left: auto; /* Push the hamburger to the right */
}

.mobile-dropdown {
    display: none; /* Hidden by default */
    flex-direction: column;
    background-color: #e4e4e4;
    position: absolute;
    top: 100%; /* Adjust based on your header height */
    width: 100%;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 1000;
    position: sticky;
}

.mobile-dropdown a {
    text-decoration: none;
    color: black;
}

.mobile-nav-item {
    padding: 20px;
    background-color: #e4e4e4;
    cursor: pointer;
    border-top: solid rgb(0, 0, 0);
    text-decoration: none;
    font-size: 1.5em;
}

.mobile-nav-item a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: #333;
    font-weight: 500;
}

.mobile-submenu {
    display: none;
    list-style-type: none;
    padding: 0px;
}

.mobile-nav-item.active .mobile-submenu {
    display: block;
}

.mobile-submenu-item {
    padding: 15px 0; /* Add spacing between items */
    border-top: solid rgb(0, 0, 0, 0.1);
    font-size: 1.25em;
    font-weight: 400;
}

.mobile-submenu-item:hover {
    background-color: #f4f4f4;
    cursor: pointer;
}

.mobile-submenu-item a {
    text-decoration: none;
    color: #333;
    display: block;
}

.mobile-main-item {
    padding: 10px 0; /* Add spacing between items */
}

.mobile-main-item:hover {
    background-color: #f4f4f4;
}

.mobile-main-item a {
    text-decoration: none;
    color: #333;
    display: block;
}

.mobile-nav-item:hover {
    background-color: #f4f4f4;
}

@media (max-width: 810px) {
    .nav-container {
        display: none; /* Hide main nav on small screens */
    }
    .hamburger-menu {
        display: block; /* Show hamburger menu on small screens */
    }
}

.mobile-main {
    display: none;
}




/* FOOTER STYLES */

.sticky-footer {
    position: relative;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: wheat;
    color: rgb(0, 0, 0);
    padding: 10px 20px;
    display: flex;
    justify-content: center;
    box-sizing: border-box;  /* Ensure padding is included in width calculations */
    overflow-x: hidden;      /* Prevent horizontal overflow */
}

.footer-container {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 100%;         /* Ensure the container does not exceed the screen width */
    flex-wrap: wrap;         /* Allow columns to wrap on small screens */
    box-sizing: border-box;  /* Include padding in the width calculation */
}

.ref {
    text-decoration: underline;
    color: black;
}

.footer-column {
    flex: 1;
    padding: 0 10px;
    box-sizing: border-box;
}
.footer-column a {
    text-decoration: none;
    color: black;
}

.footer-title{
    margin: 0;
    text-align: center;
    margin-bottom: 5px;
    font-size: clamp(0.75em, 5vw, 2em);
}

.footer-column ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    text-align: center;
}

.footer-column ul li {
    margin-bottom: 5px;
    
}

.footer-column ul li a {
    text-decoration: none;
    color: rgb(0, 0, 0);
}

.footer-column ul li:hover {
    text-decoration: underline;
    cursor: pointer;
}

html {
    position: relative;
}





/* CONTENT SECTION STYLES */

.base-colour{
    width: 100%;
    height: fit-content;
    background-color: rgb(43, 43, 43);
}

.content-container {
    max-width: 100%;
    margin: 0 auto;
    background-color: rgb(43, 43, 43);
}

/* For screens wider than 768px, set content-container width to 50% */
@media (min-width: 810px) {
    .content-container {
        width: 60%;
    }
}

.content-section {
    font-size: clamp(1em, 1vw, 5em); /* Minimum 1.5em, scales with 5vw, max 3em */
    margin: 0 auto;
    border: rgb(207, 207, 207) solid 2px;
    border-radius: 8px;
    background-color: rgb(207, 207, 207);
    padding: 1em;
    overflow-wrap: break-word;
    word-wrap: break-word;
    overflow-x: auto; /* Adds horizontal scroll if needed */
    text-decoration: none;
    opacity: 0;
    transition: all 1s;
    filter: blur(5px);
    transform: translateX(-100%);
}



/* Media query for screens less than 1284px wide */
@media (max-width: 810px) {
    .content-section {
        opacity: 1;
        filter: none;
        transform: none;
        transition: none; /* Remove transition on mobile */
    }
}

.show {
    opacity: 1;
    filter: blur(0px);
    transform: translateX(0);
}

.math-container {
    overflow-x: auto; /* Adds horizontal scroll if needed */
    white-space: nowrap; /* Prevents line breaks within the container */
    width: 100%; /* Ensures the container takes full width */
}

.content-section a {
    color: black;
    text-decoration: none;
}

.link a{
    text-decoration: underline;
} 

.horizontal-rule {
    border: none;
    height: 3px;
    background-color: #505050;
    border-radius: 5px;
    width: 75%;
    margin: 0 auto;
}

.header-rule {
    border: none;
    height: 2px;
    background-color: #000000;
    border-radius: 5px;
    width: 100%;
    margin: 0 auto;
}

.mobile-header {
    padding: 10px;
    font-size: 1.3em;
    font-weight: 500;
    text-decoration: underline;
}

.mobile-subheader {
    padding: 10px;
    font-size: 1.2em;
    font-weight: 500;
}

.header-mobile-rule {
    border: none;
    height: 2px;
    background-color: #333;
    margin-bottom: 2px;
    width: 50%;
    margin: 0 auto;
}

.content-section-header {
    font-size: clamp(1.5em, 5vw, 3em); /* Minimum 1.5em, scales with 5vw, max 3em */
    font-weight: 500;
    text-align: center;
    padding: 10px;
}

.content-section-subheader {
    font-size: clamp(1.5em, 5vw, 2.5em); /* Minimum 1.5em, scales with 5vw, max 3em */
    font-weight: 300;
    text-align: center;
}

.content-section-box{
    width: 50%;
    padding: 1em;
    background-color: bisque;
    border-top: solid black;
    border-bottom: solid black; 
    border-right: solid black;
}

.page-title {
    font-size: clamp(1.5em, 5vw, 3em); /* Minimum 1.5em, scales with 5vw, max 3em */
    font-weight: 600;
    color: #000000;
    text-align: center;
   padding: 10px;
    word-break: break-word;
}

.column-section {
    display: flex;
    gap: 10px;
    margin-left:  auto;
    align-content: center;
    justify-content: center;
    max-width: 100%;
    display: flex; 
}

.column-header {
    font-weight: 700;
    font-size: clamp(0.4em, 5vw, 1.2em);
    text-align: center;
}

.column-border {
    border-right: solid rgb(51, 51, 51) 2px;

}

.column {
    flex: 1;
    width: 50%;
}


@media (max-width: 810px) {
    .column-section {
        flex-direction: column; /* Stack columns vertically */
    }
    
    .column {
        margin-bottom: 20px; /* Add space between stacked columns */
        width: 100%;
    }
}

.quote-container {
    text-align: center;
    padding: 20px;
    background-color: rgb(207, 207, 207);
    border-radius: 8px;
}

.quote {
    font-size: 1.5rem;
    font-style: italic;
    color: #333;
    overflow: hidden;
    white-space: pre-wrap;
}

.author {
    font-size: 1.2rem;
    margin-top: 10px;
    color: #000000;
    font-weight: 500;
    opacity: 0; /* Hidden initially */
            transition: opacity 1s ease-in;
}

.page-navigation {
    color: rgb(180, 180, 180); 
    display: flex;
    font-size: clamp(0.2em, 5vw, 0.9em); /* Minimum 1.5em, scales with 5vw, max 3em */
}

.page-navigation a {
    text-decoration: none;
    color: rgb(214, 214, 214);
}

.page-navigation-and-search {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.content-section ul li {
    list-style-position: inside; /* Ensures bullets are inside the content box */
    padding-left: 0; /* Removes default padding for list */
}

/* TABLE STYLES     */

.table-container {
    width: 100%;
    overflow-x: auto;
    margin: 0 auto;
}

table {
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    table-layout: auto;
}

th {
    background-color: grey;
}

table, th, td {
    border-bottom: 2px solid black;
    border-collapse: collapse;
    text-align: center;
}

.hh {
    background-color: grey;
}

th, td {
   padding: 10px;
}


.box {
    display: flex;
    align-items: center;
    padding: 20px;
    width: 100%; /* Adjust as needed */
    border-bottom: solid black;
}

.box-image {
    width: 25%; /* Adjust size as needed */
    height: 100%;
    margin-right: 15px; /* Spacing between image and text */
    border-right: solid black;
}

.box-text {
    flex-grow: 1; /* Ensures the text fills remaining space */
}

.box a{
    font-weight: 600;
    text-decoration: underline;
}







/* BUTTON STYLING */

.button-default {
    width: 100%;
    height: auto;
    display: flex;
    align-items: center;
    border: none;
    border-bottom: solid black 1px;
    background-color: rgb(207, 207, 207);
    text-decoration: none;
    background-image: linear-gradient(to right, rgb(207, 207, 207) 50%, rgb(189, 189, 189) 50%);
    background-size: 200% 200%;
    transition: 0.15s ease-out;
}

.button-default-icon {
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    border-right: #757575 solid 2px;
}

.button-default-text {
    padding: 10px;
    display: flex;
    text-align: left;
    font-size: clamp(0.5em, 5vw, 1.1em); /* Minimum 1.5em, scales with 5vw, max 3em */
    text-decoration: none;
}

.button-default-arrow {
    padding: 10px;
    display: flex;
    align-items: right;
    justify-content: right;
    margin-left: auto;
    font-size: clamp(1em, 5vw, 2em); /* Minimum 1.5em, scales with 5vw, max 3em */
}


.button-default:hover {
    background-position: right;
    cursor: pointer;
    font-weight: bold;
}

/* Disable hover styles on small screens */
@media (max-width: 400px) {
    .button-default:hover {
        background-position: initial; /* Reset background animation */
        font-weight: normal; /* Disable bold font on hover */
    }
}



.button-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    padding: 10px;
}

/* Limit the grid to 3 columns maximum */
@media (min-width: 1024px) {
    .button-container {
        grid-template-columns: repeat(3, 1fr); /* 3 equal columns */
    }
}

a.button {
    color: black;
}
@media (max-width: 810px) {
    button, a.button {
        color: black; /* Ensure text color is black on mobile */
    }
}


.calculatorAndUnitConversionButton {
    font-size: 1.0em;
    font-weight: 600;
    padding: 15px;
    cursor: pointer;
    border-radius: 5px;
    border: 1px solid black;
}

.calculatorAndUnitConversionButton:hover {
    background-color: #ffffff;
}

.form-container {
    overflow: auto;
    width: 100%;
}

.calculatorAndUnitConversionDropdown {
    padding: 10px;
    width: 100%;
    height: fit-content;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 5px;
    background-color: #ffffff;
    color: black;
    border: #00000044 solid;
}

/* Flex container to hold the input and select together */
.input-group {
    width: 100%;
    padding: 20px;
    height: fit-content;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: solid black 2px;  /* Add border to the entire group */
    border-radius: 5px;       /* Optional: for rounded corners */
    overflow: hidden;         /* Ensures the elements stay inside the border */
    background-color: rgb(189, 189, 189, 0.1);
    margin-bottom: 10px;
    text-decoration: none;
    font-weight: 500;
}

.result-section {
    width: 100%;
    padding: 20px;
    height: fit-content;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: solid black 3px;  /* Add border to the entire group */
    border-radius: 5px;       /* Optional: for rounded corners */
    overflow: hidden;         /* Ensures the elements stay inside the border */
    background-color: rgb(189, 189, 189, 0.1);
    margin-bottom: 10px;
    text-decoration: none;
    font-weight: 500;
}

.center {
    text-align: center;
}


.inputy {
    width: 100%;
    display: flex;
    align-items: center;
    border: #00000044 solid;
    border-radius: 5px;
    text-decoration: none;
    background-color: white;
    color: white;
}

.result {
    width: 100%;
    height: fit-content;
    display: flex;
    align-items: center;
    border: #00000093 solid;
    border-radius: 5px;
    text-decoration: none;
    background-color: white;
    color: white;
}

/* Styling for the input */
.calculatorAndUnitConversionInput {
    flex: 1;                  /* This makes the input span available space */
    padding: 10px;
    border: none;             /* Remove individual border */
    outline: none;            /* Remove outline on focus */
    color: black;
    font-size: 16px;
}

/* Styling for the select dropdown */
.unit-dropdown {
    width: 25%;              /* Let the dropdown take as much space as it needs */
    padding: 9px;
    border: none;             /* Remove individual border */
    outline: none;
    background-color: white;
    color: black;
    font-size: 16px;    
}



.calculatorAndUnitConversionInput, .unit-dropdown {
    box-sizing: border-box;
}

@media (max-width: 600px) {
    .unit-dropdown {
    width: 25%;              /* Let the dropdown take as much space as it needs */
    padding: 9px;
    border: none;             /* Remove individual border */
    outline: none;
    background-color: white;
    color: black;
    font-size: 16px; 
    }
}

.inputy:focus-within {
    border: #000000 solid;
}

.calculatorAndUnitConversionDropdown:focus-within {
    border: #000000 solid;
}



.content-section ul {
    padding-left: 10px;
}
.content-section li {
    padding-bottom: 10px;
}



.unit-dropdown:hover {
    background-color: #e2e2e2;
    cursor: pointer;
}


/* Basic styling for input fields */
input[type="number"] {
    padding: 10px;
    border-radius: 25px;
    border: none;
    width: fit-content;
    margin-bottom: 10px;
}

/* Input field focus styling */
input[type="number"]:focus {
    border-color: #96a8bb; /* Change border color on focus */
    outline: none; /* Remove default outline */
}





/* FEEDBACK FORM STYLES     */

.contact-inputs {
    width: 75%;
    height: 5vh;
    border: none;
    outline: none;
    border-radius: 5px;
    padding: 5px;
}

.contact-feedback {
    height: 20vh;
    width: 75%;
    resize: none;
}

.contact-inputs:focus {
    border: 2px solid black;
}

.contact-button {
    display: flex;
    align-items: center;
    padding: 15px 30px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    justify-content: center;
    color: #000000;
}

.contact-button:hover {
    background-color: #c2c2c2;
}


#feedback-form {
    display: flex;
    flex-direction: column;
    align-items: center;
}






/* SEARCH BAR STYLES */

.search {
    margin-right: 0;
    width: 100%;
    display: flex;
    align-items: center;
    padding: 5px;
    border-radius: 28px;
    background-color: #f6f6f6;
}

.search:focus-within{
    border: solid rgb(59, 59, 59) 1px;
}

.search-input {
    margin-left: 14px;
    outline: none;
    border: none;
    background: transparent;
    flex: 1;
}

.search-icon {
    font-weight: 900;
    align-items: center;
    justify-content: center;
}

.hide {
    display: none;
}

.highlight {
    background-color: yellow; /* Choose a color that fits your design */
    border-radius: 3px; /* Optional: adds a rounded corner to the highlight */
    padding: 0 2px; /* Optional: adds some padding around the highlighted text */
}

/* Container holding search form and navigation */
.search-and-navigation-container {
    display: flex; /* Use flexbox to align items */
    justify-content: space-between; /* Space between search form and navigation */
    align-items: center; /* Center align vertically if needed */
    padding: 5px; /* Optional padding */
    width: 100%;
}

/* Style the search form container (if needed) */
#search-form {
    width: 30%; /* Allow search form to take up remaining space */
}

/* Style the alphabet navigation */
.alphabet-navigation {
    display: flex; /* Use flexbox to align links horizontally */
    flex-wrap: wrap; /* Allow wrapping of the letters */
    justify-content: left; /* Align items to the right */
}

.alphabet-navigation a {
    margin: 0px 5px; /* Space between each letter */
    padding: 5px 10px;
    
    color: #333; /* Or your desired color */
    font-weight: bold;
}

.alphabet-navigation a:hover {
    background-color: #f0f0f0; /* Highlight on hover */
    border-radius: 4px;
}