@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,700;1,300;1,400;1,700&display=swap');
/* @import url(https://db.onlinewebfonts.com/c/f05f148ec6596f0b75375fa566aaf1fe?family=Bely+Display+W00+Regular);*/
@import url(https://db.onlinewebfonts.com/c/2f9e0418fd05fea16ffa248e6ef1646d?family=Bely);
/* --- FONT FACE DEFINITIONS --- */
@font-face {
    font-family: "Bely";
    src: url("https://db.onlinewebfonts.com/t/2f9e0418fd05fea16ffa248e6ef1646d.eot");
    src: url("https://db.onlinewebfonts.com/t/2f9e0418fd05fea16ffa248e6ef1646d.eot?#iefix")format("embedded-opentype"),
    url("https://db.onlinewebfonts.com/t/2f9e0418fd05fea16ffa248e6ef1646d.woff2")format("woff2"),
    url("https://db.onlinewebfonts.com/t/2f9e0418fd05fea16ffa248e6ef1646d.woff")format("woff"),
    url("https://db.onlinewebfonts.com/t/2f9e0418fd05fea16ffa248e6ef1646d.ttf")format("truetype"),
    url("https://db.onlinewebfonts.com/t/2f9e0418fd05fea16ffa248e6ef1646d.svg#Bely")format("svg");
}
:root {
    --base-font-size: 16px; /* Default font size */
}

body {
    font-size: var(--base-font-size);
}

.language-font-container {
	margin-left: 20px;
    margin-right: 20px;
    margin-top: 20px;
}

.font-button {
	width: 40px;
    height: 40px;
    font-size: 20px;
    margin: 5px;
    cursor: pointer;
    background-color: #fff;
    color: #C10000;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

@font-face {
  font-family: 'Arimo';
  src: url('font/Arimo-Bold.ttf') format('ttf');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* In styles.css or word.css */

/* Define a default/base size (medium) for 'rem' units */
:root {
    font-size: 16px; /* Base for rem units, for 'medium' */
}

/* 1. SMALLER TEXT */
html.text-size-small {
    font-size: 14px; /* Smaller base for rem */
}

/* 2. MEDIUM TEXT (Default) */
html.text-size-medium {
    /* Base size is already 16px from :root, but we can set it explicitly */
    font-size: 16px;
}

/* 3. LARGE TEXT */
html.text-size-large {
    font-size: 18px; /* Larger base for rem */
}

/* 4. EXTRA LARGE TEXT */
html.text-size-xlarge {
    font-size: 20px; /* Even larger base for rem */
}

/*
   NOTE: You need to ensure the font sizes for all your elements (like h1, p, a, etc.)
   are defined using 'rem' units so they scale with the html font-size.
   
   For example, instead of:
   h1 { font-size: 24px; }
   
   Use:
   h1 { font-size: 1.5rem; } (1.5 * 16px = 24px)
*/


/* Optional: Style the new buttons */
.text-size-controls-container {
    border-top: 1px solid #ccc;
    padding-top: 10px !important; /* Use !important if needed to override existing padding */
}

#imageModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    z-index: 9998;
}

#closeImageModal {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    z-index: 9999;
    user-select: none;
    transition: color 0.3s ease;
}

#closeImageModal:hover {
    color: #C10000;
}

#modalImageContent {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
    user-select: none;
    transition: transform 0.1s ease-out;
}

.zoom-controls {
    position: absolute;
    bottom: 30px;
    display: flex;
    gap: 15px;
    z-index: 9999;
}

.zoom-controls button {
    padding: 12px 24px;
    background: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.zoom-controls button:hover {
    background: #C10000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7);
}

.zoom-controls button:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

.size-button {
    background-color: #8b0000;
    color: white;
    border: none;
    padding: 5px 10px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
    width: 45px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 0;
    gap: 8px;
  }
  
  .back-btn:hover {
    opacity: 0.8;
  }
  
  .back-icon {
    width: 18px; /* adjust to match your image */
    height: 18px;
    vertical-align: middle;
  }
  

h1, h2, h3, h4, h5, h6 {
    font-family: "Bely";;
}
.headword-button-container {
    margin: 20px;
    padding: 10px;
    background-color: #F2F4F7;
    border-radius: 8px;
}

#headwordButtons h3 {
    margin-bottom: 15px;
    margin-left: 15px;
    color: #333;
}


.button-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.headword-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: #F2F4F7;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.headword-button:hover {
    background-color: #F2F4F7;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}
.category-main-image {
    max-width: 100%;
    width: 500px;
    height: auto;
    border-radius: 8px;
    margin-bottom: 10px;
    object-fit: contain;
}
.back-icon {
    width: 24px;
    height: 24px;
    background: none;
}
#categoryImage {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.button-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 12px;
    height: 24px;
    background-color: #C10000;
    color: #ffffff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    margin: 0;
    padding: 0 6px;
}

.button-text {
    color: #333;
    font-weight: 500;
}
/* 1. Modal Overlay Container */

/* --- Category Browse Bar Styling (Matching the Red Bar) --- */

.category-browse {
    display: flex;
    gap: 15px;
    background-color: #c10000;
    padding: 10px 10px;
    border-radius: 8px;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    
}

.category-browse p {
    color: white;
    margin: 0;
    font-size: 0.7em;
    
}

