/* animation styles */
@keyframes panel {
    0% {
        opacity: 0;
        transform: translate3d(0, -3000px, 0);
    }
    60% {
        opacity: 1;
        transform: translate3d(0, 25px, 0);
    }
    75% {
        transform: translate3d(0, -10px, 0);
    }
    90% {
        transform: translate3d(0, 5px, 0);
    }
    100% {
        transform: none;
    }
}

@-webkit-keyframes panel {
    0% {
        opacity: 0;
        transform: translate3d(0, -3000px, 0);
    }
    60% {
        opacity: 1;
        transform: translate3d(0, 25px, 0);
    }
    75% {
        transform: translate3d(0, -10px, 0);
    }
    90% {
        transform: translate3d(0, 5px, 0);
    }
    100% {
        transform: none;
    }
}

@keyframes results {
    0% {
        max-height: 0px;
    }
    100% {
        max-height: 400px;
    }
}

@-webkit-keyframes results {
    0% {
        max-height: 0px;
    }
    100% {
        max-height: 400px;
    }
}

/* Subtle background animation */
@keyframes backgroundPan {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@-webkit-keyframes backgroundPan {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}


/* default styles */
*, *:before, *:after {
    position: relative;
    font: inherit;
    line-height: inherit;
    color: inherit;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
}

*:focus {
    outline: 0;
}

html, body, div, h1, p {
    display: block;
}

a, span, i, input, button {
    display: inline-block;
}

html, body {
    height: 100%;
}

body {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 24px;
    color: #f8f9fa; /* Off-white for general text on dark background */
    word-break: break-word;
    /* Updated background with a softer green gradient */
    background: linear-gradient(270deg, #008f7f, #006b5d, #00473e);
    background-size: 400% 400%;
    animation: backgroundPan 15s ease infinite;
    -webkit-animation: backgroundPan 15s ease infinite;
    padding: 20px;
    min-height: 100vh;
    padding-top: 60px; /* Crucial for fixed header */
}

/* Fix for potential overflow issue on main div */
/* Removed `overflow: hidden;` from general `div` rule */
div {
    width: initial;
    /* overflow: hidden;  <-- REMOVED THIS LINE */
}
/* Re-apply overflow hidden ONLY where needed, e.g., for specific content sections */


h1 {
    font-weight: 500;
    text-transform: capitalize;
    font-size: 2.0em;
    line-height: 1.3em;
    color: #212529; /* Dark charcoal for main heading */
    text-shadow: 1px 1px 3px rgba(0,0,0,0.08); /* Slightly softer shadow */
}

h2 {
    font-weight: 300;
    text-transform: capitalize;
    font-size: 2em;
    line-height: 1.2em;
    padding: 1%;
    color: #343a40; /* Slightly lighter charcoal for subheadings */
    border-bottom: 2px solid #e9ecef; /* Lighter separator line */
    padding-bottom: 10px;
    margin-bottom: 20px;
    text-shadow: 0.5px 0.5px 2px rgba(0,0,0,0.03);
}

p:first-letter {
    text-transform: uppercase;
}

a {
    text-decoration: none;
    color: #007bff; /* Vibrant blue for links */
    transition: color 0.3s ease;
}

a:hover {
    text-decoration: underline;
    color: #0056b3; /* Darker blue on hover */
}

input, button {
    width: 100%;
    padding: 14px 20px;
    font-weight: bold;
    border: none;
    border-radius: 4px;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    transition: background ease-in 0.3s, opacity ease-in 0.3s, transform 0.2s ease;
    -webkit-transition: background ease-in 0.3s, opacity ease-in 0.3s, transform 0.2s ease;
    -moz-transition: background ease-in 0.3s, opacity ease-in 0.3s, transform 0.2s ease;
    color: #ffffff; /* White text for input/button */
}

input[disabled], button[disabled] {
    opacity: 0.4;
    pointer-events: none;
}

input {
    text-align: left;
    background: rgba(255, 255, 255, 0.15); /* Slightly more opaque white for input */
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}

input:focus {
    background: rgba(255, 255, 255, 0.25); /* More opaque white on focus */
    box-shadow: inset 0 1px 5px rgba(0,0,0,0.3);
}

input::-webkit-input-placeholder {
    color: rgba(255, 255, 255, 0.7); /* More opaque placeholder */
    transition: ease-in 0.3s;
    -webkit-transition: ease-in 0.3s;
    -moz-transition: ease-in 0.3s;
}

input::-moz-placeholder {
    color: rgba(255, 255, 255, 0.7);
    transition: ease-in 0.3s;
    -webkit-transition: ease-in 0.3s;
    -moz-transition: ease-in 0.3s;
}

input:focus::-webkit-input-placeholder {
    text-indent: -100%;
}

input:focus::-moz-input-placeholder {
    text-indent: -100%;
}

button {
    cursor: pointer;
    font-weight: bold;
    text-align: center;
    text-transform: capitalize;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    background: #28a745; /* Bootstrap-like green for main button */
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

button:hover {
    background: #218838; /* Darker green on hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}


/* reuseable classes */
.row {
    padding: 0;
    margin: -1%;
}

.row,
.row:after {
    clear: both;
    zoom: 1;
}

.row:before,
.row:after {
    content: '';
    display: table;
}

.row > div {
    float: left;
    padding: 1%;
}

.row > .col1 {
    width: 8.33%;
}

.row > .col2 {
    width: 16.66666%;
}

.row > .col3 {
    width: 24.99%;
}

.row > .col4 {
    width: 33.33%;
}

.row > .col5 {
    width: 33.33%;
}

.row > .col6 {
    width: 50%;
}

.row > .col7 {
    width: 58.333%;
}

.row > .col8 {
    width: 66.66666664%;
}

.row > .col9 {
    width: 74.999997%;
}

.row > .col10 {
    width: 83.33%;
}

.row > .col11 {
    width: 91.666663%;
}

.row > .col12 {
    width: 100%;
}


/* description */
#desc {
    display: table;
    width: 80%;
    max-width: 1100px;
    height: 500px;
    margin: 0 auto;
    padding: 50px 0;
}


/* main styles */
#main {
    display: table;
    width: 80%;
    max-width: 1100px;
    height: 100%;
    margin: 0 auto;
    padding: 50px 0;
}

#main > div {
    display: table-cell;
    vertical-align: middle;
    animation: panel 2s both;
    -webkit-animation: panel 2s both;
}

#main > div:not(.active) {
    display: none;
}