/* --- Dropdown Styling (The <select> element) --- */
.filter-dropdown { 
	padding: 8px 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: white;
    color: #333;
    /* font-family: Arial, sans-serif; */
    font-size: 0.7em;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    /* appearance: none; */
    background-image: url(data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23000000%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-6.5%200-12.3%203.3-15.8%208.5-3.5%205.2-3.1%2011.7%201%2016.9l139.1%20139.1c5.8%205.8%2015.2%205.8%2021%200l139.1-139.1c4.1-5.2%204.4-11.7%20.9-16.9z%22%2F%3E%3C%2Fsvg%3E);
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
    min-width: 150px;
    width: 200px;
}

.filter-dropdown:focus {
    outline: none; 
    border-color: #7b7b7b; 
    box-shadow: 0 0 0 2px rgba(203, 61, 50, 0.4); 
}

/* --- Content & Pagination Styling --- */

#wordListItems {
    min-height: 100px;
    padding: 10px 0;
}

#paginationControls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 24px;
    gap: 12px;
}

/* 1. CONTAINER: Makes the results box float right below the input */
#predictiveResultsContainer {
    position: absolute;
    top: 55px;
    left: 25px;
    z-index: 1000;
    width: calc(100% - 50px);
    max-width: 350px;
    align-items: center;
    max-height: 500px;
    overflow-y: auto;
    background-color: #ffffff;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.search-container {
    position: relative;
    /* ... other styles */
}

@media (max-width: 480px) {
    #predictiveResultsContainer {
        left: 25px;
        width: calc(100% - 50px);
        max-width: unset;
    }
}

/* 2. INDIVIDUAL RESULT ITEMS: Styling the clickable rows */
.predictive-result {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    line-height: 1.4;
    font-size: 0.95em;
    transition: background-color 0.2s;    
    overflow: hidden;
    text-overflow: ellipsis;
}

.predictive-result:last-child {
    border-bottom: none;
}

.predictive-result:hover {
    background-color: #f0f0f0;
}

/* 4. TEXT STYLES (based on your JS structure) */
.predictive-result > div:nth-child(2) {
    font-size: 0.8em;
    color: #6b7280;
    margin-top: 2px;
}

/* 5. FIX for the search input container alignment */
.search-container {
    position: relative; 
}

/* Styling for the main list container (e.g., a div wrapping the list) */
.search-history-container {
    padding: 20px;
    font-family: Arial, sans-serif;
}

/* Style the individual list item */
.history-item {
    list-style: none; /* Remove bullet points */
    display: flex; /* Use flexbox for alignment */
    justify-content: space-between; /* Push link to the left, icon to the right */
    align-items: center;
    padding: 10px 0;
    margin: 0;
    border-bottom: 1px solid #ccc; /* Add the separator line */
    font-family: 'bely-display';
    text-decoration: none;
}

/* Style the last item to remove the bottom line */
.history-item:last-of-type {
    border-bottom: none; 
}

/* Style the clickable search term */
.history-term {
    text-decoration: none; /* Remove underline */
    color: #333; /* Darker text color */
    font-size: 16px;
    font-weight: 500; /* Slightly bold for prominence */
}

/* Style the eye icon */
.eye-icon {
    color: #888; /* Gray color for the icon */
    font-size: 18px; /* Adjust size as needed */
    width: 20px;
}

/* Style the eye icon */
.favorite-icon {
    color: #888; /* Gray color for the icon */
    font-size: 18px; /* Adjust size as needed */
    width: 20px;
    margin-left: 10px;
}

.right-merge {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-direction: row;
    margin-top: 10px;
}

/* --- Alphabetical Header (e.g., the red 'A' bar) --- */
.alpha-header {
    background-color: #cb3d32; /* Same red as the filter bar */
    color: white;
    font-size: 1.5em;
    font-weight: bold;
    padding: 8px 20px;
    margin: 15px 0 0 0; /* Space above, no space below */
    border-radius: 5px 5px 0 0; /* Round top corners only */
}

/* --- Word List Internal Structure --- */
.word-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.headword-base {
    font-size: 1.3em;
    font-weight: bold;
    color: #333; /* Dark color for headword */
    margin: 0;
}

.word-details {
    font-size: 0.9em;
    color: #666; /* Gray color for details */
}

.part-of-speech, .category {
    font-style: italic;
    color: #888; /* Lighter gray for practical/category */
}

.bullet-separator {
    margin: 0 5px;
    color: #ccc;
}

.right-merge img {
    width: 20px;
    height: 20px;
    margin-left: 10px;
    opacity: 0.6; /* Grayed-out icons */
    transition: opacity 0.2s;
}

/* --- Top Control Bar (Sort/Filter/Results) Styling --- */
.top-control-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0; /* Add padding if needed */
    background: #E2E2E2;
}

.sort-button, .filter-button-main {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
    
    margin-top: 0px;

}

/* Style for the active Filter button */
.filter-button-main {
    background-color: #c10000; /* Red color from the image */
    color: white;
    display: flex;
    align-items: center;
}

.filter-button-main::before {
    content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white" width="16px" height="16px"><path d="M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"/></svg>');
    margin-right: 5px;
    display: block;
}

/* Style for the Sort button (A -> Z button) */
.sort-button {
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ccc;
    margin-left: 20px;
    margin-top: 0px;

}

.sort-order {
    font-weight: normal;
    margin-left: 5px;
}

.result-count {
    margin-left: auto; /* Pushes the count to the right */
    font-weight: bold;
    color: #555;
    margin-right: 20px;
}

/* Example CSS for the new section header */
.word-section-header {
    background-color: #c10000; /* A deep red color */
    color: white;
    padding: 8px 15px;
    margin-top: 15px; /* Space above the section */
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}