#main > div > div > div > h1,
#main > div > div > div > p {
    text-align: center;
}

#main > div > div > div > h1 > i,
#main > div > div > div > p > i {
    font-weight: bold;
    color: #4CAF50;
}

#main > div > div > div > p {
    padding: 15px 0;
    font-size: 1.1em;
    line-height: 1.8em;
}

#main > #se-results-panel > div > .row {
    max-height: 500px;
    overflow-y: auto;
    animation: results 1s both 2s;
    -webkit-animation: results 1s both 2s;
    scrollbar-width: thin;
    scrollbar-color: #dee2e6 transparent; /* Lighter scrollbar thumb for Firefox */
}

#main > #se-results-panel > div > .row::-webkit-scrollbar-track,
#main > #se-results-panel > div > .row::-webkit-scrollbar {
    background: none;
    width: 10px;
}

#main > #se-results-panel > div > .row::-webkit-scrollbar-thumb {
    background: #dee2e6; /* Light grey for scrollbar thumb */
    border-radius: 4px;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
}

#main > #se-results-panel > div > .row > div > a {
    display: block;
    color: #212529; /* Dark text for results */
    padding: 15px 10px;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.9); /* Opaque white background for results */
    opacity: 0.95; /* Increased opacity slightly */
    border-radius: 4px;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    transition: background ease-in 0.3s, opacity 0.3s ease, transform 0.2s ease;
    -webkit-transition: background ease-in 0.3s, opacity 0.3s ease, transform 0.2s ease;
    -moz-transition: background ease-in 0.3s, opacity 0.3s ease, transform 0.2s ease;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border: 1px solid rgba(255, 255, 255, 0.8); /* Stronger white border */
}

#main > #se-results-panel > div > .row > div > a:hover {
    background: #f8f9fa; /* Slightly brighter white on hover */
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

#main > #se-results-panel > div > .row > div > a:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

#main > #se-results-panel > div > .row > div > a:after {
    content: attr(data-value);
    display: block;
    font-weight: bold;
    color: #6c757d; /* Muted grey for status text */
    text-decoration: none;
    margin-top: 5px;
    font-size: 0.9em;
}

#main > #se-results-panel > div > .row > div > a[data-value="exists"] {
    text-decoration: line-through;
    opacity: 0.8; /* Slightly less opaque for 'exists' */
    background: rgba(220, 53, 69, 0.9); /* Strong red for exists */
    color: #fff; /* White text on red background */
    border-color: rgba(220, 53, 69, 1);
}

#main > #se-results-panel > div > .row > div > a[data-value="exists"]:after {
    color: #f8d7da; /* Light red for 'exists' status text */
    text-decoration: none;
}

#main > #se-results-panel > div > .row > div > a[data-value="Available!!!"] {
    text-decoration: none;
    opacity: 1;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    color: #ffffff;
    background: rgba(40, 167, 69, 0.9); /* Strong green for available */
    border-color: rgba(40, 167, 69, 1);
}

#main > #se-results-panel > div > .row > div > a[data-value="Available!!!"]:after {
    color: #d4edda; /* Lighter green for 'Available!!!' status text */
}

#main > #se-results-panel > div > .col3:nth-last-of-type(2) > button {
    background: #007bff; /* Primary blue for main action */
}

#main > #se-results-panel > div > .col3:nth-last-of-type(2) > button:hover {
    background: #0056b3; /* Darker blue on hover */
}

#main > #se-results-panel > div > .col3:nth-last-of-type(1) > button {
    background: #6c757d; /* Muted grey for secondary action */
}

#main > #se-results-panel > div > .col3:nth-last-of-type(1) > button:hover {
    background: #5a6268; /* Darker grey on hover */
}