.section-letter {
    font-size: 1rem;
    font-weight: bold;
    margin: 0; /* Remove default margin from the h2 */
    display: inline-block;
}

/* --- Modal (Popup) Styles --- */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000; /* Ensure it's on top of everything */
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 400px;
    text-align: center;
    margin-top: 300px;
    padding-right: 20px;
    padding-left: 20px;
    padding-top: 20px;
    padding-bottom: 20px;
}

.modal-content h3 {
    margin-top: 0;
    color: #333;
    font-size: 1.5em;
}

.range-controls {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin: 20px 0;
    gap: 15px;
}

.alphabet-select {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
    min-width: 80px;
}

.modal-actions {
    margin-top: 20px;
    display: flex;
    justify-content: space-around;
}

.button-primary, .button-secondary {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.button-primary {
    background-color: #cb3d32; /* Primary red color */
    color: white;
}

.button-primary:hover {
    background-color: #a82e25;
}

.button-secondary {
    background-color: #eee;
    color: #333;
    border: 1px solid #ccc;
}

.button-secondary:hover {
    background-color: #ddd;
}

/* Style for the active range display on the main filter button */
.range-display {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 5px;
}

/* Style the "Clear history" button */
.clear-history-button {
    margin-top: 20px;
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #f0f0f0;
    cursor: pointer;
    font-size: 14px;
    /* Center the button, if needed */
    display: block;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

/* Example block & Duplicates Merged */
.example-block {
    border-left: 5px solid white;
    padding-left: 1rem;
    margin-top: 1rem;
}

/* Custom background pattern (Main Red Color: #CC2936) */
.card-bg {
  background: #fff /* Combined background-color and background-image */
}

/* Card Styles */
#word-card {
    /* Assuming a white or light background and rounded corners on the body/container */
    border-radius: 25px;
    background-color: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin: 20px auto;
    overflow: hidden; /* Important to contain the red header */
    margin-left: 20px;
    margin-right: 20px;
}

/* Red Header Area */
.word-card-header {
    background: #CC2936 url(bg.svg);
    padding: 20px;
    position: relative;
    color: white;
    box-shadow: inset 0 -5px 10px rgba(0, 0, 0, 0.1);
    /* For the subtle patterned look, you'd use a repeating background image/SVG */
}

/* Header Text (Secondary Label) */
#header-text {
    font-size: 0.875rem;
    border-radius: 10px;
    font-weight: 700;
/*    letter-spacing: 0.1em; */
/*    text-transform: uppercase; */
    margin-bottom: 1rem;
    color: #A6192E;
    background: #fff;
    max-width: 150px;
    padding: 5px;
    display: flex
;
}

/* Flex container for English/Tongan terms */
.header-terms-container {
    display: flex;
    align-items: flex-end;
    margin-bottom: 0.75rem;
    margin-left: 20px;
    align-content: flex-start;
    flex-wrap: nowrap;
    flex-direction: row;
}

#english-term {
    font-size: 1.5rem;
    border-right: 2px solid white;
    color: #A6192E;
}

/* Part of Speech & Definition Label */
#part-of-speech, #tongan-term {
	font-size: 1.125rem;
	/* font-family: "Bely";; */
    font-weight: 500;
    /* color: #A6192E; */
    margin-left: 20px;
}

#definition-label {
font-size: 1rem;
    /* font-family: "Bely";; */
    font-weight: 500;
    /* color: #A6192E; */
    margin-left: 20px;
    font-weight: 700;
}

/* Separator and Source Label Container */
.separator-container {
    display: flex;
    color: #A6192E;
    align-items: center;
}

/* Separator Line */
.separator-container > span {
    height: 2px;
    background-color: #A6192E;
    width: 5%;
    margin-right: 1rem;
    opacity: 0.3;
        margin-left: 20px;
}

/* Source Label */
.separator-container > p {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0.7;
    white-space: nowrap;
        /* font-family: "Bely";; */
    
}

/* Example Block Paragraphs */
.example-block p {
    border-left: 5px solid white;
    padding-left: 1rem;
    margin-top: 1rem;
    margin-left: 0px;
        /* font-family: "Bely";; */
}

.example-block p span.font-bold {
    font-weight: 700;
}

/* Audio Player Container and Note */
.audio-container {
    margin-top: 2rem;
    margin-left: 20px;
    margin-right: 20px;
    margin-bottom: 20px;
}

.audio-container p {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 0.25rem;
    font-style: italic;
}

/* Audio Player Element */
#audio-player {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 9999px;
}

/* Button Container */
.button-container {
    margin-top: 2rem;
    text-align: center;
}

/* Overlay */
.overlay {
  /* Combined background properties using shorthand */
  background: rgba(0, 0, 0, 0.8) url(initial-load.svg) top left / cover repeat-y fixed;
  position: fixed;
  inset: 0; /* Shorthand for top: 0, left: 0, width: 100%, height: 100% */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1100;
  transition: opacity 0.5s ease-in-out;
}

.overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Hide the overlay on iPads and tablets */
@media (min-width: 768px) and (max-width: 1024px) {
  .overlay {
    display: none;
  }
}

/* Language Selection Box Styles */
.language-selection-box {
  text-align: center;
}

.language-selection-box h2 {
  font: bold 24px/1 sans-serif; /* Simplified font properties (assuming 'sans-serif' as fallback) */
  margin-bottom: 16px;
  color: #1f2937;
}