/* Specific styles for sections, and footer (header styles moved to new section) */
section {
    background-color: rgba(255, 255, 255, 0.98); /* Near opaque white sections */
    padding: 30px;
    margin-bottom: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    color: #343a40; /* Dark text for sections */
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    border: 1px solid rgba(222, 226, 230, 0.7); /* Light grey border */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

section:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

p {
    margin-bottom: 15px;
    color: #495057; /* Dark grey for general paragraph text */
    font-size: 1.05em;
}

ul {
    list-style: none;
    padding: 0;
}

ul li {
    background-color: rgba(248, 249, 250, 0.9); /* Very light grey for list item background */
    margin-bottom: 8px;
    padding: 12px 15px;
    border-radius: 6px;
    display: flex;
    align-items: flex-start;
    color: #343a40; /* Dark text for list items */
    border-left: 5px solid #28a745; /* Consistent green accent border */
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

ul li:hover {
    background-color: #e9ecef; /* Slightly darker light grey on hover */
    border-color: #218838;
}

ul li strong {
    color: #212529; /* Stronger dark color for bold text in lists */
}

/* Custom bullet point for unordered lists */
ul li::before {
    content: "✓";
    color: #28a745;
    font-weight: bold;
    display: inline-block;
    width: 1.2em;
    margin-right: 8px;
    font-size: 1.2em;
    line-height: 1.2;
}

ol {
    padding-left: 25px;
}

ol li {
    margin-bottom: 10px;
    color: #495057; /* Dark grey for ordered list items */
    list-style-type: decimal-leading-zero;
    padding-left: 5px;
}

footer {
    text-align: center;
    background-color: rgba(255, 255, 255, 0.98); /* Near opaque white header */
    padding: 20px;
    margin-top: 40px;
    font-size: 0.9em;
    color: #f8f9fa; /* Off-white for footer text */
    border-top: 1px solid rgba(248, 249, 250, 0.2); /* Subtle light border */
    text-shadow: 0.5px 0.5px 1px rgba(0,0,0,0.3);
}


/* New/Refined Header Styles - This section REPLACES all previous header-related CSS */

.header {
    background-color: rgba(255, 255, 255, 0.98); /* Near opaque white header */
    width: 100%;
    position: fixed; /* Keep header at top */
    top: 0;
    left: 0;
    z-index: 1000; /* Ensure it's above other content */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.container {
    max-width: 1200px; /* Standard container width */
    margin: 0 auto;
    padding: 0 20px; /* Horizontal padding for smaller screens */
}

.navbar {
    display: flex;
    justify-content: space-between; /* Logo left, menu right */
    align-items: center; /* Vertically center items */
    padding: 15px 0; /* Vertical padding inside the navbar */
}

.logo {
    font-size: 1.8em; /* Slightly larger logo */
    color: #212529;
    text-decoration: none;
    font-weight: bold;
    line-height: 1; /* Prevents extra spacing */
}

.logo-dot {
    color: #28a745; /* Green for the .org part */
}

.main-menu {
    list-style: none;
    display: flex; /* Horizontal menu items */
    align-items: center;
    margin: 0;
    padding: 0;
    /* Crucial: remove overflow hidden from here if it was present */
    overflow: visible; /* Ensure dropdowns are not cut off */
}

.main-menu li {
    margin-left: 25px; /* Spacing between main menu items */
    background-color: transparent; /* Override default li background */
    border-left: none; /* Remove default li border */
    padding: 0; /* Remove default li padding */
}

.main-menu li a {
    text-decoration: none;
    color: #495057; /* Dark grey for menu links */
    font-weight: 500;
    font-size: 1.1em;
    padding: 8px 12px; /* Clickable area for menu items */
    border-radius: 4px;
    transition: color 0.3s ease, background-color 0.3s ease;
}

.main-menu li a:hover {
    color: #007bff; /* Vibrant blue on hover */
    background-color: rgba(0, 123, 255, 0.05); /* Subtle background on hover */
    text-decoration: none; /* No underline on hover for menu items */
}

/* Dropdown menu styles */
.dropdown {
    position: relative; /* Container for dropdown */
    /* Ensure the parent of dropdown menu does not have overflow: hidden */
    /* If the .navbar or .main-menu had overflow: hidden, it would clip the dropdown */
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 5px); /* Position below the parent item with a small gap */
    left: 0;
    background-color: #fff;
    border: 1px solid #e9ecef;
    list-style: none;
    padding: 5px 0;
    margin: 0;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    display: none; /* Hidden by default */
    min-width: 160px; /* Minimum width for dropdown */
    z-index: 1001; /* Ensure dropdown is above other content */
    /* Ensure no overflow hidden on this menu itself */
    overflow: visible;
}

.dropdown:hover .dropdown-menu {
    display: block; /* Show on hover */
}

.dropdown-menu li {
    margin: 0; /* Reset margin for dropdown items */
    padding: 0; /* Reset padding for dropdown items */
}

.dropdown-menu li a {
    color: #343a40; /* Dark text for dropdown links */
    padding: 10px 20px;
    display: block; /* Make links full width of list item */
    text-align: left;
    white-space: nowrap; /* Prevent text wrapping */
}

.dropdown-menu li a:hover {
    background-color: #f8f9fa; /* Lighter background on hover */
    color: #007bff;
}

.arrow-down {
    display: inline-block;
    margin-left: 5px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #495057; /* A small down arrow */
    vertical-align: middle;
    transition: transform 0.3s ease;
}

.arrow-down.rotate {
    transform: rotate(180deg); /* Rotate arrow when active/open */
}

/* Hamburger menu for mobile */
.hamburger {
    display: none; /* Hidden on desktop */
    flex-direction: column;
    cursor: pointer;
    border: none;
    background-color: transparent;
    padding: 10px;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 4px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.hamburger.active .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}


/* Responsive styles */
@media (max-width: 768px) {
    body {
        padding-top: 60px; /* Ensure content clears fixed header on mobile too */
        padding-left: 0;
        padding-right: 0;
    }

    .navbar {
        padding: 10px 20px; /* Adjust padding for mobile navbar */
    }

    .main-menu {
        display: none; /* Hide main menu by default on mobile */
        flex-direction: column; /* Stack menu items vertically */
        position: absolute;
        top: 60px; /* Position below fixed header */
        left: 0;
        background-color: rgba(255, 255, 255, 0.98);
        width: 100%;
        text-align: center;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        padding: 15px 0;
        z-index: 999; /* Below header, above main content */
        max-height: calc(100vh - 60px); /* Limit height for scrollable menu if many items */
        overflow-y: auto; /* Enable scrolling for long menus */
        /* Ensure no overflow hidden on this main-menu itself */
        overflow-x: hidden; /* Prevent horizontal scroll if something pushes it */
    }

    .main-menu.active {
        display: flex; /* Show menu when active class is added by JS */
    }

    .main-menu li {
        margin: 10px 0; /* Vertical spacing for stacked menu items */
        width: 100%;
    }

    .main-menu li a {
        display: block; /* Make links fill the width */
        padding: 12px 20px;
        font-size: 1.2em; /* Slightly larger text for mobile readability */
    }

    /* Dropdown on mobile should not be hidden on hover, but toggled by JS */
    .dropdown-menu {
        position: static; /* Remove absolute positioning on mobile */
        border: none;
        box-shadow: none;
        width: 100%;
        background-color: rgba(248, 249, 250, 0.9); /* Slightly different background for sub-menu */
        padding: 0; /* Remove padding as list items handle it */
        display: none; /* Controlled by JS click */
        /* Ensure no overflow hidden on this menu itself */
        overflow: visible;
    }

    .dropdown-menu.active {
        display: block; /* Show dropdown when active */
    }

    .dropdown-menu li a {
        padding: 10px 30px; /* Indent sub-menu items */
        font-size: 1.1em;
    }

    .hamburger {
        display: flex; /* Show hamburger icon on mobile */
    }

    /* Adjust main content padding on mobile */
    #main {
        width: 95%; /* Adjust width for better mobile layout */
        padding: 20px 0; /* Adjust padding */
    }

    /* General header rule was overriding specific .header */
    /* Remove redundant general 'header' rule if it's not needed for other elements */
    /* If this rule was present from previous attempts, it might still cause issues. */
    /* I've removed it from here to ensure the .header rules above take precedence. */
    /* header { ... } should not be present anymore if only .header is used */
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.5em; /* Smaller logo on very small screens */
    }
    h1 {
        font-size: 1.8em;
    }
    h2 {
        font-size: 1.3em;
    }
    section {
        padding: 15px;
        margin-bottom: 15px;
    }
    ul li {
        border-left-width: 3px;
    }
}

/* Original row/col styles - keep these as they are for grid layout */
.row {
    padding: 0;
    margin: -1%;
}

.row,
.row:after {
    clear: both;
    zoom: 1;
}

.row:before,
.row:after {
    content: '';
    display: table;
}

.row > div {
    float: left;
    padding: 1%;
}

.row > .col1 { width: 8.33%; }
.row > .col2 { width: 16.66666%; }
.row > .col3 { width: 24.99%; }
.row > .col4 { width: 33.33%; }
.row > .col5 { width: 33.33%; }
.row > .col6 { width: 50%; }
.row > .col7 { width: 58.333%; }
.row > .col8 { width: 66.66666664%; }
.row > .col9 { width: 74.999997%; }
.row > .col10 { width: 83.33%; }
.row > .col11 { width: 91.666663%; }
.row > .col12 { width: 100%; }