.language-selection-box p {
  color: #4b5563;
  margin-bottom: 24px;
}

.language-switcher-container-open {
  display: flex;
  justify-content: center;
  margin-top: 350px;
}

/* Unified Sidebar */
#unifiedSidebar {
  position: fixed;
  top: 0;
  right: -400px; /* Hidden by default */
  width: 400px;
  height: 100%;
  background-color: #f0f0f0;
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
  transition: right 0.3s ease;
  z-index: 1000;
  padding: 20px;
  overflow-y: auto;
}

/* Sidebar Headings */
#unifiedSidebar h2 {
  font-size: 1.5em;
  border-bottom: 2px solid #ccc;
  padding-bottom: 5px;
  margin-top: 20px;
}

/* Filter and Share Buttons (Consolidated Identical Styles) */
.share-button,
.filter-button {
  padding: 0.5rem 1rem;
  border: 1px solid #ccc;
  border-radius: 999px;
  background-color: #f1f1f1;
  color: #000;
  cursor: pointer;
  font-size: 0.875rem;
  transition: background-color 0.2s, color 0.2s;
}

/* Filter Container */
.filter-container {
  display: flex;
  flex-flow: row wrap; /* Simplified flex-direction, flex-wrap */
  gap: 0.5rem;
  align-items: flex-end; /* Kept specific alignment */
  justify-content: flex-start;
  align-content: center;
}

/* Style for selected/active buttons */
.filter-button.active-filter {
  background: #FFEEF0;
  border-color: #FFD5DA;
  color: var(--brand);
}

/* List Items */
#combinedList li {
  padding: 10px 0;
  border-bottom: 1px dashed #ddd;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Links */
.combined-term {
  text-decoration: none;
  color: #333;
  font-size: 1.1em;
}

/* Remove and Close Buttons (Consolidated Similar Styles) */
.remove-item,
#closeUnifiedSidebarButton {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2em; /* Adjusted close button size slightly to match remove */
}

/* Remove button specific style */
.remove-item {
  color: red;
  font-weight: bold;
}

/* Close button specific style */
#closeUnifiedSidebarButton {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 1.5em; /* Restore original size for close button */
}

/* Filter and Menu Icons (Consolidated Identical/Similar Styles) */
.filter,
.menu {
  position: fixed;
  width: 30px;
  height: 40px;
  top: 35px;
  padding-top: 30px;
  z-index: 2000;
  filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.5));
}

.filter {
  right: 15px;
}

.menu {
  left: 15px;
}

/* Button Container */
.button-container {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    /* Combined transition for smooth hiding/showing */
    transition: all 0.5s ease-out;
}

.button-container.hide-buttons {
    opacity: 0;
    transform: translateY(50px);
    pointer-events: none;
    height: 0;
    margin-top: 0;
    overflow: hidden;
}

/* Initial state of the app container */
.app-container {
    display: flex; /* Added display: flex for proper flex-direction to work */
    flex-direction: column;
    align-items: center;
    transition: all 0.7s ease-in-out;
    margin-bottom: auto;
    background-color: #A71C20;
    background-image: url(pattern-background-02.svg);
    place-items: center;
    margin-top: unset;
    padding-top: 90px;
}

/* Logo and Title Container */
#logo-title-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 40px;
    transition: all 0.7s ease-in-out, opacity 0.5s ease-out;
    text-align: center;
    
}

.page-container-hide {
    display: none;
}

#logo-title-container.hide-logo {
    opacity: 0;
    transform: translateY(-150px) scale(0.8);
    pointer-events: none;
    height: 0;
    margin-bottom: 0;
    overflow: hidden;
}

/* Shifts the app-container upwards when search is active */
body.search-active .app-container {
    align-items: flex-start;
    margin-top: 5vh;
    margin-bottom: auto;
    padding-top: 45px;
}

/* Results Container */
#results {
    opacity: 0;
    transform: translateY(20px);
    /* Consolidated transition with delays */
    transition: opacity 0.5s ease-out 0.6s, transform 0.5s ease-out 0.6s;
}

#results.show-results {
    opacity: 1;
    transform: translateY(0);
    width: 100%;
}

#loading-indicator {
    display: none;
    text-align: center;
    margin-top: 20px;
    color: #6b7280;
}

#loading-indicator.show {
    display: block;
}

.icons {
    height: 24px;
    width: 30px;
}

/* Tabs */
.tabs-container {
    display: flex;
    justify-content: center;
    width: 100%;
    background-color: #fff;
    border-bottom: 1px solid #ddd;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-top: 20px;
    place-items: center;
    flex-wrap: nowrap;
}

.tab-button {
    padding: 15px 25px;
    cursor: pointer;
    font-weight: bold;
    color: #555;
    background-color: transparent;
    border: none;
    outline: none;
    font-size: 1.1em;
    transition: color 0.3s ease, background-color 0.3s ease;
}

.tab-button:hover {
    color: #8B0000;
}

.tab-button.active {
    color: #8B0000;
    border-bottom: 3px solid #8B0000;
    background-color: #fefefe;
}

/* Base styling for the main content area */
.content-area {
    padding: 20px;
    max-width: 960px;
    margin: 0 auto;
    min-height: 500px;
    box-sizing: border-box;
    width: 100%;
}

/* Styling for individual content sections */
.content-section {
    display: none;
    padding: 20px 0;
    line-height: 1.6;
    color: #333;
}

.content-section.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

/* Headings within content sections */
.content-section h2 {
    color: #8B0000;
    font-size: 2em;
    margin-bottom: 15px;
    border-bottom: 2px solid #D9B380;
    padding-bottom: 10px;
}

.content-section h3 {
    color: #A32C2C;
    font-size: 1.5em;
    margin-top: 25px;
    margin-bottom: 10px;
}

/* Paragraphs, Lists, and List Items within content sections */
.content-section p,
.content-section ul,
.content-section ol {
    margin-bottom: 1em;
}

.content-section ul,
.content-section ol {
    margin-left: 20px;
}

.content-section li {
    margin-bottom: 0.5em;
}

/* Keyframe animation for a smooth fade-in effect */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .content-area {
        padding: 15px;
    }

    .tab-button {
        padding: 10px 15px;
        font-size: 1em;
    }

    .content-section h2 {
        font-size: 1.8em;
    }

    .content-section h3 {
        font-size: 1.3em;
    }
}

@media (max-width: 480px) {
    .content-area {
        padding: 10px;
        margin: 0 10px;
    }

    .tab-button {
        padding: 8px 10px;
        font-size: 0.9em;
    }

    .content-section h2 {
        font-size: 1.5em;
    }
}

/* Container for the search bar to manage layout */
.search-container {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 600px;
    padding: 10px 10px 10px 25px;
    background-color: transparent;
    position: relative;
    margin: 0 auto;
}

#search-input-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Styling for the search input field */
/* #searchInput {
    flex-grow: 1;
    padding: 10px 10px 10px 50px;
    border: none;
    border-radius: 15px;
    background-color: #ffffff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: #333333;
    outline: none;
 
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
} */
#searchInput {
    flex: 1;
    padding: 12px 50px 12px 15px; /* Add padding-right to make space for the button */
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
}
/* Placeholder text styling */
#searchInput::placeholder {
    color: #888888;
    opacity: 1;
}

/* Search button styling (contains icon and text, overlaps input) */
.search-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    color: #333333;
    border: none;
    border-radius: 9999px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.3s ease;
    margin-left: -50px;
    position: relative;
}

/* Styling for the icon inside the search button */
.search-button i {
    margin-right: 8px;
    font-size: 18px;
}

/* Container for app buttons */
.button-container {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
}

/* Base styling for all app buttons (Consolidated) */
.app-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #333333;
    color: #ffffff;
    border-radius: 9999px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* Hover effect for the app buttons */
.app-button:hover {
    background-color: #444444;
    border-color: #cccccc;
}

/* Styling for the icons within the buttons */
.app-button i {
    margin-left: 10px;
    font-size: 18px;
}

/* Specific styling for the star icon */
.app-button .fa-star {
    color: #FFD700;
}

/* Fixed Bottom Navigation (Nav Items & Container) */
.fixed-bottom-title img {
    width: 30px;
    height: 24px;
    margin-bottom: 0.25rem;
}

.fixed-bottom-title.active-page i,
.fixed-bottom-title.active-page img {
    color: #AD1D35;
}

.fixed-bottom-nav {
    position: fixed;
    bottom: 0;
    z-index: 1000;
    background-color: #fff;
    padding: 1rem 0.4rem; /* Combined vertical padding */
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: 100%;
    border-top: 1px solid #e5e7eb; /* Combined border properties */
    box-shadow: 0px 1px 3px;
    right: 0px;
    left: 0px;

}

.fixed-bottom-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-width: 0;
    margin: 0 0.2rem;
    color: #9C9C9C;
    padding: 0.2rem;
    border-radius: 0.375rem;
    transition: all 200ms; /* Simplified transition property */
    text-decoration: none;
    font-size: 0.7em;
}

.fixed-bottom-title.active-page,
.fixed-bottom-title:hover {
    color: #AD1D35;
}

/* Icon styling within each nav item */
.fixed-bottom-title i {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}


/* General Styles */
body, html {
    font-family: 'Open Sans';
    margin: 0;
    padding: 0;
    background-color: #ffffff;
    color: #525252;
    overflow-x: hidden;
    width: 100%;
    margin-bottom: 200px;
}

.remove-favorite {
    color: #333;
    background-color: #ffffff;
    padding: 2px 4px;
}

.seal {
    display: flex;
    justify-content: center;
    margin: 20px auto 0; /* Shorthand margin */
    width: 100px;
}

/* Social Icons */
.social-icons {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
    display: flex;
    gap: 5px;
    margin-left: 25px;
}

.social-icons li {
    display: inline-block;
    margin-bottom: 5px;
}

.social-icons a {
    background-color: #fff;
    color: #000;
    font-size: 15px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 25px;
    height: 25px;
    line-height: 40px;
    border-radius: 50%;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

.social-icons a:hover {
    opacity: 0.8;
}

.social-icons .fa-linkedin,
.social-icons .fa-facebook,
.social-icons .fa-twitter,
.social-icons .fa-tiktok {
    font-size: 20px; /* Consolidated font size for all social icons */
}

/* Language Switcher Styles */
.language-switcher-container {
    display: flex;
    border-radius: 10px;
    width: fit-content;
    margin: 20px;
}

.language-button {
padding: 10px 15px;
    display: flex
;
    font-weight: bold;
    font-size: 0.8em;
    border-radius: 0;
    cursor: pointer;
    border: none;
    outline: none;
    background-color: transparent;
    color: white;
    transition: background-color 0.3s 
ease, color 0.3s 
ease;
    align-items: center;
}

/* Initially hide the element */
#content-to-toggle {
    display: none; /* or visibility: hidden; opacity: 0; */
    /* Add other styles like padding, border, etc. */
}

/* Class to make the element visible */
#content-to-toggle.visible {
    display: block; /* or visibility: visible; opacity: 1; */
}

/* Specific border-radius for the end buttons */
.language-button:first-child {
    border-radius: 5px 0 0 5px; /* Shorthand */
}

.language-button:last-child {
    border-radius: 0 5px 5px 0; /* Shorthand */
}

/* Style for the active (selected) button */
.language-button.active {
    background-color: #fff;
    color: #a60000;

}

/* Style for the inactive button (when not active) */
.language-button:not(.active) {
    background-color: #cdcdcd;
    color: #555;
}

/* Hover effects */
.language-button:not(.active):hover {
    background-color: #a60000;
}


/* Search Options (Checkbox Styles) */
.search-options {
    border: 0;
}

.search-options input[type="checkbox"] {
    margin-top: 20px;
    display: inline;
    opacity: 1;
}

.input[type=checkbox] {
    transition: all 0.3s;
    box-sizing: border-box;
    display: none;
}

/* Support Page - Button-Like Link */
.button-like-link {
    display: inline-block;
    padding: 10px 15px;
    background-color: #a6192e;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: background-color 0.3s ease, transform 0.1s ease, box-shadow 0.3s ease;
}

.button-like-link:hover {
    background-color: #a6192e85;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0,0,0,0.15);
}

.button-like-link:active {
    background-color: #a6192e85;
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Support Page - Section Styles */
section {
    min-height: 70vh;
    padding: 40px 20px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin: 20px auto;
    max-width: 900px;
    line-height: 1.6;
}

section:nth-of-type(even) {
    background-color: #ecf0f1;
}

/* Back to Top Button */
#backToTopBtn {
    display: none;
    position: fixed;
    bottom: 100px;
    right: 20px;
    z-index: 99;
    background-color: #000000;
    color: white;
    padding: 12px 18px;
    border-radius: 50%;
    text-align: center;
    font-size: 24px;
    line-height: 1;
    text-decoration: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    opacity: 0.8;
    border: none;
    cursor: pointer;
    font-family: 'Arial', sans-serif;
    transition: all 0.3s ease; /* Simplified transition */
}

#backToTopBtn:hover {
    background-color: #c0392b;
    opacity: 1;
    transform: translateY(-3px);
}

#backToTopBtn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#backToTopBtn::before {
    content: '↑';
    display: block;
    font-size: 24px;
    font-weight: bold;
}

/* Back to Top Target */
#top {
    position: absolute;
    inset: 0 auto auto 0; /* Shorthand for top, left, height, width */
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* Syllabary GRID */
#languageGrid {
    display: grid;
    gap: 5px;
    padding: 10px;
    border-radius: 8px;
    grid-template-columns: repeat(9, minmax(0, 1fr));
}

.outer-box {
    position: relative;
    aspect-ratio: 1 / 1;
    background-color: #2C2829;
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: sans-serif;
    font-weight: bold;
    cursor: pointer;
    padding: 10px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.1s ease-in-out, box-shadow 0.1s ease-in-out;
}

.outer-box:hover {
    transform: translateY(-2px);
    box-shadow: 3px 3px 7px rgba(0, 0, 0, 0.3);
}

.outer-box:active {
    background-color: #cf887f;
    transform: translateY(0);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.big-char {
    margin: 0;
    font-size: clamp(20px, 5vw, 50px);
    color: #fff;
    line-height: 1;
}

.inner-box {
    position: absolute;
    bottom: 0.2em;
    width: 45%;
    height: 25%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2px;
    box-sizing: border-box;
    cursor: pointer;
}

.small-char {
    margin: 0;
    font-size: clamp(8px, 1.5vw, 14px);
    color: #fff;
    white-space: nowrap;
}

.outer-box.empty-cell {
    background-color: transparent;
    box-shadow: none;
    cursor: default;
}

.inner-box.empty-inner-cell {
    display: none;
}

/* Responsive adjustments for overall grid and gaps */
@media (max-width: 768px) {
    #languageGrid {
        gap: 4px;
        padding: 8px;
    }
    .button-like-link {
        width: 90%;
        margin-bottom: 10px;
    }
    #backToTopBtn::before {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    #languageGrid {
        gap: 3px;
        padding: 5px;
    }
}

/* PDF viewer */
.pdf-viewer {
    height: 80vh;
    border: 1px solid #ccc;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    justify-content: center;
}

.fallback {
    text-align: center;
    margin-top: 20px;
    color: #fff;
}

/* Support Box */
.support-container {
    display: flex;
    gap: 20px;
    max-width: 1200px;
    padding: 20px;
}

.support-box {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    flex: 1;
    margin: 10px 0; /* Shorthand margin */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.support-box h2 {
    margin-bottom: 20px;
    font-size: 24px;
    color: #333;
}

.support-box p {
    font-size: 16px;
    color: #666;
}

.support-box a {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #a6192e;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.support-box a:hover {
    background-color: #cf887f;
}



/* FAQ */
.faq-section {
    margin-bottom: 30px;
}
.faq-question {
    font-weight: bold;
    color: #333;
}
.faq-answer {
    margin-left: 20px;
    color: #333;
}

/* Contact form */
.contact-form {
    padding: 20px;
    width: 100%;
    max-width: 500px;
}
.contact-form h2 {
    margin-bottom: 20px;
    font-size: 24px;
    color: #333;
}
.contact-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}
.contact-form textarea {
    resize: vertical;
    height: 100px;
}
.contact-form input[type="submit"] {
    background-color: #2980b9;
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
}
.contact-form input[type="submit"]:hover {
    background-color: #3498db;
}

/* Slide menu */
.header {
    background-color: #0073e6;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.main {
    margin: 60px auto 0; /* Shorthand margin */
    display: block;
    height: 100%;
}
.mainInner {
    display: table;
    height: 100%;
    width: 100%;
    text-align: center;
}
.mainInner div {
    display: table-cell;
    vertical-align: middle;
    font-size: 3em;
    font-weight: bold;
    letter-spacing: 1.25px;
}
#sidebarMenu {
    padding-top: 60px;
    height: 100%;
    top: 0;
    position: fixed;
    left: 0;
    width: 250px;
    transform: translateX(-250px);
    transition: transform 250ms ease-in-out;
    background: linear-gradient(180deg, #C10000 0%, #8D0000 100%);
    z-index: 1001;
}
.sidebarMenuInner {
    margin: 0;
    padding: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
}
.sidebarMenuInner li {
    list-style: none;
    color: #fff;
    text-transform: uppercase;
    font-weight: bold;
    padding: 20px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}
.sidebarMenuInner li span {
    display: block;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.50);
}
.sidebarMenuInner li a {
    color: #fff;
    text-transform: uppercase;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
}
#sidebarMenu::-webkit-scrollbar {
    width: 8px;
}

#sidebarMenu::-webkit-scrollbar-track {
    background: #f1f1f1;
}

#sidebarMenu::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

#sidebarMenu::-webkit-scrollbar-thumb:hover {
    background: #555;
}
input[type="checkbox"]:checked ~ #sidebarMenu {
    transform: translateX(0);
}
/* Re-merged input[type=checkbox] with search-options' input[type=checkbox] */
input[type=checkbox] {
    transition: all 0.3s;
    box-sizing: border-box;
    display: none;
}
.sidebarIconToggle {
    transition: all 0.3s;
    box-sizing: border-box;
    position: fixed;
    z-index: 1002;
    height: 100%;
    width: 100%;
}

/* Consolidated Spinner/Icon styles */
.spinner,
.horizontal,
.diagonal.part-1,
.diagonal.part-2 {
    transition: all 0.3s;
    box-sizing: border-box;
    position: absolute;
    height: 3px;
    background-color: #fff;
    border-radius: 6px;
    box-shadow: 0.5px 0.5px;
}
.spinner, .horizontal {
    position: relative;
    float: left;
    width: 100%;
}

.horizontal {
    margin-top: 3px;
}

.diagonal.part-1,
.diagonal.part-2 {
    position: relative;
    float: left;
    width: 15px;
    background-color: #fff;
}

.diagonal.part-2 {
    margin-top: 3px;
}

input[type=checkbox]:checked ~ .sidebarIconToggle > .horizontal {
    opacity: 0;
}
input[type=checkbox]:checked ~ .sidebarIconToggle > .diagonal.part-1 {
    transform: rotate(135deg);
    margin-top: 8px;
}
input[type=checkbox]:checked ~ .sidebarIconToggle > .diagonal.part-2 {
    transform: rotate(-135deg);
    margin-top: -9px;
}

/* Pagination */
#paginationControls {
    margin-top: 20px;
    text-align: center;
}
#paginationControls button {
    padding: 5px 10px;
    margin: 0 5px;
    cursor: pointer;
}
#paginationControls button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}


.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
}

/* Original CSS - General Elements */
.logo img {
    height: 50px;
    margin: 10px 0 5px 15px; /* Shorthand margin */
}

nav {
    display: flex;
    align-items: center;
    flex-grow: 1;
    justify-content: center;
}

.menu-icon {
    display: none;
    cursor: pointer;
}

.menu-icon svg {
    fill: #fff;
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    background-color: #ffffff;
    border-radius: 20px;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}

.nav-links li {
    margin: 0 15px;
}

.nav-links a {
    color: #333;
    text-decoration: none;
    font-size: 16px;
}

.nav-links a:hover {
    text-decoration: underline;
}

.top-container {
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-bottom-left-radius: 10% 50px;
    background: #A71C20 url(pattern-background-02.svg); /* Shorthand background */
    place-items: center;
}

.container {
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.container-noshad {
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
}

.container-noshad-hidden {
    visibility:hidden
}

h1 {
    text-align: center;
    color: #333;
}

button {
    padding: 10px 20px;
    cursor: pointer;
    background-color: #a6192e;
    color: #fff;
    border: none;
    border-radius: 4px;
    margin-top: 20px;
}

button:hover {
    /* No explicit hover defined in original, keeping it empty */
}

#results {
    margin-top: 10px;
}

.result-item {
    border-bottom: 1px solid #ddd;
    padding: 10px 0;
}

/* Sidebar Styling Consolidation - Favorites & History */
.Favorites-sidebar,
.history-sidebar {
    position: fixed;
    top: 0;
    right: -300px; /* Adjusted right to match common usage */
    height: 100%;
    background-color: #fff;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    padding: 40px 20px 20px; /* Shorthand: padding-top: 40px, others 20px */
    z-index: 1200;
}

.history-sidebar {
    right: -400px; /* Original width/position for history */
}

.Favorites-sidebar h2,
.history-sidebar h2 {
    margin-top: 10px; /* Corrected to include unit */
    color: #333;
}

#FavoritesList,
#historyList {
    list-style: none;
    padding: 0;
   /*  font-family: "Bely";; */

}

#FavoritesList li,
#historyList li {
    margin-bottom: 10px;
}

#FavoritesList li a,
#historyList li a {
    color: #333;
    text-decoration: none;
    font-size: 16px;
}

#FavoritesList li a:hover,
#historyList li a:hover {
    text-decoration: underline;
}

#closeFavoritesButton,
#closeHistoryButton {
    position: absolute;
    top: 15px;
    right: 10px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
}

#closeFavoritesButton:hover {
    color: #005bb5;
}

#closeHistoryButton:hover {
    color: #8a8573;
}

/* Button Consolidation - Opensearch, Clear Favorites, Clear History, Pagination */
.opensearch,
.clear-favorites-button,
.clear-history-button,
.pagination-button,
#clearHistoryButton {
    padding: 0.5rem 1rem;
    border: 1px solid #ccc;
    border-radius: 999px;
    background-color: #f1f1f1;
    color: #000;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.2s, color 0.2s;
}

.opensearch {
    margin-top: unset;
}

#clearFavoritesButton:hover,
#clearHistoryButton:hover {
    background: #FFEEF0;
    border-color: #FFD5DA;
    color: var(--brand);
}

/* Responsive Design - Media Queries */
@media (max-width: 768px) {
    .menu-icon {
        display: block;
        text-align: right;
    }

    .nav-links {
        position: fixed;
        top: 60px;
        right: -200%;
        height: 100vh;
        width: 100%;
        background-color: #2F6695;
        flex-direction: column;
        align-items: center;
        transition: right 0.3s ease;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        margin: 20px 0;
    }

    .action-buttons {
        margin-top: 10px;
    }

    .action-buttons button {
        margin-right: 10px;
        padding: 5px 10px;
        background-color: rgba(255, 0, 0, 0.3);
        color: #fff;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        flex-wrap: wrap;
    	justify-content: flex-end;

    }

    .action-buttons button:hover {
        background-color: rgba(255, 0, 0, 0.3);
    }

    /* Footer/Main Content Area - Combined Curve Styles */
    .site-main,
    .site-footer {
        color: #ffffff;
        padding: 60px 0 40px;
        margin-top: 40px;
        width: 100%;
        position: relative;
        /* Consolidated curve design */
        border-radius: 80% 80% 0 0 / 80px 80px 0 0; /* Horizontal / Vertical */
        overflow: hidden;
    }

    .site-footer .container {
        max-width: 1200px;
        margin: 0 auto;
        display: block;
    }

    .site-footer .row {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: flex-start;
        padding: 0 15px;
    }

    .site-footer .col-xs-6, .site-footer .col-md-3, .site-footer .col-md-8, .site-footer .col-sm-6, .site-footer .col-xs-12 {
        flex: 1 1 auto;
        padding: 15px;
        box-sizing: border-box;
    }

    .site-footer ul.nav-links {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .site-footer ul.nav-links li a {
        color: #ffffff;
        text-decoration: none;
        padding: 5px 0;
        display: block;
        transition: color 0.3s ease;
    }

    .site-footer ul.nav-links li a:hover {
        color: #cbd5e0;
    }

    .site-footer .copyright-text {
        margin-top: 20px;
        font-size: 0.9rem;
        text-align: center;
    }

    .site-footer .copyright-text a {
        color: #ffffff;
        text-decoration: none;
        transition: color 0.3s ease;
    }

    .site-footer .copyright-text a:hover {
        color: #cbd5e0;
    }

    .site-footer .social-icons {
        list-style: none;
        padding: 0;
        margin: 20px 0 0; /* Shorthand margin */
        display: flex;
        justify-content: center;
        gap: 15px;
    }

    .site-footer .social-icons li a {
        color: #ffffff;
        font-size: 1.5rem;
        transition: color 0.3s ease;
    }

    .site-footer .social-icons li a:hover {
        color: #cbd5e0;
    }

    /* Responsive adjustments */
    @media (max-width: 768px) {
        .grid-cell {
            font-size: 1.2rem;
            padding: 0.8rem;
        }
        .grid-container {
            padding: 15px;
            gap: 6px;
        }
        .site-footer .row {
            flex-direction: column;
            align-items: center;
        }
        .site-footer .col-xs-6, .site-footer .col-md-3, .site-footer .col-md-8, .site-footer .col-sm-6, .site-footer .col-xs-12 {
            text-align: center;
        }
        .site-footer ul.nav-links {
            margin-bottom: 20px;
        }
    }

    @media (max-width: 480px) {
        .grid-cell {
            font-size: 1rem;
            padding: 0.6rem;
        }
        .grid-container {
            padding: 10px;
            gap: 4px;
        }
        .site-footer {
            padding: 40px 0 20px;
        }
    }
}

/* Dropdown */
.dropdown {
    float: left;
    overflow: hidden;
}

.dropdown .dropbtn {
    font-size: 16px;
    border: none;
    outline: none;
    color: white;
    padding: 0;
    background-color: inherit;
    font-family: inherit;
    margin-left: 10px;
}

.navbar a:hover, .dropdown:hover .dropbtn {
    background-color: red;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
}

.dropdown-content a {
    float: none;
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
}

.dropdown-content a:hover {
    background-color: #ddd;
}

.dropdown:hover .dropdown-content {
    display: block;
}
